-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer] exploded-graph-rewriter: Add support for range constraints.
Diff support included. A cheap solution is implemented that treats range constraints as "some sort of key-value map", so it's going to be trivial to add support for other such maps later, such as dynamic type info. Differential Revision: https://reviews.llvm.org/D63685 llvm-svn: 364268
- llvmorg-20-init
- llvmorg-19.1.7
- llvmorg-19.1.6
- llvmorg-19.1.5
- llvmorg-19.1.4
- llvmorg-19.1.3
- llvmorg-19.1.2
- llvmorg-19.1.1
- llvmorg-19.1.0
- llvmorg-19.1.0-rc4
- llvmorg-19.1.0-rc3
- llvmorg-19.1.0-rc2
- llvmorg-19.1.0-rc1
- llvmorg-19-init
- llvmorg-18.1.8
- llvmorg-18.1.7
- llvmorg-18.1.6
- llvmorg-18.1.5
- llvmorg-18.1.4
- llvmorg-18.1.3
- llvmorg-18.1.2
- llvmorg-18.1.1
- llvmorg-18.1.0
- llvmorg-18.1.0-rc4
- llvmorg-18.1.0-rc3
- llvmorg-18.1.0-rc2
- llvmorg-18.1.0-rc1
- llvmorg-18-init
- llvmorg-17.0.6
- llvmorg-17.0.5
- llvmorg-17.0.4
- llvmorg-17.0.3
- llvmorg-17.0.2
- llvmorg-17.0.1
- llvmorg-17.0.0
- llvmorg-17.0.0-rc4
- llvmorg-17.0.0-rc3
- llvmorg-17.0.0-rc2
- llvmorg-17.0.0-rc1
- llvmorg-17-init
- llvmorg-16.0.6
- llvmorg-16.0.5
- llvmorg-16.0.4
- llvmorg-16.0.3
- llvmorg-16.0.2
- llvmorg-16.0.1
- llvmorg-16.0.0
- llvmorg-16.0.0-rc4
- llvmorg-16.0.0-rc3
- llvmorg-16.0.0-rc2
- llvmorg-16.0.0-rc1
- llvmorg-16-init
- llvmorg-15.0.7
- llvmorg-15.0.6
- llvmorg-15.0.5
- llvmorg-15.0.4
- llvmorg-15.0.3
- llvmorg-15.0.2
- llvmorg-15.0.1
- llvmorg-15.0.0
- llvmorg-15.0.0-rc3
- llvmorg-15.0.0-rc2
- llvmorg-15.0.0-rc1
- llvmorg-15-init
- llvmorg-14.0.6
- llvmorg-14.0.5
- llvmorg-14.0.4
- llvmorg-14.0.3
- llvmorg-14.0.2
- llvmorg-14.0.1
- llvmorg-14.0.0
- llvmorg-14.0.0-rc4
- llvmorg-14.0.0-rc3
- llvmorg-14.0.0-rc2
- llvmorg-14.0.0-rc1
- llvmorg-14-init
- llvmorg-13.0.1
- llvmorg-13.0.1-rc3
- llvmorg-13.0.1-rc2
- llvmorg-13.0.1-rc1
- llvmorg-13.0.0
- llvmorg-13.0.0-rc4
- llvmorg-13.0.0-rc3
- llvmorg-13.0.0-rc2
- llvmorg-13.0.0-rc1
- llvmorg-13-init
- llvmorg-12.0.1
- llvmorg-12.0.1-rc4
- llvmorg-12.0.1-rc3
- llvmorg-12.0.1-rc2
- llvmorg-12.0.1-rc1
- llvmorg-12.0.0
- llvmorg-12.0.0-rc5
- llvmorg-12.0.0-rc4
- llvmorg-12.0.0-rc3
- llvmorg-12.0.0-rc2
- llvmorg-12.0.0-rc1
- llvmorg-12-init
- llvmorg-11.1.0
- llvmorg-11.1.0-rc3
- llvmorg-11.1.0-rc2
- llvmorg-11.1.0-rc1
- llvmorg-11.0.1
- llvmorg-11.0.1-rc2
- llvmorg-11.0.1-rc1
- llvmorg-11.0.0
- llvmorg-11.0.0-rc6
- llvmorg-11.0.0-rc5
- llvmorg-11.0.0-rc4
- llvmorg-11.0.0-rc3
- llvmorg-11.0.0-rc2
- llvmorg-11.0.0-rc1
- llvmorg-11-init
- llvmorg-10.0.1
- llvmorg-10.0.1-rc4
- llvmorg-10.0.1-rc3
- llvmorg-10.0.1-rc2
- llvmorg-10.0.1-rc1
- llvmorg-10.0.0
- llvmorg-10.0.0-rc6
- llvmorg-10.0.0-rc5
- llvmorg-10.0.0-rc4
- llvmorg-10.0.0-rc3
- llvmorg-10.0.0-rc2
- llvmorg-10.0.0-rc1
- llvmorg-10-init
- llvmorg-9.0.1
- llvmorg-9.0.1-rc3
- llvmorg-9.0.1-rc2
- llvmorg-9.0.1-rc1
- llvmorg-9.0.0
- llvmorg-9.0.0-rc6
- llvmorg-9.0.0-rc5
- llvmorg-9.0.0-rc4
- llvmorg-9.0.0-rc3
- llvmorg-9.0.0-rc2
- llvmorg-9.0.0-rc1
Showing
7 changed files
with
162 additions
and
2 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
clang/test/Analysis/exploded-graph-rewriter/constraints.dot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// RUN: %exploded_graph_rewriter %s | FileCheck %s | ||
|
||
// FIXME: Substitution doesn't seem to work on Windows. | ||
// UNSUPPORTED: system-windows | ||
|
||
// CHECK: <tr><td align="left"><b>Ranges: </b></td></tr> | ||
// CHECK-SAME: <tr><td align="left"><table border="0"> | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td align="left">reg_$0<x></td> | ||
// CHECK-SAME: <td align="left">\{ [0, 0] \}</td> | ||
// CHECK-SAME: </tr> | ||
// CHECK-SAME: </table></td></tr> | ||
Node0x1 [shape=record,label= | ||
"{ | ||
{ "node_id": 1, | ||
"pointer": "0x1", | ||
"state_id": 2, | ||
"program_points": [], | ||
"program_state": { | ||
"store": null, | ||
"environment": null, | ||
"constraints": [ | ||
{ "symbol": "reg_$0<x>", "range": "{ [0, 0] }" } | ||
] | ||
} | ||
} | ||
\l}"]; |
65 changes: 65 additions & 0 deletions
65
clang/test/Analysis/exploded-graph-rewriter/constraints_diff.dot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// RUN: %exploded_graph_rewriter -d %s | FileCheck %s | ||
|
||
// FIXME: Substitution doesn't seem to work on Windows. | ||
// UNSUPPORTED: system-windows | ||
|
||
Node0x1 [shape=record,label= | ||
"{ | ||
{ "node_id": 1, | ||
"pointer": "0x1", | ||
"state_id": 2, | ||
"program_points": [], | ||
"program_state": { | ||
"store": null, | ||
"environment": null, | ||
"constraints": [ | ||
{ "symbol": "reg_$0<x>", "range": "{ [0, 10] }" } | ||
] | ||
} | ||
} | ||
\l}"]; | ||
|
||
Node0x1 -> Node0x3; | ||
|
||
// CHECK: Node0x3 [ | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td><font color="red">-</font></td> | ||
// CHECK-SAME: <td align="left">reg_$0<x></td> | ||
// CHECK-SAME: <td align="left">\{ [0, 10] \}</td> | ||
// CHECK-SAME: </tr> | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td><font color="forestgreen">+</font></td> | ||
// CHECK-SAME: <td align="left">reg_$0<x></td> | ||
// CHECK-SAME: <td align="left">\{ [0, 5] \}</td> | ||
// CHECK-SAME: </tr> | ||
Node0x3 [shape=record,label= | ||
"{ | ||
{ "node_id": 3, | ||
"pointer": "0x3", | ||
"state_id": 4, | ||
"program_points": [], | ||
"program_state": { | ||
"store": null, | ||
"environment": null, | ||
"constraints": [ | ||
{ "symbol": "reg_$0<x>", "range": "{ [0, 5] }" } | ||
] | ||
} | ||
} | ||
\l}"]; | ||
|
||
Node0x3 -> Node0x5; | ||
|
||
Node0x5 [shape=record,label= | ||
"{ | ||
{ "node_id": 5, | ||
"pointer": "0x5", | ||
"state_id": 6, | ||
"program_points": [], | ||
"program_state": { | ||
"store": null, | ||
"environment": null, | ||
"constraints": null | ||
} | ||
} | ||
\l}"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters