[llvm] r291000 - [lib/LTO] Simplify logic removing set but unused variable. NFCI.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 12:37:57 PST 2017


Author: davide
Date: Wed Jan  4 14:37:57 2017
New Revision: 291000

URL: http://llvm.org/viewvc/llvm-project?rev=291000&view=rev
Log:
[lib/LTO] Simplify logic removing set but unused variable. NFCI.

Reported by David Binderman and ack'ed by Teresa on IRC.
PR: 31527

Modified:
    llvm/trunk/lib/LTO/LTO.cpp

Modified: llvm/trunk/lib/LTO/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTO.cpp?rev=291000&r1=290999&r2=291000&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTO.cpp (original)
+++ llvm/trunk/lib/LTO/LTO.cpp Wed Jan  4 14:37:57 2017
@@ -891,23 +891,17 @@ Error LTO::runThinLTO(AddStreamFn AddStr
       ThinLTO.Backend(Conf, ThinLTO.CombinedIndex, ModuleToDefinedGVSummaries,
                       AddStream, Cache);
 
-  // Partition numbers for ThinLTO jobs start at 1 (see comments for
-  // GlobalResolution in LTO.h). Task numbers, however, start at
-  // ParallelCodeGenParallelismLevel if an LTO module is present, as tasks 0
-  // through ParallelCodeGenParallelismLevel-1 are reserved for parallel code
-  // generation partitions.
+  // Task numbers start at ParallelCodeGenParallelismLevel if an LTO
+  // module is present, as tasks 0 through ParallelCodeGenParallelismLevel-1
+  // are reserved for parallel code generation partitions.
   unsigned Task =
       HasRegularLTO ? RegularLTO.ParallelCodeGenParallelismLevel : 0;
-  unsigned Partition = 1;
-
   for (auto &Mod : ThinLTO.ModuleMap) {
     if (Error E = BackendProc->start(Task, Mod.second, ImportLists[Mod.first],
                                      ExportLists[Mod.first],
                                      ResolvedODR[Mod.first], ThinLTO.ModuleMap))
       return E;
-
     ++Task;
-    ++Partition;
   }
 
   return BackendProc->wait();




More information about the llvm-commits mailing list