Use the asmprinter to find out what the preferred alignment of a global is.

This patch speeds up 172.mgrid from 31.81s to 11.39s on darwin/ppc.
Many many thanks to Nate for tracking down the root cause of the issue.

llvm-svn: 25979
This commit is contained in:
Chris Lattner 2006-02-05 01:30:45 +00:00
parent a9b2525d3e
commit 1b1a8731c0
1 changed files with 1 additions and 1 deletions

View File

@ -527,7 +527,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
std::string name = Mang->getValueName(I);
Constant *C = I->getInitializer();
unsigned Size = TD.getTypeSize(C->getType());
unsigned Align = TD.getTypeAlignmentShift(C->getType());
unsigned Align = getPreferredAlignmentLog(I);
if (C->isNullValue() && /* FIXME: Verify correct */
(I->hasInternalLinkage() || I->hasWeakLinkage() ||