Remove the original statepoint's spill mechanism. New mechanism relies on LLVM's greedy register allocator. The original one has it own spill management, which cause conflict in some situation. There would be a chaotic code which contain lots of memory reads/writes, and much larger stack size.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 37825 Build 37824: arc lint + arc unit
Event Timeline
Hi,
I don't think this patch is correct in the sense that having statepoints depend on GreedyRegAlloc is a non-starter.
Indeed, that means that now any configuration that doesn't use greedy reg alloc (like fast or basic reg alloc) will generate incorrect code with respect to state point spilling.
What problem do you see with the current handling of statepoints?
Cheers,
-Quentin
llvm/include/llvm/CodeGen/SlotIndexes.h | ||
---|---|---|
334 | Having 0-sized SmallVector looks weird. |
Thanks for the review. The problem canbe seen when you llc the testcase I uploaded. With my patch, the function only saves 56 bytes for variables. Without, it will save much more. And that's only a simple case. In the situation I met before, some function reloads for the statepoint's spill, Then spill for statepoint's reload. They are not compatible, some one of them should leave.
Having 0-sized SmallVector looks weird.
Just use std::vector if you don't need the inline storage.