[LLVMdev] Stack alignment problem

Vladimir Prus ghost at cs.msu.su
Thu Jul 1 10:18:01 PDT 2004


Hello,
it seems the Prolog/Epilog insertion does not correctly align stack for me. 
Consider the PEI::calculateFrameObjectOffsets method. It only aligns the 
stack if 

   FFI->hasCalls()

is true. The only place where 

   MachineFrameInfo::setHasCalls 

is invoked is

   PEI::saveCallerSavedRegisters

and the value 'true' is only passed when there are instructions with opcodes 
equal to either RegInfo->getCallFrameSetupOpcode() or  
RegInfo->getCallFrameDestroyOpcode(). I don't have such special opcode, so 
hasCalls returns false and the stack is not aligned.

Any ideas?

- Volodya





More information about the llvm-dev mailing list