[llvm-commits] [PATCH] Invariants (and Assume Aligned) - LLVM

Duncan Sands baldrick at free.fr
Fri Dec 7 09:43:22 PST 2012


PS: About assume aligned: the unrolled loop problem could also be solved by
allowing the alignment on a load/store to be an expression rather than a number.
For example:

   for (i = 0; i < N; ++i) {
     %a = some_horrible_expression_computing_alignment_in_terms_of_i
     load %p, align %a
   }

When the loop is unrolled, each instance of the load would get the right
alignment.

I'm not actually advocating doing this, I just thought it should be mentioned.

Ciao, Duncan.



More information about the llvm-commits mailing list