I'm adding loop unrolling pragmas to clang with change (not yet submitted): http://reviews.llvm.org/D4089
This optimizer change consumes the metadata produced from those pragmas and uses them in the loop unroller.
The pragmas must immediately precede a loop statement and take the following forms:
#pragma clang loop unroll(enable) unroll the loop completely
#pragma clang loop unroll(disable) do not unroll the loop.
#pragma clang loop unroll_count(N) // unroll the loop N times
These pragmas mirror recently added loop vectorizer pragmas. If you have comments on the particulars of the syntax and semantics please comment on the clang change.