[LLVMdev] Optimisation of select/cmp/br
Rafael EspĂndola
rafael.espindola at gmail.com
Fri Feb 7 08:34:27 PST 2014
>> It seems something that GVN should be able to handle if expressed with
>> branches instead of select. Unfortunately it currently doesn't :-(
>>
>> It is a long project, but one way to fix this might be to extend
>> (rewrite?) GVN PRE (pr13307, pr10254) and then make GVN handle selects
>> too (on way to fix pr13590 and hopefully your example).
>
>
> I'm not at all familiar with the LLVM internals (just with the Ocaml
> bindings for generating IR), but could try and help out with this if there
> was agreement on how it needs doing / someone gave me a pointer in the right
> direction. I guess this case is the most tricky of the ones you listed since
> it relies on knowledge that %data is not null. I've filed this as a bug
> (#18754).
Daniel Berlin was trying to rewrite GVN at some point. I am not sure
if it is still ongoing, but he should be able to comment on whether a
better GVN should handle these and give you some pointers if you want
to try.
Cheers,
Rafael
More information about the llvm-dev
mailing list