mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 06:30:39 +00:00
NVPTX: 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@229260 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
47cd120a18
commit
8cfbff509e
@ -93,9 +93,7 @@ bool NVPTXDAGToDAGISel::useF32FTZ() const {
|
||||
const Function *F = MF->getFunction();
|
||||
// Otherwise, check for an nvptx-f32ftz attribute on the function
|
||||
if (F->hasFnAttribute("nvptx-f32ftz"))
|
||||
return (F->getAttributes().getAttribute(AttributeSet::FunctionIndex,
|
||||
"nvptx-f32ftz")
|
||||
.getValueAsString() == "true");
|
||||
return F->getFnAttribute("nvptx-f32ftz").getValueAsString() == "true";
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user