[compiler-rt] r252421 - [PGO] Cleanup: fix function-data field names
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 8 10:00:13 PST 2015
Author: davidxl
Date: Sun Nov 8 12:00:13 2015
New Revision: 252421
URL: http://llvm.org/viewvc/llvm-project?rev=252421&view=rev
Log:
[PGO] Cleanup: fix function-data field names
To make them the same as the common def in InstrProfData.inc.
This is a preparation to make the runtime code to use the
template as well. NFC
Modified:
compiler-rt/trunk/lib/profile/InstrProfiling.h
compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c
Modified: compiler-rt/trunk/lib/profile/InstrProfiling.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfiling.h?rev=252421&r1=252420&r2=252421&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfiling.h (original)
+++ compiler-rt/trunk/lib/profile/InstrProfiling.h Sun Nov 8 12:00:13 2015
@@ -32,8 +32,8 @@ typedef struct __llvm_profile_data {
const uint32_t NameSize;
const uint32_t NumCounters;
const uint64_t FuncHash;
- const char *const Name;
- uint64_t *const Counters;
+ const char *const NamePtr;
+ uint64_t *const CounterPtr;
} __llvm_profile_data;
typedef struct __llvm_profile_header {
Modified: compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c?rev=252421&r1=252420&r2=252421&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c Sun Nov 8 12:00:13 2015
@@ -33,25 +33,25 @@ void __llvm_profile_register_function(vo
if (!DataFirst) {
DataFirst = Data;
DataLast = Data + 1;
- NamesFirst = Data->Name;
- NamesLast = Data->Name + Data->NameSize;
- CountersFirst = Data->Counters;
- CountersLast = Data->Counters + Data->NumCounters;
+ NamesFirst = Data->NamePtr;
+ NamesLast = Data->NamePtr + Data->NameSize;
+ CountersFirst = Data->CounterPtr;
+ CountersLast = Data->CounterPtr + Data->NumCounters;
return;
}
#define UPDATE_FIRST(First, New) \
First = New < First ? New : First
UPDATE_FIRST(DataFirst, Data);
- UPDATE_FIRST(NamesFirst, Data->Name);
- UPDATE_FIRST(CountersFirst, Data->Counters);
+ UPDATE_FIRST(NamesFirst, Data->NamePtr);
+ UPDATE_FIRST(CountersFirst, Data->CounterPtr);
#undef UPDATE_FIRST
#define UPDATE_LAST(Last, New) \
Last = New > Last ? New : Last
UPDATE_LAST(DataLast, Data + 1);
- UPDATE_LAST(NamesLast, Data->Name + Data->NameSize);
- UPDATE_LAST(CountersLast, Data->Counters + Data->NumCounters);
+ UPDATE_LAST(NamesLast, Data->NamePtr + Data->NameSize);
+ UPDATE_LAST(CountersLast, Data->CounterPtr + Data->NumCounters);
#undef UPDATE_LAST
}
More information about the llvm-commits
mailing list