[PATCH] D56772: [MIR] Add simple PRE pass to MachineCSE
Anton Afanasyev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 08:20:01 PDT 2019
anton-afanasyev marked 2 inline comments as done.
anton-afanasyev added inline comments.
================
Comment at: llvm/trunk/lib/CodeGen/MachineCSE.cpp:814
+ unsigned NewReg = MRI->cloneVirtualRegister(VReg);
+ if (!isProfitableToCSE(NewReg, VReg, CMBB, MI))
+ continue;
----------------
LuoYuanke wrote:
> Do we need to enhance the algorithm to consider more about register pressure on the profit calculation? I'm afraid there is performance drop when the register pressure is heavy.
Hi @LuoYuanke, yes, this could be the case. Actually this commit doesn't change profit calculation, `ProcessBlockPRE()` uses the same `isProfitableToCommit()` function as `ProcessBlockCSE()` uses. Do you have concrete test cases where register pressure increases?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56772/new/
https://reviews.llvm.org/D56772
More information about the llvm-commits
mailing list