[llvm-branch-commits] [llvm-branch] r136125 - in /llvm/branches/exception-handling-rewrite/lib: Target/CBackend/CBackend.cpp Target/CppBackend/CPPBackend.cpp Transforms/IPO/GlobalOpt.cpp
Bill Wendling
isanbard at gmail.com
Tue Jul 26 13:25:21 PDT 2011
Author: void
Date: Tue Jul 26 15:25:21 2011
New Revision: 136125
URL: http://llvm.org/viewvc/llvm-project?rev=136125&view=rev
Log:
Add some preliminary support for ResumeInst in the C and C++ backends.
Modified:
llvm/branches/exception-handling-rewrite/lib/Target/CBackend/CBackend.cpp
llvm/branches/exception-handling-rewrite/lib/Target/CppBackend/CPPBackend.cpp
llvm/branches/exception-handling-rewrite/lib/Transforms/IPO/GlobalOpt.cpp
Modified: llvm/branches/exception-handling-rewrite/lib/Target/CBackend/CBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/exception-handling-rewrite/lib/Target/CBackend/CBackend.cpp?rev=136125&r1=136124&r2=136125&view=diff
==============================================================================
--- llvm/branches/exception-handling-rewrite/lib/Target/CBackend/CBackend.cpp (original)
+++ llvm/branches/exception-handling-rewrite/lib/Target/CBackend/CBackend.cpp Tue Jul 26 15:25:21 2011
@@ -288,10 +288,12 @@
void visitInvokeInst(InvokeInst &I) {
llvm_unreachable("Lowerinvoke pass didn't work!");
}
-
void visitUnwindInst(UnwindInst &I) {
llvm_unreachable("Lowerinvoke pass didn't work!");
}
+ void visitResumeInst(ResumeInst &I) {
+ llvm_unreachable("Lowerinvoke pass didn't work!");
+ }
void visitUnreachableInst(UnreachableInst &I);
void visitPHINode(PHINode &I);
Modified: llvm/branches/exception-handling-rewrite/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/exception-handling-rewrite/lib/Target/CppBackend/CPPBackend.cpp?rev=136125&r1=136124&r2=136125&view=diff
==============================================================================
--- llvm/branches/exception-handling-rewrite/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/branches/exception-handling-rewrite/lib/Target/CppBackend/CPPBackend.cpp Tue Jul 26 15:25:21 2011
@@ -1064,6 +1064,11 @@
}
break;
}
+ case Instruction::Resume: {
+ Out << "ResumeInst::Create(mod->getContext(), " << opNames[0]
+ << ", " << bbname << ");";
+ break;
+ }
case Instruction::Invoke: {
const InvokeInst* inv = cast<InvokeInst>(I);
Out << "std::vector<Value*> " << iName << "_params;";
@@ -1424,6 +1429,9 @@
Out << "\", " << bbname << ");";
break;
}
+ case Instruction::LandingPad: {
+ break;
+ }
}
DefinedValues.insert(I);
nl(Out);
Modified: llvm/branches/exception-handling-rewrite/lib/Transforms/IPO/GlobalOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/exception-handling-rewrite/lib/Transforms/IPO/GlobalOpt.cpp?rev=136125&r1=136124&r2=136125&view=diff
==============================================================================
--- llvm/branches/exception-handling-rewrite/lib/Transforms/IPO/GlobalOpt.cpp (original)
+++ llvm/branches/exception-handling-rewrite/lib/Transforms/IPO/GlobalOpt.cpp Tue Jul 26 15:25:21 2011
@@ -2506,7 +2506,7 @@
CallStack.pop_back(); // return from fn.
return true; // We succeeded at evaluating this ctor!
} else {
- // invoke, unwind, unreachable.
+ // invoke, unwind, resume, unreachable.
return false; // Cannot handle this terminator.
}
More information about the llvm-branch-commits
mailing list