mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Minor style fixes for TargetTransformationInfo and TargetTransformImpl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166936 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -45,11 +45,11 @@ public:
|
|||||||
/// used.
|
/// used.
|
||||||
TargetTransformInfo();
|
TargetTransformInfo();
|
||||||
|
|
||||||
explicit TargetTransformInfo(const ScalarTargetTransformInfo* S,
|
TargetTransformInfo(const ScalarTargetTransformInfo* S,
|
||||||
const VectorTargetTransformInfo *V)
|
const VectorTargetTransformInfo *V)
|
||||||
: ImmutablePass(ID), STTI(S), VTTI(V) {
|
: ImmutablePass(ID), STTI(S), VTTI(V) {
|
||||||
initializeTargetTransformInfoPass(*PassRegistry::getPassRegistry());
|
initializeTargetTransformInfoPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetTransformInfo(const TargetTransformInfo &T) :
|
TargetTransformInfo(const TargetTransformInfo &T) :
|
||||||
ImmutablePass(ID), STTI(T.STTI), VTTI(T.VTTI) { }
|
ImmutablePass(ID), STTI(T.STTI), VTTI(T.VTTI) { }
|
||||||
@@ -102,7 +102,7 @@ public:
|
|||||||
/// isTruncateFree - Return true if it's free to truncate a value of
|
/// isTruncateFree - Return true if it's free to truncate a value of
|
||||||
/// type Ty1 to type Ty2. e.g. On x86 it's free to truncate a i32 value in
|
/// type Ty1 to type Ty2. e.g. On x86 it's free to truncate a i32 value in
|
||||||
/// register EAX to i16 by referencing its sub-register AX.
|
/// register EAX to i16 by referencing its sub-register AX.
|
||||||
virtual bool isTruncateFree(Type * /*Ty1*/, Type * /*Ty2*/) const {
|
virtual bool isTruncateFree(Type *Ty1, Type *Ty2) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/// Is this type legal.
|
/// Is this type legal.
|
||||||
|
@@ -28,7 +28,7 @@ bool ScalarTargetTransformImpl::isLegalICmpImmediate(int64_t imm) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ScalarTargetTransformImpl::isLegalAddressingMode(const AddrMode &AM,
|
bool ScalarTargetTransformImpl::isLegalAddressingMode(const AddrMode &AM,
|
||||||
Type *Ty) const {
|
Type *Ty) const {
|
||||||
return TLI->isLegalAddressingMode(AM, Ty);
|
return TLI->isLegalAddressingMode(AM, Ty);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ VectorTargetTransformImpl::getScalarizationOverhead(Type *Ty,
|
|||||||
bool Insert,
|
bool Insert,
|
||||||
bool Extract) const {
|
bool Extract) const {
|
||||||
assert (Ty->isVectorTy() && "Can only scalarize vectors");
|
assert (Ty->isVectorTy() && "Can only scalarize vectors");
|
||||||
unsigned Cost = 0;
|
unsigned Cost = 0;
|
||||||
|
|
||||||
for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
|
for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
|
||||||
if (Insert)
|
if (Insert)
|
||||||
@@ -240,7 +240,7 @@ unsigned VectorTargetTransformImpl::getCmpSelInstrCost(unsigned Opcode,
|
|||||||
Type *CondTy) const {
|
Type *CondTy) const {
|
||||||
int ISD = InstructionOpcodeToISD(Opcode);
|
int ISD = InstructionOpcodeToISD(Opcode);
|
||||||
assert(ISD && "Invalid opcode");
|
assert(ISD && "Invalid opcode");
|
||||||
|
|
||||||
// Selects on vectors are actually vector selects.
|
// Selects on vectors are actually vector selects.
|
||||||
if (ISD == ISD::SELECT) {
|
if (ISD == ISD::SELECT) {
|
||||||
assert(CondTy && "CondTy must exist");
|
assert(CondTy && "CondTy must exist");
|
||||||
|
Reference in New Issue
Block a user