[Openmp-commits] [PATCH] D48282: [OMPT] Use alloca() to force availability of frame pointer

Simon Convent via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 25 02:06:27 PDT 2018


sconvent updated this revision to Diff 152640.
sconvent added a comment.

Add comment explaining the use of alloca()


https://reviews.llvm.org/D48282

Files:
  runtime/test/ompt/misc/interoperability.cpp


Index: runtime/test/ompt/misc/interoperability.cpp
===================================================================
--- runtime/test/ompt/misc/interoperability.cpp
+++ runtime/test/ompt/misc/interoperability.cpp
@@ -3,6 +3,7 @@
 
 #include <iostream>
 #include <thread>
+#include <alloca.h>
 
 #include "callback.h"
 #include "omp.h"
@@ -15,6 +16,9 @@
   // runtime isn't initialized yet...)
   omp_get_num_threads();
 
+  // Call alloca() to force availability of frame pointer
+  void *p = alloca(0);
+
   OMPT_SIGNAL(condition);
   // Wait for both initial threads to arrive that will eventually become the
   // master threads in the following parallel region.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48282.152640.patch
Type: text/x-patch
Size: 668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180625/20c2ab57/attachment.bin>


More information about the Openmp-commits mailing list