[Openmp-dev] OpenMP LIT tests for OpenMPOpt pass

Abid Malik via Openmp-dev openmp-dev at lists.llvm.org
Wed Dec 9 09:53:17 PST 2020


Hello,

I am writing test cases for the OpenMPOpt pass. I am dumping the IR and
then checking the correctness of IR (after certain openmp related
optimizations). For example;
// RUN: %clang_cc1 -verify -fopenmp -O3 -x c -std=c99 -emit-llvm %s -o - |
FileCheck %s
// expected-no-diagnostics

void test_1(){

#pragma omp parallel
{
#pragma omp for
for (int i=0; i < 100; i++);
}
}

// CHECK: define void @test_1()
// CHECK: ...) @__kmpc_for_call(
// CHECK: ret void
// CHECK: define internal void @.omp_outlined.(
// CHECK: call void @__kmpc_for_static_init_4(
// CHECK: call void @__kmpc_for_static_fini(
// CHECK-NEXT: call void @__kmpc_barrier(
// CHECK: ret void


Is this a valid test format for the pass or should it be through the opt
tool?
-- 
Abid M. Malik
******************************************************
"I have learned silence from the talkative, toleration from the intolerant,
and kindness from the unkind"---Gibran
"Success is not for the chosen few, but for the few who choose" --- John
Maxwell
"Being a good person does not depend on your religion or status in life,
your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD
YOU TREAT OTHERS"--- Abid
"The Universe is talking to us, and the language of the Universe is
mathematics."----Abid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20201209/12bcc557/attachment.html>


More information about the Openmp-dev mailing list