[PATCH] D43859: [GlobalOpt] don't change CC of musttail calle(e|r) PR36546
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 01:52:30 PST 2018
JDevlieghere added a comment.
Won't this interfere with tail call optimization? From the language manual, I understood it only to be supported for fastcc. (+ the ghc and HiPE calling conventions, which are already not considered here) If we can change the CC of the whole chain, the invariant would still hold. Would that be a valid alternative?
PS: Please upload full context diffs next time :-)
================
Comment at: lib/Transforms/IPO/GlobalOpt.cpp:2137
// FIXME: Is it worth transforming x86_stdcallcc and x86_fastcallcc?
return CC == CallingConv::C || CC == CallingConv::X86_ThisCall;
}
----------------
Wouldn't it be cheaper to check the CC first, do an early return and only check for musttail calls/callees later?
Repository:
rL LLVM
https://reviews.llvm.org/D43859
More information about the llvm-commits
mailing list