diff options
| author | Xinliang David Li <davidxl@google.com> | 2015-11-24 17:03:24 +0000 |
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2015-11-24 17:03:24 +0000 |
| commit | 1b85d4c961e5142a672b18fa040a0b0441911c7c (patch) | |
| tree | 2118885846f6cd6c00e115b765499b2abfef06eb /llvm/lib | |
| parent | 383d1f6aa6189223bf0472ef322d2385421e9bda (diff) | |
| download | bcm5719-llvm-1b85d4c961e5142a672b18fa040a0b0441911c7c.tar.gz bcm5719-llvm-1b85d4c961e5142a672b18fa040a0b0441911c7c.zip | |
Minor refactor to make VP writing more efficient
llvm-svn: 253994
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/ProfileData/InstrProf.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index fc7fc8aa1e2..b670902f3f9 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -166,10 +166,8 @@ void ValueProfRecord::serializeFrom(const InstrProfRecord &Record, for (uint32_t S = 0; S < NumValueSites; S++) { uint32_t ND = Record.getNumValueDataForSite(ValueKind, S); SiteCountArray[S] = ND; - std::unique_ptr<InstrProfValueData[]> SrcVD = - Record.getValueForSite(ValueKind, S); + Record.getValueForSite(DstVD, ValueKind, S); for (uint32_t I = 0; I < ND; I++) { - DstVD[I] = SrcVD[I]; switch (ValueKind) { case IPVK_IndirectCallTarget: DstVD[I].Value = IndexedInstrProf::ComputeHash( |

