Add new llvm.loop.unroll.enable metadata.
authorMark Heffernan <meheff@google.com>
Mon, 10 Aug 2015 17:28:08 +0000 (17:28 +0000)
committerMark Heffernan <meheff@google.com>
Mon, 10 Aug 2015 17:28:08 +0000 (17:28 +0000)
commit214aad9f314593e33a10f1d46cdf19c9e359e5f6
tree0f577780d8b4218bc67cb7f4ca657d4a59df2504
parent20f59c8f980777a08c8c8768c43c1c69b9f5646b
Add new llvm.loop.unroll.enable metadata.

This change adds the unroll metadata "llvm.loop.unroll.enable" which directs
the optimizer to unroll a loop fully if the trip count is known at compile time, and
unroll partially if the trip count is not known at compile time. This differs from
"llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not
known at compile time.

The "llvm.loop.unroll.enable" is intended to be added for loops annotated with
"#pragma unroll".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244466 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/unroll-pragmas.ll