aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachinePipeliner.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-08-13 11:59:18 -0700
committerArthur Eubanks <aeubanks@google.com>2021-08-13 11:59:18 -0700
commitd7593ebaeeec2072abed73db0299a0e71f5c7a2c (patch)
treefee5ee1a588d738f99d472d3d5874ed937da7400 /llvm/lib/CodeGen/MachinePipeliner.cpp
parenta9831cce1e7a74f507071073fcea29f81c413aac (diff)
downloadllvm-d7593ebaeeec2072abed73db0299a0e71f5c7a2c.zip
llvm-d7593ebaeeec2072abed73db0299a0e71f5c7a2c.tar.gz
llvm-d7593ebaeeec2072abed73db0299a0e71f5c7a2c.tar.bz2
[NFC] Clean up users of AttributeList::hasAttribute()
AttributeList::hasAttribute() is confusing, use clearer methods like hasParamAttr()/hasRetAttr(). Add hasRetAttr() since it was missing from AttributeList.
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachinePipeliner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index caa3f80..f32c8a2 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -200,8 +200,7 @@ bool MachinePipeliner::runOnMachineFunction(MachineFunction &mf) {
if (!EnableSWP)
return false;
- if (mf.getFunction().getAttributes().hasAttribute(
- AttributeList::FunctionIndex, Attribute::OptimizeForSize) &&
+ if (mf.getFunction().getAttributes().hasFnAttr(Attribute::OptimizeForSize) &&
!EnableSWPOptSize.getPosition())
return false;