[LLVMdev] Rotated loop identification

Michele Scandale michele.scandale at gmail.com
Wed Feb 6 13:18:44 PST 2013


Up

On 02/04/2013 07:48 PM, Michele Scandale wrote:
> Dear all,
>
> I'm working on a late IR target dependent optimization on loops. A part of this
> optimization requires to derive "by hand" the trip-count expression of a given
> loop. In order to handle correctly these cases I need to check if the loop has
> an entry guard or not. The problem I have is that starting from the information
> I derive during my analysis (initial IV value, last IV value, comparison kind) I
> don't know how to verify if the entry guard is present or not, mainly because
> algebraic simplifications changed the entry guard comparison. Being able to know
> if a given loop has been rotated would be enough for my purposes but I haven't
> found a way to obtain this.
>
> I think that the only way is to track in the IR the information, but I don't
> know how to track it in a safe (the information shouldn't be lost) and
> transparent way (it should not interfere with the optimizer). Thinking to custom
> intrinsics I don't understand how to allow memory optimizations and, at the same
> time, prevent the intrinsic elimination or hoisting from the target loop.
>
> I would appreciate any hint on this topic.
>
> Thanks in advance for future replies.
>
> Best regards,
> Michele Scandale
>




More information about the llvm-dev mailing list