[PATCH] D60144: [SCEV] Add option to forget everything in SCEV.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 15:34:22 PDT 2019


asbirlea added inline comments.


================
Comment at: include/llvm/Transforms/Utils/UnrollLoop.h:66
 LoopUnrollResult UnrollLoop(Loop *L, unsigned Count, unsigned TripCount,
                             bool Force, bool AllowRuntime,
                             bool AllowExpensiveTripCount, bool PreserveCondBr,
----------------
sanjoy wrote:
> Unrelated to this change, but the parameter lists are getting really long here.  What do you think about creating a struct holding all these params in a later change?
Ack, added to TODO list.


================
Comment at: lib/Analysis/ScalarEvolution.cpp:6792
 
+void ScalarEvolution::forgetEverything() {
+  BackedgeTakenCounts.clear();
----------------
sanjoy wrote:
> What about `LoopPropertiesCache`?
Could I ask you to please double check I have not missed other caches? 


================
Comment at: lib/Analysis/ScalarEvolution.cpp:6796
+
+  ConstantEvolutionLoopExitValue.clear();
+  ValueExprMap.clear();
----------------
sanjoy wrote:
> I also propose we should be explicit about what we're *not* clearing here (in the form of a comment) to not confuse future readers, and what the criteria should be to add a newly added cache to these of caches being cleared here.
That makes sense!
Might I ask for your suggestions on extending the comment I added, as to what else we are *not* clearing? I don't know enough about SCEV to fill that in.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60144/new/

https://reviews.llvm.org/D60144





More information about the llvm-commits mailing list