Allow norecurse attribute on functions that have debug infos.
authorChristian Bruel <christian.bruel@st.com>
Wed, 5 Dec 2018 16:48:00 +0000 (16:48 +0000)
committerChristian Bruel <christian.bruel@st.com>
Wed, 5 Dec 2018 16:48:00 +0000 (16:48 +0000)
commit4ead99b3ac2a0ccd5174c35bcf339eb080dd9697
tree699e96567456f2052354c47527f7d17714a13234
parent3998bebc1268982750473528a22297807cb9bce3
Allow norecurse attribute on functions that have debug infos.

Summary: debug intrinsics might be marked norecurse to enable the caller function to be norecurse and optimized if needed. This avoids code gen optimisation differences when -g is used, as in globalOpt.cpp:processInternalGlobal checks.

Reviewers: chandlerc, jmolloy, aprantl

Reviewed By: aprantl

Subscribers: aprantl, llvm-commits

Differential Revision: https://reviews.llvm.org/D55187

llvm-svn: 348381
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll [new file with mode: 0644]