mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 17:32:49 +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:
parent
4d57e0cd69
commit
7d8d5a522f
@ -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() ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user