Instead of hacking in custom support for Invoke/Unwind, use the LowerInvoke pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8871 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index d511de6..dcc9bea 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -50,6 +50,13 @@
// FIXME: Implement the switch instruction in the instruction selector!
PM.add(createLowerSwitchPass());
+ // FIXME: Implement the invoke/unwind instructions!
+ PM.add(createLowerInvokePass());
+
+ // FIXME: The code generator does not properly handle functions with
+ // unreachable basic blocks.
+ PM.add(createCFGSimplificationPass());
+
if (NoPatternISel)
PM.add(createX86SimpleInstructionSelector(*this));
else
@@ -94,6 +101,13 @@
// FIXME: Implement the switch instruction in the instruction selector!
PM.add(createLowerSwitchPass());
+ // FIXME: Implement the invoke/unwind instructions!
+ PM.add(createLowerInvokePass());
+
+ // FIXME: The code generator does not properly handle functions with
+ // unreachable basic blocks.
+ PM.add(createCFGSimplificationPass());
+
if (NoPatternISel)
PM.add(createX86SimpleInstructionSelector(*this));
else