diff options
author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2025-07-28 08:38:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-28 08:38:52 -0700 |
commit | 819f020b282f42e5ed45d8d8325cbb94ba48ef7a (patch) | |
tree | 7e9cd2029aaa1e7341f708b2f2f0f71dde05d399 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | a496a985d922e8ad1e9ef8d9ad3598a097cdfa90 (diff) | |
download | llvm-819f020b282f42e5ed45d8d8325cbb94ba48ef7a.zip llvm-819f020b282f42e5ed45d8d8325cbb94ba48ef7a.tar.gz llvm-819f020b282f42e5ed45d8d8325cbb94ba48ef7a.tar.bz2 |
Use F.hasOptSize() instead of checking optsize directly (#147348)
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 429a17a..7ea2512 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -211,8 +211,7 @@ void MachineFunction::init() { ConstantPool = new (Allocator) MachineConstantPool(getDataLayout()); Alignment = STI->getTargetLowering()->getMinFunctionAlignment(); - // FIXME: Use Function::hasOptSize(). - if (!F.getAlign() && !F.hasFnAttribute(Attribute::OptimizeForSize)) + if (!F.getAlign() && !F.hasOptSize()) Alignment = std::max(Alignment, STI->getTargetLowering()->getPrefFunctionAlignment()); |