Skip to content

Commit 5bbdaad

Browse files
committed
C++: deprecate AST-based GVN
1 parent 855edda commit 5bbdaad

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: deprecated
3+
---
4+
5+
6+
* Deprecated `semmle.code.cpp.valuenumbering.GlobalValueNumberingImpl`. Use `semmle.code.cpp.valuenumbering.GlobalValueNumbering`, which exposes the same API.

cpp/ql/lib/semmle/code/cpp/valuenumbering/GlobalValueNumberingImpl.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/**
2+
* DEPRECATED: This library has been replaced with a newer version which
3+
* provides better performance and precision. Use
4+
* `semmle.code.cpp.valuenumbering.GlobalValueNumbering` instead.
5+
*
26
* Provides an implementation of Global Value Numbering.
37
* See https://en.wikipedia.org/wiki/Global_value_numbering
48
*
@@ -221,7 +225,7 @@ private newtype GvnBase =
221225
* expression with this `GVN` and using its `toString` and `getLocation`
222226
* methods.
223227
*/
224-
class GVN extends GvnBase {
228+
deprecated class GVN extends GvnBase {
225229
GVN() { this instanceof GvnBase }
226230

227231
/** Gets an expression that has this GVN. */
@@ -503,7 +507,7 @@ private predicate mk_Deref(GVN p, ControlFlowNode dominator, PointerDereferenceE
503507

504508
/** Gets the global value number of expression `e`. */
505509
cached
506-
GVN globalValueNumber(Expr e) {
510+
deprecated GVN globalValueNumber(Expr e) {
507511
exists(int val, Type t |
508512
mk_IntConst(val, t, e) and
509513
result = GVN_IntConst(val, t)

0 commit comments

Comments
 (0)