[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Sat Jan 20 14:36:29 PST 2007
Changes in directory llvm/lib/Target/Sparc:
SparcAsmPrinter.cpp updated: 1.75 -> 1.76
---
Log message:
Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can. Patch by Scott Michel!
---
Diffs of the changes: (+2 -2)
SparcAsmPrinter.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
diff -u llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.75 llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.76
--- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.75 Tue Dec 19 16:59:26 2006
+++ llvm/lib/Target/Sparc/SparcAsmPrinter.cpp Sat Jan 20 16:35:55 2007
@@ -229,7 +229,7 @@
std::string name = Mang->getValueName(I);
Constant *C = I->getInitializer();
unsigned Size = TD->getTypeSize(C->getType());
- unsigned Align = TD->getTypeAlignment(C->getType());
+ unsigned Align = TD->getTypeAlignmentPref(C->getType());
if (C->isNullValue() &&
(I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
@@ -239,7 +239,7 @@
O << "\t.local " << name << "\n";
O << "\t.comm " << name << "," << TD->getTypeSize(C->getType())
- << "," << (unsigned)TD->getTypeAlignment(C->getType());
+ << "," << Align;
O << "\n";
} else {
switch (I->getLinkage()) {
More information about the llvm-commits
mailing list