Path: blob/main/contrib/llvm-project/llvm/lib/Target/ARC/ARCTargetTransformInfo.h
35269 views
//===- ARCTargetTransformInfo.h - ARC specific TTI --------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7// \file8// This file contains a TargetTransformInfo::Concept conforming object specific9// to the ARC target machine. It uses the target's detailed information to10// provide more precise answers to certain TTI queries, while letting the11// target independent and default TTI implementations handle the rest.12//13//===----------------------------------------------------------------------===//1415#ifndef LLVM_LIB_TARGET_ARC_ARCTARGETTRANSFORMINFO_H16#define LLVM_LIB_TARGET_ARC_ARCTARGETTRANSFORMINFO_H1718#include "ARC.h"19#include "llvm/Analysis/TargetTransformInfo.h"20#include "llvm/CodeGen/BasicTTIImpl.h"2122namespace llvm {2324class ARCSubtarget;25class ARCTargetLowering;26class ARCTargetMachine;2728class ARCTTIImpl : public BasicTTIImplBase<ARCTTIImpl> {29using BaseT = BasicTTIImplBase<ARCTTIImpl>;30friend BaseT;3132const ARCSubtarget *ST;33const ARCTargetLowering *TLI;3435const ARCSubtarget *getST() const { return ST; }36const ARCTargetLowering *getTLI() const { return TLI; }3738public:39explicit ARCTTIImpl(const ARCTargetMachine *TM, const Function &F)40: BaseT(TM, F.getDataLayout()), ST(TM->getSubtargetImpl()),41TLI(ST->getTargetLowering()) {}4243// Provide value semantics. MSVC requires that we spell all of these out.44ARCTTIImpl(const ARCTTIImpl &Arg)45: BaseT(static_cast<const BaseT &>(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}46ARCTTIImpl(ARCTTIImpl &&Arg)47: BaseT(std::move(static_cast<BaseT &>(Arg))), ST(std::move(Arg.ST)),48TLI(std::move(Arg.TLI)) {}49};5051} // end namespace llvm5253#endif // LLVM_LIB_TARGET_ARC_ARCTARGETTRANSFORMINFO_H545556