File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal
csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,18 @@ private module Cached {
7373 or
7474 instruction .getOpcode ( ) instanceof Opcode:: InitializeNonLocal
7575 or
76+ // Chi instructions track virtual variables, and therefore a chi instruction is
77+ // conflated if it's associated with the aliased virtual variable.
7678 exists ( OldInstruction oldInstruction | instruction = Chi ( oldInstruction ) |
7779 Alias:: getResultMemoryLocation ( oldInstruction ) .getVirtualVariable ( ) instanceof
7880 Alias:: AliasedVirtualVariable
7981 )
8082 or
83+ // Phi instructions track locations, and therefore a phi instruction is
84+ // conflated if it's associated with a conflated location.
8185 exists ( Alias:: MemoryLocation location |
8286 instruction = Phi ( _, location ) and
83- location .getVirtualVariable ( ) instanceof Alias :: AliasedVirtualVariable
87+ not exists ( location .getAllocation ( ) )
8488 )
8589 }
8690
Original file line number Diff line number Diff line change @@ -73,14 +73,18 @@ private module Cached {
7373 or
7474 instruction .getOpcode ( ) instanceof Opcode:: InitializeNonLocal
7575 or
76+ // Chi instructions track virtual variables, and therefore a chi instruction is
77+ // conflated if it's associated with the aliased virtual variable.
7678 exists ( OldInstruction oldInstruction | instruction = Chi ( oldInstruction ) |
7779 Alias:: getResultMemoryLocation ( oldInstruction ) .getVirtualVariable ( ) instanceof
7880 Alias:: AliasedVirtualVariable
7981 )
8082 or
83+ // Phi instructions track locations, and therefore a phi instruction is
84+ // conflated if it's associated with a conflated location.
8185 exists ( Alias:: MemoryLocation location |
8286 instruction = Phi ( _, location ) and
83- location .getVirtualVariable ( ) instanceof Alias :: AliasedVirtualVariable
87+ not exists ( location .getAllocation ( ) )
8488 )
8589 }
8690
You can’t perform that action at this time.
0 commit comments