[InstrProfiling] Support relative CountersPtr for PlatformOther
authorJinsong Ji <jji@us.ibm.com>
Wed, 18 Aug 2021 17:20:18 +0000 (17:20 +0000)
committerJinsong Ji <jji@us.ibm.com>
Wed, 18 Aug 2021 17:45:39 +0000 (17:45 +0000)
commit66e2772e4285588ccc3bcdb5f392c8326debbd7d
treefa8b472331cc89287668a6692baabee318998ea5
parent6d7ea597efee6398c4bf09a0d60a870c67ef2764
[InstrProfiling] Support relative CountersPtr for PlatformOther

D104556 change the CountersPtr to be relative, however, it did not
update the pointer initialization in  __llvm_profile_register_function,
so the platform (eg:AIX) that use __llvm_profile_register_function is now totaly
broken, any PGO code will SEGV.

This patch update the code to reflect that the Data->CountersPtr is now
relative.

Reviewed By: MaskRay, davidxl

Differential Revision: https://reviews.llvm.org/D108304
compiler-rt/lib/profile/InstrProfilingPlatformOther.c