Index: lib/Target/AAP/AAPTargetMachine.cpp =================================================================== --- /dev/null +++ lib/Target/AAP/AAPTargetMachine.cpp @@ -0,0 +1,16 @@ +//===-- AAPTargetMachine.cpp - Define TargetMachine for AAP ---------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Implements the info about AAP target spec. +// +//===----------------------------------------------------------------------===// + +extern "C" void LLVMInitializeAAPTarget() { +} + Index: lib/Target/AAP/CMakeLists.txt =================================================================== --- /dev/null +++ lib/Target/AAP/CMakeLists.txt @@ -0,0 +1,7 @@ +set(LLVM_TARGET_DEFINITIONS AAP.td) + +add_llvm_target(AAPCodeGen + AAPTargetMachine.cpp +) + +add_subdirectory(TargetInfo) Index: lib/Target/AAP/LLVMBuild.txt =================================================================== --- /dev/null +++ lib/Target/AAP/LLVMBuild.txt @@ -0,0 +1,33 @@ +;===- ./lib/Target/AAP/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 +; +;===------------------------------------------------------------------------===; + +[common] +subdirectories = TargetInfo + +[component_0] +type = TargetGroup +name = AAP +parent = Target +has_asmprinter = 0 +has_asmparser = 0 + +[component_1] +type = Library +name = AAPCodeGen +parent = AAP +required_libraries = AsmPrinter CodeGen Core MC SelectionDAG Support Target AAPInfo +add_to_library_groups = AAP Index: lib/Target/AAP/TargetInfo/AAPTargetInfo.cpp =================================================================== --- /dev/null +++ lib/Target/AAP/TargetInfo/AAPTargetInfo.cpp @@ -0,0 +1,29 @@ +//===-- AAPTargetInfo.cpp - AAP Target Implementation ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/IR/Module.h" +#include "llvm/Support/TargetRegistry.h" + +using namespace llvm; + +namespace llvm { +Target &getTheAAPTarget() { + static Target TheAAPTarget; + return TheAAPTarget; +} +} + +extern "C" void LLVMInitializeAAPTargetInfo() { + RegisterTarget X(getTheAAPTarget(), "aap", "AAP [experimental]"); +} + +// Placeholder. This will be removed when the MC support has been +// introduced +extern "C" void LLVMInitializeAAPTargetMC() { +} Index: lib/Target/AAP/TargetInfo/CMakeLists.txt =================================================================== --- /dev/null +++ lib/Target/AAP/TargetInfo/CMakeLists.txt @@ -0,0 +1,3 @@ +add_llvm_library(LLVMAAPInfo + AAPTargetInfo.cpp +) Index: lib/Target/AAP/TargetInfo/LLVMBuild.txt =================================================================== --- /dev/null +++ lib/Target/AAP/TargetInfo/LLVMBuild.txt @@ -0,0 +1,23 @@ +;===- ./lib/Target/AAP/TargetInfo/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 = AAPInfo +parent = AAP +required_libraries = Support +add_to_library_groups = AAP Index: lib/Target/LLVMBuild.txt =================================================================== --- lib/Target/LLVMBuild.txt +++ lib/Target/LLVMBuild.txt @@ -19,6 +19,7 @@ ; will typically require only insertion of a line. [common] subdirectories = + AAP AMDGPU ARM AArch64