From a4765c6a028ae01fd67b15ac123d07a629997ffa Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Wed, 4 Oct 2023 22:03:49 -0700 Subject: [PATCH] [mlgo] Fix state-tracking-coro.ll test Post #68263, the inline advisor printer tries to print SCC Nodes' names, but if we perform a full pipeline (like O1), there'll be some DCE-ing happening and the Node pointers kept in the advisor for this (printing) purpose are dangling. Using the more eager printer post each scc inline pass is sufficient. --- llvm/test/Transforms/Inline/ML/state-tracking-coro.ll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll b/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll index 40731ec83a70e4..bbce9e43b10c98 100644 --- a/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll +++ b/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll @@ -1,9 +1,10 @@ ; Based on llvm/test/Transforms/Coroutines/coro-split-02.ll ; Corosplit will keep f1 and add 3 more functions. ; RUN: opt -passes='default,print' -training-log=/dev/null \ -; RUN: -S -enable-ml-inliner=development -keep-inline-advisor-for-printing < %s 2>&1 | FileCheck %s +; RUN: -S -enable-ml-inliner=development -enable-scc-inline-advisor-printing < %s 2>&1 | FileCheck %s ; REQUIRES: have_tflite ; +; CHECK: [MLInlineAdvisor] Nodes: 1 Edges: 0 ; CHECK: [MLInlineAdvisor] Nodes: 4 Edges: 0 %"struct.std::coroutine_handle" = type { ptr }