[PATCH] D68082: [SCEV] Don't add Predicates with OptForSize

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 15:26:26 PDT 2019


sanjoy added a comment.

In D68082#1695125 <https://reviews.llvm.org/D68082#1695125>, @hsaito wrote:

> I agree with @Ayal about changing getAsAddRec for OptForSize. In general, it's better to not "Analyze" if we know we won't be using the result of analysis.


+1

I vote against having SCEV depend on `OptForSize`.

> In this regard, I do not like pass managers running Analyses for a Transformation pass w/o first letting the Transformation pass inspect the incoming IR, but that's a totally different discussion and I don't have a solution for that problem.

Maybe I'm misunderstanding, but SCEV is lazy so if a transform looks at the IR and decides not to ask SCEV for trip count or call `getSCEV` then SCEV will not do any actual work.

> Is new pass manager any better there?




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

https://reviews.llvm.org/D68082





More information about the llvm-commits mailing list