This is an archive of the discontinued LLVM Phabricator instance.

Fine tuning of TC* macros
ClosedPublic

Authored by pawosm01 on May 3 2016, 11:17 AM.

Details

Summary

This patch introduces following:

  • TCI_* and TCD_* macros for incrementation and decrementation
  • Fix for invalid use of TCR_8 in one expression

Diff Detail

Repository
rL LLVM

Event Timeline

pawosm01 updated this revision to Diff 56033.May 3 2016, 11:17 AM
pawosm01 retitled this revision from to Fine tuning of TC* macros.
pawosm01 updated this object.
pawosm01 set the repository for this revision to rL LLVM.
pawosm01 added a subscriber: openmp-commits.
This revision is now accepted and ready to land.May 6 2016, 10:33 AM
This revision was automatically updated to reflect the committed changes.
pawosm01 added a comment.EditedMay 24 2016, 4:06 AM

As a side note, there is one more place that could be rearranged too: as I replaced no-op TCR_4 with actual code, compiler complained when building debug build. Following change was required:

diff --git a/runtime/src/kmp_tasking.c b/runtime/src/kmp_tasking.c
index 1d4ec35..e4d7bdc 100644
--- a/runtime/src/kmp_tasking.c
+++ b/runtime/src/kmp_tasking.c
@@ -1832,7 +1832,7 @@ static inline int __kmp_execute_tasks_template(kmp_info_t *thread, kmp_int32 gti
 #else
     KMP_DEBUG_ASSERT( nthreads > 1 );
 #endif
-    KMP_DEBUG_ASSERT( TCR_4((int)*unfinished_threads) >= 0 );
+    KMP_DEBUG_ASSERT( (int)(TCR_4(*unfinished_threads)) >= 0 );
.
     // Choose tasks from our own work queue.
     start:

Change commited.