diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-01-20 20:58:56 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-01-20 20:58:56 +0000 |
commit | 105cf2b179e0cbedcb2452026a0689feceef8e32 (patch) | |
tree | c4ee97ad3335245297a39f4fd78fe2a37b9460fa /llvm/lib/CodeGen | |
parent | 1c9e4ef0df14835e6c46a39126308a27c576567e (diff) | |
download | bcm5719-llvm-105cf2b179e0cbedcb2452026a0689feceef8e32.tar.gz bcm5719-llvm-105cf2b179e0cbedcb2452026a0689feceef8e32.zip |
[GlobalISel] Add the proper cmake plumbing.
This patch adds the necessary plumbing to cmake to build the sources related to
GlobalISel.
To build the sources related to GlobalISel, we need to add -DBUILD_GLOBAL_ISEL=ON.
By default, this is OFF, thus GlobalISel sources will not impact people that do
not explicitly opt-in.
Differential Revision: http://reviews.llvm.org/D15983
llvm-svn: 258344
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/CMakeLists.txt | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/CMakeLists.txt | 5 | ||||
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 37 | ||||
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/LLVMBuild.txt | 22 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LLVMBuild.txt | 2 |
5 files changed, 68 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt index b7c1bd32d38..7f00e8f6758 100644 --- a/llvm/lib/CodeGen/CMakeLists.txt +++ b/llvm/lib/CodeGen/CMakeLists.txt @@ -142,3 +142,6 @@ add_dependencies(LLVMCodeGen intrinsics_gen) add_subdirectory(SelectionDAG) add_subdirectory(AsmPrinter) add_subdirectory(MIRParser) +if(LLVM_BUILD_GLOBAL_ISEL) + add_subdirectory(GlobalISel) +endif() diff --git a/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt new file mode 100644 index 00000000000..07968c8123a --- /dev/null +++ b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt @@ -0,0 +1,5 @@ +add_llvm_library(LLVMGlobalISel + IRTranslator.cpp + ) + +add_dependencies(LLVMGlobalISel intrinsics_gen) diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp new file mode 100644 index 00000000000..efb4ead0a94 --- /dev/null +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -0,0 +1,37 @@ +//===-- llvm/CodeGen/GlobalISel/IRTranslator.cpp - IRTranslator --*- C++ -*-==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// \file +/// This file implements the IRTranslator class. +//===----------------------------------------------------------------------===// + +#include "llvm/CodeGen/GlobalISel/IRTranslator.h" + +using namespace llvm; + +char IRTranslator::ID = 0; + +bool IRTranslator::translateADD(const Instruction &Inst) { + return false; +} + +bool IRTranslator::translate(const Instruction &) { + return false; +} + + +void IRTranslator::finalize() { +} + +IRTranslator::IRTranslator() + : MachineFunctionPass(ID) { +} + +bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { + return false; +} diff --git a/llvm/lib/CodeGen/GlobalISel/LLVMBuild.txt b/llvm/lib/CodeGen/GlobalISel/LLVMBuild.txt new file mode 100644 index 00000000000..a2daa3b222a --- /dev/null +++ b/llvm/lib/CodeGen/GlobalISel/LLVMBuild.txt @@ -0,0 +1,22 @@ +;===- ./lib/CodeGen/GlobalISel/LLVMBuild.txt -----------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Library +name = GlobalISel +parent = CodeGen +required_libraries = Analysis CodeGen Core MC Support Target TransformUtils diff --git a/llvm/lib/CodeGen/LLVMBuild.txt b/llvm/lib/CodeGen/LLVMBuild.txt index 69b6a0f380a..e08312101cd 100644 --- a/llvm/lib/CodeGen/LLVMBuild.txt +++ b/llvm/lib/CodeGen/LLVMBuild.txt @@ -16,7 +16,7 @@ ;===------------------------------------------------------------------------===; [common] -subdirectories = AsmPrinter SelectionDAG MIRParser +subdirectories = AsmPrinter SelectionDAG MIRParser GlobalISel [component_0] type = Library |