[llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 16 12:37:01 PST 2003
Changes in directory llvm/lib/CodeGen:
MachineFunction.cpp updated: 1.37 -> 1.38
---
Log message:
Print machine frame objects with the frame offset intrinsic to the machine
---
Diffs of the changes:
Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.37 llvm/lib/CodeGen/MachineFunction.cpp:1.38
--- llvm/lib/CodeGen/MachineFunction.cpp:1.37 Sun Jan 12 18:23:03 2003
+++ llvm/lib/CodeGen/MachineFunction.cpp Thu Jan 16 12:35:56 2003
@@ -120,7 +120,7 @@
<< "\"\n";
// Print Frame Information
- getFrameInfo()->print(OS);
+ getFrameInfo()->print(*this, OS);
// Print Constant Pool
getConstantPool()->print(OS);
@@ -188,7 +188,9 @@
}
-void MachineFrameInfo::print(std::ostream &OS) const {
+void MachineFrameInfo::print(const MachineFunction &MF, std::ostream &OS) const{
+ int ValOffset = MF.getTarget().getFrameInfo().getOffsetOfLocalArea();
+
for (unsigned i = 0, e = Objects.size(); i != e; ++i) {
const StackObject &SO = Objects[i];
OS << " <fi #" << (int)(i-NumFixedObjects) << "> is ";
@@ -200,11 +202,12 @@
if (i < NumFixedObjects)
OS << " fixed";
if (i < NumFixedObjects || SO.SPOffset != -1) {
+ int Off = SO.SPOffset + ValOffset;
OS << " at location [SP";
- if (SO.SPOffset > 0)
- OS << "+" << SO.SPOffset;
- else if (SO.SPOffset < 0)
- OS << SO.SPOffset;
+ if (Off > 0)
+ OS << "+" << Off;
+ else if (Off < 0)
+ OS << Off;
OS << "]";
}
OS << "\n";
@@ -214,7 +217,9 @@
OS << " Stack frame contains variable sized objects\n";
}
-void MachineFrameInfo::dump() const { print(std::cerr); }
+void MachineFrameInfo::dump(const MachineFunction &MF) const {
+ print(MF, std::cerr);
+}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list