rnk added a comment.

So, I'm strongly in favor of the feature, but I want to get feedback on the 
name.

The major pro is that it maps directly to LLVM IR: the attribute does exactly 
what it says. The major con is that the name isn't really related to what the 
user wants to do, which is to merge duplicate constant data. This attribute is 
also not sufficient, since you also need `-fdata-sections` for ICF to fire on 
readonly data.

Some alternatives:

- no_addrsig
- enable_icf
- allow_icf
- allow_merging

If you force me to pick now, I would say let's go with `[[clang:unnamed_addr]]` 
because the search results for unnamed_addr already explain what it should do. 
Perhaps naming consistency is better than picking the most descriptive name.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158223

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to