GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C++: Add comments. · github/codeql@49600c1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal
    • SsaImpl.qll
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll‎

Copy file name to clipboardExpand all lines: cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,15 +1446,31 @@ module Public {
14461446
not def instanceof PhiNode
14471447
}
14481448

1449+
/**
1450+
* The `getAnUltimateDefinition` predicate uses an optimized step relation
1451+
* which is pruned to only those uncertain steps which lead back to a
1452+
* definition which satisfies `relevantUltimateDefinition`. This predicate
1453+
* computes the subset of `Definition`s which can lead back to definitions
1454+
* which satisfy `relevantUltimateDefinition`.
1455+
*/
14491456
private predicate fwd(Definition def) {
1457+
// Base case: This definition is a relevant definition
14501458
relevantUltimateDefinition(def)
14511459
or
14521460
exists(Definition def0 |
1461+
// Recursive case: `def0` is a relevant definition, and
1462+
// `def` is an uncertain step which takes us back to `def0`.
14531463
fwd(def0) and
14541464
def0 = getAPhiInputOrPriorDefinition(def)
14551465
)
14561466
}
14571467

1468+
/**
1469+
* Holds if `def1 = getAPhiInputOrPriorDefinition(def2)`, and
1470+
* both `def1` and `def2` are part of a sequence of uncertain
1471+
* steps which lead back to a `Definition` which
1472+
* satisfies `relevantUltimateDefinition`.
1473+
*/
14581474
private predicate step(Definition def1, Definition def2) {
14591475
fwd(def1) and
14601476
fwd(def2) and

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.