From 1ee8c0d82d1ca51631c75263da6fe0de8de1595c Mon Sep 17 00:00:00 2001 From: Benjamin Segovia Date: Mon, 27 Feb 2012 14:24:14 +0000 Subject: [PATCH] Removed the crap related to llvm targets and triples --- backend/src/CMakeLists.txt | 9 +++- backend/src/llvm/CMakeLists.txt | 4 -- backend/src/llvm/GenBackend.cpp | 8 +-- backend/src/llvm/GenTargetMachine.h | 61 ---------------------- backend/src/llvm/TargetInfo/CMakeLists.txt | 10 ---- .../src/llvm/TargetInfo/GenBackendTargetInfo.cpp | 42 --------------- backend/src/llvm/TargetInfo/Makefile | 15 ------ 7 files changed, 8 insertions(+), 141 deletions(-) delete mode 100644 backend/src/llvm/GenTargetMachine.h delete mode 100644 backend/src/llvm/TargetInfo/CMakeLists.txt delete mode 100644 backend/src/llvm/TargetInfo/GenBackendTargetInfo.cpp delete mode 100644 backend/src/llvm/TargetInfo/Makefile diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt index 3326f10..86a37fc 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 0907bb5..a6f05bc 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 1e7d8e3..3ccd1f4 100644 --- a/backend/src/llvm/GenBackend.cpp +++ b/backend/src/llvm/GenBackend.cpp @@ -17,7 +17,7 @@ * Author: Benjamin Segovia */ -#include "GenTargetMachine.h" +// #include "GenTargetMachine.h" #include "llvm/CallingConv.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -62,12 +62,6 @@ #include using namespace llvm; -#if 0 -extern "C" void LLVMInitializeGenBackendTarget() { - // Register the target. - RegisterTargetMachine 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 a720674..0000000 --- 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 . - * - * Author: Benjamin Segovia - */ - -//===-- 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 9ce8817..0000000 --- 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 835737c..0000000 --- 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 . - * - * Author: Benjamin Segovia - */ - -//===-- 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 d4d5e15..0000000 --- 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 -- 2.7.4