[llvm] [SCEV] Split collecting and applying rewrite info from loop guards (NFC) (PR #97316)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 07:05:46 PDT 2024
================
@@ -1299,8 +1299,26 @@ class ScalarEvolution {
/// sharpen it.
void setNoWrapFlags(SCEVAddRecExpr *AddRec, SCEV::NoWrapFlags Flags);
+ class LoopGuards {
+ DenseMap<const SCEV *, const SCEV *> RewriteMap;
+ bool PreserveNUW = false;
+ bool PreserveNSW = false;
+ ScalarEvolution &SE;
+
+ LoopGuards(ScalarEvolution &SE) : SE(SE) {}
+
+ public:
+ /// Collect rewrite map for loop guards for loop \p L, together with flags
+ /// indidcating if NUW and NSW can be preserved during rewriting.
----------------
nikic wrote:
```suggestion
/// indidcating if NUW and NSW can be preserved during rewriting.
```
```suggestion
/// indicating if NUW and NSW can be preserved during rewriting.
```
https://github.com/llvm/llvm-project/pull/97316
More information about the llvm-commits
mailing list