[LLVMbugs] [Bug 240] NEW: [lowerinvoke] Values live across an invoke should become volatile stack objects

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Feb 15 15:06:20 PST 2004


           Summary: [lowerinvoke] Values live across an invoke should become
                    volatile stack objects
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: sabre at nondot.org
        ReportedBy: sabre at nondot.org

When lowering in "expensive code gen mode", the lower-invoke pass turns an
invoke instruction into a setjmp call and some other stuff.  The problem with
this is that ANSI C requires that values live across a setjmp be stored in
volatile variables.  Because of this, any LLVM values live across the invoke
should be turned into alloca's, and use volatile loads and stores to access them.

This is related to Bug 77, but now applies to all of the code generators, not
just the C backend.  Also, the lower-invoke pass has enough information to only
"spill" values that are live across the invoke to the stack, instead of spilling
_everything_ like the solution to Bug 77 did.

This problem isn't interesting enough to me to fix anytime in the near future
(because it doesn't affect many common platforms, and eventually the code
generators will have real invoke/unwind support), but if someone wants to tackle
it, feel free. :)


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list