[PATCH] D54366: RegAllocFast: Add heuristic to detect values not live-out of a block
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 16:53:51 PDT 2019
arsenm added inline comments.
Herald added a project: LLVM.
================
Comment at: lib/CodeGen/RegAllocFast.cpp:107
+ /// that it is alive accross blocks.
+ BitVector MayLiveAccrossBlocks;
+
----------------
Typo, extra c in Across
================
Comment at: lib/CodeGen/RegAllocFast.cpp:277-278
+ unsigned C = 0;
+ for (const MachineOperand &Use :
+ make_range(std::next(I), MRI->reg_nodbg_end())) {
+ if (Use.getParent()->getParent() != FirstMBB || ++C >= Limit) {
----------------
This is broken because it's skipping the first use. It can also useMRI->reg_nodbg_instructions.
This is also broken for the case where there is a phi/copy when there is a loop back to the same block. This needs to check for whether the use instruction happens before the spilled value def
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54366/new/
https://reviews.llvm.org/D54366
More information about the llvm-commits
mailing list