mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
If function notes say optimize for size, then adjust alignment.
llvm-svn: 55794
This commit is contained in:
parent
1ffb4ad3a8
commit
f3770334a9
@ -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