[PATCH] D104829: Fail gracefully if no inlining model is available to download.

Jacob Hegna via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 18:18:52 PDT 2021


jacobhegna created this revision.
jacobhegna added a reviewer: mtrofin.
Herald added subscribers: hiraditya, mgorny.
jacobhegna requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104829

Files:
  llvm/lib/Analysis/CMakeLists.txt


Index: llvm/lib/Analysis/CMakeLists.txt
===================================================================
--- llvm/lib/Analysis/CMakeLists.txt
+++ llvm/lib/Analysis/CMakeLists.txt
@@ -14,6 +14,11 @@
       message(WARNING "LLVM_INLINER_MODEL_PATH was not set: autogenerating a model to finish the build.")
     endif()
 
+    # Crash if the user wants to download a model but a URL is not specified
+    if ("${LLVM_INLINER_MODEL_PATH}" STREQUAL "download" AND "${LLVM_INLINER_MODEL_CURRENT_URL}" STREQUAL "")
+        message(FATAL_ERROR "LLVM_INLINER_MODEL_PATH was set to 'download' but there is no model url currently specified in cmake - likely, the model interface recently changed, and so there is not a released model available.")
+    endif()
+
     tf_find_and_compile(
       ${LLVM_INLINER_MODEL_PATH}
       ${LLVM_INLINER_MODEL_CURRENT_URL}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104829.354127.patch
Type: text/x-patch
Size: 857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210624/69caf301/attachment.bin>


More information about the llvm-commits mailing list