SDNode *SelectConstant(SDNode *N);
SDNode *SelectConstantFP(SDNode *N);
SDNode *SelectAdd(SDNode *N);
- bool isConstExtProfitable(SDNode *N) const;
// Include the pieces autogenerated from the target description.
#include "HexagonGenDAGISel.inc"
cast<GlobalAddressSDNode>(Base)->getGlobal();
SDValue TargAddr =
CurDAG->getTargetGlobalAddress(GV, dl, PointerTy, 0);
- SDNode* NewBase;
- if (Subtarget.hasV4TOps())
- NewBase = CurDAG->getMachineNode(Hexagon::TFRI_V4,
- dl, PointerTy, TargAddr);
- else
- NewBase = CurDAG->getMachineNode(Hexagon::CONST32_set,
- dl, PointerTy, TargAddr);
+ SDNode* NewBase = CurDAG->getMachineNode(Hexagon::CONST32_set,
+ dl, PointerTy,
+ TargAddr);
// Figure out base + offset opcode
if (LoadedVT == MVT::i64) Opcode = Hexagon::LDrid_indexed;
else if (LoadedVT == MVT::i32) Opcode = Hexagon::LDriw_indexed;
cast<GlobalAddressSDNode>(Base)->getGlobal();
SDValue TargAddr =
CurDAG->getTargetGlobalAddress(GV, dl, PointerTy, 0);
- SDNode* NewBase;
- if (Subtarget.hasV4TOps())
- NewBase = CurDAG->getMachineNode(Hexagon::TFRI_V4,
- dl, PointerTy, TargAddr);
- else
- NewBase = CurDAG->getMachineNode(Hexagon::CONST32_set,
- dl, PointerTy, TargAddr);
+ SDNode* NewBase = CurDAG->getMachineNode(Hexagon::CONST32_set,
+ dl, PointerTy,
+ TargAddr);
// Figure out base + offset opcode
if (StoredVT == MVT::i64) Opcode = Hexagon::STrid_indexed;
OutOps.push_back(Op1);
return false;
}
-
-bool HexagonDAGToDAGISel::isConstExtProfitable(SDNode *N) const {
- unsigned UseCount = 0;
- for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) {
- UseCount++;
- }
-
- return (UseCount <= 1);
-
-}