[PATCH] D33685: [InlineCost, NFC] Change CallAnalyzer::isGEPFree to use TTI::getUserCost instead of TTI::getGEPCost

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 13:46:52 PDT 2017


haicheng added a comment.

Hi Evgeny,

Please see the embed comment.  SimplifiedValues maps variables to known constants.  So, I think you change is not NFC.

Haicheng



================
Comment at: lib/Analysis/InlineCost.cpp:348-352
-  for (User::op_iterator I = GEP.idx_begin(), E = GEP.idx_end(); I != E; ++I)
-    if (Constant *SimpleOp = SimplifiedValues.lookup(*I))
-       Indices.push_back(SimpleOp);
-     else
-       Indices.push_back(*I);
----------------
Why removing this loop won't cause functional change?


https://reviews.llvm.org/D33685





More information about the llvm-commits mailing list