File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -4477,6 +4477,9 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
44774477 // will still be none type or should have gotten the default NotCold.
44784478 // Skip that after calling clone helper since that does some sanity
44794479 // checks that confirm we haven't decided yet that we need cloning.
4480+ // We might have a single version that is cold due to the
4481+ // MinClonedColdBytePercent heuristic, make sure we don't skip in that
4482+ // case.
44804483 if (AllocNode.Versions .size () == 1 &&
44814484 (AllocationType)AllocNode.Versions [0 ] != AllocationType::Cold) {
44824485 assert ((AllocationType)AllocNode.Versions [0 ] ==
Original file line number Diff line number Diff line change 3131; RUN: --check-prefix=SIZESUNHINTED
3232; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s --implicit-check-not "\"memprof\"=\"cold\""
3333
34+ ;; Check that we do hint with a sufficient -memprof-cloning-cold-threshold.
3435; RUN: opt -thinlto-bc -memprof-report-hinted-sizes %s >%t.o
3536; RUN: llvm-lto2 run %t.o -enable-memprof-context-disambiguation \
3637; RUN: -supports-hot-cold-new \
4243; RUN: --check-prefix=SIZESHINTED
4344; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s --check-prefix=IRHINTED
4445
46+ ;; Check again that we hint with a sufficient -memprof-cloning-cold-threshold,
47+ ;; even if we don't specify -memprof-report-hinted-sizes.
4548; RUN: opt -thinlto-bc -memprof-report-hinted-sizes %s >%t.o
4649; RUN: llvm-lto2 run %t.o -enable-memprof-context-disambiguation \
4750; RUN: -supports-hot-cold-new \
You can’t perform that action at this time.
0 commit comments