[PATCH] D100016: [GreedyRA ORE] Separate Folder Reloads and Zero Cost Folder Reloads
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 13 19:24:23 PDT 2021
skatkov added inline comments.
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:3198
+ ZeroCostFoldedReloads.erase(Slot);
+ assert(FoldedReloads.size() + ZeroCostFoldedReloads.size() ==
+ (unsigned)llvm::count_if(Accesses, isSpillSlotAccess) &&
----------------
reames wrote:
> This assert does not hold when the instruction uses the same stack slot twice (which is entirely legal). Just remove it.
It should. FoldedReloads and ZeroCostFoldedReloads are sets to avoid duplication.
I guesses that memory operands does not contain duplicates, am I wrong?
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:3208
llvm::any_of(Accesses, isSpillSlotAccess)) {
- ++Stats.FoldedSpills;
+ Stats.FoldedSpills += Accesses.size();
}
----------------
reames wrote:
> Side question: Are you planning on extending this to zero-cost folded spills? Statepoints also have those too.
Probably I misses that... I will check the code when statepoint may contain folded spill...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100016/new/
https://reviews.llvm.org/D100016
More information about the llvm-commits
mailing list