[llvm-branch-commits] [llvm-branch] r86179 - /llvm/branches/Apple/Leela/lib/CodeGen/AggressiveAntiDepBreaker.cpp

Bill Wendling isanbard at gmail.com
Thu Nov 5 13:24:00 PST 2009


Author: void
Date: Thu Nov  5 15:24:00 2009
New Revision: 86179

URL: http://llvm.org/viewvc/llvm-project?rev=86179&view=rev
Log:
$ svn merge -c 86172 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r86172 into '.':
U    lib/CodeGen/AggressiveAntiDepBreaker.cpp


Modified:
    llvm/branches/Apple/Leela/lib/CodeGen/AggressiveAntiDepBreaker.cpp

Modified: llvm/branches/Apple/Leela/lib/CodeGen/AggressiveAntiDepBreaker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/AggressiveAntiDepBreaker.cpp?rev=86179&r1=86178&r2=86179&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/AggressiveAntiDepBreaker.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/AggressiveAntiDepBreaker.cpp Thu Nov  5 15:24:00 2009
@@ -630,12 +630,6 @@
   std::multimap<unsigned, AggressiveAntiDepState::RegisterReference>& 
     RegRefs = State->GetRegRefs();
 
-  // Nothing to do if no candidates.
-  if (Candidates.empty()) {
-    DEBUG(errs() << "\n===== No anti-dependency candidates\n");
-    return 0;
-  }
-
   // The code below assumes that there is at least one instruction,
   // so just duck out immediately if the block is empty.
   if (SUnits.empty()) return 0;
@@ -655,16 +649,19 @@
 
   // ...need a map from MI to SUnit.
   std::map<MachineInstr *, SUnit *> MISUnitMap;
-
-  DEBUG(errs() << "\n===== Attempting to break " << Candidates.size() << 
-        " anti-dependencies\n");
   for (unsigned i = 0, e = SUnits.size(); i != e; ++i) {
     SUnit *SU = &SUnits[i];
     MISUnitMap.insert(std::pair<MachineInstr *, SUnit *>(SU->getInstr(), SU));
   }
 
+  // Even if there are no anti-dependencies we still need to go
+  // through the instructions to update Def, Kills, etc.
 #ifndef NDEBUG 
-  {
+  if (Candidates.empty()) {
+    DEBUG(errs() << "\n===== No anti-dependency candidates\n");
+  } else {
+    DEBUG(errs() << "\n===== Attempting to break " << Candidates.size() << 
+          " anti-dependencies\n");
     DEBUG(errs() << "Available regs:");
     for (unsigned Reg = 0; Reg < TRI->getNumRegs(); ++Reg) {
       if (!State->IsLive(Reg))





More information about the llvm-branch-commits mailing list