40 lines · cpp
1//===- ARCSubtarget.cpp - ARC Subtarget Information -------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file implements the ARC specific subclass of TargetSubtargetInfo.10//11//===----------------------------------------------------------------------===//12 13#include "ARCSubtarget.h"14#include "ARC.h"15#include "ARCSelectionDAGInfo.h"16#include "llvm/MC/TargetRegistry.h"17 18using namespace llvm;19 20#define DEBUG_TYPE "arc-subtarget"21 22#define GET_SUBTARGETINFO_TARGET_DESC23#define GET_SUBTARGETINFO_CTOR24#include "ARCGenSubtargetInfo.inc"25 26void ARCSubtarget::anchor() {}27 28ARCSubtarget::ARCSubtarget(const Triple &TT, const std::string &CPU,29 const std::string &FS, const TargetMachine &TM)30 : ARCGenSubtargetInfo(TT, CPU, /*TuneCPU=*/CPU, FS), InstrInfo(*this),31 FrameLowering(*this), TLInfo(TM, *this) {32 TSInfo = std::make_unique<ARCSelectionDAGInfo>();33}34 35ARCSubtarget::~ARCSubtarget() = default;36 37const SelectionDAGTargetInfo *ARCSubtarget::getSelectionDAGInfo() const {38 return TSInfo.get();39}40