diff options
Diffstat (limited to 'llvm/lib/ProfileData/SampleProf.cpp')
-rw-r--r-- | llvm/lib/ProfileData/SampleProf.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/ProfileData/SampleProf.cpp b/llvm/lib/ProfileData/SampleProf.cpp index b6abf6e..b2b786a 100644 --- a/llvm/lib/ProfileData/SampleProf.cpp +++ b/llvm/lib/ProfileData/SampleProf.cpp @@ -119,16 +119,7 @@ raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS, sampleprof_error SampleRecord::merge(const SampleRecord &Other, uint64_t Weight) { sampleprof_error Result; - // With pseudo probes, merge a dangling sample with a non-dangling sample - // should result in a dangling sample. - if (FunctionSamples::ProfileIsProbeBased && - (getSamples() == FunctionSamples::InvalidProbeCount || - Other.getSamples() == FunctionSamples::InvalidProbeCount)) { - NumSamples = FunctionSamples::InvalidProbeCount; - Result = sampleprof_error::success; - } else { - Result = addSamples(Other.getSamples(), Weight); - } + Result = addSamples(Other.getSamples(), Weight); for (const auto &I : Other.getCallTargets()) { MergeResult(Result, addCalledTarget(I.first(), I.second, Weight)); } |