[llvm] r353550 - [Cmake] Add an option to build LLVM using the experimental new pass manager

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 8 11:31:04 PST 2019


Author: xur
Date: Fri Feb  8 11:31:03 2019
New Revision: 353550

URL: http://llvm.org/viewvc/llvm-project?rev=353550&view=rev
Log:
[Cmake] Add an option to build LLVM using the experimental new pass manager

Add LLVM_USE_NEWPM to build LLVM using the experimental new pass manager.

Differential Revision: http://reviews.llvm.org/D57068

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
    llvm/trunk/docs/CMake.rst

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=353550&r1=353549&r2=353550&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Fri Feb  8 11:31:03 2019
@@ -784,6 +784,16 @@ if(LLVM_ENABLE_EH AND NOT LLVM_ENABLE_RT
   message(FATAL_ERROR "Exception handling requires RTTI. You must set LLVM_ENABLE_RTTI to ON")
 endif()
 
+option(LLVM_USE_NEWPM "Build LLVM using the experimental new pass manager" Off)
+mark_as_advanced(LLVM_USE_NEWPM)
+if (LLVM_USE_NEWPM)
+  append("-fexperimental-new-pass-manager"
+    CMAKE_CXX_FLAGS
+    CMAKE_C_FLAGS
+    CMAKE_EXE_LINKER_FLAGS
+    CMAKE_SHARED_LINKER_FLAGS)
+endif()
+
 option(LLVM_ENABLE_IR_PGO "Build LLVM and tools with IR PGO instrumentation (deprecated)" Off)
 mark_as_advanced(LLVM_ENABLE_IR_PGO)
 

Modified: llvm/trunk/docs/CMake.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.rst?rev=353550&r1=353549&r2=353550&view=diff
==============================================================================
--- llvm/trunk/docs/CMake.rst (original)
+++ llvm/trunk/docs/CMake.rst Fri Feb  8 11:31:03 2019
@@ -582,6 +582,9 @@ LLVM-specific variables
   If enabled, the compiler version check will only warn when using a toolchain
   which is about to be deprecated, instead of emitting an error.
 
+**LLVM_USE_NEWPM**:BOOL
+  If enabled, use the experimental new pass manager.
+
 CMake Caches
 ============
 




More information about the llvm-commits mailing list