[llvm] [TLI] Support inferring function attributes for sincos[f|l] (PR #108554)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 07:10:00 PDT 2024
================
@@ -1270,6 +1270,18 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
Changed |= setOnlyWritesMemory(F);
Changed |= setWillReturn(F);
break;
+ case LibFunc_sincos:
+ case LibFunc_sincosf:
+ case LibFunc_sincosl:
+ Changed |= setDoesNotThrow(F);
+ Changed |= setDoesNotFreeMemory(F);
+ Changed |= setOnlyWritesMemory(F);
+ Changed |= setOnlyWritesMemory(F, 1);
+ Changed |= setOnlyWritesMemory(F, 2);
+ Changed |= setDoesNotCapture(F, 1);
+ Changed |= setDoesNotCapture(F, 2);
+ Changed |= setWillReturn(F);
----------------
arsenm wrote:
Does this need something for argmemonly?
Unrelated but all of this code should probably be using AttrBuilder instead of a set function that directly operates on the function
https://github.com/llvm/llvm-project/pull/108554
More information about the llvm-commits
mailing list