[llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp InstrSelectionSupport.cpp MachineCodeForFunction.cpp
Misha Brukman
brukman at neo.cs.uiuc.edu
Sun Oct 27 18:28:01 PST 2002
Changes in directory llvm/lib/CodeGen/InstrSelection:
InstrSelection.cpp updated: 1.48 -> 1.49
InstrSelectionSupport.cpp updated: 1.35 -> 1.36
MachineCodeForFunction.cpp updated: 1.16 -> 1.17
---
Log message:
Changed `MachineCodeForMethod' to `MachineFunction'.
---
Diffs of the changes:
Index: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
diff -u llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.48 llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.49
--- llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.48 Tue Oct 22 22:30:47 2002
+++ llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp Sun Oct 27 18:27:19 2002
@@ -12,7 +12,7 @@
#include "llvm/CodeGen/InstrForest.h"
#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
-#include "llvm/CodeGen/MachineCodeForMethod.h"
+#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Target/MachineRegInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Function.h"
@@ -155,7 +155,7 @@
if (SelectDebugLevel >= Select_PrintMachineCode)
{
cerr << "\n*** Machine instructions after INSTRUCTION SELECTION\n";
- MachineCodeForMethod::get(&F).dump();
+ MachineFunction::get(&F).dump();
}
return true;
Index: llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
diff -u llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.35 llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.36
--- llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.35 Mon Oct 14 11:30:55 2002
+++ llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp Sun Oct 27 18:27:19 2002
@@ -10,7 +10,7 @@
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrAnnot.h"
#include "llvm/CodeGen/MachineCodeForInstruction.h"
-#include "llvm/CodeGen/MachineCodeForMethod.h"
+#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/InstrForest.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/MachineRegInfo.h"
Index: llvm/lib/CodeGen/InstrSelection/MachineCodeForFunction.cpp
diff -u llvm/lib/CodeGen/InstrSelection/MachineCodeForFunction.cpp:1.16 llvm/lib/CodeGen/InstrSelection/MachineCodeForFunction.cpp:1.17
--- llvm/lib/CodeGen/InstrSelection/MachineCodeForFunction.cpp:1.16 Fri Oct 11 11:10:53 2002
+++ llvm/lib/CodeGen/InstrSelection/MachineCodeForFunction.cpp Sun Oct 27 18:27:19 2002
@@ -6,7 +6,7 @@
// to be stored with each function.
//===---------------------------------------------------------------------===//
-#include "llvm/CodeGen/MachineCodeForMethod.h"
+#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h" // For debug output
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
#include "llvm/Target/TargetMachine.h"
@@ -30,27 +30,27 @@
// This should not be called before "construct()"
// for a given Function.
//
-MachineCodeForMethod&
-MachineCodeForMethod::construct(const Function *M, const TargetMachine &Tar)
+MachineFunction&
+MachineFunction::construct(const Function *M, const TargetMachine &Tar)
{
assert(M->getAnnotation(MCFM_AID) == 0 &&
"Object already exists for this function!");
- MachineCodeForMethod* mcInfo = new MachineCodeForMethod(M, Tar);
+ MachineFunction* mcInfo = new MachineFunction(M, Tar);
M->addAnnotation(mcInfo);
return *mcInfo;
}
void
-MachineCodeForMethod::destruct(const Function *M)
+MachineFunction::destruct(const Function *M)
{
bool Deleted = M->deleteAnnotation(MCFM_AID);
assert(Deleted && "Machine code did not exist for function!");
}
-MachineCodeForMethod&
-MachineCodeForMethod::get(const Function *F)
+MachineFunction&
+MachineFunction::get(const Function *F)
{
- MachineCodeForMethod *mc = (MachineCodeForMethod*)F->getAnnotation(MCFM_AID);
+ MachineFunction *mc = (MachineFunction*)F->getAnnotation(MCFM_AID);
assert(mc && "Call construct() method first to allocate the object");
return *mc;
}
@@ -122,7 +122,7 @@
/*ctor*/
-MachineCodeForMethod::MachineCodeForMethod(const Function *F,
+MachineFunction::MachineFunction(const Function *F,
const TargetMachine& target)
: Annotation(MCFM_AID),
method(F), staticStackSize(0),
@@ -138,7 +138,7 @@
}
int
-MachineCodeForMethod::computeOffsetforLocalVar(const TargetMachine& target,
+MachineFunction::computeOffsetforLocalVar(const TargetMachine& target,
const Value* val,
unsigned int& getPaddedSize,
unsigned int sizeToUse)
@@ -160,7 +160,7 @@
}
int
-MachineCodeForMethod::allocateLocalVar(const TargetMachine& target,
+MachineFunction::allocateLocalVar(const TargetMachine& target,
const Value* val,
unsigned int sizeToUse)
{
@@ -183,7 +183,7 @@
}
int
-MachineCodeForMethod::allocateSpilledValue(const TargetMachine& target,
+MachineFunction::allocateSpilledValue(const TargetMachine& target,
const Type* type)
{
assert(! spillsAreaFrozen &&
@@ -208,7 +208,7 @@
}
int
-MachineCodeForMethod::pushTempValue(const TargetMachine& target,
+MachineFunction::pushTempValue(const TargetMachine& target,
unsigned int size)
{
unsigned int align = SizeToAlignment(size, target);
@@ -228,20 +228,20 @@
}
void
-MachineCodeForMethod::popAllTempValues(const TargetMachine& target)
+MachineFunction::popAllTempValues(const TargetMachine& target)
{
resetTmpAreaSize(); // clear tmp area to reuse
}
int
-MachineCodeForMethod::getOffset(const Value* val) const
+MachineFunction::getOffset(const Value* val) const
{
hash_map<const Value*, int>::const_iterator pair = offsets.find(val);
return (pair == offsets.end())? INVALID_FRAME_OFFSET : pair->second;
}
void
-MachineCodeForMethod::dump() const
+MachineFunction::dump() const
{
std::cerr << "\n" << method->getReturnType()
<< " \"" << method->getName() << "\"\n";
More information about the llvm-commits
mailing list