Skip to content

Commit 85c7116

Browse files
committed
C++: Fix the following join (I canceled it mid-way):
``` Tuple counts for SsaInternals#7b362d2f::getAPriorDefinition#1#ff/2@bfabfc7o after 11.4s: 1000 ~4% {2} r1 = SCAN Ssa#da392372::Make#SsaInternals#7b362d2f::SsaInput#::Definition::definesAt#3#dispred#ffff OUTPUT In.1, In.0 474321529 ~0% {4} r2 = JOIN r1 WITH SsaInternals#7b362d2f::DefOrUse::hasIndexInBlock#3#dispred#ffff_3012#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.2, Rhs.3, Rhs.1 0 ~0% {2} r3 = JOIN r2 WITH SsaInternals#7b362d2f::SsaCached::lastRefRedef#4#ffff ON FIRST 3 OUTPUT Lhs.3, Rhs.3 0 ~0% {2} r4 = JOIN r3 WITH SsaInternals#7b362d2f::nodeToDefOrUse#3#fff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1 'result' 0 ~0% {2} r5 = JOIN r4 WITH SsaInternals#7b362d2f::ssaDefinition#1#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1 'defOrUse', Lhs.1 'result' return r5 ```
1 parent 04b8432 commit 85c7116

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ private Definition ssaDefinition(Def def) {
676676
/** Gets a node that represents the prior definition of `node`. */
677677
private Node getAPriorDefinition(SsaDefOrUse defOrUse) {
678678
exists(IRBlock bb, int i, SourceVariable sv, Definition def, DefOrUse defOrUse0 |
679-
SsaCached::lastRefRedef(def, bb, i, ssaDefinition(defOrUse)) and
679+
SsaCached::lastRefRedef(pragma[only_bind_into](def), pragma[only_bind_into](bb),
680+
pragma[only_bind_into](i), ssaDefinition(defOrUse)) and
680681
def.getSourceVariable() = sv and
681682
defOrUse0.hasIndexInBlock(bb, i, sv) and
682683
nodeToDefOrUse(result, defOrUse0, _)

0 commit comments

Comments
 (0)