[PATCH] D18634: Don't IPO over functions that can be de-refined

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 22:06:36 PDT 2016


Same here: we could benefit from a good cleanup.
These predicates were designed with a model in mind, and the problem Sanjoy uncovered shows how this model is broken. I suspect that comments like this one: "Using this method outside of the code generators is almost always a mistake" discouraging the use of "isXXXForLinker" are reminiscent of the model.
Ideally we should rethink the set of abstract properties that are relevant, how they map to linkage types, and then re-define the predicates (and revisit their uses).

-- 
Mehdi


> On Mar 30, 2016, at 6:56 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
> 
> I would really like to see fewer predicates here. It is too hard to figure out the right one.
> 
> isStrongDefinitionForLinker doesn't make a lot of sense to me as the spelling of the predicate though because it doesn't tell me, the optimization author, what it means.
> 
> Note that I think mayBeOverridden will become irrelevant with this change, and so I would look closely at removing that or re-using it.
> 
> On Wed, Mar 30, 2016 at 6:52 PM Sanjoy Das via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
> sanjoy added a comment.
> 
> So at this point both @joker.eph and @rnk would rather have this path be in terms of `isStrongDefinitionForLinker`; so I'll do that rename tomorrow unless someone objects before then.
> 
> 
> http://reviews.llvm.org/D18634 <http://reviews.llvm.org/D18634>
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160330/a5de8739/attachment.html>


More information about the llvm-commits mailing list