aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp17
-rw-r--r--lib/Analysis/IPA/FindUnsafePointerTypes.cpp20
-rw-r--r--lib/Analysis/IPA/FindUsedTypes.cpp22
-rw-r--r--lib/Analysis/InductionVariable.cpp8
-rw-r--r--lib/Analysis/IntervalPartition.cpp10
-rw-r--r--lib/Analysis/LoopInfo.cpp2
-rw-r--r--lib/Analysis/PostDominators.cpp18
-rw-r--r--lib/AsmParser/Parser.cpp2
-rw-r--r--lib/AsmParser/llvmAsmParser.y55
-rw-r--r--lib/Bytecode/Writer/SlotCalculator.cpp28
-rw-r--r--lib/CodeGen/InstrSched/InstrScheduling.cpp11
-rw-r--r--lib/CodeGen/InstrSched/SchedGraph.cpp2
-rw-r--r--lib/CodeGen/RegAlloc/LiveRangeInfo.cpp29
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.cpp243
-rw-r--r--lib/Target/SparcV9/InstrSched/InstrScheduling.cpp11
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedGraph.cpp2
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp29
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp243
-rw-r--r--lib/Transforms/ExprTypeConvert.cpp56
-rw-r--r--lib/Transforms/IPO/FunctionResolution.cpp23
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp93
-rw-r--r--lib/Transforms/IPO/RaiseAllocations.cpp26
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp106
-rw-r--r--lib/Transforms/LevelRaise.cpp60
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp51
-rw-r--r--lib/Transforms/Scalar/ConstantProp.cpp4
-rw-r--r--lib/Transforms/Scalar/DCE.cpp19
-rw-r--r--lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp41
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp133
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp29
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp322
-rw-r--r--lib/Transforms/Scalar/LICM.cpp62
-rw-r--r--lib/Transforms/Scalar/PiNodeInsertion.cpp12
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp42
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp132
-rw-r--r--lib/Transforms/Scalar/SimplifyCFG.cpp29
-rw-r--r--lib/Transforms/Scalar/SymbolStripping.cpp25
-rw-r--r--lib/Transforms/TransformInternals.cpp8
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp44
-rw-r--r--lib/Transforms/Utils/PromoteMemoryToRegister.cpp21
-rw-r--r--lib/VMCore/AsmWriter.cpp148
-rw-r--r--lib/VMCore/BasicBlock.cpp78
-rw-r--r--lib/VMCore/Constants.cpp1
-rw-r--r--lib/VMCore/Dominators.cpp18
-rw-r--r--lib/VMCore/Function.cpp44
-rw-r--r--lib/VMCore/InstrTypes.cpp1
-rw-r--r--lib/VMCore/Instruction.cpp3
-rw-r--r--lib/VMCore/Module.cpp45
-rw-r--r--lib/VMCore/Pass.cpp26
-rw-r--r--lib/VMCore/PassManagerT.h38
-rw-r--r--lib/VMCore/SlotCalculator.cpp28
-rw-r--r--lib/VMCore/SymbolTable.cpp3
-rw-r--r--lib/VMCore/SymbolTableListTraitsImpl.h88
-rw-r--r--lib/VMCore/ValueHolderImpl.h222
-rw-r--r--lib/VMCore/iBranch.cpp13
-rw-r--r--lib/VMCore/iSwitch.cpp3
56 files changed, 1304 insertions, 1545 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index c84719fd6a..1c61ff3d8b 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -95,31 +95,30 @@ void CallGraph::addToCallGraph(Function *M) {
}
// Look for an indirect method call...
- for (Function::iterator BBI = M->begin(), BBE = M->end(); BBI != BBE; ++BBI) {
- BasicBlock *BB = *BBI;
+ for (Function::iterator BB = M->begin(), BBE = M->end(); BB != BBE; ++BB)
for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE; ++II){
- Instruction *I = *II;
+ Instruction &I = *II;
- if (CallInst *CI = dyn_cast<CallInst>(I)) {
+ if (CallInst *CI = dyn_cast<CallInst>(&I)) {
if (CI->getCalledFunction() == 0)
Node->addCalledMethod(ExternalNode);
- } else if (InvokeInst *II = dyn_cast<InvokeInst>(I)) {
+ } else if (InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
if (II->getCalledFunction() == 0)
Node->addCalledMethod(ExternalNode);
}
}
- }
}
-bool CallGraph::run(Module *TheModule) {
+bool CallGraph::run(Module &M) {
destroy();
- Mod = TheModule;
+ Mod = &M;
ExternalNode = getNodeFor(0);
Root = 0;
// Add every method to the call graph...
- for_each(Mod->begin(), Mod->end(), bind_obj(this,&CallGraph::addToCallGraph));
+ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
+ addToCallGraph(I);
// If we didn't find a main method, use the external call graph node
if (Root == 0) Root = ExternalNode;
diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
index 1723a8edac..8cad60d178 100644
--- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
+++ b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
@@ -19,7 +19,6 @@
#include "llvm/Analysis/FindUnsafePointerTypes.h"
#include "llvm/Assembly/CachedWriter.h"
#include "llvm/Type.h"
-#include "llvm/Instruction.h"
#include "llvm/Module.h"
#include "llvm/Support/InstIterator.h"
#include "Support/CommandLine.h"
@@ -50,21 +49,20 @@ static inline bool isSafeInstruction(const Instruction *I) {
}
-bool FindUnsafePointerTypes::run(Module *Mod) {
- for (Module::iterator MI = Mod->begin(), ME = Mod->end();
- MI != ME; ++MI) {
- const Function *M = *MI; // We don't need/want write access
- for (const_inst_iterator I = inst_begin(M), E = inst_end(M); I != E; ++I) {
- const Instruction *Inst = *I;
- const Type *ITy = Inst->getType();
+bool FindUnsafePointerTypes::run(Module &Mod) {
+ for (Module::iterator FI = Mod.begin(), E = Mod.end();
+ FI != E; ++FI) {
+ const Function *F = FI; // We don't need/want write access
+ for (const_inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) {
+ const Type *ITy = I->getType();
if (isa<PointerType>(ITy) && !UnsafeTypes.count((PointerType*)ITy))
- if (!isSafeInstruction(Inst)) {
+ if (!isSafeInstruction(*I)) {
UnsafeTypes.insert((PointerType*)ITy);
if (PrintFailures) {
- CachedWriter CW(M->getParent(), std::cerr);
+ CachedWriter CW(F->getParent(), std::cerr);
CW << "FindUnsafePointerTypes: Type '" << ITy
- << "' marked unsafe in '" << M->getName() << "' by:\n" << Inst;
+ << "' marked unsafe in '" << F->getName() << "' by:\n" << **I;
}
}
}
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp
index b4897a265a..8cfe1085a3 100644
--- a/lib/Analysis/IPA/FindUsedTypes.cpp
+++ b/lib/Analysis/IPA/FindUsedTypes.cpp
@@ -7,10 +7,8 @@
#include "llvm/Analysis/FindUsedTypes.h"
#include "llvm/Assembly/CachedWriter.h"
#include "llvm/SymbolTable.h"
-#include "llvm/GlobalVariable.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
-#include "llvm/Instruction.h"
#include "llvm/Support/InstIterator.h"
AnalysisID FindUsedTypes::ID(AnalysisID::create<FindUsedTypes>());
@@ -42,25 +40,25 @@ void FindUsedTypes::IncorporateSymbolTable(const SymbolTable *ST) {
// run - This incorporates all types used by the specified module
//
-bool FindUsedTypes::run(Module *m) {
+bool FindUsedTypes::run(Module &m) {
UsedTypes.clear(); // reset if run multiple times...
- if (IncludeSymbolTables && m->hasSymbolTable())
- IncorporateSymbolTable(m->getSymbolTable()); // Add symtab first...
+ if (IncludeSymbolTables && m.hasSymbolTable())
+ IncorporateSymbolTable(m.getSymbolTable()); // Add symtab first...
// Loop over global variables, incorporating their types
- for (Module::const_giterator I = m->gbegin(), E = m->gend(); I != E; ++I)
- IncorporateType((*I)->getType());
+ for (Module::const_giterator I = m.gbegin(), E = m.gend(); I != E; ++I)
+ IncorporateType(I->getType());
- for (Module::iterator MI = m->begin(), ME = m->end(); MI != ME; ++MI) {
- const Function *M = *MI;
- if (IncludeSymbolTables && M->hasSymbolTable())
- IncorporateSymbolTable(M->getSymbolTable()); // Add symtab first...
+ for (Module::iterator MI = m.begin(), ME = m.end(); MI != ME; ++MI) {
+ const Function &F = *MI;
+ if (IncludeSymbolTables && F.hasSymbolTable())
+ IncorporateSymbolTable(F.getSymbolTable()); // Add symtab first...
// Loop over all of the instructions in the function, adding their return
// type as well as the types of their operands.
//
- for (const_inst_iterator II = inst_begin(M), IE = inst_end(M);
+ for (const_inst_iterator II = inst_begin(F), IE = inst_end(F);
II != IE; ++II) {
const Instruction *I = *II;
const Type *Ty = I->getType();
diff --git a/lib/Analysis/InductionVariable.cpp b/lib/Analysis/InductionVariable.cpp
index b3da95f090..8637a1ab7e 100644
--- a/lib/Analysis/InductionVariable.cpp
+++ b/lib/Analysis/InductionVariable.cpp
@@ -31,8 +31,8 @@ static bool isLoopInvariant(const Value *V, const Loop *L) {
if (isa<Constant>(V) || isa<Argument>(V) || isa<GlobalValue>(V))
return true;
- Instruction *I = cast<Instruction>(V);
- BasicBlock *BB = I->getParent();
+ const Instruction *I = cast<Instruction>(V);
+ const BasicBlock *BB = I->getParent();
return !L->contains(BB);
}
@@ -41,8 +41,8 @@ enum InductionVariable::iType
InductionVariable::Classify(const Value *Start, const Value *Step,
const Loop *L = 0) {
// Check for cannonical and simple linear expressions now...
- if (ConstantInt *CStart = dyn_cast<ConstantInt>(Start))
- if (ConstantInt *CStep = dyn_cast<ConstantInt>(Step)) {
+ if (const ConstantInt *CStart = dyn_cast<ConstantInt>(Start))
+ if (const ConstantInt *CStep = dyn_cast<ConstantInt>(Step)) {
if (CStart->equalsInt(0) && CStep->equalsInt(1))
return Cannonical;
else
diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp
index 5dfccd2c80..8d0e34c1a7 100644
--- a/lib/Analysis/IntervalPartition.cpp
+++ b/lib/Analysis/IntervalPartition.cpp
@@ -51,19 +51,17 @@ void IntervalPartition::updatePredecessors(Interval *Int) {
// IntervalPartition ctor - Build the first level interval partition for the
// specified function...
//
-bool IntervalPartition::runOnFunction(Function *F) {
- assert(F->front() && "Cannot operate on prototypes!");
-
+bool IntervalPartition::runOnFunction(Function &F) {
// Pass false to intervals_begin because we take ownership of it's memory
- function_interval_iterator I = intervals_begin(F, false);
- assert(I != intervals_end(F) && "No intervals in function!?!?!");
+ function_interval_iterator I = intervals_begin(&F, false);
+ assert(I != intervals_end(&F) && "No intervals in function!?!?!");
addIntervalToPartition(RootInterval = *I);
++I; // After the first one...
// Add the rest of the intervals to the partition...
- for_each(I, intervals_end(F),
+ for_each(I, intervals_end(&F),
bind_obj(this, &IntervalPartition::addIntervalToPartition));
// Now that we know all of the successor information, propogate this to the
diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp
index 29558dab8b..2559912c0e 100644
--- a/lib/Analysis/LoopInfo.cpp
+++ b/lib/Analysis/LoopInfo.cpp
@@ -35,7 +35,7 @@ void LoopInfo::releaseMemory() {
//===----------------------------------------------------------------------===//
// LoopInfo implementation
//
-bool LoopInfo::runOnFunction(Function *F) {
+bool LoopInfo::runOnFunction(Function &) {
releaseMemory();
Calculate(getAnalysis<DominatorSet>()); // Update
return false;
diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp
index ca0b64a064..caff1f1db3 100644
--- a/lib/Analysis/PostDominators.cpp
+++ b/lib/Analysis/PostDominators.cpp
@@ -21,7 +21,7 @@ using std::set;
AnalysisID DominatorSet::ID(AnalysisID::create<DominatorSet>(), true);
AnalysisID DominatorSet::PostDomID(AnalysisID::create<DominatorSet>(), true);
-bool DominatorSet::runOnFunction(Function *F) {
+bool DominatorSet::runOnFunction(Function &F) {
Doms.clear(); // Reset from the last time we were run...
if (isPostDominator())
@@ -40,17 +40,17 @@ bool DominatorSet::dominates(Instruction *A, Instruction *B) const {
// Loop through the basic block until we find A or B.
BasicBlock::iterator I = BBA->begin();
- for (; *I != A && *I != B; ++I) /*empty*/;
+ for (; &*I != A && &*I != B; ++I) /*empty*/;
// A dominates B if it is found first in the basic block...
- return *I == A;
+ return &*I == A;
}
// calcForwardDominatorSet - This method calculates the forward dominator sets
// for the specified function.
//
-void DominatorSet::calcForwardDominatorSet(Function *M) {
- Root = M->getEntryNode();
+void DominatorSet::calcForwardDominatorSet(Function &F) {
+ Root = &F.getEntryNode();
assert(pred_begin(Root) == pred_end(Root) &&
"Root node has predecessors in function!");
@@ -59,7 +59,7 @@ void DominatorSet::calcForwardDominatorSet(Function *M) {
Changed = false;
DomSetType WorkingSet;
- df_iterator<Function*> It = df_begin(M), End = df_end(M);
+ df_iterator<Function*> It = df_begin(&F), End = df_end(&F);
for ( ; It != End; ++It) {
BasicBlock *BB = *It;
pred_iterator PI = pred_begin(BB), PEnd = pred_end(BB);
@@ -93,7 +93,7 @@ void DominatorSet::calcForwardDominatorSet(Function *M) {
// only have a single exit node (return stmt), then calculates the post
// dominance sets for the function.
//
-void DominatorSet::calcPostDominatorSet(Function *F) {
+void DominatorSet::calcPostDominatorSet(Function &F) {
// Since we require that the unify all exit nodes pass has been run, we know
// that there can be at most one return instruction in the function left.
// Get it.
@@ -101,8 +101,8 @@ void DominatorSet::calcPostDominatorSet(Function *F) {
Root = getAnalysis<UnifyFunctionExitNodes>().getExitNode();
if (Root == 0) { // No exit node for the function? Postdomsets are all empty
- for (Function::iterator FI = F->begin(), FE = F->end(); FI != FE; ++FI)
- Doms[*FI] = DomSetType();
+ for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
+ Doms[FI] = DomSetType();
return;
}
diff --git a/lib/AsmParser/Parser.cpp b/lib/AsmParser/Parser.cpp
index 19632dd131..7af313348d 100644
--- a/lib/AsmParser/Parser.cpp
+++ b/lib/AsmParser/Parser.cpp
@@ -34,7 +34,7 @@ Module *ParseAssemblyFile(const string &Filename) { // throw (ParseException)
fclose(F);
if (Result) { // Check to see that it is valid...
- if (verifyModule(Result)) {
+ if (verifyModule(*Result)) {
delete Result;
throw ParseException(Filename, "Source file is not well formed LLVM!");
}
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index de8d0e617f..4b9f36fe71 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -45,8 +45,8 @@ string CurFilename;
#define UR_OUT(X)
#endif
-// This contains info used when building the body of a method. It is destroyed
-// when the method is completed.
+// This contains info used when building the body of a function. It is
+// destroyed when the function is completed.
//
typedef vector<Value *> ValueList; // Numbered defs
static void ResolveDefinitions(vector<ValueList> &LateResolvers,
@@ -68,9 +68,9 @@ static struct PerModuleInfo {
GlobalRefsType GlobalRefs;
void ModuleDone() {
- // If we could not resolve some methods at method compilation time (calls to
- // methods before they are defined), resolve them now... Types are resolved
- // when the constant pool has been completely parsed.
+ // If we could not resolve some functions at function compilation time
+ // (calls to functions before they are defined), resolve them now... Types
+ // are resolved when the constant pool has been completely parsed.
//
ResolveDefinitions(LateResolveValues);
@@ -88,7 +88,7 @@ static struct PerModuleInfo {
ThrowException(UndefinedReferences);
}
- Values.clear(); // Clear out method local definitions
+ Values.clear(); // Clear out function local definitions
Types.clear();
CurrentModule = 0;
}
@@ -132,13 +132,13 @@ static struct PerModuleInfo {
} CurModule;
static struct PerFunctionInfo {
- Function *CurrentFunction; // Pointer to current method being created
+ Function *CurrentFunction; // Pointer to current function being created
vector<ValueList> Values; // Keep track of numbered definitions
vector<ValueList> LateResolveValues;
vector<PATypeHolder> Types;
map<ValID, PATypeHolder> LateResolveTypes;
- bool isDeclare; // Is this method a forward declararation?
+ bool isDeclare; // Is this function a forward declararation?
inline PerFunctionInfo() {
CurrentFunction = 0;
@@ -156,12 +156,12 @@ static struct PerFunctionInfo {
// resolve the branches now...
ResolveDefinitions(LateResolveValues, &CurModule.LateResolveValues);
- Values.clear(); // Clear out method local definitions
+ Values.clear(); // Clear out function local definitions
Types.clear();
CurrentFunction = 0;
isDeclare = false;
}
-} CurMeth; // Info for the current method...
+} CurMeth; // Info for the current function...
static bool inFunctionScope() { return CurMeth.CurrentFunction != 0; }
@@ -210,7 +210,7 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) {
Value *N = SymTab ? SymTab->lookup(Type::TypeTy, Name) : 0;
if (N == 0) {
- // Symbol table doesn't automatically chain yet... because the method
+ // Symbol table doesn't automatically chain yet... because the function
// hasn't been added to the module...
//
SymTab = CurModule.CurrentModule->getSymbolTable();
@@ -741,7 +741,7 @@ OptInternal : INTERNAL { $$ = true; } | /*empty*/ { $$ = false; };
//===----------------------------------------------------------------------===//
// Types includes all predefined types... except void, because it can only be
-// used in specific contexts (method returning void for example). To have
+// used in specific contexts (function returning void for example). To have
// access to it, a user must explicitly use TypesV.
//
@@ -810,7 +810,7 @@ UpRTypes : '\\' EUINT64VAL { // Type UpReference
delete $1;
};
-// TypeList - Used for struct declarations and as a basis for method type
+// TypeList - Used for struct declarations and as a basis for function type
// declaration type lists
//
TypeListI : UpRTypes {
@@ -821,7 +821,7 @@ TypeListI : UpRTypes {
($$=$1)->push_back(*$3); delete $3;
};
-// ArgTypeList - List of types for a method type declaration...
+// ArgTypeList - List of types for a function type declaration...
ArgTypeListI : TypeListI
| TypeListI ',' DOTDOTDOT {
($$=$1)->push_back(Type::VoidTy);
@@ -1011,7 +1011,7 @@ Module : FunctionList {
CurModule.ModuleDone();
};
-// FunctionList - A list of methods, preceeded by a constant pool.
+// FunctionList - A list of functions, preceeded by a constant pool.
//
FunctionList : FunctionList Function {
$$ = $1;
@@ -1164,10 +1164,11 @@ FunctionHeaderH : OptInternal TypesV FuncName '(' ArgList ')' {
// Yes it is. If this is the case, either we need to be a forward decl,
// or it needs to be.
if (!CurMeth.isDeclare && !M->isExternal())
- ThrowException("Redefinition of method '" + FunctionName + "'!");
+ ThrowException("Redefinition of function '" + FunctionName + "'!");
- // If we found a preexisting method prototype, remove it from the module,
- // so that we don't get spurious conflicts with global & local variables.
+ // If we found a preexisting function prototype, remove it from the
+ // module, so that we don't get spurious conflicts with global & local
+ // variables.
//
CurModule.CurrentModule->getFunctionList().remove(M);
}
@@ -1182,10 +1183,8 @@ FunctionHeaderH : OptInternal TypesV FuncName '(' ArgList ')' {
CurMeth.FunctionStart(M);
- // Add all of the arguments we parsed to the method...
+ // Add all of the arguments we parsed to the function...
if ($5 && !CurMeth.isDeclare) { // Is null if empty...
- Function::ArgumentListType &ArgList = M->getArgumentList();
-
for (list<pair<Argument*, char*> >::iterator I = $5->begin();
I != $5->end(); ++I) {
if (setValueName(I->first, I->second)) { // Insert into symtab...
@@ -1193,7 +1192,7 @@ FunctionHeaderH : OptInternal TypesV FuncName '(' ArgList ')' {
}
InsertValue(I->first);
- ArgList.push_back(I->first);
+ M->getArgumentList().push_back(I->first);
}
delete $5; // We're now done with the argument list
} else if ($5) {
@@ -1212,7 +1211,7 @@ BEGIN : BEGINTOK | '{'; // Allow BEGIN or '{' to start a function
FunctionHeader : FunctionHeaderH BEGIN {
$$ = CurMeth.CurrentFunction;
- // Resolve circular types before we parse the body of the method.
+ // Resolve circular types before we parse the body of the function.
ResolveTypes(CurMeth.LateResolveTypes);
};
@@ -1275,10 +1274,10 @@ ResolvedVal : Types ValueRef {
BasicBlockList : BasicBlockList BasicBlock {
- ($$ = $1)->getBasicBlocks().push_back($2);
+ ($$ = $1)->getBasicBlockList().push_back($2);
}
- | FunctionHeader BasicBlock { // Do not allow methods with 0 basic blocks
- ($$ = $1)->getBasicBlocks().push_back($2);
+ | FunctionHeader BasicBlock { // Do not allow functions with 0 basic blocks
+ ($$ = $1)->getBasicBlockList().push_back($2);
};
@@ -1358,7 +1357,7 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result...
}
delete $2;
- Value *V = getVal(PMTy, $3); // Get the method we're calling...
+ Value *V = getVal(PMTy, $3); // Get the function we're calling...
BasicBlock *Normal = dyn_cast<BasicBlock>($8);
BasicBlock *Except = dyn_cast<BasicBlock>($10);
@@ -1494,7 +1493,7 @@ InstVal : BinaryOps Types ValueRef ',' ValueRef {
}
delete $2;
- Value *V = getVal(PMTy, $3); // Get the method we're calling...
+ Value *V = getVal(PMTy, $3); // Get the function we're calling...
// Create the call node...
if (!$5) { // Has no arguments?
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp
index 6dad92609a..6b83a116e5 100644
--- a/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -11,15 +11,11 @@
#include "llvm/SlotCalculator.h"
#include "llvm/Analysis/ConstantsScanner.h"
-#include "llvm/Function.h"
-#include "llvm/GlobalVariable.h"
#include "llvm/Module.h"
-#include "llvm/BasicBlock.h"
#include "llvm/iOther.h"
#include "llvm/Constant.h"
#include "llvm/DerivedTypes.h"