[LLVMdev] Disable loop unroll pass

Shuxin Yang shuxin.llvm at gmail.com
Thu Nov 22 10:55:12 PST 2012


> I appreciate your feed-back. Could you give an example where building 
> a hw loop is not appropriate for your target?
>

In my case, unrolling and hw loop is orthogonal. So long as a loop is 
countable & size dosen't exceeds
some threshold, it can be converted into a hw loop. So loop is desirable 
to be unrolled.

One benefit of unrolling is to exposed inter-iteration redundancies, and 
the downstream redundancy
elimination can *easily* take care them.  We would otherwise have to 
resort to iter-iteration
redundancy eliminators to remove such redundancies in a *HARD* way, 
sometimes impossible.

As far as I know, LLVM doesn't have iter-iteration redundancy 
elimination (like predictive commoning),
and it dosen't have scalar replacement to promote subscript variable to 
register (i.e the 2nd
load in a[i]... a[i-n] is load from register; GVN can promote a[i-n] to 
register only if n==1).

Thanks
Shuxin














More information about the llvm-dev mailing list