mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Final IR reshuffle
Moved IR flavors into "implementation", with internal files under "implementation/internal". Made `IRBlockConstruction` just a nested module of `IRConstruction`/`SSAConstruction`, so it gets picked up from the `Construction` parameter of the `IR` module, rather than being picked up just from being in the same directory as `IRBlock`.
This commit is contained in:
@@ -1,58 +1,58 @@
|
||||
{
|
||||
"C++ IR Instruction": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/Instruction.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll"
|
||||
],
|
||||
"C++ IR IRBlock": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRBlock.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRBlock.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRBlock.qll"
|
||||
],
|
||||
"C++ IR IRVariable": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRVariable.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll"
|
||||
],
|
||||
"C++ IR FunctionIR": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/FunctionIR.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/FunctionIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/FunctionIR.qll"
|
||||
],
|
||||
"C++ IR OperandTag": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/OperandTag.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/OperandTag.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/OperandTag.qll"
|
||||
],
|
||||
"C++ IR IRImpl": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IR.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IR.qll"
|
||||
],
|
||||
"C++ IR IRSanityImpl": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/IRSanity.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRSanity.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRSanity.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/IRSanity.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/IRSanity.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/IRSanity.qll"
|
||||
],
|
||||
"C++ IR PrintIRImpl": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/raw_ir/PrintIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/PrintIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/PrintIR.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/raw/PrintIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll"
|
||||
],
|
||||
"C++ SSA AliasAnalysis": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/AliasAnalysis.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/AliasAnalysis.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll"
|
||||
],
|
||||
"C++ SSA SimpleSSA": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/SimpleSSA.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/SimpleSSA.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SimpleSSA.qll"
|
||||
],
|
||||
"C++ SSA IRBlockConstruction": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/IRBlockConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/IRBlockConstruction.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/IRBlockConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/IRBlockConstruction.qll"
|
||||
],
|
||||
"C++ SSA SSAConstruction": [
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/ssa_ir/SSAConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/internal/aliased_ssa_ir/SSAConstruction.qll"
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll",
|
||||
"cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Most queries should operate on the aliased SSA IR, so that's what we expose
|
||||
// publically as the "IR".
|
||||
import internal.aliased_ssa.IR
|
||||
import implementation.aliased_ssa.IR
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
* @id cpp/ir-sanity-check
|
||||
*/
|
||||
|
||||
import internal.aliased_ssa.IRSanity
|
||||
import implementation.aliased_ssa.IRSanity
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
* @kind graph
|
||||
*/
|
||||
|
||||
import internal.aliased_ssa.PrintIR
|
||||
import implementation.aliased_ssa.PrintIR
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import cpp
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private import IRInternal
|
||||
private import IRBlockConstruction
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import semmle.code.cpp.ir.implementation.EdgeKind
|
||||
private import Construction::BlockConstruction
|
||||
|
||||
class IRBlock extends TIRBlock {
|
||||
final string toString() {
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import FunctionIR
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.implementation.TempVariableTag
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import FunctionIR
|
||||
import IRBlock
|
||||
import IRVariable
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import IRBlock
|
||||
import cpp
|
||||
@@ -0,0 +1 @@
|
||||
import semmle.code.cpp.ir.implementation.unaliased_ssa.IR as InputIR
|
||||
@@ -1,6 +1,6 @@
|
||||
private import IRInternal
|
||||
private import Construction::OldIR as OldIR
|
||||
import Instruction
|
||||
import SSAConstructionInternal
|
||||
private import SSAConstruction as Construction
|
||||
private import NewIR
|
||||
|
||||
import Cached
|
||||
private cached module Cached {
|
||||
@@ -2,6 +2,7 @@ import SSAConstructionInternal
|
||||
import cpp
|
||||
private import semmle.code.cpp.ir.implementation.Opcode
|
||||
import NewIR
|
||||
import IRBlockConstruction as BlockConstruction
|
||||
|
||||
import Cached
|
||||
cached private module Cached {
|
||||
@@ -0,0 +1,3 @@
|
||||
import semmle.code.cpp.ir.implementation.unaliased_ssa.IR as OldIR
|
||||
import semmle.code.cpp.ir.implementation.aliased_ssa.IR as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -0,0 +1,3 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ir.implementation.unaliased_ssa.IR as InputIR
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import cpp
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private import IRInternal
|
||||
private import IRBlockConstruction
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import semmle.code.cpp.ir.implementation.EdgeKind
|
||||
private import Construction::BlockConstruction
|
||||
|
||||
class IRBlock extends TIRBlock {
|
||||
final string toString() {
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import FunctionIR
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.implementation.TempVariableTag
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import FunctionIR
|
||||
import IRBlock
|
||||
import IRVariable
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import IRBlock
|
||||
import cpp
|
||||
@@ -1,5 +1,4 @@
|
||||
private import IRInternal
|
||||
import Instruction
|
||||
import semmle.code.cpp.ir.implementation.raw.Instruction
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.implementation.EdgeKind
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.internal.raw.IR
|
||||
import semmle.code.cpp.ir.implementation.raw.IR
|
||||
import IRBlockConstruction as BlockConstruction
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
private import TranslatedElement
|
||||
@@ -1,5 +1,5 @@
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.internal.raw.IR
|
||||
import semmle.code.cpp.ir.implementation.raw.IR
|
||||
private import semmle.code.cpp.ir.implementation.Opcode
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
@@ -1,5 +1,5 @@
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.internal.raw.IR
|
||||
import semmle.code.cpp.ir.implementation.raw.IR
|
||||
private import semmle.code.cpp.ir.implementation.Opcode
|
||||
private import semmle.code.cpp.ir.internal.TempVariableTag
|
||||
private import InstructionTag
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import cpp
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private import IRInternal
|
||||
private import IRBlockConstruction
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import semmle.code.cpp.ir.implementation.EdgeKind
|
||||
private import Construction::BlockConstruction
|
||||
|
||||
class IRBlock extends TIRBlock {
|
||||
final string toString() {
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import FunctionIR
|
||||
import cpp
|
||||
import semmle.code.cpp.ir.implementation.TempVariableTag
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import FunctionIR
|
||||
import IRBlock
|
||||
import IRVariable
|
||||
@@ -1,4 +1,4 @@
|
||||
private import IRInternal
|
||||
private import internal.IRInternal
|
||||
import Instruction
|
||||
import IRBlock
|
||||
import cpp
|
||||
@@ -0,0 +1 @@
|
||||
import semmle.code.cpp.ir.implementation.raw.IR as InputIR
|
||||
@@ -1,6 +1,6 @@
|
||||
private import IRInternal
|
||||
private import Construction::OldIR as OldIR
|
||||
import Instruction
|
||||
import SSAConstructionInternal
|
||||
private import SSAConstruction as Construction
|
||||
private import NewIR
|
||||
|
||||
import Cached
|
||||
private cached module Cached {
|
||||
@@ -2,6 +2,7 @@ import SSAConstructionInternal
|
||||
import cpp
|
||||
private import semmle.code.cpp.ir.implementation.Opcode
|
||||
import NewIR
|
||||
import IRBlockConstruction as BlockConstruction
|
||||
|
||||
import Cached
|
||||
cached private module Cached {
|
||||
@@ -0,0 +1,3 @@
|
||||
import semmle.code.cpp.ir.implementation.raw.IR as OldIR
|
||||
import semmle.code.cpp.ir.implementation.unaliased_ssa.IR as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -0,0 +1,2 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ir.implementation.raw.IR as InputIR
|
||||
@@ -1 +0,0 @@
|
||||
import semmle.code.cpp.ir.internal.unaliased_ssa.IR as InputIR
|
||||
@@ -1,3 +0,0 @@
|
||||
import semmle.code.cpp.ir.internal.unaliased_ssa.IR as OldIR
|
||||
import semmle.code.cpp.ir.internal.aliased_ssa.IR as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -1,3 +0,0 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ir.internal.unaliased_ssa.IR as InputIR
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
import semmle.code.cpp.ir.internal.raw.IR as InputIR
|
||||
@@ -1,3 +0,0 @@
|
||||
import semmle.code.cpp.ir.internal.raw.IR as OldIR
|
||||
import semmle.code.cpp.ir.internal.unaliased_ssa.IR as NewIR
|
||||
import SimpleSSA as Alias
|
||||
@@ -1,2 +0,0 @@
|
||||
import AliasAnalysis as Alias
|
||||
import semmle.code.cpp.ir.internal.raw.IR as InputIR
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ir/internal/raw/PrintIR.ql
|
||||
semmle/code/cpp/ir/implementation/raw/PrintIR.ql
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ir/internal/raw/IRSanity.ql
|
||||
semmle/code/cpp/ir/implementation/raw/IRSanity.ql
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ir/internal/unaliased_ssa/PrintIR.ql
|
||||
semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.ql
|
||||
@@ -1 +1 @@
|
||||
semmle/code/cpp/ir/internal/unaliased_ssa/IRSanity.ql
|
||||
semmle/code/cpp/ir/implementation/unaliased_ssa/IRSanity.ql
|
||||
Reference in New Issue
Block a user