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()
1010 * The query can extend this class to control which functions have IR generated for them.
1111 */
1212class IRConfiguration extends TIRConfiguration {
13+ /** Gets a textual representation of this element. */
1314 string toString ( ) { result = "IRConfiguration" }
1415
1516 /**
1617 * Holds if IR should be created for function `func`. By default, holds for all functions.
1718 */
1819 predicate shouldCreateIRForFunction ( Language:: Function func ) { any ( ) }
1920
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+ */
2028 predicate shouldEvaluateDebugStringsForFunction ( Language:: Function func ) { any ( ) }
2129}
2230
@@ -26,6 +34,7 @@ private newtype TIREscapeAnalysisConfiguration = MkIREscapeAnalysisConfiguration
2634 * The query can extend this class to control what escape analysis is used when generating SSA.
2735 */
2836class IREscapeAnalysisConfiguration extends TIREscapeAnalysisConfiguration {
37+ /** Gets a textual representation of this element. */
2938 string toString ( ) { result = "IREscapeAnalysisConfiguration" }
3039
3140 /**
Original file line number Diff line number Diff line change @@ -10,13 +10,21 @@ private newtype TIRConfiguration = MkIRConfiguration()
1010 * The query can extend this class to control which functions have IR generated for them.
1111 */
1212class IRConfiguration extends TIRConfiguration {
13+ /** Gets a textual representation of this element. */
1314 string toString ( ) { result = "IRConfiguration" }
1415
1516 /**
1617 * Holds if IR should be created for function `func`. By default, holds for all functions.
1718 */
1819 predicate shouldCreateIRForFunction ( Language:: Function func ) { any ( ) }
1920
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+ */
2028 predicate shouldEvaluateDebugStringsForFunction ( Language:: Function func ) { any ( ) }
2129}
2230
@@ -26,6 +34,7 @@ private newtype TIREscapeAnalysisConfiguration = MkIREscapeAnalysisConfiguration
2634 * The query can extend this class to control what escape analysis is used when generating SSA.
2735 */
2836class IREscapeAnalysisConfiguration extends TIREscapeAnalysisConfiguration {
37+ /** Gets a textual representation of this element. */
2938 string toString ( ) { result = "IREscapeAnalysisConfiguration" }
3039
3140 /**
You can’t perform that action at this time.
0 commit comments