mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-30 06:19:45 +00:00
Transforms: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API. getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind) getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -657,9 +657,7 @@ bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val) {
|
||||
// Check to see if it would be profitable to unswitch current loop.
|
||||
|
||||
// Do not do non-trivial unswitch while optimizing for size.
|
||||
if (OptimizeForSize ||
|
||||
F->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
|
||||
Attribute::OptimizeForSize))
|
||||
if (OptimizeForSize || F->hasFnAttribute(Attribute::OptimizeForSize))
|
||||
return false;
|
||||
|
||||
UnswitchNontrivialCondition(LoopCond, Val, currentLoop);
|
||||
|
Reference in New Issue
Block a user