summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-04-15 06:14:52 +0000
committerEric Christopher <echristo@gmail.com>2017-04-15 06:14:52 +0000
commit908ed7f20c425bf1bd7915f18d5d1408d2e8bb28 (patch)
tree0b9a93f2c4c9b801bfe718390f0f272c3fd739fc /llvm/lib
parent85be8ca881b03966335aed600c9b3066278b40a3 (diff)
downloadbcm5719-llvm-908ed7f20c425bf1bd7915f18d5d1408d2e8bb28.tar.gz
bcm5719-llvm-908ed7f20c425bf1bd7915f18d5d1408d2e8bb28.zip
Tidy checking for the soft float attribute.
llvm-svn: 300394
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 813f5d72c8a..1f8dec2aed8 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -1101,19 +1101,10 @@ bool CallAnalyzer::analyzeBlock(BasicBlock *BB,
// is expensive or the function has the "use-soft-float" attribute, this may
// eventually become a library call. Treat the cost as such.
if (I->getType()->isFloatingPointTy()) {
- bool hasSoftFloatAttr = false;
-
// If the function has the "use-soft-float" attribute, mark it as
// expensive.
- if (F.hasFnAttribute("use-soft-float")) {
- Attribute Attr = F.getFnAttribute("use-soft-float");
- StringRef Val = Attr.getValueAsString();
- if (Val == "true")
- hasSoftFloatAttr = true;
- }
-
if (TTI.getFPOpCost(I->getType()) == TargetTransformInfo::TCC_Expensive ||
- hasSoftFloatAttr)
+ (F.getFnAttribute("use-soft-float").getValueAsString() == "true"))
Cost += InlineConstants::CallPenalty;
}
OpenPOWER on IntegriCloud