diff --git a/docs/Passes.html b/docs/Passes.html
index b7f70b91cbf..9393410a360 100644
--- a/docs/Passes.html
+++ b/docs/Passes.html
@@ -161,7 +161,6 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "
\n" if !
-loop-unswitch | Unswitch loops |
-loweratomic | Lower atomic intrinsics to non-atomic form |
-lowerinvoke | Lower invoke and unwind, for unwindless code generators |
--lowersetjmp | Lower Set Jump |
-lowerswitch | Lower SwitchInst's to branches |
-mem2reg | Promote Memory to Register |
-memcpyopt | MemCpy Optimization |
@@ -1476,35 +1475,6 @@ if (X < 3) {
-
-
-
-
- Lowers setjmp and longjmp to use the LLVM invoke and unwind
- instructions as necessary.
-
-
-
- Lowering of longjmp is fairly trivial. We replace the call with a
- call to the LLVM library function __llvm_sjljeh_throw_longjmp().
- This unwinds the stack for us calling all of the destructors for
- objects allocated on the stack.
-
-
-
- At a setjmp call, the basic block is split and the setjmp
- removed. The calls in a function that have a setjmp are converted to
- invoke where the except part checks to see if it's a longjmp
- exception and, if so, if it's handled in the function. If it is, then it gets
- the value returned by the longjmp and goes to where the basic block
- was split. invoke instructions are handled in a similar fashion with
- the original except block being executed if it isn't a longjmp
- except that is handled by that function.
-
-
-
-lowerswitch: Lower SwitchInst's to branches
diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html
index 50cd906119b..5cd248c2db6 100644
--- a/docs/ReleaseNotes.html
+++ b/docs/ReleaseNotes.html
@@ -576,14 +576,13 @@ it run faster:
-
If you're already an LLVM user or developer with out-of-tree changes based
-on LLVM 2.9, this section lists some "gotchas" that you may run into upgrading
-from the previous release.
+
If you're already an LLVM user or developer with out-of-tree changes based on
+ LLVM 2.9, this section lists some "gotchas" that you may run into upgrading
+ from the previous release.
-
+ - The
LowerSetJmp
wasn't used effectively by any of the
+ targets and was removed.
@@ -667,6 +666,9 @@ from the previous release.
isn't used by the current front-ends. So this was removed during the
exception handling rewrite.
+
The LLVMAddLowerSetJmpPass
function from the C API was removed
+ because the LowerSetJmp
pass was removed.
+
diff --git a/include/llvm-c/Transforms/IPO.h b/include/llvm-c/Transforms/IPO.h
index b6397d1c324..710bebe598b 100644
--- a/include/llvm-c/Transforms/IPO.h
+++ b/include/llvm-c/Transforms/IPO.h
@@ -48,9 +48,6 @@ void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM);
/** See llvm::createIPConstantPropagationPass function. */
void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM);
-/** See llvm::createLowerSetJmpPass function. */
-void LLVMAddLowerSetJmpPass(LLVMPassManagerRef PM);
-
/** See llvm::createPruneEHPass function. */
void LLVMAddPruneEHPass(LLVMPassManagerRef PM);
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h
index b0863c3360e..780ab8e0083 100644
--- a/include/llvm/InitializePasses.h
+++ b/include/llvm/InitializePasses.h
@@ -143,7 +143,6 @@ void initializeLowerAtomicPass(PassRegistry&);
void initializeLowerExpectIntrinsicPass(PassRegistry&);
void initializeLowerIntrinsicsPass(PassRegistry&);
void initializeLowerInvokePass(PassRegistry&);
-void initializeLowerSetJmpPass(PassRegistry&);
void initializeLowerSwitchPass(PassRegistry&);
void initializeMachineBlockFrequencyInfoPass(PassRegistry&);
void initializeMachineBranchProbabilityInfoPass(PassRegistry&);
diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h
index 8467d114903..058bd637f95 100644
--- a/include/llvm/LinkAllPasses.h
+++ b/include/llvm/LinkAllPasses.h
@@ -93,7 +93,6 @@ namespace {
(void) llvm::createLoopRotatePass();
(void) llvm::createLowerExpectIntrinsicPass();
(void) llvm::createLowerInvokePass();
- (void) llvm::createLowerSetJmpPass();
(void) llvm::createLowerSwitchPass();
(void) llvm::createNoAAPass();
(void) llvm::createNoProfileInfoPass();
diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h
index 9b59353d623..f9d7f9e6b98 100644
--- a/include/llvm/Transforms/IPO.h
+++ b/include/llvm/Transforms/IPO.h
@@ -49,13 +49,6 @@ ModulePass *createStripDebugDeclarePass();
// These pass removes unused symbols' debug info.
ModulePass *createStripDeadDebugInfoPass();
-//===----------------------------------------------------------------------===//
-/// createLowerSetJmpPass - This function lowers the setjmp/longjmp intrinsics
-/// to invoke/unwind instructions. This should really be part of the C/C++
-/// front-end, but it's so much easier to write transformations in LLVM proper.
-///
-ModulePass *createLowerSetJmpPass();
-
//===----------------------------------------------------------------------===//
/// createConstantMergePass - This function returns a new pass that merges
/// duplicate global constants together into a single constant that is shared.
diff --git a/lib/Transforms/IPO/CMakeLists.txt b/lib/Transforms/IPO/CMakeLists.txt
index b7bf5e402aa..4d8dbc2189a 100644
--- a/lib/Transforms/IPO/CMakeLists.txt
+++ b/lib/Transforms/IPO/CMakeLists.txt
@@ -13,7 +13,6 @@ add_llvm_library(LLVMipo
Inliner.cpp
Internalize.cpp
LoopExtractor.cpp
- LowerSetJmp.cpp
MergeFunctions.cpp
PartialInlining.cpp
PassManagerBuilder.cpp
diff --git a/lib/Transforms/IPO/IPO.cpp b/lib/Transforms/IPO/IPO.cpp
index c0f5625ee2f..b6008b7c3d8 100644
--- a/lib/Transforms/IPO/IPO.cpp
+++ b/lib/Transforms/IPO/IPO.cpp
@@ -35,7 +35,6 @@ void llvm::initializeIPO(PassRegistry &Registry) {
initializeLoopExtractorPass(Registry);
initializeBlockExtractorPassPass(Registry);
initializeSingleLoopExtractorPass(Registry);
- initializeLowerSetJmpPass(Registry);
initializeMergeFunctionsPass(Registry);
initializePartialInlinerPass(Registry);
initializePruneEHPass(Registry);
@@ -86,10 +85,6 @@ void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createIPConstantPropagationPass());
}
-void LLVMAddLowerSetJmpPass(LLVMPassManagerRef PM) {
- unwrap(PM)->add(createLowerSetJmpPass());
-}
-
void LLVMAddPruneEHPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createPruneEHPass());
}
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp
deleted file mode 100644
index 494cee20f20..00000000000
--- a/lib/Transforms/IPO/LowerSetJmp.cpp
+++ /dev/null
@@ -1,547 +0,0 @@
-//===- LowerSetJmp.cpp - Code pertaining to lowering set/long jumps -------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the lowering of setjmp and longjmp to use the
-// LLVM invoke and unwind instructions as necessary.
-//
-// Lowering of longjmp is fairly trivial. We replace the call with a
-// call to the LLVM library function "__llvm_sjljeh_throw_longjmp()".
-// This unwinds the stack for us calling all of the destructors for
-// objects allocated on the stack.
-//
-// At a setjmp call, the basic block is split and the setjmp removed.
-// The calls in a function that have a setjmp are converted to invoke
-// where the except part checks to see if it's a longjmp exception and,
-// if so, if it's handled in the function. If it is, then it gets the
-// value returned by the longjmp and goes to where the basic block was
-// split. Invoke instructions are handled in a similar fashion with the
-// original except block being executed if it isn't a longjmp except
-// that is handled by that function.
-//
-//===----------------------------------------------------------------------===//
-
-//===----------------------------------------------------------------------===//
-// FIXME: This pass doesn't deal with PHI statements just yet. That is,
-// we expect this to occur before SSAification is done. This would seem
-// to make sense, but in general, it might be a good idea to make this
-// pass invokable via the "opt" command at will.
-//===----------------------------------------------------------------------===//
-
-#define DEBUG_TYPE "lowersetjmp"
-#include "llvm/Transforms/IPO.h"
-#include "llvm/Constants.h"
-#include "llvm/DerivedTypes.h"
-#include "llvm/Instructions.h"
-#include "llvm/Intrinsics.h"
-#include "llvm/LLVMContext.h"
-#include "llvm/Module.h"
-#include "llvm/Pass.h"
-#include "llvm/Support/CallSite.h"
-#include "llvm/Support/CFG.h"
-#include "llvm/Support/InstVisitor.h"
-#include "llvm/Transforms/Utils/Local.h"
-#include "llvm/ADT/DepthFirstIterator.h"
-#include "llvm/ADT/Statistic.h"
-#include