[llvm] r300369 - [RDF] No longer ignore implicit defs or uses on any instructions

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 14:19:18 PDT 2017


Author: kparzysz
Date: Fri Apr 14 16:19:17 2017
New Revision: 300369

URL: http://llvm.org/viewvc/llvm-project?rev=300369&view=rev
Log:
[RDF] No longer ignore implicit defs or uses on any instructions

This used to be a Hexagon-specific treatment, but is no longer needed
since it's switched to subregister liveness tracking.

Modified:
    llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp

Modified: llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp?rev=300369&r1=300368&r2=300369&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp Fri Apr 14 16:19:17 2017
@@ -1289,20 +1289,7 @@ void DataFlowGraph::buildStmt(NodeAddr<B
     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<B
     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<B
     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;




More information about the llvm-commits mailing list