[LLVMdev] Patch/Question: calculateFrameObjectOffsets

Vladimir Prus ghost at cs.msu.su
Tue Jun 8 08:22:01 PDT 2004


Hello,
the calculateFrameObjectOffsets methods in CodeGen/PrologEpilogEmitter.cpp 
does not work for me, since it asserts if stack grows up, and when assert is 
commented out, allocates spill slots in the same location as function 
arguments, which is not right.

I've tried to fix that, and a patches. It merely adds 

   if (StackGrowsDown) 

everywhere, so that the current logic should not be alterted, and the logic 
when stack grows up is correct. I'd say that the patch is not as nice, due to 
those conditionals, but on the other hand the existing logic is a bit tricky, 
and I would not like to change it, especially since I haven't yet learned 
howto run LLVM testsuite.

What do you think, is this patch OK or I should try to remove as many of 
conditionals as I can?

- Volodya
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PrologEpilogInserter.cpp.diff
Type: text/x-diff
Size: 3684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040608/ba81e0be/attachment.diff>


More information about the llvm-dev mailing list