forked from OSchip/llvm-project
[CodeGen] Simplify getRecipEstimateForFunc
It used two attribute lookups when only one was needed. llvm-svn: 291965
This commit is contained in:
parent
509bbd1a66
commit
e0ebdf4bc7
|
@ -1918,11 +1918,7 @@ void TargetLoweringBase::setMaximumJumpTableSize(unsigned Val) {
|
|||
/// override the target defaults.
|
||||
static StringRef getRecipEstimateForFunc(MachineFunction &MF) {
|
||||
const Function *F = MF.getFunction();
|
||||
StringRef RecipAttrName = "reciprocal-estimates";
|
||||
if (!F->hasFnAttribute(RecipAttrName))
|
||||
return StringRef();
|
||||
|
||||
return F->getFnAttribute(RecipAttrName).getValueAsString();
|
||||
return F->getFnAttribute("reciprocal-estimates").getValueAsString();
|
||||
}
|
||||
|
||||
/// Construct a string for the given reciprocal operation of the given type.
|
||||
|
|
Loading…
Reference in New Issue