[llvm-commits] patch: teach deadargelim to work on externally visible functions!

Duncan Sands baldrick at free.fr
Mon Jan 4 05:11:31 PST 2010


Hi Edwin,

>>> Since you already make optimizations based on the assumption that the
>>> externally visible function you see
>>> is the actual one [*] that is going to be called at runtime I think
>>> there is a more general solution for this:
>> ...
>>> [*] which may not be true, it could be overridden via LD_PRELOAD or
>>> other means.
>> the call to mayBeOverridden in the patch is checking whether we are
>> allowed to assume that the function body is definitive.
> 
> It returns false for externalLinkage, yet you can override the symbol
> from another shared lib.

sure, but then you are invoking undefined behaviour.

Ciao,

Duncan.



More information about the llvm-commits mailing list