[PATCH] D79720: [IndVarSimplify][LoopUtils] Track rewrite cost per unique BB (PR45835)

dmajor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 11 11:50:48 PDT 2020


dmajor added a comment.

In D79720#2029647 <https://reviews.llvm.org/D79720#2029647>, @lebedev.ri wrote:

> Yes, but it is still not obvious to me as to why that happens?
>  It's the same PHI node, we are asking about the same value, for the same basic block.
>  Why do we not find expansion first time but do find it second time?
>  Did we perform some expansion inbetween?


If I'm understanding my recording correctly -- the reason the expansion was found the second time was that we expanded the value the first time, immediately after computing `isHighCostExpansion`: https://github.com/llvm/llvm-project/blob/release/10.x/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L675


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79720





More information about the llvm-commits mailing list