aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SjLjEHPrepare.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-10-14 16:11:37 +0000
committerDuncan Sands <baldrick@free.fr>2009-10-14 16:11:37 +0000
commit4205cfe3fe4c86814b91248d25f0cf01ecf642b4 (patch)
tree724ab8850796ff140c0c5381ceb40929197922a4 /lib/CodeGen/SjLjEHPrepare.cpp
parentf27a0438aa24fb0ab2e5095fc22525d7e2933033 (diff)
downloadexternal_llvm-4205cfe3fe4c86814b91248d25f0cf01ecf642b4.zip
external_llvm-4205cfe3fe4c86814b91248d25f0cf01ecf642b4.tar.gz
external_llvm-4205cfe3fe4c86814b91248d25f0cf01ecf642b4.tar.bz2
I don't see any point in having both eh.selector.i32 and eh.selector.i64,
so get rid of eh.selector.i64 and rename eh.selector.i32 to eh.selector. Likewise for eh.typeid.for. This aligns us with gcc, which always uses a 32 bit value for the selector on all platforms. My understanding is that the register allocator used to assert if the selector intrinsic size didn't match the pointer size, and this was the reason for introducing the two variants. However my testing shows that this is no longer the case (I fixed some bugs in selector lowering yesterday, and some more today in the fastisel path; these might have caused the original problems). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r--lib/CodeGen/SjLjEHPrepare.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/SjLjEHPrepare.cpp b/lib/CodeGen/SjLjEHPrepare.cpp
index 04bc6cf..e987fa2 100644
--- a/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/lib/CodeGen/SjLjEHPrepare.cpp
@@ -50,8 +50,7 @@ namespace {
Constant *FrameAddrFn;
Constant *LSDAAddrFn;
Value *PersonalityFn;
- Constant *Selector32Fn;
- Constant *Selector64Fn;
+ Constant *SelectorFn;
Constant *ExceptionFn;
Value *CallSite;
@@ -116,8 +115,7 @@ bool SjLjEHPass::doInitialization(Module &M) {
FrameAddrFn = Intrinsic::getDeclaration(&M, Intrinsic::frameaddress);
BuiltinSetjmpFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_sjlj_setjmp);
LSDAAddrFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_sjlj_lsda);
- Selector32Fn = Intrinsic::getDeclaration(&M, Intrinsic::eh_selector_i32);
- Selector64Fn = Intrinsic::getDeclaration(&M, Intrinsic::eh_selector_i64);
+ SelectorFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_selector);
ExceptionFn = Intrinsic::getDeclaration(&M, Intrinsic::eh_exception);
PersonalityFn = 0;
@@ -298,8 +296,7 @@ bool SjLjEHPass::insertSjLjEHSupport(Function &F) {
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
if (CallInst *CI = dyn_cast<CallInst>(I)) {
- if (CI->getCalledFunction() == Selector32Fn ||
- CI->getCalledFunction() == Selector64Fn) {
+ if (CI->getCalledFunction() == SelectorFn) {
if (!PersonalityFn) PersonalityFn = CI->getOperand(2);
EH_Selectors.push_back(CI);
} else if (CI->getCalledFunction() == ExceptionFn) {