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