[PATCH] D93838: [SCCP] Add Function Specialization pass
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 01:51:12 PDT 2021
ChuanqiXu added inline comments.
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1126
+ if (EnableFunctionSpecialization != FuncSpecializationLevel::Disabled)
+ MPM.addPass(FunctionSpecializationPass());
+
----------------
SjoerdMeijer wrote:
> ChuanqiXu wrote:
> > ChuanqiXu wrote:
> > > The Function Specialization pass would only run in LTO mode in Legacy Pass manager while is seems like it would run as a module pass in NewPM. Is this a intended behavior?
> > It looks like it would run as a module simplify pass in NewPM?
> I will look into this.
>
> I am actually trying to reproduce numbers at the moment, but found that this patch doesn't trigger on SPEC anymore. Curious if I had regressed things with my changes, I took the second revision of this patch for which performance numbers were reported, but I don't think see an uplift with that either, so can't reproduce numbers yet. I am comparing an LTO run without the patch applied as the baseline, to an LTO ran with the patch applied. Now rereading previous reviews comments, it looks like you had the same problem reproducing numbers. But anyway, I will sort that out first.
Yeah, previously I find that this patch can't work on SPEC since I made a mistake when I run LTO.
Previously, I set:
```
LDOPTIMIZE = -flto=full -fuse-ld=lld -mllvm -function-specialize-level=aggressive
```
But it wouldn't work. In fact, we need to set:
```
LDOPTIMIZE = -flto=full -fuse-ld=lld -Wl,-mllvm -Wl,-function-specialize-level=aggressive
```
Hope this could help you.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93838/new/
https://reviews.llvm.org/D93838
More information about the llvm-commits
mailing list