mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Merge pull request #856 from jbj/ir-getInstructionOperandDefinition
C++: Speed up `getInstructionOperandDefinition`
This commit is contained in:
@@ -56,6 +56,11 @@ class FunctionIR extends TFunctionIR {
|
||||
result.getFunctionIR() = this
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
final UnmodeledUseInstruction getUnmodeledUseInstruction() {
|
||||
result.getFunctionIR() = this
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the single return instruction for this function.
|
||||
*/
|
||||
|
||||
@@ -192,10 +192,11 @@ cached private module Cached {
|
||||
instruction.getTag() = ChiTag(getOldInstruction(result)) and
|
||||
tag instanceof ChiPartialOperandTag
|
||||
or
|
||||
instruction instanceof UnmodeledUseInstruction and
|
||||
tag instanceof UnmodeledUseOperandTag and
|
||||
result instanceof UnmodeledDefinitionInstruction and
|
||||
instruction.getFunction() = result.getFunction()
|
||||
exists(FunctionIR f |
|
||||
tag instanceof UnmodeledUseOperandTag and
|
||||
result = f.getUnmodeledDefinitionInstruction() and
|
||||
instruction = f.getUnmodeledUseInstruction()
|
||||
)
|
||||
or
|
||||
tag instanceof ChiTotalOperandTag and
|
||||
result = getChiInstructionTotalOperand(instruction)
|
||||
|
||||
@@ -56,6 +56,11 @@ class FunctionIR extends TFunctionIR {
|
||||
result.getFunctionIR() = this
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
final UnmodeledUseInstruction getUnmodeledUseInstruction() {
|
||||
result.getFunctionIR() = this
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the single return instruction for this function.
|
||||
*/
|
||||
|
||||
@@ -56,6 +56,11 @@ class FunctionIR extends TFunctionIR {
|
||||
result.getFunctionIR() = this
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
final UnmodeledUseInstruction getUnmodeledUseInstruction() {
|
||||
result.getFunctionIR() = this
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the single return instruction for this function.
|
||||
*/
|
||||
|
||||
@@ -192,10 +192,11 @@ cached private module Cached {
|
||||
instruction.getTag() = ChiTag(getOldInstruction(result)) and
|
||||
tag instanceof ChiPartialOperandTag
|
||||
or
|
||||
instruction instanceof UnmodeledUseInstruction and
|
||||
tag instanceof UnmodeledUseOperandTag and
|
||||
result instanceof UnmodeledDefinitionInstruction and
|
||||
instruction.getFunction() = result.getFunction()
|
||||
exists(FunctionIR f |
|
||||
tag instanceof UnmodeledUseOperandTag and
|
||||
result = f.getUnmodeledDefinitionInstruction() and
|
||||
instruction = f.getUnmodeledUseInstruction()
|
||||
)
|
||||
or
|
||||
tag instanceof ChiTotalOperandTag and
|
||||
result = getChiInstructionTotalOperand(instruction)
|
||||
|
||||
Reference in New Issue
Block a user