[llvm] a4765c6 - [mlgo] Fix state-tracking-coro.ll test

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 22:07:54 PDT 2023


Author: Mircea Trofin
Date: 2023-10-04T22:07:44-07:00
New Revision: a4765c6a028ae01fd67b15ac123d07a629997ffa

URL: https://github.com/llvm/llvm-project/commit/a4765c6a028ae01fd67b15ac123d07a629997ffa
DIFF: https://github.com/llvm/llvm-project/commit/a4765c6a028ae01fd67b15ac123d07a629997ffa.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/test/Transforms/Inline/ML/state-tracking-coro.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll b/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll
index 40731ec83a70e4c..bbce9e43b10c981 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<O1>,print<inline-advisor>' -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 }


        


More information about the llvm-commits mailing list