forked from OSchip/llvm-project
Eliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.
llvm-svn: 101531
This commit is contained in:
parent
9dbe61456a
commit
148c69a3f6
|
@ -632,12 +632,12 @@ public:
|
||||||
/// 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.
|
||||||
/// It returns EVT::Other if SelectionDAG should be responsible for
|
/// It returns EVT::Other if the type should be determined using generic
|
||||||
/// determining the type.
|
/// 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 MemcpyStrSrc,
|
bool NonScalarIntSafe, bool MemcpyStrSrc,
|
||||||
SelectionDAG &DAG) const {
|
MachineFunction &MF) const {
|
||||||
return MVT::Other;
|
return MVT::Other;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5549,13 +5549,13 @@ PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
|
||||||
/// 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.
|
||||||
/// It returns EVT::Other if SelectionDAG should be responsible for
|
/// It returns EVT::Other if the type should be determined using generic
|
||||||
/// determining the type.
|
/// 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 NonScalarIntSafe,
|
||||||
bool MemcpyStrSrc,
|
bool MemcpyStrSrc,
|
||||||
SelectionDAG &DAG) const {
|
MachineFunction &MF) const {
|
||||||
if (this->PPCSubTarget.isPPC64()) {
|
if (this->PPCSubTarget.isPPC64()) {
|
||||||
return MVT::i64;
|
return MVT::i64;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -357,12 +357,12 @@ namespace llvm {
|
||||||
/// 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.
|
||||||
/// It returns EVT::Other if SelectionDAG should be responsible for
|
/// It returns EVT::Other if the type should be determined using generic
|
||||||
/// determining the type.
|
/// 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 NonScalarIntSafe, bool MemcpyStrSrc,
|
||||||
SelectionDAG &DAG) const;
|
MachineFunction &MF) const;
|
||||||
|
|
||||||
/// getFunctionAlignment - Return the Log2 alignment of this function.
|
/// getFunctionAlignment - Return the Log2 alignment of this function.
|
||||||
virtual unsigned getFunctionAlignment(const Function *F) const;
|
virtual unsigned getFunctionAlignment(const Function *F) const;
|
||||||
|
|
|
@ -1079,18 +1079,18 @@ unsigned X86TargetLowering::getByValTypeAlignment(const Type *Ty) const {
|
||||||
/// 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.
|
||||||
/// It returns EVT::Other if SelectionDAG should be responsible for
|
/// It returns EVT::Other if the type should be determined using generic
|
||||||
/// determining the type.
|
/// target-independent logic.
|
||||||
EVT
|
EVT
|
||||||
X86TargetLowering::getOptimalMemOpType(uint64_t Size,
|
X86TargetLowering::getOptimalMemOpType(uint64_t Size,
|
||||||
unsigned DstAlign, unsigned SrcAlign,
|
unsigned DstAlign, unsigned SrcAlign,
|
||||||
bool NonScalarIntSafe,
|
bool NonScalarIntSafe,
|
||||||
bool MemcpyStrSrc,
|
bool MemcpyStrSrc,
|
||||||
SelectionDAG &DAG) 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 = DAG.getMachineFunction().getFunction();
|
const Function *F = MF.getFunction();
|
||||||
if (NonScalarIntSafe &&
|
if (NonScalarIntSafe &&
|
||||||
!F->hasFnAttr(Attribute::NoImplicitFloat)) {
|
!F->hasFnAttr(Attribute::NoImplicitFloat)) {
|
||||||
if (Size >= 16 &&
|
if (Size >= 16 &&
|
||||||
|
|
|
@ -426,12 +426,12 @@ namespace llvm {
|
||||||
/// 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.
|
||||||
/// It returns EVT::Other if SelectionDAG should be responsible for
|
/// It returns EVT::Other if the type should be determined using generic
|
||||||
/// determining the type.
|
/// 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 NonScalarIntSafe, bool MemcpyStrSrc,
|
||||||
SelectionDAG &DAG) const;
|
MachineFunction &MF) const;
|
||||||
|
|
||||||
/// allowsUnalignedMemoryAccesses - Returns true if the target allows
|
/// allowsUnalignedMemoryAccesses - Returns true if the target allows
|
||||||
/// unaligned memory accesses. of the specified type.
|
/// unaligned memory accesses. of the specified type.
|
||||||
|
|
Loading…
Reference in New Issue