[OMPT] Add support for testing return addresses on POWER
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Thu, 9 Nov 2017 14:26:12 +0000 (14:26 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Thu, 9 Nov 2017 14:26:12 +0000 (14:26 +0000)
commit380346fce18233fcb550a9519aac70fa2a5cc438
tree96e618208440b9ae41daff70b202d8d3899ce502
parentf8c75b8794e71cca4e6a9b3bd81e694a4fb868e1
[OMPT] Add support for testing return addresses on POWER

Return addresses are determined based on the address of a label
that is inserted directly after a pragma / API call. In some cases
the tests can assume a known number of instructions between the
addresses. However, the instructions and their encoded lengths
depend on the target that the test is compiled on.

Firstly, this patch refactors the macro print_current_address() to
allow such target dependent modifications and adds information for
the observed instructions on POWER. Secondly, it adapts the related
macro print_fuzzy_address() to reuse much of "hacky" code and fixes
the used formatting strings in the printf() call. Finally, it also
adds documentation about how these macros are intended to work.

Differential Revision: https://reviews.llvm.org/D39699

llvm-svn: 317786
openmp/runtime/test/ompt/callback.h