@@ -22,14 +22,6 @@ InstructionTag getInstructionTag(Instruction instruction) {
22
22
instruction = TRawInstruction ( _, result )
23
23
}
24
24
25
- pragma [ noinline]
26
- private predicate instructionOrigin (
27
- Instruction instruction , TranslatedElement element , InstructionTag tag
28
- ) {
29
- element = getInstructionTranslatedElement ( instruction ) and
30
- tag = getInstructionTag ( instruction )
31
- }
32
-
33
25
/**
34
26
* Provides the portion of the parameterized IR interface that is used to construct the initial
35
27
* "raw" stage of the IR. The other stages of the IR do not expose these predicates.
@@ -79,8 +71,7 @@ module Raw {
79
71
cached
80
72
TIRVariable getInstructionVariable ( Instruction instruction ) {
81
73
exists ( TranslatedElement element , InstructionTag tag |
82
- element = getInstructionTranslatedElement ( instruction ) and
83
- tag = getInstructionTag ( instruction ) and
74
+ instruction = TRawInstruction ( element , tag ) and
84
75
(
85
76
result = element .getInstructionVariable ( tag ) or
86
77
result .( IRStringLiteral ) .getAST ( ) = element .getInstructionStringLiteral ( tag )
@@ -91,7 +82,7 @@ module Raw {
91
82
cached
92
83
Field getInstructionField ( Instruction instruction ) {
93
84
exists ( TranslatedElement element , InstructionTag tag |
94
- instructionOrigin ( instruction , element , tag ) and
85
+ instruction = TRawInstruction ( element , tag ) and
95
86
result = element .getInstructionField ( tag )
96
87
)
97
88
}
@@ -113,7 +104,7 @@ module Raw {
113
104
cached
114
105
int getInstructionIndex ( Instruction instruction ) {
115
106
exists ( TranslatedElement element , InstructionTag tag |
116
- instructionOrigin ( instruction , element , tag ) and
107
+ instruction = TRawInstruction ( element , tag ) and
117
108
result = element .getInstructionIndex ( tag )
118
109
)
119
110
}
@@ -141,7 +132,7 @@ module Raw {
141
132
cached
142
133
int getInstructionElementSize ( Instruction instruction ) {
143
134
exists ( TranslatedElement element , InstructionTag tag |
144
- instructionOrigin ( instruction , element , tag ) and
135
+ instruction = TRawInstruction ( element , tag ) and
145
136
result = element .getInstructionElementSize ( tag )
146
137
)
147
138
}
@@ -355,14 +346,14 @@ Locatable getInstructionAST(TStageInstruction instr) {
355
346
356
347
CppType getInstructionResultType ( TStageInstruction instr ) {
357
348
exists ( TranslatedElement element , InstructionTag tag |
358
- instructionOrigin ( instr , element , tag ) and
349
+ instr = TRawInstruction ( element , tag ) and
359
350
element .hasInstruction ( _, tag , result )
360
351
)
361
352
}
362
353
363
354
Opcode getInstructionOpcode ( TStageInstruction instr ) {
364
355
exists ( TranslatedElement element , InstructionTag tag |
365
- instructionOrigin ( instr , element , tag ) and
356
+ instr = TRawInstruction ( element , tag ) and
366
357
element .hasInstruction ( result , tag , _)
367
358
)
368
359
}
@@ -373,7 +364,7 @@ IRFunctionBase getInstructionEnclosingIRFunction(TStageInstruction instr) {
373
364
374
365
Instruction getPrimaryInstructionForSideEffect ( SideEffectInstruction instruction ) {
375
366
exists ( TranslatedElement element , InstructionTag tag |
376
- instructionOrigin ( instruction , element , tag ) and
367
+ instruction = TRawInstruction ( element , tag ) and
377
368
result = element .getPrimaryInstructionForSideEffect ( tag )
378
369
)
379
370
}
0 commit comments