Add loop pragma for Loop Distribution

Description

Add loop pragma for Loop Distribution

Summary:
This is similar to other loop pragmas like 'vectorize'. Currently it
only has state values: distribute(enable) and distribute(disable). When
one of these is specified the corresponding loop metadata is generated:

!{!"llvm.loop.distribute.enable", i1 true/false}

As a result, loop distribution will be attempted on the loop even if
Loop Distribution in not enabled globally. Analogously, with 'disable'
distribution can be turned off for an individual loop even when the pass
is otherwise enabled.

There are some slight differences compared to the existing loop pragmas.

  1. There is no 'assume_safety' variant which makes its handling slightly

different from 'vectorize'/'interleave'.

  1. Unlike the existing loop pragmas, it does not have a corresponding

numeric pragma like 'vectorize' -> 'vectorize_width'. So for the
consistency checks in CheckForIncompatibleAttributes we don't need to
check it against other pragmas. We just need to check for duplicates of
the same pragma.

Reviewers: rsmith, dexonsmith, aaron.ballman

Subscribers: bob.wilson, cfe-commits, hfinkel

Differential Revision: http://reviews.llvm.org/D19403

Details

Committed
anemetJun 14 2016, 5:04 AM
Differential Revision
D19403: Add loop pragma for Loop Distribution
Parents
rL272655: [mips][atomics] Fix atomic instruction descriptions and uses.
Branches
Unknown
Tags
Unknown