summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorAndrew Savonichev <andrew.savonichev@intel.com>2019-03-20 16:43:07 +0000
committerAndrew Savonichev <andrew.savonichev@intel.com>2019-03-20 16:43:07 +0000
commit76b178d9496ea8bf2f04f9b6b5839e62f7211508 (patch)
treee196b1f087d1fe95a83cf794eec7d7361b475979 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parentb570060fd847701356f61f1b705d3c6b355badde (diff)
downloadbcm5719-llvm-76b178d9496ea8bf2f04f9b6b5839e62f7211508.tar.gz
bcm5719-llvm-76b178d9496ea8bf2f04f9b6b5839e62f7211508.zip
[OpenCL] Generate 'unroll.enable' metadata for __attribute__((opencl_unroll_hint))
Summary: [OpenCL] Generate 'unroll.enable' metadata for __attribute__((opencl_unroll_hint)) For both !{!"llvm.loop.unroll.enable"} and !{!"llvm.loop.unroll.full"} the unroller will try to fully unroll a loop unless the trip count is not known at compile time. In that case for '.full' metadata no unrolling will be processed, while for '.enable' the loop will be partially unrolled with a heuristically chosen unroll factor. See: docs/LanguageExtensions.rst From https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/attributes-loopUnroll.html __attribute__((opencl_unroll_hint)) for (int i=0; i<2; i++) { ... } In the example above, the compiler will determine how much to unroll the loop. Before the patch for __attribute__((opencl_unroll_hint)) was generated metadata !{!"llvm.loop.unroll.full"}, which limits ability of loop unroller to decide, how much to unroll the loop. Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: zzheng, dmgreen, jdoerfert, cfe-commits, asavonic, AlexeySotkin Tags: #clang Differential Revision: https://reviews.llvm.org/D59493 llvm-svn: 356571
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud