[PATCH] D92071: [PowerPC] support register pressure reduction in machine combiner.

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 30 18:08:12 PST 2020


shchenz marked an inline comment as done.
shchenz added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:80
+static cl::opt<float> RegPressureThreshold(
+    "reg-pressure-threshold", cl::Hidden, cl::init(1.0),
+    cl::desc("register pressure threshold for the transformations."));
----------------
jsji wrote:
> shchenz wrote:
> > jsji wrote:
> > > "ppc-fma-rp-factor"
> > > 
> > > Since we multiple this value, this is more a factor than a threshold, then the default value should be slightly more than 1.0?
> > > 
> > > 
> > The logic here is if the calculated register pressure(`RPTracker.getPressure()`) exceeds the limits(get`RegPressureSetLimit`), we should do the reassociation. So I used 1.0. Does changing the compare from `>=` to `>` make sense to you?
> Yes, I know it is exceed the limit, but I don't think we should invoke this optimization immediately when we exceed the limit, shouldn't we do such reg pressure reduction when the reg pressure is really high enough? 
Make sense. I changed the factor to 1.5 in the updated patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92071



More information about the llvm-commits mailing list