[PATCH] D23940: Delete dead code

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 10:17:24 PDT 2016


> On Aug 29, 2016, at 6:29 AM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
>>> Yes, that is the kind of thing that could be handled uniformly by
>>> having the IR explicitly say what can be assumed to be dso local, but
>>> we don't have that feature yet.
>> 
>> Right, my idea was to do something like adding “visibility hidden” on *declarations* when we have this passed-in by the linker, and update shouldAssumeDSOLocal to look for this.
> 
> Yes, having something like it is probably a good thing. I was working
> on it before:
> 
> https://reviews.llvm.org/D20217
> https://reviews.llvm.org/D21839
> http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160627/368016.html
> 
> The point of this review is that the code right now is dead as we
> don't have where to plug it in llvm.

I got your point, but I’m reluctant to remove this as it was just added now *knowing* it is “dead” right now, so that the linker side can be implemented emitting the right resolution while the LLVM side is in progress.
And since we’ll probably have four clients of this API in-tree soon, it will be more work to add support for this afterwards.

I guess it depends in which timeframe we plan to add support on the LLVM side to benefit from this information.

— 
Mehdi



More information about the llvm-commits mailing list