Ensure CopyToReg nodes are always glued to the call instruction.
[oota-llvm.git] / lib / Target / Hexagon / HexagonISelDAGToDAG.cpp
index a22555d8b64ee48cb6e317bf158ab3b198c5731e..5499134eb98b0e333669369690ff845562abffce 100644 (file)
@@ -94,7 +94,6 @@ public:
   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"
@@ -313,13 +312,9 @@ SDNode *HexagonDAGToDAGISel::SelectBaseOffsetLoad(LoadSDNode *LD, DebugLoc dl) {
         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;
@@ -691,13 +686,9 @@ SDNode *HexagonDAGToDAGISel::SelectBaseOffsetStore(StoreSDNode *ST,
           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;
@@ -1516,13 +1507,3 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode,
   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);
-
-}