diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt --- a/llvm/test/CMakeLists.txt +++ b/llvm/test/CMakeLists.txt @@ -17,7 +17,7 @@ LLVM_ENABLE_PLUGINS LLVM_BYE_LINK_INTO_TOOLS LLVM_HAVE_TF_AOT - LLVM_HAVE_TF_API + LLVM_HAVE_TFLITE LLVM_INLINER_MODEL_AUTOGENERATED LLVM_RAEVICT_MODEL_AUTOGENERATED LLVM_ENABLE_EXPENSIVE_CHECKS diff --git a/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll b/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll --- a/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll +++ b/llvm/test/CodeGen/MLRegalloc/default-eviction-advisor.ll @@ -1,7 +1,7 @@ ; Check that, in the absence of dependencies, we emit an error message when ; trying to use ML-driven advisor. ; REQUIRES: !have_tf_aot -; REQUIRES: !have_tf_api +; REQUIRES: !have_tflite ; REQUIRES: default_triple ; RUN: not llc -O2 -regalloc-enable-advisor=development < %s 2>&1 | FileCheck %s ; RUN: not llc -O2 -regalloc-enable-advisor=release < %s 2>&1 | FileCheck %s diff --git a/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll b/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll --- a/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll +++ b/llvm/test/CodeGen/MLRegalloc/default-priority-advisor.ll @@ -1,7 +1,7 @@ ; Check that, in the absence of dependencies, we emit an error message when ; trying to use ML-driven advisor. ; REQUIRES: !have_tf_aot -; REQUIRES: !have_tf_api +; REQUIRES: !have_tflite ; REQUIRES: default_triple ; RUN: not llc -O2 -regalloc-enable-priority-advisor=development < %s 2>&1 | FileCheck %s ; RUN: not llc -O2 -regalloc-enable-priority-advisor=release < %s 2>&1 | FileCheck %s diff --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll --- a/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll +++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll @@ -1,4 +1,4 @@ -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; REQUIRES: x86_64-linux ; ; Check that we log the currently in development features correctly with both the default diff --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll --- a/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll +++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-log-2-fcts.ll @@ -1,4 +1,4 @@ -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; REQUIRES: x86_64-linux ; ; Check that we can log more than 1 function. diff --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll --- a/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll +++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-logging.ll @@ -1,4 +1,4 @@ -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; REQUIRES: x86_64-linux ; ; Check that we log correctly, both with a learned policy, and the default policy diff --git a/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll b/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll --- a/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll +++ b/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll @@ -1,4 +1,4 @@ -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; REQUIRES: x86_64-linux ; ; Check that we log correctly, both with a learned policy, and the default policy diff --git a/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll b/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll --- a/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll +++ b/llvm/test/CodeGen/MLRegalloc/dev-rel-equivalence.ll @@ -1,4 +1,4 @@ -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; REQUIRES: llvm_raevict_model_autogenerated ; REQUIRES: x86_64-linux ; diff --git a/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll b/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll --- a/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll +++ b/llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll @@ -4,7 +4,7 @@ ; learn from it). ; However, when we discover we 'trip' over the artificially-low size increase ; factor, we penalize the 'bad' decision. -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; ; Generate mock model ; RUN: rm -rf %t diff --git a/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll b/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll --- a/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll +++ b/llvm/test/Transforms/Inline/ML/dev-mode-log-deleted.ll @@ -1,4 +1,4 @@ -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; RUN: opt -enable-ml-inliner=development -passes=scc-oz-module-inliner \ ; RUN: -training-log=- -tfutils-text-log -S < %s | FileCheck %s diff --git a/llvm/test/Transforms/Inline/ML/development-training-log.ll b/llvm/test/Transforms/Inline/ML/development-training-log.ll --- a/llvm/test/Transforms/Inline/ML/development-training-log.ll +++ b/llvm/test/Transforms/Inline/ML/development-training-log.ll @@ -1,5 +1,5 @@ ; Test that we can produce a log if we have or do not have a model, in development mode. -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; Generate mock model ; RUN: rm -rf %t_savedmodel %t ; RUN: %python %S/../../../../lib/Analysis/models/gen-inline-oz-test-model.py %t_savedmodel diff --git a/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll b/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll --- a/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll +++ b/llvm/test/Transforms/Inline/ML/ml-test-development-mode.ll @@ -5,7 +5,7 @@ ; This test uses Inputs/test-module.ll, as it shares it with a similar test ; for the 'release' mode. ; -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; RUN: rm -rf %t ; RUN: rm -rf %t_savedmodel ; RUN: %python %S/../../../../lib/Analysis/models/gen-inline-oz-test-model.py %t_savedmodel diff --git a/llvm/test/Transforms/Inline/ML/size-estimator-default.ll b/llvm/test/Transforms/Inline/ML/size-estimator-default.ll --- a/llvm/test/Transforms/Inline/ML/size-estimator-default.ll +++ b/llvm/test/Transforms/Inline/ML/size-estimator-default.ll @@ -1,4 +1,4 @@ -; REQUIRES: !have_tf_api +; REQUIRES: !have_tflite ; RUN: opt -passes='print' -S < %S/Inputs/size-estimator.ll 2>&1 | FileCheck %s ; CHECK: [InlineSizeEstimatorAnalysis] size estimate for branches: None \ No newline at end of file diff --git a/llvm/test/Transforms/Inline/ML/size-estimator-training.ll b/llvm/test/Transforms/Inline/ML/size-estimator-training.ll --- a/llvm/test/Transforms/Inline/ML/size-estimator-training.ll +++ b/llvm/test/Transforms/Inline/ML/size-estimator-training.ll @@ -1,6 +1,6 @@ -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; RUN: opt -passes='print' -S < %S/Inputs/size-estimator.ll 2>&1 | FileCheck %s --check-prefix=DEFAULT ; RUN: opt -passes='print' -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -S < %S/Inputs/size-estimator.ll 2>&1 | FileCheck %s ; DEFAULT: [InlineSizeEstimatorAnalysis] size estimate for branches: None ; CHECK: [InlineSizeEstimatorAnalysis] size estimate for branches: 28 \ No newline at end of file diff --git a/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll b/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll --- a/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll +++ b/llvm/test/Transforms/Inline/ML/state-tracking-coro.ll @@ -2,7 +2,7 @@ ; 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 -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; ; CHECK: [MLInlineAdvisor] Nodes: 4 Edges: 0 diff --git a/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll b/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll --- a/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll +++ b/llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll @@ -1,7 +1,7 @@ ; Based on llvm/test/Other/cgscc-iterate-function-mutation.ll ; 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 -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; ; CHECK: [MLInlineAdvisor] Nodes: 36 Edges: 0 diff --git a/llvm/test/Transforms/Inline/ML/state-tracking.ll b/llvm/test/Transforms/Inline/ML/state-tracking.ll --- a/llvm/test/Transforms/Inline/ML/state-tracking.ll +++ b/llvm/test/Transforms/Inline/ML/state-tracking.ll @@ -1,6 +1,6 @@ ; 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 -; REQUIRES: have_tf_api +; REQUIRES: have_tflite ; ; CHECK: [MLInlineAdvisor] Nodes: 3 Edges: 1 diff --git a/llvm/test/Transforms/Inline/inlining-advisor-default.ll b/llvm/test/Transforms/Inline/inlining-advisor-default.ll --- a/llvm/test/Transforms/Inline/inlining-advisor-default.ll +++ b/llvm/test/Transforms/Inline/inlining-advisor-default.ll @@ -1,10 +1,10 @@ ; Check that, in the absence of dependencies, we emit an error message when ; trying to use ML-driven inlining. ; REQUIRES: !have_tf_aot -; REQUIRES: !have_tf_api +; REQUIRES: !have_tflite ; RUN: not opt -passes=scc-oz-module-inliner -enable-ml-inliner=development -S < %s 2>&1 | FileCheck %s ; RUN: not opt -passes=scc-oz-module-inliner -enable-ml-inliner=release -S < %s 2>&1 | FileCheck %s declare i64 @f1() ; CHECK: Could not setup Inlining Advisor for the requested mode and/or options \ No newline at end of file diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -304,8 +304,8 @@ if config.have_tf_aot: config.available_features.add("have_tf_aot") -if config.have_tf_api: - config.available_features.add("have_tf_api") +if config.have_tflite: + config.available_features.add("have_tflite") if config.llvm_inliner_model_autogenerated: config.available_features.add("llvm_inliner_model_autogenerated") diff --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in --- a/llvm/test/lit.site.cfg.py.in +++ b/llvm/test/lit.site.cfg.py.in @@ -53,7 +53,7 @@ config.has_plugins = @LLVM_ENABLE_PLUGINS@ config.linked_bye_extension = @LLVM_BYE_LINK_INTO_TOOLS@ config.have_tf_aot = @LLVM_HAVE_TF_AOT@ -config.have_tf_api = @LLVM_HAVE_TF_API@ +config.have_tflite = @LLVM_HAVE_TFLITE@ config.llvm_inliner_model_autogenerated = @LLVM_INLINER_MODEL_AUTOGENERATED@ config.llvm_raevict_model_autogenerated = @LLVM_RAEVICT_MODEL_AUTOGENERATED@ config.expensive_checks = @LLVM_ENABLE_EXPENSIVE_CHECKS@