[llvm-commits] [llvm] r85311 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp
Chris Lattner
sabre at nondot.org
Tue Oct 27 14:21:07 PDT 2009
Author: lattner
Date: Tue Oct 27 16:21:06 2009
New Revision: 85311
URL: http://llvm.org/viewvc/llvm-project?rev=85311&view=rev
Log:
CBE support for indbr.
Modified:
llvm/trunk/lib/Target/CBackend/CBackend.cpp
Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=85311&r1=85310&r2=85311&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original)
+++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Tue Oct 27 16:21:06 2009
@@ -282,6 +282,7 @@
void visitReturnInst(ReturnInst &I);
void visitBranchInst(BranchInst &I);
void visitSwitchInst(SwitchInst &I);
+ void visitIndBrInst(IndBrInst &I);
void visitInvokeInst(InvokeInst &I) {
llvm_unreachable("Lowerinvoke pass didn't work!");
}
@@ -2578,6 +2579,12 @@
Out << " }\n";
}
+void CWriter::visitIndBrInst(IndBrInst &IBI) {
+ Out << " goto *(void*)(";
+ writeOperand(IBI.getOperand(0));
+ Out << ");\n";
+}
+
void CWriter::visitUnreachableInst(UnreachableInst &I) {
Out << " /*UNREACHABLE*/;\n";
}
More information about the llvm-commits
mailing list