42 lines · plain
1;; Test that MemProfContextDisambiguation is enabled under the expected conditions2;; and in the expected position.3 4;; Pass is not currently enabled by default at any opt level.5; RUN: opt -debug-pass-manager -passes='lto<O0>' -S %s \6; RUN: 2>&1 | FileCheck %s --implicit-check-not="Running pass: MemProfContextDisambiguation"7; RUN: opt -debug-pass-manager -passes='lto<O1>' -S %s \8; RUN: 2>&1 | FileCheck %s --implicit-check-not="Running pass: MemProfContextDisambiguation"9; RUN: opt -debug-pass-manager -passes='lto<O2>' -S %s \10; RUN: 2>&1 | FileCheck %s --implicit-check-not="Running pass: MemProfContextDisambiguation"11; RUN: opt -debug-pass-manager -passes='lto<O3>' -S %s \12; RUN: 2>&1 | FileCheck %s --implicit-check-not="Running pass: MemProfContextDisambiguation"13 14;; Pass should not run even under option at O0/O1.15; RUN: opt -debug-pass-manager -passes='lto<O0>' -S %s \16; RUN: -enable-memprof-context-disambiguation \17; RUN: 2>&1 | FileCheck %s --implicit-check-not="Running pass: MemProfContextDisambiguation"18; RUN: opt -debug-pass-manager -passes='lto<O1>' -S %s \19; RUN: -enable-memprof-context-disambiguation \20; RUN: 2>&1 | FileCheck %s --implicit-check-not="Running pass: MemProfContextDisambiguation"21 22;; Pass should be enabled under option at O2/O3.23; RUN: opt -debug-pass-manager -passes='lto<O2>' -S %s \24; RUN: -enable-memprof-context-disambiguation \25; RUN: 2>&1 | FileCheck %s --check-prefix=ENABLED26; RUN: opt -debug-pass-manager -passes='lto<O3>' -S %s \27; RUN: -enable-memprof-context-disambiguation \28; RUN: 2>&1 | FileCheck %s --check-prefix=ENABLED29 30;; When enabled, MemProfContextDisambiguation runs just after inlining.31; ENABLED: Running pass: InlinerPass32; ENABLED: Invalidating analysis: InlineAdvisorAnalysis33; ENABLED: Running pass: MemProfContextDisambiguation34 35define noundef ptr @_Z3barv() {36entry:37 %call = call noalias noundef nonnull ptr @_Znam(i64 noundef 10)38 ret ptr %call39}40 41declare noundef nonnull ptr @_Znam(i64 noundef)42