From 0e2a2571ca4639c8b75286988217017fbc884c7b Mon Sep 17 00:00:00 2001 From: Joachim Protze Date: Thu, 21 Dec 2017 13:55:29 +0000 Subject: [OMPT] Use frames at different level when using clang version 5 or higher with debug flag Clang 5 or higher adds an intermediate function call in certain cases when compiling with debug flag. This revision updates the testcases to work correctly. Differential Revision: https://reviews.llvm.org/D40595 llvm-svn: 321263 --- openmp/runtime/test/ompt/tasks/explicit_task.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'openmp/runtime/test/ompt/tasks/explicit_task.c') diff --git a/openmp/runtime/test/ompt/tasks/explicit_task.c b/openmp/runtime/test/ompt/tasks/explicit_task.c index 6ffad3ef45f..01fb3f8c008 100644 --- a/openmp/runtime/test/ompt/tasks/explicit_task.c +++ b/openmp/runtime/test/ompt/tasks/explicit_task.c @@ -1,6 +1,7 @@ // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 +#define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN #include "callback.h" #include @@ -11,7 +12,7 @@ int main() print_frame(0); #pragma omp parallel num_threads(2) { - print_frame(1); + print_frame_from_outlined_fn(1); print_ids(0); print_ids(1); print_frame(0); @@ -55,7 +56,7 @@ int main() // CHECK: {{^}}[[MASTER_ID]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=[[MAIN_REENTER]], parallel_id=[[PARALLEL_ID:[0-9]+]], requested_team_size=2, codeptr_ra=0x{{[0-f]+}}, invoker=[[PARALLEL_INVOKER:[0-9]+]] // nested parallel masters // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] - // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(1)=[[EXIT:0x[0-f]+]] + // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID:[0-9]+]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] // CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] @@ -75,7 +76,7 @@ int main() // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_end: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]] // CHECK: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID:[0-9]+]] - // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(1)=[[EXIT:0x[0-f]+]] + // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address({{.}})=[[EXIT:0x[0-f]+]] // CHECK: {{^}}[[THREAD_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[IMPLICIT_TASK_ID]], exit_frame=[[EXIT]], reenter_frame=[[NULL]] // CHECK: {{^}}[[THREAD_ID]]: task level 1: parallel_id=[[IMPLICIT_PARALLEL_ID]], task_id=[[PARENT_TASK_ID]], exit_frame=[[NULL]], reenter_frame=[[MAIN_REENTER]] // CHECK: {{^}}[[THREAD_ID]]: __builtin_frame_address(0)=[[REENTER:0x[0-f]+]] -- cgit v1.2.3