OSDN Git Service

[RDF] No longer ignore implicit defs or uses on any instructions
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 14 Apr 2017 21:19:17 +0000 (21:19 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 14 Apr 2017 21:19:17 +0000 (21:19 +0000)
This used to be a Hexagon-specific treatment, but is no longer needed
since it's switched to subregister liveness tracking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300369 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/RDFGraph.cpp

index 8d70e35..7a2895a 100644 (file)
@@ -1289,20 +1289,7 @@ void DataFlowGraph::buildStmt(NodeAddr<BlockNode*> BA, MachineInstr &In) {
     return true;
   };
 
-  // Collect a set of registers that this instruction implicitly uses
-  // or defines. Implicit operands from an instruction will be ignored
-  // unless they are listed here.
-  RegisterSet ImpUses, ImpDefs;
-  if (const uint16_t *ImpD = In.getDesc().getImplicitDefs())
-    while (uint16_t R = *ImpD++)
-      ImpDefs.insert(RegisterRef(R));
-  if (const uint16_t *ImpU = In.getDesc().getImplicitUses())
-    while (uint16_t R = *ImpU++)
-      ImpUses.insert(RegisterRef(R));
-
   bool IsCall = isCall(In);
-  bool NeedsImplicit = IsCall || In.isInlineAsm() || In.isReturn();
-  bool IsPredicated = TII.isPredicated(In);
   unsigned NumOps = In.getNumOperands();
 
   // Avoid duplicate implicit defs. This will not detect cases of implicit
@@ -1364,8 +1351,6 @@ void DataFlowGraph::buildStmt(NodeAddr<BlockNode*> BA, MachineInstr &In) {
     if (!R || !TargetRegisterInfo::isPhysicalRegister(R) || DoneDefs.test(R))
       continue;
     RegisterRef RR = makeRegRef(Op);
-    if (!NeedsImplicit && !ImpDefs.count(RR))
-      continue;
     uint16_t Flags = NodeAttrs::None;
     if (TOI.isPreserving(In, OpN)) {
       Flags |= NodeAttrs::Preserving;
@@ -1394,14 +1379,6 @@ void DataFlowGraph::buildStmt(NodeAddr<BlockNode*> BA, MachineInstr &In) {
     unsigned R = Op.getReg();
     if (!R || !TargetRegisterInfo::isPhysicalRegister(R))
       continue;
-    RegisterRef RR = makeRegRef(Op);
-    // Add implicit uses on return and call instructions, and on predicated
-    // instructions regardless of whether or not they appear in the instruction
-    // descriptor's list.
-    bool Implicit = Op.isImplicit();
-    bool TakeImplicit = NeedsImplicit || IsPredicated;
-    if (Implicit && !TakeImplicit && !ImpUses.count(RR))
-      continue;
     uint16_t Flags = NodeAttrs::None;
     if (Op.isUndef())
       Flags |= NodeAttrs::Undef;