diff options
| author | Benjamin Segovia <segovia.benjamin@gmail.com> | 2012-02-27 14:24:14 +0000 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-08-10 16:15:27 -0700 |
| commit | 1ee8c0d82d1ca51631c75263da6fe0de8de1595c (patch) | |
| tree | 3545d0794d0c12b0d4a3124fa28b2c8e38db5cab /backend | |
| parent | 5686905f9ec0fd94b5ae32b4fc68431553588fb9 (diff) | |
Removed the crap related to llvm targets and triples
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/src/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | backend/src/llvm/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | backend/src/llvm/GenBackend.cpp | 8 | ||||
| -rw-r--r-- | backend/src/llvm/GenTargetMachine.h | 61 | ||||
| -rw-r--r-- | backend/src/llvm/TargetInfo/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | backend/src/llvm/TargetInfo/GenBackendTargetInfo.cpp | 42 | ||||
| -rw-r--r-- | backend/src/llvm/TargetInfo/Makefile | 15 |
7 files changed, 8 insertions, 141 deletions
diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt index 3326f109..86a37fc6 100644 --- a/backend/src/CMakeLists.txt +++ b/backend/src/CMakeLists.txt @@ -53,8 +53,13 @@ include_directories (.) link_directories (${LLVM_LIBRARY_DIRS}) add_library (gbe SHARED ${GBE_SRC}) include (${LLVM_DIR}/AddLLVMDefinitions.cmake) -target_link_libraries (gbe LLVMGenBackend LLVMSelectionDAG LLVMAsmPrinter - LLVMMCParser LLVMAsmParser LLVMBitReader) +target_link_libraries (gbe + LLVMGenBackend + LLVMSelectionDAG + LLVMAsmPrinter + LLVMMCParser + LLVMAsmParser + LLVMBitReader) if (GBE_COMPILE_UTESTS) set (TESTER_SRC utest/tester.cpp) diff --git a/backend/src/llvm/CMakeLists.txt b/backend/src/llvm/CMakeLists.txt index 0907bb5f..a6f05bc8 100644 --- a/backend/src/llvm/CMakeLists.txt +++ b/backend/src/llvm/CMakeLists.txt @@ -5,10 +5,8 @@ include (${LLVM_DIR}/LLVMProcessSources.cmake) include_directories(${LLVM_INCLUDE_DIRS}) include_directories(../) add_llvm_target(GenBackend llvm2gen.cpp GenBackend.cpp) - add_llvm_library_dependencies(LLVMGenBackend LLVMAnalysis - LLVMGenBackendInfo LLVMCodeGen LLVMCore LLVMMC @@ -17,5 +15,3 @@ add_llvm_library_dependencies(LLVMGenBackend LLVMTarget LLVMTransformUtils) -add_subdirectory(TargetInfo) - diff --git a/backend/src/llvm/GenBackend.cpp b/backend/src/llvm/GenBackend.cpp index 1e7d8e37..3ccd1f40 100644 --- a/backend/src/llvm/GenBackend.cpp +++ b/backend/src/llvm/GenBackend.cpp @@ -17,7 +17,7 @@ * Author: Benjamin Segovia <benjamin.segovia@intel.com> */ -#include "GenTargetMachine.h" +// #include "GenTargetMachine.h" #include "llvm/CallingConv.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -62,12 +62,6 @@ #include <algorithm> using namespace llvm; -#if 0 -extern "C" void LLVMInitializeGenBackendTarget() { - // Register the target. - RegisterTargetMachine<GenTargetMachine> X(TheGenBackendTarget); -} -#endif namespace { class CBEMCAsmInfo : public MCAsmInfo { diff --git a/backend/src/llvm/GenTargetMachine.h b/backend/src/llvm/GenTargetMachine.h deleted file mode 100644 index a7206747..00000000 --- a/backend/src/llvm/GenTargetMachine.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * Author: Benjamin Segovia <benjamin.segovia@intel.com> - */ - -//===-- GenTargetMachine.h - TargetMachine for the C backend ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the TargetMachine that is used by the C backend. -// -//===----------------------------------------------------------------------===// - -#ifndef CTARGETMACHINE_H -#define CTARGETMACHINE_H - -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetData.h" - -namespace llvm { -#if 0 -struct GenTargetMachine : public TargetMachine { - GenTargetMachine(const Target &T, StringRef TT, - StringRef CPU, StringRef FS, - Reloc::Model RM, CodeModel::Model CM) - : TargetMachine(T, TT, CPU, FS) {} - - virtual bool addPassesToEmitFile(PassManagerBase &PM, - formatted_raw_ostream &Out, - CodeGenFileType FileType, - CodeGenOpt::Level OptLevel, - bool DisableVerify); - - virtual const TargetData *getTargetData() const { return 0; } -}; - -extern Target TheGenBackendTarget; -#endif -} // End llvm namespace - - -#endif diff --git a/backend/src/llvm/TargetInfo/CMakeLists.txt b/backend/src/llvm/TargetInfo/CMakeLists.txt deleted file mode 100644 index 9ce8817c..00000000 --- a/backend/src/llvm/TargetInfo/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ) - -add_llvm_library(LLVMGenBackendInfo - GenBackendTargetInfo.cpp - ) - -add_llvm_library_dependencies(LLVMGenBackendInfo - LLVMMC - LLVMSupport - LLVMTarget) diff --git a/backend/src/llvm/TargetInfo/GenBackendTargetInfo.cpp b/backend/src/llvm/TargetInfo/GenBackendTargetInfo.cpp deleted file mode 100644 index 835737ce..00000000 --- a/backend/src/llvm/TargetInfo/GenBackendTargetInfo.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * Author: Benjamin Segovia <benjamin.segovia@intel.com> - */ - -//===-- CBackendTargetInfo.cpp - CBackend Target Implementation -----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "GenTargetMachine.h" -#include "llvm/Module.h" -#include "llvm/Support/TargetRegistry.h" -using namespace llvm; -#if 0 -Target llvm::TheGenBackendTarget; - -extern "C" void LLVMInitializeGenBackendTargetInfo() { - RegisterTarget<> X(TheGenBackendTarget, "gen", "Gen backend"); -} - -extern "C" void LLVMInitializeGenBackendTargetMC() {} -#endif - diff --git a/backend/src/llvm/TargetInfo/Makefile b/backend/src/llvm/TargetInfo/Makefile deleted file mode 100644 index d4d5e15b..00000000 --- a/backend/src/llvm/TargetInfo/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -##===- lib/Target/CBackend/TargetInfo/Makefile -------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## -LEVEL = ../../../.. -LIBRARYNAME = LLVMCBackendInfo - -# Hack: we need to include 'main' target directory to grab private headers -CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. - -include $(LEVEL)/Makefile.common |
