[X86] Fix the base pointer save/restore bug
Previous the stack slot for spilling base pointer register is allocated after the stack realignment. When the stack is naturally aligned the stack slot is share with other data that allocated from stack and cause data corrupt. Another issue is the stack slot for save/restore the callee saved register is not fixed for each function. It depends on the register usage of them in each function. This patch is to recalculate the offset the stack slot for base pointer register during the prolog/epilog insert pass, and allocate the stack slot when spilling callee saved registers. Differential Revision: https://reviews.llvm.org/D144625
Loading
Please sign in to comment