mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-11 10:25:41 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25979 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -527,7 +527,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
|
|||||||
std::string name = Mang->getValueName(I);
|
std::string name = Mang->getValueName(I);
|
||||||
Constant *C = I->getInitializer();
|
Constant *C = I->getInitializer();
|
||||||
unsigned Size = TD.getTypeSize(C->getType());
|
unsigned Size = TD.getTypeSize(C->getType());
|
||||||
unsigned Align = TD.getTypeAlignmentShift(C->getType());
|
unsigned Align = getPreferredAlignmentLog(I);
|
||||||
|
|
||||||
if (C->isNullValue() && /* FIXME: Verify correct */
|
if (C->isNullValue() && /* FIXME: Verify correct */
|
||||||
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
|
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
|
||||||
|
Reference in New Issue
Block a user