mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
Update TargetLowering ivars for name policy.
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly ivars should be camel-case and start with an upper-case letter. A few in TargetLowering were starting with a lower-case letter. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abc402886e
commit
3450f800aa
@ -183,7 +183,7 @@ public:
|
||||
/// isPredictableSelectExpensive - Return true if selects are only cheaper
|
||||
/// than branches if the branch is unlikely to be predicted right.
|
||||
bool isPredictableSelectExpensive() const {
|
||||
return predictableSelectIsExpensive;
|
||||
return PredictableSelectIsExpensive;
|
||||
}
|
||||
|
||||
/// getSetCCResultType - Return the ValueType of the result of SETCC
|
||||
@ -659,7 +659,7 @@ public:
|
||||
/// return the limit for functions that have OptSize attribute.
|
||||
/// @brief Get maximum # of store operations permitted for llvm.memset
|
||||
unsigned getMaxStoresPerMemset(bool OptSize) const {
|
||||
return OptSize ? maxStoresPerMemsetOptSize : maxStoresPerMemset;
|
||||
return OptSize ? MaxStoresPerMemsetOptSize : MaxStoresPerMemset;
|
||||
}
|
||||
|
||||
/// This function returns the maximum number of store operations permitted
|
||||
@ -668,7 +668,7 @@ public:
|
||||
/// return the limit for functions that have OptSize attribute.
|
||||
/// @brief Get maximum # of store operations permitted for llvm.memcpy
|
||||
unsigned getMaxStoresPerMemcpy(bool OptSize) const {
|
||||
return OptSize ? maxStoresPerMemcpyOptSize : maxStoresPerMemcpy;
|
||||
return OptSize ? MaxStoresPerMemcpyOptSize : MaxStoresPerMemcpy;
|
||||
}
|
||||
|
||||
/// This function returns the maximum number of store operations permitted
|
||||
@ -677,7 +677,7 @@ public:
|
||||
/// return the limit for functions that have OptSize attribute.
|
||||
/// @brief Get maximum # of store operations permitted for llvm.memmove
|
||||
unsigned getMaxStoresPerMemmove(bool OptSize) const {
|
||||
return OptSize ? maxStoresPerMemmoveOptSize : maxStoresPerMemmove;
|
||||
return OptSize ? MaxStoresPerMemmoveOptSize : MaxStoresPerMemmove;
|
||||
}
|
||||
|
||||
/// This function returns true if the target allows unaligned memory accesses.
|
||||
@ -696,7 +696,7 @@ public:
|
||||
/// optimization.
|
||||
/// @brief Determine if the target should perform code placement optimization.
|
||||
bool shouldOptimizeCodePlacement() const {
|
||||
return benefitFromCodePlacementOpt;
|
||||
return BenefitFromCodePlacementOpt;
|
||||
}
|
||||
|
||||
/// getOptimalMemOpType - Returns the target specific optimal type for load
|
||||
@ -1598,11 +1598,11 @@ protected:
|
||||
/// with 16-bit alignment would result in four 2-byte stores and one 1-byte
|
||||
/// store. This only applies to setting a constant array of a constant size.
|
||||
/// @brief Specify maximum number of store instructions per memset call.
|
||||
unsigned maxStoresPerMemset;
|
||||
unsigned MaxStoresPerMemset;
|
||||
|
||||
/// Maximum number of stores operations that may be substituted for the call
|
||||
/// to memset, used for functions with OptSize attribute.
|
||||
unsigned maxStoresPerMemsetOptSize;
|
||||
unsigned MaxStoresPerMemsetOptSize;
|
||||
|
||||
/// When lowering \@llvm.memcpy this field specifies the maximum number of
|
||||
/// store operations that may be substituted for a call to memcpy. Targets
|
||||
@ -1614,11 +1614,11 @@ protected:
|
||||
/// and one 1-byte store. This only applies to copying a constant array of
|
||||
/// constant size.
|
||||
/// @brief Specify maximum bytes of store instructions per memcpy call.
|
||||
unsigned maxStoresPerMemcpy;
|
||||
unsigned MaxStoresPerMemcpy;
|
||||
|
||||
/// Maximum number of store operations that may be substituted for a call
|
||||
/// to memcpy, used for functions with OptSize attribute.
|
||||
unsigned maxStoresPerMemcpyOptSize;
|
||||
unsigned MaxStoresPerMemcpyOptSize;
|
||||
|
||||
/// When lowering \@llvm.memmove this field specifies the maximum number of
|
||||
/// store instructions that may be substituted for a call to memmove. Targets
|
||||
@ -1629,19 +1629,19 @@ protected:
|
||||
/// with 8-bit alignment would result in nine 1-byte stores. This only
|
||||
/// applies to copying a constant array of constant size.
|
||||
/// @brief Specify maximum bytes of store instructions per memmove call.
|
||||
unsigned maxStoresPerMemmove;
|
||||
unsigned MaxStoresPerMemmove;
|
||||
|
||||
/// Maximum number of store instructions that may be substituted for a call
|
||||
/// to memmove, used for functions with OpSize attribute.
|
||||
unsigned maxStoresPerMemmoveOptSize;
|
||||
unsigned MaxStoresPerMemmoveOptSize;
|
||||
|
||||
/// This field specifies whether the target can benefit from code placement
|
||||
/// optimization.
|
||||
bool benefitFromCodePlacementOpt;
|
||||
bool BenefitFromCodePlacementOpt;
|
||||
|
||||
/// predictableSelectIsExpensive - Tells the code generator that select is
|
||||
/// PredictableSelectIsExpensive - Tells the code generator that select is
|
||||
/// more expensive than a branch if the branch is usually predicted right.
|
||||
bool predictableSelectIsExpensive;
|
||||
bool PredictableSelectIsExpensive;
|
||||
|
||||
protected:
|
||||
/// isLegalRC - Return true if the value types that can be represented by the
|
||||
|
@ -707,17 +707,17 @@ TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm,
|
||||
PointerTy = MVT::getIntegerVT(8*TD->getPointerSize(0));
|
||||
memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*));
|
||||
memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray));
|
||||
maxStoresPerMemset = maxStoresPerMemcpy = maxStoresPerMemmove = 8;
|
||||
maxStoresPerMemsetOptSize = maxStoresPerMemcpyOptSize
|
||||
= maxStoresPerMemmoveOptSize = 4;
|
||||
benefitFromCodePlacementOpt = false;
|
||||
MaxStoresPerMemset = MaxStoresPerMemcpy = MaxStoresPerMemmove = 8;
|
||||
MaxStoresPerMemsetOptSize = MaxStoresPerMemcpyOptSize
|
||||
= MaxStoresPerMemmoveOptSize = 4;
|
||||
BenefitFromCodePlacementOpt = false;
|
||||
UseUnderscoreSetJmp = false;
|
||||
UseUnderscoreLongJmp = false;
|
||||
SelectIsExpensive = false;
|
||||
IntDivIsCheap = false;
|
||||
Pow2DivIsCheap = false;
|
||||
JumpIsExpensive = false;
|
||||
predictableSelectIsExpensive = false;
|
||||
PredictableSelectIsExpensive = false;
|
||||
StackPointerRegisterToSaveRestore = 0;
|
||||
ExceptionPointerRegister = 0;
|
||||
ExceptionSelectorRegister = 0;
|
||||
|
@ -835,21 +835,21 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
|
||||
setSchedulingPreference(Sched::Hybrid);
|
||||
|
||||
//// temporary - rewrite interface to use type
|
||||
maxStoresPerMemset = 8;
|
||||
maxStoresPerMemsetOptSize = Subtarget->isTargetDarwin() ? 8 : 4;
|
||||
maxStoresPerMemcpy = 4; // For @llvm.memcpy -> sequence of stores
|
||||
maxStoresPerMemcpyOptSize = Subtarget->isTargetDarwin() ? 4 : 2;
|
||||
maxStoresPerMemmove = 4; // For @llvm.memmove -> sequence of stores
|
||||
maxStoresPerMemmoveOptSize = Subtarget->isTargetDarwin() ? 4 : 2;
|
||||
MaxStoresPerMemset = 8;
|
||||
MaxStoresPerMemsetOptSize = Subtarget->isTargetDarwin() ? 8 : 4;
|
||||
MaxStoresPerMemcpy = 4; // For @llvm.memcpy -> sequence of stores
|
||||
MaxStoresPerMemcpyOptSize = Subtarget->isTargetDarwin() ? 4 : 2;
|
||||
MaxStoresPerMemmove = 4; // For @llvm.memmove -> sequence of stores
|
||||
MaxStoresPerMemmoveOptSize = Subtarget->isTargetDarwin() ? 4 : 2;
|
||||
|
||||
// On ARM arguments smaller than 4 bytes are extended, so all arguments
|
||||
// are at least 4 bytes aligned.
|
||||
setMinStackArgumentAlignment(4);
|
||||
|
||||
benefitFromCodePlacementOpt = true;
|
||||
BenefitFromCodePlacementOpt = true;
|
||||
|
||||
// Prefer likely predicted branches to selects on out-of-order cores.
|
||||
predictableSelectIsExpensive = Subtarget->isLikeA9();
|
||||
PredictableSelectIsExpensive = Subtarget->isLikeA9();
|
||||
|
||||
setMinFunctionAlignment(Subtarget->isThumb() ? 1 : 2);
|
||||
}
|
||||
|
@ -1052,8 +1052,8 @@ HexagonTargetLowering::HexagonTargetLowering(HexagonTargetMachine
|
||||
setPrefLoopAlignment(4);
|
||||
|
||||
// Limits for inline expansion of memcpy/memmove
|
||||
maxStoresPerMemcpy = 6;
|
||||
maxStoresPerMemmove = 6;
|
||||
MaxStoresPerMemcpy = 6;
|
||||
MaxStoresPerMemmove = 6;
|
||||
|
||||
//
|
||||
// Library calls for unsupported operations
|
||||
|
@ -520,7 +520,7 @@ MipsTargetLowering(MipsTargetMachine &TM)
|
||||
setExceptionPointerRegister(IsN64 ? Mips::A0_64 : Mips::A0);
|
||||
setExceptionSelectorRegister(IsN64 ? Mips::A1_64 : Mips::A1);
|
||||
|
||||
maxStoresPerMemcpy = 16;
|
||||
MaxStoresPerMemcpy = 16;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -75,9 +75,9 @@ NVPTXTargetLowering::NVPTXTargetLowering(NVPTXTargetMachine &TM)
|
||||
// always lower memset, memcpy, and memmove intrinsics to load/store
|
||||
// instructions, rather
|
||||
// then generating calls to memset, mempcy or memmove.
|
||||
maxStoresPerMemset = (unsigned)0xFFFFFFFF;
|
||||
maxStoresPerMemcpy = (unsigned)0xFFFFFFFF;
|
||||
maxStoresPerMemmove = (unsigned)0xFFFFFFFF;
|
||||
MaxStoresPerMemset = (unsigned)0xFFFFFFFF;
|
||||
MaxStoresPerMemcpy = (unsigned)0xFFFFFFFF;
|
||||
MaxStoresPerMemmove = (unsigned)0xFFFFFFFF;
|
||||
|
||||
setBooleanContents(ZeroOrNegativeOneBooleanContent);
|
||||
|
||||
|
@ -500,15 +500,15 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
|
||||
// friends. Gcc uses same threshold of 128 bytes (= 32 word stores).
|
||||
if (Subtarget->getDarwinDirective() == PPC::DIR_E500mc ||
|
||||
Subtarget->getDarwinDirective() == PPC::DIR_E5500) {
|
||||
maxStoresPerMemset = 32;
|
||||
maxStoresPerMemsetOptSize = 16;
|
||||
maxStoresPerMemcpy = 32;
|
||||
maxStoresPerMemcpyOptSize = 8;
|
||||
maxStoresPerMemmove = 32;
|
||||
maxStoresPerMemmoveOptSize = 8;
|
||||
MaxStoresPerMemset = 32;
|
||||
MaxStoresPerMemsetOptSize = 16;
|
||||
MaxStoresPerMemcpy = 32;
|
||||
MaxStoresPerMemcpyOptSize = 8;
|
||||
MaxStoresPerMemmove = 32;
|
||||
MaxStoresPerMemmoveOptSize = 8;
|
||||
|
||||
setPrefFunctionAlignment(4);
|
||||
benefitFromCodePlacementOpt = true;
|
||||
BenefitFromCodePlacementOpt = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1335,17 +1335,17 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
|
||||
|
||||
// On Darwin, -Os means optimize for size without hurting performance,
|
||||
// do not reduce the limit.
|
||||
maxStoresPerMemset = 16; // For @llvm.memset -> sequence of stores
|
||||
maxStoresPerMemsetOptSize = Subtarget->isTargetDarwin() ? 16 : 8;
|
||||
maxStoresPerMemcpy = 8; // For @llvm.memcpy -> sequence of stores
|
||||
maxStoresPerMemcpyOptSize = Subtarget->isTargetDarwin() ? 8 : 4;
|
||||
maxStoresPerMemmove = 8; // For @llvm.memmove -> sequence of stores
|
||||
maxStoresPerMemmoveOptSize = Subtarget->isTargetDarwin() ? 8 : 4;
|
||||
MaxStoresPerMemset = 16; // For @llvm.memset -> sequence of stores
|
||||
MaxStoresPerMemsetOptSize = Subtarget->isTargetDarwin() ? 16 : 8;
|
||||
MaxStoresPerMemcpy = 8; // For @llvm.memcpy -> sequence of stores
|
||||
MaxStoresPerMemcpyOptSize = Subtarget->isTargetDarwin() ? 8 : 4;
|
||||
MaxStoresPerMemmove = 8; // For @llvm.memmove -> sequence of stores
|
||||
MaxStoresPerMemmoveOptSize = Subtarget->isTargetDarwin() ? 8 : 4;
|
||||
setPrefLoopAlignment(4); // 2^4 bytes.
|
||||
benefitFromCodePlacementOpt = true;
|
||||
BenefitFromCodePlacementOpt = true;
|
||||
|
||||
// Predictable cmov don't hurt on atom because it's in-order.
|
||||
predictableSelectIsExpensive = !Subtarget->isAtom();
|
||||
PredictableSelectIsExpensive = !Subtarget->isAtom();
|
||||
|
||||
setPrefFunctionAlignment(4); // 2^4 bytes.
|
||||
}
|
||||
|
@ -156,9 +156,9 @@ XCoreTargetLowering::XCoreTargetLowering(XCoreTargetMachine &XTM)
|
||||
// We want to custom lower some of our intrinsics.
|
||||
setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom);
|
||||
|
||||
maxStoresPerMemset = maxStoresPerMemsetOptSize = 4;
|
||||
maxStoresPerMemmove = maxStoresPerMemmoveOptSize
|
||||
= maxStoresPerMemcpy = maxStoresPerMemcpyOptSize = 2;
|
||||
MaxStoresPerMemset = MaxStoresPerMemsetOptSize = 4;
|
||||
MaxStoresPerMemmove = MaxStoresPerMemmoveOptSize
|
||||
= MaxStoresPerMemcpy = MaxStoresPerMemcpyOptSize = 2;
|
||||
|
||||
// We have target-specific dag combine patterns for the following nodes:
|
||||
setTargetDAGCombine(ISD::STORE);
|
||||
|
Loading…
Reference in New Issue
Block a user