File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
cpp/ql/src/semmle/code/cpp/ir/implementation
csharp/ql/src/experimental/ir/implementation Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,21 @@ private newtype TIRConfiguration = MkIRConfiguration()
10
10
* The query can extend this class to control which functions have IR generated for them.
11
11
*/
12
12
class IRConfiguration extends TIRConfiguration {
13
+ /** Gets a textual representation of this element. */
13
14
string toString ( ) { result = "IRConfiguration" }
14
15
15
16
/**
16
17
* Holds if IR should be created for function `func`. By default, holds for all functions.
17
18
*/
18
19
predicate shouldCreateIRForFunction ( Language:: Function func ) { any ( ) }
19
20
21
+ /**
22
+ * Holds if the strings used as part of an IR dump should be generated for function `func`.
23
+ *
24
+ * This predicate is overridden in `PrintIR.qll` to avoid the expense of generating a large number
25
+ * of debug strings for IR that will not be dumped. We still generate the actual IR for these
26
+ * functions, however, to preserve the results of any interprocedural analysis.
27
+ */
20
28
predicate shouldEvaluateDebugStringsForFunction ( Language:: Function func ) { any ( ) }
21
29
}
22
30
@@ -26,6 +34,7 @@ private newtype TIREscapeAnalysisConfiguration = MkIREscapeAnalysisConfiguration
26
34
* The query can extend this class to control what escape analysis is used when generating SSA.
27
35
*/
28
36
class IREscapeAnalysisConfiguration extends TIREscapeAnalysisConfiguration {
37
+ /** Gets a textual representation of this element. */
29
38
string toString ( ) { result = "IREscapeAnalysisConfiguration" }
30
39
31
40
/**
Original file line number Diff line number Diff line change @@ -10,13 +10,21 @@ private newtype TIRConfiguration = MkIRConfiguration()
10
10
* The query can extend this class to control which functions have IR generated for them.
11
11
*/
12
12
class IRConfiguration extends TIRConfiguration {
13
+ /** Gets a textual representation of this element. */
13
14
string toString ( ) { result = "IRConfiguration" }
14
15
15
16
/**
16
17
* Holds if IR should be created for function `func`. By default, holds for all functions.
17
18
*/
18
19
predicate shouldCreateIRForFunction ( Language:: Function func ) { any ( ) }
19
20
21
+ /**
22
+ * Holds if the strings used as part of an IR dump should be generated for function `func`.
23
+ *
24
+ * This predicate is overridden in `PrintIR.qll` to avoid the expense of generating a large number
25
+ * of debug strings for IR that will not be dumped. We still generate the actual IR for these
26
+ * functions, however, to preserve the results of any interprocedural analysis.
27
+ */
20
28
predicate shouldEvaluateDebugStringsForFunction ( Language:: Function func ) { any ( ) }
21
29
}
22
30
@@ -26,6 +34,7 @@ private newtype TIREscapeAnalysisConfiguration = MkIREscapeAnalysisConfiguration
26
34
* The query can extend this class to control what escape analysis is used when generating SSA.
27
35
*/
28
36
class IREscapeAnalysisConfiguration extends TIREscapeAnalysisConfiguration {
37
+ /** Gets a textual representation of this element. */
29
38
string toString ( ) { result = "IREscapeAnalysisConfiguration" }
30
39
31
40
/**
You can’t perform that action at this time.
0 commit comments