diff options
| author | Bill Wendling <isanbard@gmail.com> | 2010-07-15 23:42:21 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2010-07-15 23:42:21 +0000 |
| commit | 22d56b4791f13680c0de7c199f80e9b6d424e59b (patch) | |
| tree | 344c2c3d1dafa1d73f9c6342120493cedd016c72 /lib/CodeGen | |
| parent | 6ce7a341f2605d0d4bc91981b7684ef2a0d44f28 (diff) | |
| download | external_llvm-22d56b4791f13680c0de7c199f80e9b6d424e59b.zip external_llvm-22d56b4791f13680c0de7c199f80e9b6d424e59b.tar.gz external_llvm-22d56b4791f13680c0de7c199f80e9b6d424e59b.tar.bz2 | |
Revert. This isn't the correct way to go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 14 | ||||
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 2 |
2 files changed, 1 insertions, 15 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 1fa887c..458e865 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -796,7 +796,6 @@ void SelectionDAGBuilder::visit(unsigned Opcode, const User &I) { #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. @@ -2195,19 +2194,6 @@ void SelectionDAGBuilder::visitIndirectBr(const IndirectBrInst &I) { getValue(I.getAddress()))); } -void SelectionDAGBuilder::visitUnreachable(const 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(const User &I) { // -0.0 - X --> fneg const Type *Ty = I.getType(); diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h index 8621637..46733d6 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h @@ -385,7 +385,7 @@ private: void visitBr(const BranchInst &I); void visitSwitch(const SwitchInst &I); void visitIndirectBr(const IndirectBrInst &I); - void visitUnreachable(const UnreachableInst &I); + void visitUnreachable(const UnreachableInst &I) { /* noop */ } // Helpers for visitSwitch bool handleSmallSwitchRange(CaseRec& CR, |
