This patch updates the native Windows exception handler prepare pass to outline arguments and non-alloca values that are referenced in outlined handler functions, assigning a slot in the frame allocation block for the referenced values and spilling them to that location.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
lgtm
Can you make sure these files aren't committed with DOS line endings? The last few commits have had them.
Ultimately I want to come up with a better solution than Demote*ToStack, but it'll work for now.
lib/CodeGen/WinEHPrepare.cpp | ||
---|---|---|
342 | If the cast can never fail, use cast<> over dyn_cast<> so that it's checked with an assertion. Otherwise the ++II will just crash in a less obvious way. | |
369–371 | While LLVM does elide braces when possible, we usually try to stay consistent with braces or no braces across an else-if chain. | |
372–373 | This is just cast<Instruction>(ParentVal); |
If the cast can never fail, use cast<> over dyn_cast<> so that it's checked with an assertion. Otherwise the ++II will just crash in a less obvious way.