[PATCH] D55187: Set norecurse attribute on functions that have debug infos.

Christian Bruel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 05:46:45 PST 2018


chrib marked 2 inline comments as done.
chrib added inline comments.


================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:1311
   // marked norecurse, so any called from F to F will not be marked norecurse.
   for (Instruction &I : instructions(*F))
+    if (!isa<DbgInfoIntrinsic>(I))
----------------
chandlerc wrote:
> aprantl wrote:
> > Is there something like on the function level?
> > 
> > http://www.llvm.org/doxygen/classllvm_1_1BasicBlock.html#a126c95a0ff18e58ac0c2c7439fb2dc6d
> Yeah, I'd much prefer to iterate the filtered sequence here.
not at function level but yes I can iterate on the BBs something like:

  for (auto &BB : *F) {
    for (auto &I : BB.instructionsWithoutDebug()) 


================
Comment at: test/Transforms/InferFunctionAttrs/norecurse_debug.ll:53
+!21 = !{!"any pointer", !22, i64 0}
+!22 = !{!"omnipotent char", !23, i64 0}
+!23 = !{!"Simple C/C++ TBAA"}
----------------
aprantl wrote:
> Do you need the TBAA info for the testcase?
indeed no,  not related to this issue to the tbaa meta can be removed.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55187/new/

https://reviews.llvm.org/D55187





More information about the llvm-commits mailing list