mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[Alignment][NFC] Use Align::None instead of 1
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: sdardis, nemanjai, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67704 llvm-svn: 372230
This commit is contained in:
parent
1eedca3f36
commit
4055f4094f
@ -636,7 +636,7 @@ public:
|
|||||||
|
|
||||||
/// Return the alignment for the specified \p GV.
|
/// Return the alignment for the specified \p GV.
|
||||||
static llvm::Align getGVAlignment(const GlobalValue *GV, const DataLayout &DL,
|
static llvm::Align getGVAlignment(const GlobalValue *GV, const DataLayout &DL,
|
||||||
llvm::Align InAlign = llvm::Align(1));
|
llvm::Align InAlign = llvm::Align::None());
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Private state for PrintSpecial()
|
/// Private state for PrintSpecial()
|
||||||
|
@ -838,7 +838,7 @@ public:
|
|||||||
int offset = 0; // offset off of ptrVal
|
int offset = 0; // offset off of ptrVal
|
||||||
unsigned size = 0; // the size of the memory location
|
unsigned size = 0; // the size of the memory location
|
||||||
// (taken from memVT if zero)
|
// (taken from memVT if zero)
|
||||||
MaybeAlign align = Align(1); // alignment
|
MaybeAlign align = Align::None(); // alignment
|
||||||
|
|
||||||
MachineMemOperand::Flags flags = MachineMemOperand::MONone;
|
MachineMemOperand::Flags flags = MachineMemOperand::MONone;
|
||||||
IntrinsicInfo() = default;
|
IntrinsicInfo() = default;
|
||||||
|
@ -2904,7 +2904,7 @@ void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock &MBB) {
|
|||||||
|
|
||||||
// Emit an alignment directive for this block, if needed.
|
// Emit an alignment directive for this block, if needed.
|
||||||
const llvm::Align Align = MBB.getAlignment();
|
const llvm::Align Align = MBB.getAlignment();
|
||||||
if (Align > 1)
|
if (Align != llvm::Align::None())
|
||||||
EmitAlignment(Align);
|
EmitAlignment(Align);
|
||||||
MCCodePaddingContext Context;
|
MCCodePaddingContext Context;
|
||||||
setupCodePaddingContext(MBB, Context);
|
setupCodePaddingContext(MBB, Context);
|
||||||
|
@ -89,8 +89,8 @@ int MachineFrameInfo::CreateFixedObject(uint64_t Size, int64_t SPOffset,
|
|||||||
// object is 16-byte aligned. Note that unlike the non-fixed case, if the
|
// object is 16-byte aligned. Note that unlike the non-fixed case, if the
|
||||||
// stack needs realignment, we can't assume that the stack will in fact be
|
// stack needs realignment, we can't assume that the stack will in fact be
|
||||||
// aligned.
|
// aligned.
|
||||||
llvm::Align Alignment =
|
llvm::Align Alignment = commonAlignment(
|
||||||
commonAlignment(ForcedRealign ? llvm::Align() : StackAlignment, SPOffset);
|
ForcedRealign ? llvm::Align::None() : StackAlignment, SPOffset);
|
||||||
Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment);
|
Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment);
|
||||||
Objects.insert(Objects.begin(),
|
Objects.insert(Objects.begin(),
|
||||||
StackObject(Size, Alignment, SPOffset, IsImmutable,
|
StackObject(Size, Alignment, SPOffset, IsImmutable,
|
||||||
@ -102,8 +102,8 @@ int MachineFrameInfo::CreateFixedObject(uint64_t Size, int64_t SPOffset,
|
|||||||
int MachineFrameInfo::CreateFixedSpillStackObject(uint64_t Size,
|
int MachineFrameInfo::CreateFixedSpillStackObject(uint64_t Size,
|
||||||
int64_t SPOffset,
|
int64_t SPOffset,
|
||||||
bool IsImmutable) {
|
bool IsImmutable) {
|
||||||
llvm::Align Alignment =
|
llvm::Align Alignment = commonAlignment(
|
||||||
commonAlignment(ForcedRealign ? llvm::Align() : StackAlignment, SPOffset);
|
ForcedRealign ? llvm::Align::None() : StackAlignment, SPOffset);
|
||||||
Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment);
|
Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment);
|
||||||
Objects.insert(Objects.begin(),
|
Objects.insert(Objects.begin(),
|
||||||
StackObject(Size, Alignment, SPOffset, IsImmutable,
|
StackObject(Size, Alignment, SPOffset, IsImmutable,
|
||||||
|
@ -948,7 +948,7 @@ bool MipsConstantIslands::isWaterInRange(unsigned UserOffset,
|
|||||||
MachineFunction::const_iterator NextBlock = ++Water->getIterator();
|
MachineFunction::const_iterator NextBlock = ++Water->getIterator();
|
||||||
if (NextBlock == MF->end()) {
|
if (NextBlock == MF->end()) {
|
||||||
NextBlockOffset = BBInfo[Water->getNumber()].postOffset();
|
NextBlockOffset = BBInfo[Water->getNumber()].postOffset();
|
||||||
NextBlockAlignment = llvm::Align();
|
NextBlockAlignment = llvm::Align::None();
|
||||||
} else {
|
} else {
|
||||||
NextBlockOffset = BBInfo[NextBlock->getNumber()].Offset;
|
NextBlockOffset = BBInfo[NextBlock->getNumber()].Offset;
|
||||||
NextBlockAlignment = NextBlock->getAlignment();
|
NextBlockAlignment = NextBlock->getAlignment();
|
||||||
|
@ -14627,7 +14627,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||||||
Info.ptrVal = I.getArgOperand(0);
|
Info.ptrVal = I.getArgOperand(0);
|
||||||
Info.offset = -VT.getStoreSize()+1;
|
Info.offset = -VT.getStoreSize()+1;
|
||||||
Info.size = 2*VT.getStoreSize()-1;
|
Info.size = 2*VT.getStoreSize()-1;
|
||||||
Info.align = Align(1);
|
Info.align = Align::None();
|
||||||
Info.flags = MachineMemOperand::MOLoad;
|
Info.flags = MachineMemOperand::MOLoad;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -14661,7 +14661,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||||||
Info.ptrVal = I.getArgOperand(0);
|
Info.ptrVal = I.getArgOperand(0);
|
||||||
Info.offset = 0;
|
Info.offset = 0;
|
||||||
Info.size = VT.getStoreSize();
|
Info.size = VT.getStoreSize();
|
||||||
Info.align = Align(1);
|
Info.align = Align::None();
|
||||||
Info.flags = MachineMemOperand::MOLoad;
|
Info.flags = MachineMemOperand::MOLoad;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -14713,7 +14713,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||||||
Info.ptrVal = I.getArgOperand(1);
|
Info.ptrVal = I.getArgOperand(1);
|
||||||
Info.offset = -VT.getStoreSize()+1;
|
Info.offset = -VT.getStoreSize()+1;
|
||||||
Info.size = 2*VT.getStoreSize()-1;
|
Info.size = 2*VT.getStoreSize()-1;
|
||||||
Info.align = Align(1);
|
Info.align = Align::None();
|
||||||
Info.flags = MachineMemOperand::MOStore;
|
Info.flags = MachineMemOperand::MOStore;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -14746,7 +14746,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||||||
Info.ptrVal = I.getArgOperand(1);
|
Info.ptrVal = I.getArgOperand(1);
|
||||||
Info.offset = 0;
|
Info.offset = 0;
|
||||||
Info.size = VT.getStoreSize();
|
Info.size = VT.getStoreSize();
|
||||||
Info.align = Align(1);
|
Info.align = Align::None();
|
||||||
Info.flags = MachineMemOperand::MOStore;
|
Info.flags = MachineMemOperand::MOStore;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -4862,7 +4862,7 @@ bool X86TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||||||
ScalarVT = MVT::i32;
|
ScalarVT = MVT::i32;
|
||||||
|
|
||||||
Info.memVT = MVT::getVectorVT(ScalarVT, VT.getVectorNumElements());
|
Info.memVT = MVT::getVectorVT(ScalarVT, VT.getVectorNumElements());
|
||||||
Info.align = Align(1);
|
Info.align = Align::None();
|
||||||
Info.flags |= MachineMemOperand::MOStore;
|
Info.flags |= MachineMemOperand::MOStore;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4875,7 +4875,7 @@ bool X86TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||||||
unsigned NumElts = std::min(DataVT.getVectorNumElements(),
|
unsigned NumElts = std::min(DataVT.getVectorNumElements(),
|
||||||
IndexVT.getVectorNumElements());
|
IndexVT.getVectorNumElements());
|
||||||
Info.memVT = MVT::getVectorVT(DataVT.getVectorElementType(), NumElts);
|
Info.memVT = MVT::getVectorVT(DataVT.getVectorElementType(), NumElts);
|
||||||
Info.align = Align(1);
|
Info.align = Align::None();
|
||||||
Info.flags |= MachineMemOperand::MOLoad;
|
Info.flags |= MachineMemOperand::MOLoad;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4887,7 +4887,7 @@ bool X86TargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
|
|||||||
unsigned NumElts = std::min(DataVT.getVectorNumElements(),
|
unsigned NumElts = std::min(DataVT.getVectorNumElements(),
|
||||||
IndexVT.getVectorNumElements());
|
IndexVT.getVectorNumElements());
|
||||||
Info.memVT = MVT::getVectorVT(DataVT.getVectorElementType(), NumElts);
|
Info.memVT = MVT::getVectorVT(DataVT.getVectorElementType(), NumElts);
|
||||||
Info.align = Align(1);
|
Info.align = Align::None();
|
||||||
Info.flags |= MachineMemOperand::MOStore;
|
Info.flags |= MachineMemOperand::MOStore;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user