Bugzilla – Bug 240
[lowerinvoke] Values live across an invoke should become volatile stack objects
Last modified: 2005-09-27 16:20:38
You need to log in before you can comment on or make changes to this bug.
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. :) -Chris
Changing all of these bugs who do not have people looking at them to be assigned to "unassignedbugs", indicating that if someone is feeling ambitious, they can take ownership of the bug. If I stole your bug, and you still want it, feel free to take ownership back. -Chris
Fixed. Patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050926/028386.html This patch also fixes Bug 631. -Chris