mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Rename NonScalarIntSafe to something more appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ff2664f2f
commit
15701f8969
@ -646,7 +646,7 @@ public:
|
||||
/// alignment can satisfy any constraint. Similarly if SrcAlign is zero it
|
||||
/// means there isn't a need to check it against alignment requirement,
|
||||
/// probably because the source does not need to be loaded. If
|
||||
/// 'NonScalarIntSafe' is true, that means it's safe to return a
|
||||
/// 'IsZeroVal' is true, that means it's safe to return a
|
||||
/// non-scalar-integer type, e.g. empty string source, constant, or loaded
|
||||
/// from memory. 'MemcpyStrSrc' indicates whether the memcpy source is
|
||||
/// constant so it does not need to be loaded.
|
||||
@ -654,7 +654,7 @@ public:
|
||||
/// target-independent logic.
|
||||
virtual EVT getOptimalMemOpType(uint64_t /*Size*/,
|
||||
unsigned /*DstAlign*/, unsigned /*SrcAlign*/,
|
||||
bool /*NonScalarIntSafe*/,
|
||||
bool /*IsZeroVal*/,
|
||||
bool /*MemcpyStrSrc*/,
|
||||
MachineFunction &/*MF*/) const {
|
||||
return MVT::Other;
|
||||
|
@ -3345,7 +3345,7 @@ static bool isMemSrcFromString(SDValue Src, std::string &Str) {
|
||||
static bool FindOptimalMemOpLowering(std::vector<EVT> &MemOps,
|
||||
unsigned Limit, uint64_t Size,
|
||||
unsigned DstAlign, unsigned SrcAlign,
|
||||
bool NonScalarIntSafe,
|
||||
bool IsZeroVal,
|
||||
bool MemcpyStrSrc,
|
||||
SelectionDAG &DAG,
|
||||
const TargetLowering &TLI) {
|
||||
@ -3359,7 +3359,7 @@ static bool FindOptimalMemOpLowering(std::vector<EVT> &MemOps,
|
||||
// 'MemcpyStrSrc' indicates whether the memcpy source is constant so it does
|
||||
// not need to be loaded.
|
||||
EVT VT = TLI.getOptimalMemOpType(Size, DstAlign, SrcAlign,
|
||||
NonScalarIntSafe, MemcpyStrSrc,
|
||||
IsZeroVal, MemcpyStrSrc,
|
||||
DAG.getMachineFunction());
|
||||
|
||||
if (VT == MVT::Other) {
|
||||
@ -3606,11 +3606,11 @@ static SDValue getMemsetStores(SelectionDAG &DAG, DebugLoc dl,
|
||||
FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(Dst);
|
||||
if (FI && !MFI->isFixedObjectIndex(FI->getIndex()))
|
||||
DstAlignCanChange = true;
|
||||
bool NonScalarIntSafe =
|
||||
bool IsZeroVal =
|
||||
isa<ConstantSDNode>(Src) && cast<ConstantSDNode>(Src)->isNullValue();
|
||||
if (!FindOptimalMemOpLowering(MemOps, TLI.getMaxStoresPerMemset(OptSize),
|
||||
Size, (DstAlignCanChange ? 0 : Align), 0,
|
||||
NonScalarIntSafe, false, DAG, TLI))
|
||||
IsZeroVal, false, DAG, TLI))
|
||||
return SDValue();
|
||||
|
||||
if (DstAlignCanChange) {
|
||||
|
@ -5774,7 +5774,7 @@ PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
|
||||
/// alignment can satisfy any constraint. Similarly if SrcAlign is zero it
|
||||
/// means there isn't a need to check it against alignment requirement,
|
||||
/// probably because the source does not need to be loaded. If
|
||||
/// 'NonScalarIntSafe' is true, that means it's safe to return a
|
||||
/// 'IsZeroVal' is true, that means it's safe to return a
|
||||
/// non-scalar-integer type, e.g. empty string source, constant, or loaded
|
||||
/// from memory. 'MemcpyStrSrc' indicates whether the memcpy source is
|
||||
/// constant so it does not need to be loaded.
|
||||
@ -5782,7 +5782,7 @@ PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
|
||||
/// target-independent logic.
|
||||
EVT PPCTargetLowering::getOptimalMemOpType(uint64_t Size,
|
||||
unsigned DstAlign, unsigned SrcAlign,
|
||||
bool NonScalarIntSafe,
|
||||
bool IsZeroVal,
|
||||
bool MemcpyStrSrc,
|
||||
MachineFunction &MF) const {
|
||||
if (this->PPCSubTarget.isPPC64()) {
|
||||
|
@ -353,7 +353,7 @@ namespace llvm {
|
||||
/// alignment can satisfy any constraint. Similarly if SrcAlign is zero it
|
||||
/// means there isn't a need to check it against alignment requirement,
|
||||
/// probably because the source does not need to be loaded. If
|
||||
/// 'NonScalarIntSafe' is true, that means it's safe to return a
|
||||
/// 'IsZeroVal' is true, that means it's safe to return a
|
||||
/// non-scalar-integer type, e.g. empty string source, constant, or loaded
|
||||
/// from memory. 'MemcpyStrSrc' indicates whether the memcpy source is
|
||||
/// constant so it does not need to be loaded.
|
||||
@ -361,7 +361,7 @@ namespace llvm {
|
||||
/// target-independent logic.
|
||||
virtual EVT
|
||||
getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign,
|
||||
bool NonScalarIntSafe, bool MemcpyStrSrc,
|
||||
bool IsZeroVal, bool MemcpyStrSrc,
|
||||
MachineFunction &MF) const;
|
||||
|
||||
private:
|
||||
|
@ -1232,7 +1232,7 @@ unsigned X86TargetLowering::getByValTypeAlignment(Type *Ty) const {
|
||||
/// alignment can satisfy any constraint. Similarly if SrcAlign is zero it
|
||||
/// means there isn't a need to check it against alignment requirement,
|
||||
/// probably because the source does not need to be loaded. If
|
||||
/// 'NonScalarIntSafe' is true, that means it's safe to return a
|
||||
/// 'IsZeroVal' is true, that means it's safe to return a
|
||||
/// non-scalar-integer type, e.g. empty string source, constant, or loaded
|
||||
/// from memory. 'MemcpyStrSrc' indicates whether the memcpy source is
|
||||
/// constant so it does not need to be loaded.
|
||||
@ -1241,14 +1241,14 @@ unsigned X86TargetLowering::getByValTypeAlignment(Type *Ty) const {
|
||||
EVT
|
||||
X86TargetLowering::getOptimalMemOpType(uint64_t Size,
|
||||
unsigned DstAlign, unsigned SrcAlign,
|
||||
bool NonScalarIntSafe,
|
||||
bool IsZeroVal,
|
||||
bool MemcpyStrSrc,
|
||||
MachineFunction &MF) const {
|
||||
// FIXME: This turns off use of xmm stores for memset/memcpy on targets like
|
||||
// linux. This is because the stack realignment code can't handle certain
|
||||
// cases like PR2962. This should be removed when PR2962 is fixed.
|
||||
const Function *F = MF.getFunction();
|
||||
if (NonScalarIntSafe &&
|
||||
if (IsZeroVal &&
|
||||
!F->hasFnAttr(Attribute::NoImplicitFloat)) {
|
||||
if (Size >= 16 &&
|
||||
(Subtarget->isUnalignedMemAccessFast() ||
|
||||
|
@ -533,7 +533,7 @@ namespace llvm {
|
||||
/// alignment can satisfy any constraint. Similarly if SrcAlign is zero it
|
||||
/// means there isn't a need to check it against alignment requirement,
|
||||
/// probably because the source does not need to be loaded. If
|
||||
/// 'NonScalarIntSafe' is true, that means it's safe to return a
|
||||
/// 'IsZeroVal' is true, that means it's safe to return a
|
||||
/// non-scalar-integer type, e.g. empty string source, constant, or loaded
|
||||
/// from memory. 'MemcpyStrSrc' indicates whether the memcpy source is
|
||||
/// constant so it does not need to be loaded.
|
||||
@ -541,7 +541,7 @@ namespace llvm {
|
||||
/// target-independent logic.
|
||||
virtual EVT
|
||||
getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign,
|
||||
bool NonScalarIntSafe, bool MemcpyStrSrc,
|
||||
bool IsZeroVal, bool MemcpyStrSrc,
|
||||
MachineFunction &MF) const;
|
||||
|
||||
/// allowsUnalignedMemoryAccesses - Returns true if the target allows
|
||||
|
Loading…
Reference in New Issue
Block a user