aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-22 00:24:57 +0000
committerOwen Anderson <resistor@mac.com>2009-07-22 00:24:57 +0000
commite922c0201916e0b980ab3cfe91e1413e68d55647 (patch)
tree663be741b84470d97945f01da459a3627af683fd
parent7cf12c7efd37dc12c3ed536a3f4c373dddac2b85 (diff)
Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/tutorial/LangImpl5.html2
-rw-r--r--docs/tutorial/LangImpl6.html2
-rw-r--r--docs/tutorial/LangImpl7.html2
-rw-r--r--examples/Kaleidoscope/toy.cpp2
-rw-r--r--include/llvm/Analysis/ConstantFolding.h10
-rw-r--r--include/llvm/Analysis/LoopPass.h1
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h2
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h6
-rw-r--r--include/llvm/Analysis/ValueTracking.h4
-rw-r--r--include/llvm/BasicBlock.h2
-rw-r--r--include/llvm/CallGraphSCCPass.h1
-rw-r--r--include/llvm/CodeGen/CallingConvLower.h6
-rw-r--r--include/llvm/CodeGen/FastISel.h1
-rw-r--r--include/llvm/Function.h2
-rw-r--r--include/llvm/Instructions.h10
-rw-r--r--include/llvm/Pass.h16
-rw-r--r--include/llvm/Support/IRBuilder.h8
-rw-r--r--include/llvm/Support/TargetFolder.h2
-rw-r--r--include/llvm/Transforms/Utils/PromoteMemToReg.h2
-rw-r--r--include/llvm/Transforms/Utils/ValueMapper.h2
-rw-r--r--include/llvm/Value.h4
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp32
-rw-r--r--lib/Analysis/ConstantFolding.cpp142
-rw-r--r--lib/Analysis/IPA/Andersens.cpp2
-rw-r--r--lib/Analysis/LoopVR.cpp6
-rw-r--r--lib/Analysis/ScalarEvolution.cpp63
-rw-r--r--lib/Analysis/ScalarEvolutionExpander.cpp20
-rw-r--r--lib/Analysis/ValueTracking.cpp12
-rw-r--r--lib/CodeGen/DwarfEHPrepare.cpp4
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp24
-rw-r--r--lib/CodeGen/SelectionDAG/CallingConvLower.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp10
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
-rw-r--r--lib/CodeGen/ShadowStackGC.cpp40
-rw-r--r--lib/CodeGen/UnreachableBlockElim.cpp2
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp18
-rw-r--r--lib/Linker/LinkModules.cpp2
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.cpp2
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp8
-rw-r--r--lib/Target/ARM/Thumb1RegisterInfo.cpp2
-rw-r--r--lib/Target/ARM/Thumb2RegisterInfo.cpp2
-rw-r--r--lib/Target/Alpha/AlphaISelLowering.cpp4
-rw-r--r--lib/Target/CBackend/CBackend.cpp12
-rw-r--r--lib/Target/CellSPU/SPUISelLowering.cpp2
-rw-r--r--lib/Target/MSP430/MSP430ISelLowering.cpp8
-rw-r--r--lib/Target/Mips/MipsISelLowering.cpp8
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp12
-rw-r--r--lib/Target/Sparc/SparcISelLowering.cpp6
-rw-r--r--lib/Target/SystemZ/SystemZISelLowering.cpp8
-rw-r--r--lib/Target/X86/X86FastISel.cpp4
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp8
-rw-r--r--lib/Target/X86/X86InstrInfo.cpp4
-rw-r--r--lib/Target/XCore/XCoreISelLowering.cpp8
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp17
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp22
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp1
-rw-r--r--lib/Transforms/IPO/ExtractGV.cpp11
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp1
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp172
-rw-r--r--lib/Transforms/IPO/IPConstantPropagation.cpp10
-rw-r--r--lib/Transforms/IPO/IndMemRemoval.cpp2
-rw-r--r--lib/Transforms/IPO/Internalize.cpp2
-rw-r--r--lib/Transforms/IPO/LowerSetJmp.cpp22
-rw-r--r--lib/Transforms/IPO/MergeFunctions.cpp4
-rw-r--r--lib/Transforms/IPO/PartialInlining.cpp2
-rw-r--r--lib/Transforms/IPO/PartialSpecialization.cpp2
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp2
-rw-r--r--lib/Transforms/IPO/RaiseAllocations.cpp24
-rw-r--r--lib/Transforms/IPO/StripDeadPrototypes.cpp1
-rw-r--r--lib/Transforms/IPO/StripSymbols.cpp1
-rw-r--r--lib/Transforms/IPO/StructRetPromotion.cpp3
-rw-r--r--lib/Transforms/Instrumentation/BlockProfiling.cpp8
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp4
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp28
-rw-r--r--lib/Transforms/Instrumentation/RSProfiling.cpp33
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp10
-rw-r--r--lib/Transforms/Scalar/ConstantProp.cpp2
-rw-r--r--lib/Transforms/Scalar/GVN.cpp12
-rw-r--r--lib/Transforms/Scalar/GVNPRE.cpp7
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp12
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp6
-rw-r--r--lib/Transforms/Scalar/JumpThreading.cpp20
-rw-r--r--lib/Transforms/Scalar/LICM.cpp10
-rw-r--r--lib/Transforms/Scalar/LoopIndexSplit.cpp12
-rw-r--r--lib/Transforms/Scalar/LoopRotation.cpp2
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp28
-rw-r--r--lib/Transforms/Scalar/LoopUnswitch.cpp22
-rw-r--r--lib/Transforms/Scalar/MemCpyOptimizer.cpp21
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp22
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp39
-rw-r--r--lib/Transforms/Scalar/Reg2Mem.cpp2
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp12
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp113
-rw-r--r--lib/Transforms/Scalar/SimplifyCFGPass.cpp6
-rw-r--r--lib/Transforms/Scalar/SimplifyLibCalls.cpp6
-rw-r--r--lib/Transforms/Scalar/TailDuplication.cpp4
-rw-r--r--lib/Transforms/Utils/AddrModeMatcher.cpp2
-rw-r--r--lib/Transforms/Utils/BasicBlockUtils.cpp10
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp14
-rw-r--r--lib/Transforms/Utils/CloneModule.cpp4
-rw-r--r--lib/Transforms/Utils/CodeExtractor.cpp38
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp18
-rw-r--r--lib/Transforms/Utils/LCSSA.cpp2
-rw-r--r--lib/Transforms/Utils/Local.cpp6
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp2
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp23
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp56
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp7
-rw-r--r--lib/Transforms/Utils/Mem2Reg.cpp2
-rw-r--r--lib/Transforms/Utils/PromoteMemoryToRegister.cpp14
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp26
-rw-r--r--lib/Transforms/Utils/ValueMapper.cpp10
-rw-r--r--lib/VMCore/AutoUpgrade.cpp56
-rw-r--r--lib/VMCore/BasicBlock.cpp6
-rw-r--r--lib/VMCore/Function.cpp6
-rw-r--r--lib/VMCore/Value.cpp2
-rw-r--r--lib/VMCore/Verifier.cpp3
-rw-r--r--tools/bugpoint/ExtractFunction.cpp2
-rw-r--r--tools/bugpoint/TestPasses.cpp2
-rw-r--r--utils/TableGen/CallingConvEmitter.cpp4
120 files changed, 835 insertions, 786 deletions
diff --git a/docs/tutorial/LangImpl5.html b/docs/tutorial/LangImpl5.html
index 5f50cb28c5..a783c4abbd 100644
--- a/docs/tutorial/LangImpl5.html
+++ b/docs/tutorial/LangImpl5.html
@@ -856,7 +856,7 @@ the loop again and exiting the loop. Any future code is emitted in the
NamedValues.erase(VarName);
// for expr always returns 0.0.
- return TheFunction->getContext()->getNullValue(Type::DoubleTy);
+ return TheFunction->getContext().getNullValue(Type::DoubleTy);
}
</pre>
</div>
diff --git a/docs/tutorial/LangImpl6.html b/docs/tutorial/LangImpl6.html
index 9fffb53398..1933d71c06 100644
--- a/docs/tutorial/LangImpl6.html
+++ b/docs/tutorial/LangImpl6.html
@@ -1570,7 +1570,7 @@ Value *ForExprAST::Codegen() {
// for expr always returns 0.0.
- return TheFunction->getContext()->getNullValue(Type::DoubleTy);
+ return TheFunction->getContext().getNullValue(Type::DoubleTy);
}
Function *PrototypeAST::Codegen() {
diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html
index 27a30f7343..07c8da653c 100644
--- a/docs/tutorial/LangImpl7.html
+++ b/docs/tutorial/LangImpl7.html
@@ -1858,7 +1858,7 @@ Value *ForExprAST::Codegen() {
// for expr always returns 0.0.
- return TheFunction->getContext()->getNullValue(Type::DoubleTy);
+ return TheFunction->getContext().getNullValue(Type::DoubleTy);
}
Value *VarExprAST::Codegen() {
diff --git a/examples/Kaleidoscope/toy.cpp b/examples/Kaleidoscope/toy.cpp
index 4f9e949829..1aa9965fa4 100644
--- a/examples/Kaleidoscope/toy.cpp
+++ b/examples/Kaleidoscope/toy.cpp
@@ -856,7 +856,7 @@ Value *ForExprAST::Codegen() {
// for expr always returns 0.0.
- return TheFunction->getContext()->getNullValue(Type::DoubleTy);
+ return TheFunction->getContext().getNullValue(Type::DoubleTy);
}
Value *VarExprAST::Codegen() {
diff --git a/include/llvm/Analysis/ConstantFolding.h b/include/llvm/Analysis/ConstantFolding.h
index 6c8acf0c27..3e393ff691 100644
--- a/include/llvm/Analysis/ConstantFolding.h
+++ b/include/llvm/Analysis/ConstantFolding.h
@@ -29,13 +29,13 @@ namespace llvm {
/// is returned. Note that this function can only fail when attempting to fold
/// instructions like loads and stores, which have no constant expression form.
///
-Constant *ConstantFoldInstruction(Instruction *I, LLVMContext *Context,
+Constant *ConstantFoldInstruction(Instruction *I, LLVMContext &Context,
const TargetData *TD = 0);
/// ConstantFoldConstantExpression - Attempt to fold the constant expression
/// using the specified TargetData. If successful, the constant result is
/// result is returned, if not, null is returned.
-Constant *ConstantFoldConstantExpression(ConstantExpr *CE, LLVMContext *Context,
+Constant *ConstantFoldConstantExpression(ConstantExpr *CE, LLVMContext &Context,
const TargetData *TD = 0);
/// ConstantFoldInstOperands - Attempt to constant fold an instruction with the
@@ -46,7 +46,7 @@ Constant *ConstantFoldConstantExpression(ConstantExpr *CE, LLVMContext *Context,
///
Constant *ConstantFoldInstOperands(unsigned Opcode, const Type *DestTy,
Constant*const * Ops, unsigned NumOps,
- LLVMContext *Context,
+ LLVMContext &Context,
const TargetData *TD = 0);
/// ConstantFoldCompareInstOperands - Attempt to constant fold a compare
@@ -55,7 +55,7 @@ Constant *ConstantFoldInstOperands(unsigned Opcode, const Type *DestTy,
///
Constant *ConstantFoldCompareInstOperands(unsigned Predicate,
Constant*const * Ops, unsigned NumOps,
- LLVMContext *Context,
+ LLVMContext &Context,
const TargetData *TD = 0);
@@ -63,7 +