mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-20 18:48:13 +00:00
Const-qualify getPreIndexedAddressParts and friends.
llvm-svn: 62259
This commit is contained in:
parent
ce265d8cf9
commit
ab89b888e8
@ -676,7 +676,7 @@ public:
|
|||||||
virtual bool getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
virtual bool getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
||||||
SDValue &Offset,
|
SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ public:
|
|||||||
virtual bool getPostIndexedAddressParts(SDNode *N, SDNode *Op,
|
virtual bool getPostIndexedAddressParts(SDNode *N, SDNode *Op,
|
||||||
SDValue &Base, SDValue &Offset,
|
SDValue &Base, SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1726,7 +1726,7 @@ bool
|
|||||||
ARMTargetLowering::getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
ARMTargetLowering::getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
||||||
SDValue &Offset,
|
SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
if (Subtarget->isThumb())
|
if (Subtarget->isThumb())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -1760,7 +1760,7 @@ bool ARMTargetLowering::getPostIndexedAddressParts(SDNode *N, SDNode *Op,
|
|||||||
SDValue &Base,
|
SDValue &Base,
|
||||||
SDValue &Offset,
|
SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
if (Subtarget->isThumb())
|
if (Subtarget->isThumb())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ namespace llvm {
|
|||||||
virtual bool getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
virtual bool getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
||||||
SDValue &Offset,
|
SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG);
|
SelectionDAG &DAG) const;
|
||||||
|
|
||||||
/// getPostIndexedAddressParts - returns true by value, base pointer and
|
/// getPostIndexedAddressParts - returns true by value, base pointer and
|
||||||
/// offset pointer and addressing mode by reference if this node can be
|
/// offset pointer and addressing mode by reference if this node can be
|
||||||
@ -108,7 +108,7 @@ namespace llvm {
|
|||||||
virtual bool getPostIndexedAddressParts(SDNode *N, SDNode *Op,
|
virtual bool getPostIndexedAddressParts(SDNode *N, SDNode *Op,
|
||||||
SDValue &Base, SDValue &Offset,
|
SDValue &Base, SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG);
|
SelectionDAG &DAG) const;
|
||||||
|
|
||||||
virtual void computeMaskedBitsForTargetNode(const SDValue Op,
|
virtual void computeMaskedBitsForTargetNode(const SDValue Op,
|
||||||
const APInt &Mask,
|
const APInt &Mask,
|
||||||
|
@ -766,7 +766,7 @@ static bool isIntS16Immediate(SDValue Op, short &Imm) {
|
|||||||
/// can be more efficiently represented with [r+imm].
|
/// can be more efficiently represented with [r+imm].
|
||||||
bool PPCTargetLowering::SelectAddressRegReg(SDValue N, SDValue &Base,
|
bool PPCTargetLowering::SelectAddressRegReg(SDValue N, SDValue &Base,
|
||||||
SDValue &Index,
|
SDValue &Index,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
short imm = 0;
|
short imm = 0;
|
||||||
if (N.getOpcode() == ISD::ADD) {
|
if (N.getOpcode() == ISD::ADD) {
|
||||||
if (isIntS16Immediate(N.getOperand(1), imm))
|
if (isIntS16Immediate(N.getOperand(1), imm))
|
||||||
@ -813,7 +813,8 @@ bool PPCTargetLowering::SelectAddressRegReg(SDValue N, SDValue &Base,
|
|||||||
/// a signed 16-bit displacement [r+imm], and if it is not better
|
/// a signed 16-bit displacement [r+imm], and if it is not better
|
||||||
/// represented as reg+reg.
|
/// represented as reg+reg.
|
||||||
bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
|
bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
|
||||||
SDValue &Base, SelectionDAG &DAG){
|
SDValue &Base,
|
||||||
|
SelectionDAG &DAG) const {
|
||||||
// If this can be more profitably realized as r+r, fail.
|
// If this can be more profitably realized as r+r, fail.
|
||||||
if (SelectAddressRegReg(N, Disp, Base, DAG))
|
if (SelectAddressRegReg(N, Disp, Base, DAG))
|
||||||
return false;
|
return false;
|
||||||
@ -898,7 +899,7 @@ bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
|
|||||||
/// represented as an indexed [r+r] operation.
|
/// represented as an indexed [r+r] operation.
|
||||||
bool PPCTargetLowering::SelectAddressRegRegOnly(SDValue N, SDValue &Base,
|
bool PPCTargetLowering::SelectAddressRegRegOnly(SDValue N, SDValue &Base,
|
||||||
SDValue &Index,
|
SDValue &Index,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
// Check to see if we can easily represent this as an [r+r] address. This
|
// Check to see if we can easily represent this as an [r+r] address. This
|
||||||
// will fail if it thinks that the address is more profitably represented as
|
// will fail if it thinks that the address is more profitably represented as
|
||||||
// reg+imm, e.g. where imm = 0.
|
// reg+imm, e.g. where imm = 0.
|
||||||
@ -925,7 +926,7 @@ bool PPCTargetLowering::SelectAddressRegRegOnly(SDValue N, SDValue &Base,
|
|||||||
/// [r+imm*4]. Suitable for use by STD and friends.
|
/// [r+imm*4]. Suitable for use by STD and friends.
|
||||||
bool PPCTargetLowering::SelectAddressRegImmShift(SDValue N, SDValue &Disp,
|
bool PPCTargetLowering::SelectAddressRegImmShift(SDValue N, SDValue &Disp,
|
||||||
SDValue &Base,
|
SDValue &Base,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
// If this can be more profitably realized as r+r, fail.
|
// If this can be more profitably realized as r+r, fail.
|
||||||
if (SelectAddressRegReg(N, Disp, Base, DAG))
|
if (SelectAddressRegReg(N, Disp, Base, DAG))
|
||||||
return false;
|
return false;
|
||||||
@ -1013,7 +1014,7 @@ bool PPCTargetLowering::SelectAddressRegImmShift(SDValue N, SDValue &Disp,
|
|||||||
bool PPCTargetLowering::getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
bool PPCTargetLowering::getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
||||||
SDValue &Offset,
|
SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) const {
|
||||||
// Disabled by default for now.
|
// Disabled by default for now.
|
||||||
if (!EnablePPCPreinc) return false;
|
if (!EnablePPCPreinc) return false;
|
||||||
|
|
||||||
|
@ -239,30 +239,30 @@ namespace llvm {
|
|||||||
virtual bool getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
virtual bool getPreIndexedAddressParts(SDNode *N, SDValue &Base,
|
||||||
SDValue &Offset,
|
SDValue &Offset,
|
||||||
ISD::MemIndexedMode &AM,
|
ISD::MemIndexedMode &AM,
|
||||||
SelectionDAG &DAG);
|
SelectionDAG &DAG) const;
|
||||||
|
|
||||||
/// SelectAddressRegReg - Given the specified addressed, check to see if it
|
/// SelectAddressRegReg - Given the specified addressed, check to see if it
|
||||||
/// can be represented as an indexed [r+r] operation. Returns false if it
|
/// can be represented as an indexed [r+r] operation. Returns false if it
|
||||||
/// can be more efficiently represented with [r+imm].
|
/// can be more efficiently represented with [r+imm].
|
||||||
bool SelectAddressRegReg(SDValue N, SDValue &Base, SDValue &Index,
|
bool SelectAddressRegReg(SDValue N, SDValue &Base, SDValue &Index,
|
||||||
SelectionDAG &DAG);
|
SelectionDAG &DAG) const;
|
||||||
|
|
||||||
/// SelectAddressRegImm - Returns true if the address N can be represented
|
/// SelectAddressRegImm - Returns true if the address N can be represented
|
||||||
/// by a base register plus a signed 16-bit displacement [r+imm], and if it
|
/// by a base register plus a signed 16-bit displacement [r+imm], and if it
|
||||||
/// is not better represented as reg+reg.
|
/// is not better represented as reg+reg.
|
||||||
bool SelectAddressRegImm(SDValue N, SDValue &Disp, SDValue &Base,
|
bool SelectAddressRegImm(SDValue N, SDValue &Disp, SDValue &Base,
|
||||||
SelectionDAG &DAG);
|
SelectionDAG &DAG) const;
|
||||||
|
|
||||||
/// SelectAddressRegRegOnly - Given the specified addressed, force it to be
|
/// SelectAddressRegRegOnly - Given the specified addressed, force it to be
|
||||||
/// represented as an indexed [r+r] operation.
|
/// represented as an indexed [r+r] operation.
|
||||||
bool SelectAddressRegRegOnly(SDValue N, SDValue &Base, SDValue &Index,
|
bool SelectAddressRegRegOnly(SDValue N, SDValue &Base, SDValue &Index,
|
||||||
SelectionDAG &DAG);
|
SelectionDAG &DAG) const;
|
||||||
|
|
||||||
/// SelectAddressRegImmShift - Returns true if the address N can be
|
/// SelectAddressRegImmShift - Returns true if the address N can be
|
||||||
/// represented by a base register plus a signed 14-bit displacement
|
/// represented by a base register plus a signed 14-bit displacement
|
||||||
/// [r+imm*4]. Suitable for use by STD and friends.
|
/// [r+imm*4]. Suitable for use by STD and friends.
|
||||||
bool SelectAddressRegImmShift(SDValue N, SDValue &Disp, SDValue &Base,
|
bool SelectAddressRegImmShift(SDValue N, SDValue &Disp, SDValue &Base,
|
||||||
SelectionDAG &DAG);
|
SelectionDAG &DAG) const;
|
||||||
|
|
||||||
|
|
||||||
/// LowerOperation - Provide custom lowering hooks for some operations.
|
/// LowerOperation - Provide custom lowering hooks for some operations.
|
||||||
|
Loading…
Reference in New Issue
Block a user