[PATCH] D123198: [LibCalls] Add argument extension attributes to more functions.
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 1 09:43:58 PDT 2022
jonpa updated this revision to Diff 426300.
jonpa added a comment.
> Not sure !M->getNamedAlias(FuncName) is quite sufficient. What happens if we find a GlobalVariable? Or a Function with the wrong type?
Yes, I guess the more full treatment would be to check for other things as well, which makes sense.
I think I managed to improve the check from just checking for an Alias to checking for any GlobalValue and if found then making sure it's a Function.
As for the FunctionType, it doesn't seem feasible (at least not with the current patch), to have the caller to isLibFuncEmittable() provide the FunctionType. It however seems to work to use isValidProtoForLibFunc() for this purpose. I don't see that function used anywhere, but I remember you mentioned it earlier.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123198/new/
https://reviews.llvm.org/D123198
Files:
llvm/include/llvm/Analysis/TargetLibraryInfo.h
llvm/include/llvm/IR/Module.h
llvm/include/llvm/Transforms/Utils/BuildLibCalls.h
llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InferFunctionAttrs/annotate.ll
llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll
llvm/test/Transforms/InstCombine/double-float-shrink-1.ll
llvm/test/Transforms/InstCombine/pr39177.ll
llvm/test/Transforms/InstCombine/simplify-libcalls.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123198.426300.patch
Type: text/x-patch
Size: 63908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220501/3601024c/attachment.bin>
More information about the llvm-commits
mailing list