[llvm-branch-commits] [llvm-branch] r108479 - in /llvm/branches/Apple/Morbo: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll test/CodeGen/X86/2008-01-25-EmptyFunction.ll
Bill Wendling
isanbard at gmail.com
Thu Jul 15 16:43:22 PDT 2010
Author: void
Date: Thu Jul 15 18:43:21 2010
New Revision: 108479
URL: http://llvm.org/viewvc/llvm-project?rev=108479&view=rev
Log:
Revert. This isn't the correct way to go.
Modified:
llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll
llvm/branches/Apple/Morbo/test/CodeGen/X86/2008-01-25-EmptyFunction.ll
Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=108479&r1=108478&r2=108479&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu Jul 15 18:43:21 2010
@@ -627,7 +627,6 @@
#define HANDLE_INST(NUM, OPCODE, CLASS) \
case Instruction::OPCODE: visit##OPCODE((CLASS&)I); break;
#include "llvm/Instruction.def"
-#undef HANDLE_INST
}
// Assign the ordering to the freshly created DAG nodes.
@@ -2076,19 +2075,6 @@
getValue(I.getAddress())));
}
-void SelectionDAGBuilder::visitUnreachable(UnreachableInst &I) {
- // If the function consists of a single "unreachable" instruction, emit a
- // "trap". This prevents the back-ends from generating empty functions or
- // functions which have a prologue, but no epilogue.
- const BasicBlock *BB = I.getParent();
- const Function *F = BB->getParent();
-
- if (F->size() == 1 && BB->size() == 1 &&
- isa<UnreachableInst>(BB->getTerminator()))
- DAG.setRoot(DAG.getNode(ISD::TRAP, getCurDebugLoc(),
- MVT::Other, getRoot()));
-}
-
void SelectionDAGBuilder::visitFSub(User &I) {
// -0.0 - X --> fneg
const Type *Ty = I.getType();
Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h?rev=108479&r1=108478&r2=108479&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h Thu Jul 15 18:43:21 2010
@@ -394,7 +394,7 @@
void visitBr(BranchInst &I);
void visitSwitch(SwitchInst &I);
void visitIndirectBr(IndirectBrInst &I);
- void visitUnreachable(UnreachableInst &I);
+ void visitUnreachable(UnreachableInst &I) { /* noop */ }
// Helpers for visitSwitch
bool handleSmallSwitchRange(CaseRec& CR,
Modified: llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll?rev=108479&r1=108478&r2=108479&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll Thu Jul 15 18:43:21 2010
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=ppc32 | grep trap
+; RUN: llc < %s -march=ppc32 | grep .byte
target triple = "powerpc-apple-darwin8"
Modified: llvm/branches/Apple/Morbo/test/CodeGen/X86/2008-01-25-EmptyFunction.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/X86/2008-01-25-EmptyFunction.ll?rev=108479&r1=108478&r2=108479&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/X86/2008-01-25-EmptyFunction.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/X86/2008-01-25-EmptyFunction.ll Thu Jul 15 18:43:21 2010
@@ -1,17 +1,8 @@
-; RUN: llc < %s -march=x86 | FileCheck -check-prefix=NO-FP %s
-; RUN: llc < %s -march=x86 -disable-fp-elim | FileCheck -check-prefix=FP %s
+; RUN: llc < %s -march=x86 | grep {.byte 0}
target triple = "i686-apple-darwin8"
-define void @func1() noreturn nounwind {
-entry:
-; NO-FP: ud2
- unreachable
-}
-define void @func2() noreturn nounwind {
+define void @bork() noreturn nounwind {
entry:
-; FP: pushl %ebp
-; FP: movl %esp, %ebp
-; FP: ud2
unreachable
}
More information about the llvm-branch-commits
mailing list