Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
//===- TargetTransformInfoImpl.h --------------------------------*- C++ -*-===// | //===- TargetTransformInfoImpl.h --------------------------------*- C++ -*-===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
/// \file | /// \file | ||||
/// This file provides helpers for the implementation of | /// This file provides helpers for the implementation of | ||||
/// a TargetTransformInfo-conforming class. | /// a TargetTransformInfo-conforming class. | ||||
/// | /// | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H | #ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H | ||||
#define LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H | #define LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H | ||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h" | #include "llvm/Analysis/ScalarEvolutionExpressions.h" | ||||
#include "llvm/Analysis/TargetTransformInfo.h" | #include "llvm/Analysis/TargetTransformInfo.h" | ||||
#include "llvm/Analysis/VectorUtils.h" | #include "llvm/Analysis/VectorUtils.h" | ||||
#include "llvm/IR/DataLayout.h" | #include "llvm/IR/DataLayout.h" | ||||
dnsampaio: Is there any strong reason to create target specific intrinsics instead of having generic… | |||||
#include "llvm/IR/Function.h" | #include "llvm/IR/Function.h" | ||||
#include "llvm/IR/GetElementPtrTypeIterator.h" | #include "llvm/IR/GetElementPtrTypeIterator.h" | ||||
#include "llvm/IR/IntrinsicInst.h" | #include "llvm/IR/IntrinsicInst.h" | ||||
#include "llvm/IR/Operator.h" | #include "llvm/IR/Operator.h" | ||||
#include "llvm/IR/PatternMatch.h" | #include "llvm/IR/PatternMatch.h" | ||||
#include "llvm/IR/Type.h" | #include "llvm/IR/Type.h" | ||||
using namespace llvm::PatternMatch; | using namespace llvm::PatternMatch; | ||||
▲ Show 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | public: | ||||
InstructionCost getOperandsScalarizationOverhead(ArrayRef<const Value *> Args, | InstructionCost getOperandsScalarizationOverhead(ArrayRef<const Value *> Args, | ||||
ArrayRef<Type *> Tys) const { | ArrayRef<Type *> Tys) const { | ||||
return 0; | return 0; | ||||
} | } | ||||
bool supportsEfficientVectorElementLoadStore() const { return false; } | bool supportsEfficientVectorElementLoadStore() const { return false; } | ||||
bool supportsComplexNumberArithmetic() const { return false; } | |||||
Intrinsic::ID getComplexArithmeticIntrinsic(ComplexArithmeticCandidate *C, | |||||
unsigned &IntArgCount) const { | |||||
return Intrinsic::not_intrinsic; | |||||
} | |||||
bool validateComplexCandidateDataFlow(ComplexArithmeticCandidate *C, | |||||
Instruction *I) { | |||||
return false; | |||||
} | |||||
void | |||||
filterComplexArithmeticOperand(ComplexArithmeticCandidate *C, Value *V, | |||||
SmallVector<Value *, 4> &Operands, | |||||
SmallVector<Instruction *, 32> &DeadInsts) {} | |||||
bool enableAggressiveInterleaving(bool LoopHasReductions) const { | bool enableAggressiveInterleaving(bool LoopHasReductions) const { | ||||
return false; | return false; | ||||
} | } | ||||
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, | TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, | ||||
bool IsZeroCmp) const { | bool IsZeroCmp) const { | ||||
return {}; | return {}; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 856 Lines • Show Last 20 Lines |
Is there any strong reason to create target specific intrinsics instead of having generic intrinsics with polymorphism? Such as llvm.complex.add.v2f32?