diff options
| author | Xinliang David Li <davidxl@google.com> | 2015-11-23 18:02:59 +0000 | 
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2015-11-23 18:02:59 +0000 | 
| commit | c7c1f8581aca36afb03d3a1ecb4bd1a4d66736d6 (patch) | |
| tree | 1a4b453edd950eb0672ce154df2f1b2aeef60ef4 /llvm | |
| parent | e425c322245fe0539eab0ccd86c494b2587eb1b6 (diff) | |
| download | bcm5719-llvm-c7c1f8581aca36afb03d3a1ecb4bd1a4d66736d6.tar.gz bcm5719-llvm-c7c1f8581aca36afb03d3a1ecb4bd1a4d66736d6.zip  | |
[PGO] Introduce alignment macro for instr-prof control data(NFC)
llvm-svn: 253893
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/ProfileData/InstrProfData.inc | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp | 2 | 
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProfData.inc b/llvm/include/llvm/ProfileData/InstrProfData.inc index 0656c98fd69..d92c1d3314b 100644 --- a/llvm/include/llvm/ProfileData/InstrProfData.inc +++ b/llvm/include/llvm/ProfileData/InstrProfData.inc @@ -183,7 +183,6 @@ COVMAP_FUNC_RECORD(const uint64_t, llvm::Type::getInt64Ty(Ctx), FuncHash, \  #define INSTR_PROF_SIMPLE_CONCAT(x,y) x ## y  #define INSTR_PROF_CONCAT(x,y) INSTR_PROF_SIMPLE_CONCAT(x,y) -  /* Magic number to detect file format and endianness.   * Use 255 at one end, since no UTF-8 file can use that character.  Avoid 0,                * so that utilities, like strings, don't grab it as a string.  129 is also               @@ -230,6 +229,9 @@ COVMAP_FUNC_RECORD(const uint64_t, llvm::Type::getInt64Ty(Ctx), FuncHash, \  #define INSTR_PROF_VALUE_PROF_FUNC_STR \          INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_FUNC) +/* InstrProfile per-function control data alignment.  */ +#define INSTR_PROF_DATA_ALIGNMENT 8 +  /* The data structure that represents a tracked value by the   * value profiler.   */ diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp index 03b404c1f3b..a144dafdcbd 100644 --- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp @@ -344,7 +344,7 @@ InstrProfiling::getOrCreateRegionCounters(InstrProfIncrementInst *Inc) {                                    getVarName(Inc, getInstrProfDataVarPrefix()));    Data->setVisibility(NamePtr->getVisibility());    Data->setSection(getDataSection()); -  Data->setAlignment(8); +  Data->setAlignment(INSTR_PROF_DATA_ALIGNMENT);    Data->setComdat(ProfileVarsComdat);    PD.RegionCounters = CounterPtr;  | 

