Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm
bindings
cmake
docs
examples
include
lib
Analysis
AsmParser
BinaryFormat
Bitcode
CodeGen
DebugInfo
Demangle
ExecutionEngine
FuzzMutate
Fuzzer
IR
IRReader
LTO
LineEditor
Linker
MC
Object
ObjectYAML
Option
Passes
ProfileData
Support
TableGen
Target
AArch64
AMDGPU
ARC
ARM
AVR
BPF
Hexagon
Lanai
MSP430
Mips
NVPTX
Nios2
PowerPC
AsmParser
Disassembler
InstPrinter
MCTargetDesc
TargetInfo
CMakeLists.txt
LLVMBuild.txt
P9InstrResources.td
PPC.h
PPC.td
PPCAsmPrinter.cpp
PPCBoolRetToInt.cpp
PPCBranchCoalescing.cpp
PPCBranchSelector.cpp
PPCCCState.cpp
PPCCCState.h
PPCCTRLoops.cpp
PPCCallingConv.h
PPCCallingConv.td
PPCEarlyReturn.cpp
PPCExpandISEL.cpp
PPCFastISel.cpp
PPCFrameLowering.cpp
PPCFrameLowering.h
PPCHazardRecognizers.cpp
PPCHazardRecognizers.h
PPCISelDAGToDAG.cpp.REMOVED.git-id
PPCISelLowering.cpp.REMOVED.git-id
PPCISelLowering.h
PPCInstr64Bit.td
PPCInstrAltivec.td
PPCInstrBuilder.h
PPCInstrFormats.td
PPCInstrHTM.td
PPCInstrInfo.cpp.REMOVED.git-id
PPCInstrInfo.h
PPCInstrInfo.td.REMOVED.git-id
PPCInstrQPX.td
PPCInstrSPE.td
PPCInstrVSX.td.REMOVED.git-id
PPCLoopPreIncPrep.cpp
PPCMCInstLower.cpp
PPCMIPeephole.cpp
PPCMachineBasicBlockUtils.h
PPCMachineFunctionInfo.cpp
PPCMachineFunctionInfo.h
PPCPerfectShuffle.h.REMOVED.git-id
PPCPreEmitPeephole.cpp
PPCQPXLoadSplat.cpp
PPCReduceCRLogicals.cpp
PPCRegisterInfo.cpp
PPCRegisterInfo.h
PPCRegisterInfo.td
PPCSchedule.td
PPCSchedule440.td
PPCScheduleA2.td
PPCScheduleE500mc.td
PPCScheduleE5500.td
PPCScheduleG3.td
PPCScheduleG4.td
PPCScheduleG4Plus.td
PPCScheduleG5.td
PPCScheduleP7.td
PPCScheduleP8.td
PPCScheduleP9.td
PPCSubtarget.cpp
PPCSubtarget.h
PPCTLSDynamicCall.cpp
PPCTOCRegDeps.cpp
PPCTargetMachine.cpp
PPCTargetMachine.h
PPCTargetObjectFile.cpp
PPCTargetObjectFile.h
PPCTargetStreamer.h
PPCTargetTransformInfo.cpp
PPCTargetTransformInfo.h
PPCVSXCopy.cpp
PPCVSXFMAMutate.cpp
PPCVSXSwapRemoval.cpp
README.txt
README_ALTIVEC.txt
README_P9.txt
RISCV
Sparc
SystemZ
WebAssembly
X86
XCore
CMakeLists.txt
LLVMBuild.txt
README.txt
Target.cpp
TargetIntrinsicInfo.cpp
TargetLoweringObjectFile.cpp
TargetMachine.cpp
TargetMachineC.cpp
Testing
ToolDrivers
Transforms
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt
projects
resources
runtimes
scripts
test
tools
unittests
utils
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
libgc
llvm
m4
man
mcs
mk
mono
msvc
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/external/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h

101 lines
3.8 KiB
C
Raw Normal View History

//===-- PPCTargetTransformInfo.h - PPC specific TTI -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
/// \file
/// This file a TargetTransformInfo::Concept conforming object specific to the
/// PPC target machine. It uses the target's detailed information to
/// provide more precise answers to certain TTI queries, while letting the
/// target independent and default TTI implementations handle the rest.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIB_TARGET_POWERPC_PPCTARGETTRANSFORMINFO_H
#define LLVM_LIB_TARGET_POWERPC_PPCTARGETTRANSFORMINFO_H
#include "PPC.h"
#include "PPCTargetMachine.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/BasicTTIImpl.h"
#include "llvm/CodeGen/TargetLowering.h"
namespace llvm {
class PPCTTIImpl : public BasicTTIImplBase<PPCTTIImpl> {
typedef BasicTTIImplBase<PPCTTIImpl> BaseT;
typedef TargetTransformInfo TTI;
friend BaseT;
const PPCSubtarget *ST;
const PPCTargetLowering *TLI;
const PPCSubtarget *getST() const { return ST; }
const PPCTargetLowering *getTLI() const { return TLI; }
public:
explicit PPCTTIImpl(const PPCTargetMachine *TM, const Function &F)
: BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
TLI(ST->getTargetLowering()) {}
/// \name Scalar TTI Implementations
/// @{
using BaseT::getIntImmCost;
int getIntImmCost(const APInt &Imm, Type *Ty);
int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
Type *Ty);
unsigned getUserCost(const User *U, ArrayRef<const Value *> Operands);
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth);
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
TTI::UnrollingPreferences &UP);
/// @}
/// \name Vector TTI Implementations
/// @{
bool enableAggressiveInterleaving(bool LoopHasReductions);
const TTI::MemCmpExpansionOptions *enableMemCmpExpansion(
bool IsZeroCmp) const;
bool enableInterleavedAccessVectorization();
unsigned getNumberOfRegisters(bool Vector);
unsigned getRegisterBitWidth(bool Vector) const;
unsigned getCacheLineSize();
unsigned getPrefetchDistance();
unsigned getMaxInterleaveFactor(unsigned VF);
int getArithmeticInstrCost(
unsigned Opcode, Type *Ty,
TTI::OperandValueKind Opd1Info = TTI::OK_AnyValue,
TTI::OperandValueKind Opd2Info = TTI::OK_AnyValue,
TTI::OperandValueProperties Opd1PropInfo = TTI::OP_None,
TTI::OperandValueProperties Opd2PropInfo = TTI::OP_None,
ArrayRef<const Value *> Args = ArrayRef<const Value *>());
int getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp);
int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src,
const Instruction *I = nullptr);
int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy,
const Instruction *I = nullptr);
int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index);
int getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment,
unsigned AddressSpace, const Instruction *I = nullptr);
int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy,
unsigned Factor,
ArrayRef<unsigned> Indices,
unsigned Alignment,
unsigned AddressSpace);
/// @}
};
} // end namespace llvm
#endif