diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-06 09:40:08 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-06 09:40:08 +0000 |
commit | c7a82b41a706728ce7c212b5bc40c74d1cce53c7 (patch) | |
tree | c0ff68d4fca1e51980e3757ab40be0b91e018dfe /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | f578140ba6100c15809647d17f82bc9fabaaaacf (diff) | |
download | bcm5719-llvm-c7a82b41a706728ce7c212b5bc40c74d1cce53c7.tar.gz bcm5719-llvm-c7a82b41a706728ce7c212b5bc40c74d1cce53c7.zip |
[OPENMP 4.0] Codegen for 'declare simd' directive.
OpenMP 4.0 adds support for elemental functions using declarative
directive '#pragma omp declare simd'. Patch adds mangling for simd
functions in accordance with
https://sourceware.org/glibc/wiki/libmvec?action=AttachFile&do=view&target=VectorABI.txt
llvm-svn: 268721
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 0ed425ba46a..5c8f57dc005 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -710,6 +710,8 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, } } else if (!FD->hasAttr<AlwaysInlineAttr>()) Fn->addFnAttr(llvm::Attribute::NoInline); + if (CGM.getLangOpts().OpenMP && FD->hasAttr<OMPDeclareSimdDeclAttr>()) + CGM.getOpenMPRuntime().emitDeclareSimdFunction(FD, Fn); } // Add no-jump-tables value. |