[PATCH] [LoopReroll] Run LICM before Loop Rerolling.

James Molloy james.molloy at arm.com
Mon Feb 16 10:43:10 PST 2015


Hi Hal,

OK, I managed to track it down (bugpoint didn't help, but I strained my eyes over every pass until I'd worked it out :) ).

It comes from loop unrolling - we unroll part of a loop nest but don't run LICM afterwards to clean up. New patch adds it to the cleanup part of the scalar optimizer.

As this was a latent bug, I don't think we need to smarten up the reroller to handle this - we should be able to expect our input to be optimized. Do you agree with this?

Cheers,

James


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7674

Files:
  lib/Transforms/IPO/PassManagerBuilder.cpp

Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- lib/Transforms/IPO/PassManagerBuilder.cpp
+++ lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -259,6 +259,7 @@
   MPM.add(createJumpThreadingPass());         // Thread jumps
   MPM.add(createCorrelatedValuePropagationPass());
   MPM.add(createDeadStoreEliminationPass());  // Delete dead stores
+  MPM.add(createLICMPass());
 
   addExtensionsToPM(EP_ScalarOptimizerLate, MPM);

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7674.20042.patch
Type: text/x-patch
Size: 498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150216/dc4fa2ab/attachment.bin>


More information about the llvm-commits mailing list