[PATCH] D100016: [GreedyRA ORE] Separate Folder Reloads and Zero Cost Folder Reloads
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 13 12:19:52 PDT 2021
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM w/one minor fix before submission.
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:3198
+ ZeroCostFoldedReloads.erase(Slot);
+ assert(FoldedReloads.size() + ZeroCostFoldedReloads.size() ==
+ (unsigned)llvm::count_if(Accesses, isSpillSlotAccess) &&
----------------
This assert does not hold when the instruction uses the same stack slot twice (which is entirely legal). Just remove it.
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:3208
llvm::any_of(Accesses, isSpillSlotAccess)) {
- ++Stats.FoldedSpills;
+ Stats.FoldedSpills += Accesses.size();
}
----------------
Side question: Are you planning on extending this to zero-cost folded spills? Statepoints also have those too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100016/new/
https://reviews.llvm.org/D100016
More information about the llvm-commits
mailing list