[polly] [Polly] Use separate DT/LI/SE for outlined subfn. NFC. (PR #102460)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 08:14:27 PDT 2024


================
@@ -162,8 +162,21 @@ class BlockGenerator {
   /// The dominator tree of this function.
   DominatorTree &DT;
 
-  /// The entry block of the current function.
-  BasicBlock *EntryBB;
+  /// Relates to the region where the code is emitted into.
+  /// @{
+  DominatorTree *GenDT;
+  LoopInfo *GenLI;
+  ScalarEvolution *GenSE;
+  /// @}
+
+public:
+  /// Change the function that code is emitted into.
+  void switchGeneratedFunc(Function *GenFn, DominatorTree *GenDT,
----------------
Meinersbur wrote:

This was intentional since the function is called `switchGeneratedFunc`. I had stored it in a private field of the class to use it in assertions. Unfortunately, Clang emits a warning for unused fields in non-assert builds and we have some bots with `-werror` enabled, so I had to remove the asserts.

I added some assertions to the function itself that use the `GenFn`.

https://github.com/llvm/llvm-project/pull/102460


More information about the llvm-commits mailing list