[PATCH] D40249: Copy Function's calling convention by default when creating a new Call
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 06:51:08 PST 2017
serge-sans-paille created this revision.
Herald added subscribers: mehdi_amini, nhaehnle, arsenm.
Altough calling a function whith mismatching Calling Conventions (CC) is defined in the LangRef (as UB), it is a common source of code duplication to set it based on the called function (when it's known), or to forget setting it (which leads to the call being replaced by an undef later in the optimization pipeline).
This commit enforces a default behavior when creating a new CallInst or InvokeInst, as discussed in this thread:
http://lists.llvm.org/pipermail/llvm-dev/2017-November/119121.html
Repository:
rL LLVM
https://reviews.llvm.org/D40249
Files:
lib/CodeGen/StackProtector.cpp
lib/IR/Instructions.cpp
lib/Target/AMDGPU/AMDGPULibCalls.cpp
lib/Transforms/Utils/BuildLibCalls.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40249.123581.patch
Type: text/x-patch
Size: 9006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171120/43fc84dc/attachment.bin>
More information about the llvm-commits
mailing list