mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Use Other as a sentinel instead of iAny.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
81d6d52592
commit
acee647b13
@ -664,12 +664,12 @@ public:
|
|||||||
|
|
||||||
/// getOptimalMemOpType - Returns the target specific optimal type for load
|
/// getOptimalMemOpType - Returns the target specific optimal type for load
|
||||||
/// and store operations as a result of memset, memcpy, and memmove lowering.
|
/// and store operations as a result of memset, memcpy, and memmove lowering.
|
||||||
/// It returns EVT::iAny if SelectionDAG should be responsible for
|
/// It returns EVT::Other if SelectionDAG should be responsible for
|
||||||
/// determining it.
|
/// determining it.
|
||||||
virtual EVT getOptimalMemOpType(uint64_t Size, unsigned Align,
|
virtual EVT getOptimalMemOpType(uint64_t Size, unsigned Align,
|
||||||
bool isSrcConst, bool isSrcStr,
|
bool isSrcConst, bool isSrcStr,
|
||||||
SelectionDAG &DAG) const {
|
SelectionDAG &DAG) const {
|
||||||
return MVT::iAny;
|
return MVT::Other;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// usesUnderscoreSetJmp - Determine if we should use _setjmp or setjmp
|
/// usesUnderscoreSetJmp - Determine if we should use _setjmp or setjmp
|
||||||
|
@ -3208,7 +3208,7 @@ bool MeetsMaxMemopRequirement(std::vector<EVT> &MemOps,
|
|||||||
bool isSrcConst = isa<ConstantSDNode>(Src);
|
bool isSrcConst = isa<ConstantSDNode>(Src);
|
||||||
EVT VT = TLI.getOptimalMemOpType(Size, Align, isSrcConst, isSrcStr, DAG);
|
EVT VT = TLI.getOptimalMemOpType(Size, Align, isSrcConst, isSrcStr, DAG);
|
||||||
bool AllowUnalign = TLI.allowsUnalignedMemoryAccesses(VT);
|
bool AllowUnalign = TLI.allowsUnalignedMemoryAccesses(VT);
|
||||||
if (VT != MVT::iAny) {
|
if (VT != MVT::Other) {
|
||||||
const Type *Ty = VT.getTypeForEVT(*DAG.getContext());
|
const Type *Ty = VT.getTypeForEVT(*DAG.getContext());
|
||||||
unsigned NewAlign = (unsigned) TLI.getTargetData()->getABITypeAlignment(Ty);
|
unsigned NewAlign = (unsigned) TLI.getTargetData()->getABITypeAlignment(Ty);
|
||||||
// If source is a string constant, this will require an unaligned load.
|
// If source is a string constant, this will require an unaligned load.
|
||||||
@ -3216,14 +3216,14 @@ bool MeetsMaxMemopRequirement(std::vector<EVT> &MemOps,
|
|||||||
if (Dst.getOpcode() != ISD::FrameIndex) {
|
if (Dst.getOpcode() != ISD::FrameIndex) {
|
||||||
// Can't change destination alignment. It requires a unaligned store.
|
// Can't change destination alignment. It requires a unaligned store.
|
||||||
if (AllowUnalign)
|
if (AllowUnalign)
|
||||||
VT = MVT::iAny;
|
VT = MVT::Other;
|
||||||
} else {
|
} else {
|
||||||
int FI = cast<FrameIndexSDNode>(Dst)->getIndex();
|
int FI = cast<FrameIndexSDNode>(Dst)->getIndex();
|
||||||
MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo();
|
MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo();
|
||||||
if (MFI->isFixedObjectIndex(FI)) {
|
if (MFI->isFixedObjectIndex(FI)) {
|
||||||
// Can't change destination alignment. It requires a unaligned store.
|
// Can't change destination alignment. It requires a unaligned store.
|
||||||
if (AllowUnalign)
|
if (AllowUnalign)
|
||||||
VT = MVT::iAny;
|
VT = MVT::Other;
|
||||||
} else {
|
} else {
|
||||||
// Give the stack frame object a larger alignment if needed.
|
// Give the stack frame object a larger alignment if needed.
|
||||||
if (MFI->getObjectAlignment(FI) < NewAlign)
|
if (MFI->getObjectAlignment(FI) < NewAlign)
|
||||||
@ -3234,7 +3234,7 @@ bool MeetsMaxMemopRequirement(std::vector<EVT> &MemOps,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VT == MVT::iAny) {
|
if (VT == MVT::Other) {
|
||||||
if (TLI.allowsUnalignedMemoryAccesses(MVT::i64)) {
|
if (TLI.allowsUnalignedMemoryAccesses(MVT::i64)) {
|
||||||
VT = MVT::i64;
|
VT = MVT::i64;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user