[LLVMdev] Fixing segmented stacks
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Oct 18 16:46:24 CDT 2011
On Oct 18, 2011, at 2:33 PM, Sanjoy Das wrote:
>> it should be expanded late: In lib/Target/X86/X86MCInstLower.cpp.
> This is exactly what I was missing. Thanks a ton! :)
We have three pseudo expansion passes:
1. ExpandISelPseudos.cpp - For instructions that may need to create basic blocks, like CMOV and atomics.
2. ExpandPostRAPseudos.cpp - For instructions used to trick the register allocator into doing the right thing, and COPY instructions created by live range splitting.
3. *MCInstLower.cpp - For instructions that need to trick all of codegen.
Pseudos should be expanded as early as possible. Many of the instructions currently expanded in X86MCInstLower could be moved to the PostRA expansion pass. That would also allow them to be converted into pure isPseudo=1 instructions instead of just isCodeGenOnly=1.
More information about the LLVMdev