1
0
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:
Devang Patel 2008-09-04 21:03:41 +00:00
parent 1ffb4ad3a8
commit f3770334a9
2 changed files with 4 additions and 0 deletions

View File

@ -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.

View File

@ -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: