diff options
author | Johannes Doerfert <johannes@jdoerfert.de> | 2019-12-26 11:23:38 -0600 |
---|---|---|
committer | Johannes Doerfert <johannes@jdoerfert.de> | 2019-12-30 13:57:13 -0600 |
commit | 10fedd94b4326225de4a8a1fc53594cebd501246 (patch) | |
tree | dd879d47e38f020829c97fa830e87480af181aa1 /llvm/unittests/Frontend | |
parent | 000c6a5038bc654946b4348e586d685077b06943 (diff) | |
download | bcm5719-llvm-10fedd94b4326225de4a8a1fc53594cebd501246.tar.gz bcm5719-llvm-10fedd94b4326225de4a8a1fc53594cebd501246.zip |
[OpenMP] Use the OpenMPIRBuilder for `omp parallel`
This allows to use the OpenMPIRBuilder for parallel regions. Code was
extracted from D61953 and adapted to work with the new version (D70109).
All but one feature should be supported. An update of this patch will
provide test coverage and privatization other than shared.
Reviewed By: fghanim
Differential Revision: https://reviews.llvm.org/D70290
Diffstat (limited to 'llvm/unittests/Frontend')
-rw-r--r-- | llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp index e777149b30e..c6a51f6b1af 100644 --- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp +++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp @@ -376,6 +376,10 @@ TEST_F(OpenMPIRBuilderTest, ParallelSimple) { Function *OutlinedFn = PrivAI->getFunction(); EXPECT_NE(F, OutlinedFn); EXPECT_FALSE(verifyModule(*M)); + EXPECT_TRUE(OutlinedFn->hasFnAttribute(Attribute::NoUnwind)); + EXPECT_TRUE(OutlinedFn->hasFnAttribute(Attribute::NoRecurse)); + EXPECT_TRUE(OutlinedFn->hasParamAttribute(0, Attribute::NoAlias)); + EXPECT_TRUE(OutlinedFn->hasParamAttribute(1, Attribute::NoAlias)); EXPECT_TRUE(OutlinedFn->hasInternalLinkage()); EXPECT_EQ(OutlinedFn->arg_size(), 3U); |