[llvm] r200530 - [vectorizer] Tweak the way we do small loop runtime unrolling in the

Tobias Grosser tobias at grosser.es
Mon Feb 24 03:56:35 PST 2014


On 01/31/2014 11:51 AM, Chandler Carruth wrote:
> Author: chandlerc
> Date: Fri Jan 31 04:51:08 2014
> New Revision: 200530
>
> URL: http://llvm.org/viewvc/llvm-project?rev=200530&view=rev
> Log:
> [vectorizer] Tweak the way we do small loop runtime unrolling in the
> loop vectorizer to not do so when runtime pointer checks are needed and
> share code with the new (not yet enabled) load/store saturation runtime
> unrolling. Also ensure that we only consider the runtime checks when the
> loop hasn't already been vectorized. If it has, the runtime check cost
> has already been paid.
>
> I've fleshed out a test case to cover the scalar unrolling as well as
> the vector unrolling and comment clearly why we are or aren't following
> the pattern.

Just FYI, this change caused a 15% performance drop on gramschmidt:

http://llvm.org/perf/db_default/v4/nts/21588?num_comparison_runs=10&test_filter=&test_min_value_filter=&aggregation_fn=median&compare_to=21587&submit=Update

The interesting observation is that this performance drop brings us back 
to the performance we had before your commit "[vectorizer] Teach the 
loop vectorizer's unroller to only unroll by powers of two." (which gave 
a 13% performance increase on this kernel).

Cheers,
Tobias



More information about the llvm-commits mailing list