[PATCH] D135893: [FuncSpec] Fix specialisation based on literals

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 01:28:50 PDT 2022


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:712-715
-    // SCCP solver does not record an argument that will be constructed on
-    // stack.
-    if (A->hasByValAttr() && !F->onlyReadsMemory())
-      return;
----------------
chill wrote:
> ChuanqiXu wrote:
> > This change looks not related to this diff? Although it is bad that the tests still pass after deleting this. But I prefer to remain this if this is not intended.
> Indeed, this change is just a refactoring, I moved it towards the beginning of `isArgumentInteresting` since it's a more logical place for this test to be.
> 
> I don't mind not applying this change  here in this patch, I have another one coming that's just refactoring/optimisaiton(?) and I can include it there.
Oh, my oversight. Then it should be fine.


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

https://reviews.llvm.org/D135893



More information about the llvm-commits mailing list