diff options
author | Eli Bendersky <eliben@google.com> | 2014-06-25 15:42:16 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2014-06-25 15:42:16 +0000 |
commit | b198b4e864a98deaec662eed4e7db42c11f66614 (patch) | |
tree | 7b3cfaff61a855f7ccc262f78278ed1187e05276 /clang/lib/CodeGen/CGStmt.cpp | |
parent | 451ef5b2c53fd885346999d194e9623e6639c24d (diff) | |
download | bcm5719-llvm-b198b4e864a98deaec662eed4e7db42c11f66614.tar.gz bcm5719-llvm-b198b4e864a98deaec662eed4e7db42c11f66614.zip |
Rename loop unrolling and loop vectorizer metadata to have a common prefix.
[Clang part]
These patches rename the loop unrolling and loop vectorizer metadata
such that they have a common 'llvm.loop.' prefix. Metadata name
changes:
llvm.vectorizer.* => llvm.loop.vectorizer.*
llvm.loopunroll.* => llvm.loop.unroll.*
This was a suggestion from an earlier review
(http://reviews.llvm.org/D4090) which added the loop unrolling
metadata.
Patch by Mark Heffernan.
llvm-svn: 211712
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index cadfe399fa6..3e49733a9c7 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -534,7 +534,7 @@ void CodeGenFunction::EmitCondBrHints(llvm::LLVMContext &Context, if (Attrs.empty()) return; - // Add vectorize hints to the metadata on the conditional branch. + // Add vectorize and unroll hints to the metadata on the conditional branch. SmallVector<llvm::Value *, 2> Metadata(1); for (const auto *Attr : Attrs) { const LoopHintAttr *LH = dyn_cast<LoopHintAttr>(Attr); @@ -550,17 +550,17 @@ void CodeGenFunction::EmitCondBrHints(llvm::LLVMContext &Context, switch (Option) { case LoopHintAttr::Vectorize: case LoopHintAttr::VectorizeWidth: - MetadataName = "llvm.vectorizer.width"; + MetadataName = "llvm.loop.vectorize.width"; break; case LoopHintAttr::Interleave: case LoopHintAttr::InterleaveCount: - MetadataName = "llvm.vectorizer.unroll"; + MetadataName = "llvm.loop.vectorize.unroll"; break; case LoopHintAttr::Unroll: - MetadataName = "llvm.loopunroll.enable"; + MetadataName = "llvm.loop.unroll.enable"; break; case LoopHintAttr::UnrollCount: - MetadataName = "llvm.loopunroll.count"; + MetadataName = "llvm.loop.unroll.count"; break; } @@ -572,7 +572,7 @@ void CodeGenFunction::EmitCondBrHints(llvm::LLVMContext &Context, if (ValueInt == 1) { // FIXME: In the future I will modifiy the behavior of the metadata // so we can enable/disable vectorization and interleaving separately. - Name = llvm::MDString::get(Context, "llvm.vectorizer.enable"); + Name = llvm::MDString::get(Context, "llvm.loop.vectorize.enable"); Value = Builder.getTrue(); break; } |