[LLVMdev] Query on optimizing away function calls.
Frits van Bommel
fvbommel at wxs.nl
Thu Jun 18 02:49:32 PDT 2009
Duncan Sands wrote:
>> The "readonly" function attribute looks to be too strict for this.
>
> It is possible to put "readonly" on the call, rather than on func2
> itself. So if your front-end somehow knows that this use of func2
> has no real effect it could mark the call this way.
Unfortunately, it can only know that if it knows that %a won't be read from
after the call...
More information about the llvm-dev
mailing list