mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
C++: Remove self edges from post-update SSA.
This commit is contained in:
@@ -1540,7 +1540,7 @@ private module Cached {
|
||||
cached
|
||||
predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) {
|
||||
// Post update node -> Node flow
|
||||
Ssa::ssaFlow(nodeFrom.(PostUpdateNode).getPreUpdateNode(), nodeTo)
|
||||
Ssa::postUpdateFlow(nodeFrom, nodeTo)
|
||||
or
|
||||
// Def-use/Use-use flow
|
||||
Ssa::ssaFlow(nodeFrom, nodeTo)
|
||||
|
||||
@@ -713,11 +713,23 @@ private Node getAPriorDefinition(SsaDefOrUse defOrUse) {
|
||||
/** Holds if there is def-use or use-use flow from `nodeFrom` to `nodeTo`. */
|
||||
predicate ssaFlow(Node nodeFrom, Node nodeTo) {
|
||||
exists(Node nFrom, boolean uncertain, SsaDefOrUse defOrUse |
|
||||
ssaFlowImpl(defOrUse, nFrom, nodeTo, uncertain) and
|
||||
ssaFlowImpl(defOrUse, nFrom, nodeTo, uncertain) and nodeFrom != nodeTo
|
||||
|
|
||||
if uncertain = true then nodeFrom = [nFrom, getAPriorDefinition(defOrUse)] else nodeFrom = nFrom
|
||||
)
|
||||
}
|
||||
|
||||
predicate postUpdateFlow(PostUpdateNode pun, Node nodeTo) {
|
||||
exists(Node preUpdate, Node nFrom, boolean uncertain, SsaDefOrUse defOrUse |
|
||||
preUpdate = pun.getPreUpdateNode() and
|
||||
ssaFlowImpl(defOrUse, nFrom, nodeTo, uncertain)
|
||||
|
|
||||
if uncertain = true
|
||||
then preUpdate = [nFrom, getAPriorDefinition(defOrUse)]
|
||||
else preUpdate = nFrom
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `use` is a use of `sv` and is a next adjacent use of `phi` in
|
||||
* index `i1` in basic block `bb1`.
|
||||
|
||||
@@ -32,58 +32,3 @@ uniqueParameterNodeAtPosition
|
||||
uniqueParameterNodePosition
|
||||
uniqueContentApprox
|
||||
identityLocalStep
|
||||
| BarrierGuard.cpp:62:10:62:11 | p1 indirection | Node steps to itself |
|
||||
| BarrierGuard.cpp:64:10:64:11 | p1 indirection | Node steps to itself |
|
||||
| BarrierGuard.cpp:65:22:65:23 | p2 indirection | Node steps to itself |
|
||||
| BarrierGuard.cpp:66:10:66:11 | p1 indirection | Node steps to itself |
|
||||
| BarrierGuard.cpp:76:10:76:12 | buf indirection | Node steps to itself |
|
||||
| clang.cpp:8:27:8:28 | this indirection | Node steps to itself |
|
||||
| clang.cpp:31:8:31:24 | sourceStruct1_ptr indirection | Node steps to itself |
|
||||
| dispatch.cpp:37:3:37:8 | topPtr indirection | Node steps to itself |
|
||||
| dispatch.cpp:45:3:45:8 | topRef indirection | Node steps to itself |
|
||||
| dispatch.cpp:55:8:55:19 | globalBottom indirection | Node steps to itself |
|
||||
| dispatch.cpp:56:8:56:19 | globalMiddle indirection | Node steps to itself |
|
||||
| dispatch.cpp:69:3:69:5 | top indirection | Node steps to itself |
|
||||
| dispatch.cpp:73:3:73:5 | top indirection | Node steps to itself |
|
||||
| dispatch.cpp:81:3:81:3 | x indirection | Node steps to itself |
|
||||
| dispatch.cpp:89:12:89:17 | bottom indirection | Node steps to itself |
|
||||
| dispatch.cpp:90:12:90:14 | top indirection | Node steps to itself |
|
||||
| dispatch.cpp:129:10:129:15 | topPtr indirection | Node steps to itself |
|
||||
| dispatch.cpp:130:10:130:15 | topRef indirection | Node steps to itself |
|
||||
| example.c:19:6:19:6 | b indirection | Node steps to itself |
|
||||
| file://:0:0:0:0 | this indirection | Node steps to itself |
|
||||
| lambdas.cpp:13:11:13:11 | (unnamed parameter 0) indirection | Node steps to itself |
|
||||
| lambdas.cpp:20:11:20:11 | (unnamed parameter 0) indirection | Node steps to itself |
|
||||
| lambdas.cpp:23:3:23:14 | this indirection | Node steps to itself |
|
||||
| lambdas.cpp:28:11:28:11 | (unnamed parameter 0) indirection | Node steps to itself |
|
||||
| lambdas.cpp:30:3:30:6 | this indirection | Node steps to itself |
|
||||
| ref.cpp:16:12:16:14 | lhs indirection | Node steps to itself |
|
||||
| ref.cpp:75:5:75:7 | lhs indirection | Node steps to itself |
|
||||
| ref.cpp:79:12:79:14 | lhs indirection | Node steps to itself |
|
||||
| ref.cpp:87:7:87:9 | lhs indirection | Node steps to itself |
|
||||
| ref.cpp:89:7:89:9 | lhs indirection | Node steps to itself |
|
||||
| ref.cpp:96:7:96:9 | out indirection | Node steps to itself |
|
||||
| ref.cpp:102:21:102:23 | out indirection | Node steps to itself |
|
||||
| ref.cpp:104:7:104:9 | out indirection | Node steps to itself |
|
||||
| ref.cpp:113:7:113:9 | out indirection | Node steps to itself |
|
||||
| ref.cpp:115:7:115:9 | out indirection | Node steps to itself |
|
||||
| test.cpp:194:13:194:27 | this indirection | Node steps to itself |
|
||||
| test.cpp:209:13:209:33 | this indirection | Node steps to itself |
|
||||
| test.cpp:223:13:223:34 | this indirection | Node steps to itself |
|
||||
| test.cpp:236:13:236:24 | this indirection | Node steps to itself |
|
||||
| test.cpp:246:7:246:16 | this indirection | Node steps to itself |
|
||||
| test.cpp:251:7:251:12 | this indirection | Node steps to itself |
|
||||
| test.cpp:256:7:256:12 | this indirection | Node steps to itself |
|
||||
| test.cpp:267:11:267:20 | this indirection | Node steps to itself |
|
||||
| test.cpp:273:14:273:19 | this indirection | Node steps to itself |
|
||||
| test.cpp:278:14:278:19 | this indirection | Node steps to itself |
|
||||
| test.cpp:290:13:290:22 | this indirection | Node steps to itself |
|
||||
| test.cpp:295:17:295:22 | this indirection | Node steps to itself |
|
||||
| test.cpp:300:23:300:28 | this indirection | Node steps to itself |
|
||||
| test.cpp:314:2:314:2 | this indirection | Node steps to itself |
|
||||
| test.cpp:321:2:321:2 | this indirection | Node steps to itself |
|
||||
| test.cpp:359:5:359:9 | this indirection | Node steps to itself |
|
||||
| test.cpp:365:10:365:14 | this indirection | Node steps to itself |
|
||||
| test.cpp:369:10:369:14 | this indirection | Node steps to itself |
|
||||
| test.cpp:375:10:375:14 | this indirection | Node steps to itself |
|
||||
| test.cpp:489:20:489:20 | s indirection | Node steps to itself |
|
||||
|
||||
@@ -42,124 +42,3 @@ uniqueParameterNodeAtPosition
|
||||
uniqueParameterNodePosition
|
||||
uniqueContentApprox
|
||||
identityLocalStep
|
||||
| A.cpp:25:7:25:10 | this indirection | Node steps to itself |
|
||||
| A.cpp:27:22:27:25 | this indirection | Node steps to itself |
|
||||
| A.cpp:28:23:28:26 | this indirection | Node steps to itself |
|
||||
| A.cpp:31:20:31:20 | c indirection | Node steps to itself |
|
||||
| A.cpp:41:15:41:21 | new indirection | Node steps to itself |
|
||||
| A.cpp:48:20:48:20 | c indirection | Node steps to itself |
|
||||
| A.cpp:49:10:49:10 | b indirection | Node steps to itself |
|
||||
| A.cpp:55:12:55:19 | new indirection | Node steps to itself |
|
||||
| A.cpp:56:10:56:10 | b indirection | Node steps to itself |
|
||||
| A.cpp:64:10:64:15 | this indirection | Node steps to itself |
|
||||
| A.cpp:64:21:64:28 | new indirection | Node steps to itself |
|
||||
| A.cpp:65:10:65:11 | b1 indirection | Node steps to itself |
|
||||
| A.cpp:66:10:66:11 | b2 indirection | Node steps to itself |
|
||||
| A.cpp:73:10:73:19 | this indirection | Node steps to itself |
|
||||
| A.cpp:73:25:73:32 | new indirection | Node steps to itself |
|
||||
| A.cpp:74:10:74:11 | b1 indirection | Node steps to itself |
|
||||
| A.cpp:75:10:75:11 | b2 indirection | Node steps to itself |
|
||||
| A.cpp:81:21:81:21 | c indirection | Node steps to itself |
|
||||
| A.cpp:82:12:82:12 | this indirection | Node steps to itself |
|
||||
| A.cpp:87:9:87:9 | this indirection | Node steps to itself |
|
||||
| A.cpp:90:15:90:15 | c indirection | Node steps to itself |
|
||||
| A.cpp:101:5:101:6 | this indirection | Node steps to itself |
|
||||
| A.cpp:101:8:101:9 | c1 indirection | Node steps to itself |
|
||||
| A.cpp:107:12:107:13 | c1 indirection | Node steps to itself |
|
||||
| A.cpp:120:12:120:13 | c1 indirection | Node steps to itself |
|
||||
| A.cpp:126:5:126:5 | b indirection | Node steps to itself |
|
||||
| A.cpp:131:5:131:6 | this indirection | Node steps to itself |
|
||||
| A.cpp:132:10:132:10 | b indirection | Node steps to itself |
|
||||
| A.cpp:143:7:143:10 | this indirection | Node steps to itself |
|
||||
| A.cpp:151:21:151:21 | this indirection | Node steps to itself |
|
||||
| A.cpp:153:10:153:10 | d indirection | Node steps to itself |
|
||||
| A.cpp:154:10:154:10 | b indirection | Node steps to itself |
|
||||
| A.cpp:160:29:160:29 | b indirection | Node steps to itself |
|
||||
| A.cpp:161:38:161:39 | l1 indirection | Node steps to itself |
|
||||
| A.cpp:162:38:162:39 | l2 indirection | Node steps to itself |
|
||||
| A.cpp:167:44:167:44 | l indirection | Node steps to itself |
|
||||
| A.cpp:184:7:184:10 | this indirection | Node steps to itself |
|
||||
| B.cpp:7:25:7:25 | e indirection | Node steps to itself |
|
||||
| B.cpp:8:25:8:26 | b1 indirection | Node steps to itself |
|
||||
| B.cpp:10:10:10:11 | b2 indirection | Node steps to itself |
|
||||
| B.cpp:16:37:16:37 | e indirection | Node steps to itself |
|
||||
| B.cpp:17:25:17:26 | b1 indirection | Node steps to itself |
|
||||
| B.cpp:19:10:19:11 | b2 indirection | Node steps to itself |
|
||||
| B.cpp:36:7:36:10 | this indirection | Node steps to itself |
|
||||
| B.cpp:46:7:46:10 | this indirection | Node steps to itself |
|
||||
| C.cpp:19:5:19:5 | c indirection | Node steps to itself |
|
||||
| C.cpp:24:5:24:8 | this indirection | Node steps to itself |
|
||||
| C.cpp:31:10:31:11 | this indirection | Node steps to itself |
|
||||
| D.cpp:9:21:9:24 | this indirection | Node steps to itself |
|
||||
| D.cpp:10:30:10:33 | this indirection | Node steps to itself |
|
||||
| D.cpp:11:29:11:32 | this indirection | Node steps to itself |
|
||||
| D.cpp:16:21:16:23 | this indirection | Node steps to itself |
|
||||
| D.cpp:17:30:17:32 | this indirection | Node steps to itself |
|
||||
| D.cpp:18:29:18:31 | this indirection | Node steps to itself |
|
||||
| D.cpp:22:10:22:11 | b2 indirection | Node steps to itself |
|
||||
| D.cpp:31:14:31:14 | b indirection | Node steps to itself |
|
||||
| D.cpp:37:21:37:21 | e indirection | Node steps to itself |
|
||||
| D.cpp:38:14:38:14 | b indirection | Node steps to itself |
|
||||
| D.cpp:45:14:45:14 | b indirection | Node steps to itself |
|
||||
| D.cpp:51:27:51:27 | e indirection | Node steps to itself |
|
||||
| D.cpp:52:14:52:14 | b indirection | Node steps to itself |
|
||||
| D.cpp:59:5:59:7 | this indirection | Node steps to itself |
|
||||
| D.cpp:64:10:64:17 | this indirection | Node steps to itself |
|
||||
| E.cpp:21:10:21:10 | p indirection | Node steps to itself |
|
||||
| E.cpp:31:10:31:12 | raw indirection | Node steps to itself |
|
||||
| E.cpp:32:10:32:10 | b indirection | Node steps to itself |
|
||||
| aliasing.cpp:9:3:9:3 | s indirection | Node steps to itself |
|
||||
| aliasing.cpp:13:3:13:3 | s indirection | Node steps to itself |
|
||||
| aliasing.cpp:37:3:37:6 | ref1 indirection | Node steps to itself |
|
||||
| aliasing.cpp:43:8:43:11 | ref2 indirection | Node steps to itself |
|
||||
| aliasing.cpp:79:3:79:3 | s indirection | Node steps to itself |
|
||||
| aliasing.cpp:86:3:86:3 | s indirection | Node steps to itself |
|
||||
| aliasing.cpp:201:8:201:10 | ps2 indirection | Node steps to itself |
|
||||
| aliasing.cpp:206:8:206:10 | ps2 indirection | Node steps to itself |
|
||||
| by_reference.cpp:12:5:12:5 | s indirection | Node steps to itself |
|
||||
| by_reference.cpp:16:5:16:8 | this indirection | Node steps to itself |
|
||||
| by_reference.cpp:20:5:20:8 | this indirection | Node steps to itself |
|
||||
| by_reference.cpp:20:23:20:27 | value indirection | Node steps to itself |
|
||||
| by_reference.cpp:20:23:20:27 | value indirection | Node steps to itself |
|
||||
| by_reference.cpp:24:19:24:22 | this indirection | Node steps to itself |
|
||||
| by_reference.cpp:24:25:24:29 | value indirection | Node steps to itself |
|
||||
| by_reference.cpp:24:25:24:29 | value indirection | Node steps to itself |
|
||||
| by_reference.cpp:32:12:32:12 | s indirection | Node steps to itself |
|
||||
| by_reference.cpp:36:12:36:15 | this indirection | Node steps to itself |
|
||||
| by_reference.cpp:40:12:40:15 | this indirection | Node steps to itself |
|
||||
| by_reference.cpp:44:26:44:29 | this indirection | Node steps to itself |
|
||||
| by_reference.cpp:84:3:84:7 | inner indirection | Node steps to itself |
|
||||
| by_reference.cpp:88:3:88:7 | inner indirection | Node steps to itself |
|
||||
| by_reference.cpp:116:8:116:13 | pouter indirection | Node steps to itself |
|
||||
| by_reference.cpp:136:8:136:13 | pouter indirection | Node steps to itself |
|
||||
| complex.cpp:9:20:9:21 | this indirection | Node steps to itself |
|
||||
| complex.cpp:10:20:10:21 | this indirection | Node steps to itself |
|
||||
| complex.cpp:11:22:11:23 | this indirection | Node steps to itself |
|
||||
| complex.cpp:12:22:12:23 | this indirection | Node steps to itself |
|
||||
| complex.cpp:43:8:43:8 | b indirection | Node steps to itself |
|
||||
| conflated.cpp:11:9:11:10 | ra indirection | Node steps to itself |
|
||||
| conflated.cpp:20:8:20:10 | raw indirection | Node steps to itself |
|
||||
| conflated.cpp:30:8:30:9 | pa indirection | Node steps to itself |
|
||||
| conflated.cpp:37:8:37:9 | pa indirection | Node steps to itself |
|
||||
| conflated.cpp:55:8:55:9 | ll indirection | Node steps to itself |
|
||||
| conflated.cpp:59:35:59:38 | next indirection | Node steps to itself |
|
||||
| conflated.cpp:61:8:61:9 | ll indirection | Node steps to itself |
|
||||
| constructors.cpp:18:22:18:23 | this indirection | Node steps to itself |
|
||||
| constructors.cpp:19:22:19:23 | this indirection | Node steps to itself |
|
||||
| constructors.cpp:20:24:20:25 | this indirection | Node steps to itself |
|
||||
| constructors.cpp:21:24:21:25 | this indirection | Node steps to itself |
|
||||
| constructors.cpp:29:10:29:10 | f indirection | Node steps to itself |
|
||||
| qualifiers.cpp:9:30:9:33 | this indirection | Node steps to itself |
|
||||
| qualifiers.cpp:12:49:12:53 | inner indirection | Node steps to itself |
|
||||
| qualifiers.cpp:13:51:13:55 | inner indirection | Node steps to itself |
|
||||
| qualifiers.cpp:18:32:18:36 | this indirection | Node steps to itself |
|
||||
| realistic.cpp:42:20:42:20 | o indirection | Node steps to itself |
|
||||
| realistic.cpp:42:20:42:20 | o indirection | Node steps to itself |
|
||||
| simple.cpp:18:22:18:23 | this indirection | Node steps to itself |
|
||||
| simple.cpp:19:22:19:23 | this indirection | Node steps to itself |
|
||||
| simple.cpp:20:24:20:25 | this indirection | Node steps to itself |
|
||||
| simple.cpp:21:24:21:25 | this indirection | Node steps to itself |
|
||||
| simple.cpp:29:10:29:10 | f indirection | Node steps to itself |
|
||||
| simple.cpp:79:16:79:17 | this indirection | Node steps to itself |
|
||||
| simple.cpp:84:14:84:20 | this indirection | Node steps to itself |
|
||||
| struct_init.c:16:8:16:9 | ab indirection | Node steps to itself |
|
||||
|
||||
Reference in New Issue
Block a user