mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-19 01:13:25 +00:00
If function notes say optimize for size, then adjust alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b2298005d
commit
db10033d7c
@ -160,6 +160,8 @@ void X86ATTAsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
|
||||
SwitchToTextSection(SectionName.c_str());
|
||||
|
||||
unsigned FnAlign = OptimizeForSize ? 1 : 4;
|
||||
if (FnAlign == 4 && (F->getNotes() & FN_NOTE_OptimizeForSize))
|
||||
FnAlign = 1;
|
||||
switch (F->getLinkage()) {
|
||||
default: assert(0 && "Unknown linkage type!");
|
||||
case Function::InternalLinkage: // Symbols default to internal.
|
||||
|
@ -147,6 +147,8 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
|
||||
|
||||
unsigned FnAlign = OptimizeForSize ? 1 : 4;
|
||||
if (FnAlign == 4 && (F->getNotes() & FN_NOTE_OptimizeForSize))
|
||||
FnAlign = 1;
|
||||
switch (F->getLinkage()) {
|
||||
default: assert(0 && "Unsupported linkage type!");
|
||||
case Function::InternalLinkage:
|
||||
|
Loading…
Reference in New Issue
Block a user