Inserting instrumentation between a musttail call and ret instruction
would create invalid IR. Instead, treat musttail calls as function
exits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329385 91177308-0d34-0410-b5e6-96231b3b80d8
Fixes layering - Transforms/Utils shouldn't depend on including a Scalar
or IPO header, because Scalar and IPO depend on Utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328717 91177308-0d34-0410-b5e6-96231b3b80d8
Fixes layering, since Transforms/Utils doesn't depend on CodeGen, so
shouldn't include headers from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328399 91177308-0d34-0410-b5e6-96231b3b80d8
Apparently the verifier requires that inlineable calls in a function
with debug info have debug locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319199 91177308-0d34-0410-b5e6-96231b3b80d8
Clang implements the -finstrument-functions flag inherited from GCC, which
inserts calls to __cyg_profile_func_{enter,exit} on function entry and exit.
This is useful for getting a trace of how the functions in a program are
executed. Normally, the calls remain even if a function is inlined into another
function, but it is useful to be able to turn this off for users who are
interested in a lower-level trace, i.e. one that reflects what functions are
called post-inlining. (We use this to generate link order files for Chromium.)
LLVM already has a pass for inserting similar instrumentation calls to
mcount(), which it does after inlining. This patch renames and extends that
pass to handle calls both to mcount and the cygprofile functions, before and/or
after inlining as controlled by function attributes.
Differential Revision: https://reviews.llvm.org/D39287
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318195 91177308-0d34-0410-b5e6-96231b3b80d8