[PATCH] D90275: [clang][IR] Add support for leaf attribute

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 15 07:25:25 PST 2020


jdoerfert added a comment.

In D90275#2453641 <https://reviews.llvm.org/D90275#2453641>, @gulfem wrote:

>> This is missing a lang ref entry for `nocallback` and the `attributes.ll` test is arguably broken (see below).
>
> Could you please elaborate on missing lang ref entry? Where that should be added?

Sure, my bad. Each enum attribute needs an entry in the language reference to define it's meaning, see also https://llvm.org/docs/LangRef.html#function-attributes
The content is in llvm/docs/LangRef.rst.

>> The "definition" in `llvm/include/llvm/IR/Attributes.td` (see below), does not match the the behavior of `clang/test/CodeGen/attr-leaf.c`.
>> As I mentioned before, this doesn't have a meaning on definitions and that needs to be captured in the semantics (and preferably the FE).
>
> In that test case, `leaf` attribute is on the declaration.
> What kind of a test case do you suggest to add?

We need to first define the meaning of `nocallback` in the IR, without that it is hard to do anything else.

---

The problem in `llvm/test/Bitcode/attributes.ll` is clear?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90275



More information about the cfe-commits mailing list