diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2016-02-20 07:34:21 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2016-02-20 07:34:21 +0000 |
| commit | 862c5ba3020c02b4ae8fe67120f0fac0c3efaaf2 (patch) | |
| tree | 022f2d6a9ea341da5f33a47d3b672a8c564b40d3 /llvm | |
| parent | 0594ad713bbcb907f662b9c545dfad4703f3dced (diff) | |
| download | bcm5719-llvm-862c5ba3020c02b4ae8fe67120f0fac0c3efaaf2.tar.gz bcm5719-llvm-862c5ba3020c02b4ae8fe67120f0fac0c3efaaf2.zip | |
Move some code from doInitialization to runOnFunction
This has no observable behavior change, it just makes the state
insertion pass look a little more like normal passes.
llvm-svn: 261420
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/X86/X86WinEHState.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86WinEHState.cpp b/llvm/lib/Target/X86/X86WinEHState.cpp index b4edb88d850..55f44395715 100644 --- a/llvm/lib/Target/X86/X86WinEHState.cpp +++ b/llvm/lib/Target/X86/X86WinEHState.cpp @@ -114,9 +114,6 @@ INITIALIZE_PASS(WinEHStatePass, "x86-winehstate", bool WinEHStatePass::doInitialization(Module &M) { TheModule = &M; - FrameEscape = Intrinsic::getDeclaration(TheModule, Intrinsic::localescape); - FrameRecover = Intrinsic::getDeclaration(TheModule, Intrinsic::localrecover); - FrameAddress = Intrinsic::getDeclaration(TheModule, Intrinsic::frameaddress); return false; } @@ -162,6 +159,10 @@ bool WinEHStatePass::runOnFunction(Function &F) { if (!HasPads) return false; + FrameEscape = Intrinsic::getDeclaration(TheModule, Intrinsic::localescape); + FrameRecover = Intrinsic::getDeclaration(TheModule, Intrinsic::localrecover); + FrameAddress = Intrinsic::getDeclaration(TheModule, Intrinsic::frameaddress); + // Disable frame pointer elimination in this function. // FIXME: Do the nested handlers need to keep the parent ebp in ebp, or can we // use an arbitrary register? |

