From d2b225790a1cb84b5099ee1f9cd735aebc325211 Mon Sep 17 00:00:00 2001 From: Robert Marsh Date: Thu, 9 Jan 2020 11:48:18 -0800 Subject: [PATCH] C++: fix chi instr oeprands to chi instrs --- .../implementation/aliased_ssa/internal/SSAConstruction.qll | 4 ++-- .../implementation/unaliased_ssa/internal/SSAConstruction.qll | 4 ++-- .../implementation/unaliased_ssa/internal/SSAConstruction.qll | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll b/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll index 70f73b29f56..9198b254250 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll @@ -573,13 +573,13 @@ module DefUse { // An odd offset corresponds to the `Chi` instruction. defOffset = oldOffset * 2 + 1 and result = Chi(oldInstr) and - defLocation = Alias::getResultMemoryLocation(oldInstr) and + hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and actualDefLocation = defLocation.getVirtualVariable() or // An even offset corresponds to the original instruction. defOffset = oldOffset * 2 and result = getNewInstruction(oldInstr) and - defLocation = Alias::getResultMemoryLocation(oldInstr) and + hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and actualDefLocation = defLocation ) or diff --git a/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll b/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll index 70f73b29f56..9198b254250 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll @@ -573,13 +573,13 @@ module DefUse { // An odd offset corresponds to the `Chi` instruction. defOffset = oldOffset * 2 + 1 and result = Chi(oldInstr) and - defLocation = Alias::getResultMemoryLocation(oldInstr) and + hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and actualDefLocation = defLocation.getVirtualVariable() or // An even offset corresponds to the original instruction. defOffset = oldOffset * 2 and result = getNewInstruction(oldInstr) and - defLocation = Alias::getResultMemoryLocation(oldInstr) and + hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and actualDefLocation = defLocation ) or diff --git a/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll b/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll index 70f73b29f56..9198b254250 100644 --- a/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll +++ b/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll @@ -573,13 +573,13 @@ module DefUse { // An odd offset corresponds to the `Chi` instruction. defOffset = oldOffset * 2 + 1 and result = Chi(oldInstr) and - defLocation = Alias::getResultMemoryLocation(oldInstr) and + hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and actualDefLocation = defLocation.getVirtualVariable() or // An even offset corresponds to the original instruction. defOffset = oldOffset * 2 and result = getNewInstruction(oldInstr) and - defLocation = Alias::getResultMemoryLocation(oldInstr) and + hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and actualDefLocation = defLocation ) or