[llvm-commits] patch: teach deadargelim to work on externally visible functions!
Chris Lattner
clattner at apple.com
Sun Jan 10 20:08:35 PST 2010
On Jan 10, 2010, at 7:56 PM, Rafael Espindola wrote:
>> This example has undefined behavior, so it doesn't matter what we
>> produce. We should just always generate the faster code. This sounds
>> like a pretty serious performance bug on ELF systems.
>
> On the ELF standard maybe :-(
> Functions that are not marked with hidden/protected visibility can be
> overridden at runtime. That is used for thing like changing malloc by
> using LD_PRELOAD.
Treating the functions like that would be completely impractical. This would disable IP constant prop and many other interprocedural optimizations. If you want that behavior, we should introduce a new attribute, which results in us generating a new "strong but overridable" linkage type. Sorta like a non-ODR "external".
-Chris
More information about the llvm-commits
mailing list