mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Remove CP in getOperandMemoryAccess
The overrides of `Instruction.getOperandMemoryAccess` did not relate `this` to any of its other parameters, which made it attempt to compute the Cartesian product of `Instruction` and `TPhiOperand`. This happened only during computation of aliased SSA. Perhaps the optimizer was able to eliminate the CP for the non-aliased SSA computation. With this change, I'm able to compute aliased SSA for medium-sized snapshots.
This commit is contained in:
committed by
Jonas Jensen
parent
1bcae97447
commit
e0c073360b
@@ -602,7 +602,7 @@ class ReturnValueInstruction extends ReturnInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof ReturnValueOperand and
|
||||
exists(this.getOperand(tag.(ReturnValueOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
}
|
||||
@@ -629,7 +629,7 @@ class LoadInstruction extends CopyInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof CopySourceOperand and
|
||||
exists(this.getOperand(tag.(CopySourceOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
|
||||
@@ -1015,7 +1015,7 @@ class ThrowValueInstruction extends ThrowInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof ExceptionOperand and
|
||||
exists(this.getOperand(tag.(ExceptionOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
|
||||
@@ -1114,7 +1114,7 @@ class UnmodeledUseInstruction extends Instruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof UnmodeledUseOperand and
|
||||
exists(this.getOperand(tag.(UnmodeledUseOperand))) and
|
||||
result instanceof UnmodeledMemoryAccess
|
||||
}
|
||||
}
|
||||
@@ -1125,7 +1125,7 @@ class PhiInstruction extends Instruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof PhiOperand and
|
||||
exists(this.getOperand(tag.(PhiOperand))) and
|
||||
result instanceof PhiMemoryAccess
|
||||
}
|
||||
|
||||
|
||||
@@ -602,7 +602,7 @@ class ReturnValueInstruction extends ReturnInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof ReturnValueOperand and
|
||||
exists(this.getOperand(tag.(ReturnValueOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
}
|
||||
@@ -629,7 +629,7 @@ class LoadInstruction extends CopyInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof CopySourceOperand and
|
||||
exists(this.getOperand(tag.(CopySourceOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
|
||||
@@ -1015,7 +1015,7 @@ class ThrowValueInstruction extends ThrowInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof ExceptionOperand and
|
||||
exists(this.getOperand(tag.(ExceptionOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
|
||||
@@ -1114,7 +1114,7 @@ class UnmodeledUseInstruction extends Instruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof UnmodeledUseOperand and
|
||||
exists(this.getOperand(tag.(UnmodeledUseOperand))) and
|
||||
result instanceof UnmodeledMemoryAccess
|
||||
}
|
||||
}
|
||||
@@ -1125,7 +1125,7 @@ class PhiInstruction extends Instruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof PhiOperand and
|
||||
exists(this.getOperand(tag.(PhiOperand))) and
|
||||
result instanceof PhiMemoryAccess
|
||||
}
|
||||
|
||||
|
||||
@@ -602,7 +602,7 @@ class ReturnValueInstruction extends ReturnInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof ReturnValueOperand and
|
||||
exists(this.getOperand(tag.(ReturnValueOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
}
|
||||
@@ -629,7 +629,7 @@ class LoadInstruction extends CopyInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof CopySourceOperand and
|
||||
exists(this.getOperand(tag.(CopySourceOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
|
||||
@@ -1015,7 +1015,7 @@ class ThrowValueInstruction extends ThrowInstruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof ExceptionOperand and
|
||||
exists(this.getOperand(tag.(ExceptionOperand))) and
|
||||
result instanceof IndirectMemoryAccess
|
||||
}
|
||||
|
||||
@@ -1114,7 +1114,7 @@ class UnmodeledUseInstruction extends Instruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof UnmodeledUseOperand and
|
||||
exists(this.getOperand(tag.(UnmodeledUseOperand))) and
|
||||
result instanceof UnmodeledMemoryAccess
|
||||
}
|
||||
}
|
||||
@@ -1125,7 +1125,7 @@ class PhiInstruction extends Instruction {
|
||||
}
|
||||
|
||||
override final MemoryAccessKind getOperandMemoryAccess(OperandTag tag) {
|
||||
tag instanceof PhiOperand and
|
||||
exists(this.getOperand(tag.(PhiOperand))) and
|
||||
result instanceof PhiMemoryAccess
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user