[PATCH] D41104: Set the NoRecurse attribute for the dbg intrinsics.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 21:51:32 PST 2017


hfinkel added a comment.

This looks fine, and I imagine we'll need to do this almost all intrinsics.

However, I do wonder, is the attribute propagation semantically correct? What we really want to know is that the callee (an intrinsic in this case) doesn't call the caller, no necessarily that it doesn't call itself.

  void foo(bool) norecurse;
  
  void bar(bool c) {
    if (c)
      foo(true);
  }
  
  void foo(bool c) {
    bar(false);
  }

in this example, the norecurse on `foo` is semantically correct, but inferring it on `bar` wouldn't be correct.


https://reviews.llvm.org/D41104





More information about the llvm-commits mailing list