OSDN Git Service

[GlobalISel][Localizer] Remove redundant set lookup.
authorAmara Emerson <aemerson@apple.com>
Tue, 18 Jun 2019 22:08:40 +0000 (22:08 +0000)
committerAmara Emerson <aemerson@apple.com>
Tue, 18 Jun 2019 22:08:40 +0000 (22:08 +0000)
After changing the algorithm to only process the entry block we never revisit
a processed instruction.

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

lib/CodeGen/GlobalISel/Localizer.cpp

index 88c8d09..808f611 100644 (file)
@@ -115,7 +115,7 @@ bool Localizer::localizeInterBlock(
   // we start doing CSE across blocks.
   auto &MBB = MF.front();
   for (MachineInstr &MI : MBB) {
-    if (LocalizedInstrs.count(&MI) || !shouldLocalize(MI))
+    if (!shouldLocalize(MI))
       continue;
     LLVM_DEBUG(dbgs() << "Should localize: " << MI);
     assert(MI.getDesc().getNumDefs() == 1 &&