[PATCH] D107622: [FuncSpec] Return changed if function is changed by tryToReplaceWithConstant

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 01:05:51 PDT 2021


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:765
         for (auto &I : make_early_inc_range(BB))
-          FS.tryToReplaceWithConstant(&I);
+          Changed |= FS.tryToReplaceWithConstant(&I);
       }
----------------
SjoerdMeijer wrote:
> I think this now deserves a comment.
hmm, I think it is easy to know that `tryToReplaceWithConstant` may change the function. I tried to add comments for this. But I find my words are a little redundant. I would make it if there is any good suggestion.


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

https://reviews.llvm.org/D107622



More information about the llvm-commits mailing list