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.
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?
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.