[LLVMbugs] [Bug 2925] New: mem2reg Painfully Slow on Large BasicBlocks

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Oct 21 10:30:23 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2925

           Summary: mem2reg Painfully Slow on Large BasicBlocks
           Product: libraries
           Version: trunk
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: greened at obbligato.org
                CC: llvmbugs at cs.uiuc.edu


mem2reg has a serious slowdown in RewriteSingleStoreAlloca when working on
large blocks.  The search loops to find matching load and store instructions
dominate compile time.

Flat profile:

  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
 93.23      1.24     1.24        1     1.24     1.25  (anonymous
namespace)::PromoteMem2Reg::run()
  0.75      1.25     0.01  9425833     0.00     0.00 
llvm::cast_retty<llvm::LoadInst, llvm::ilist_iterator<llvm::Instruction>
>::ret_type llvm::cast<llvm::LoadInst, llvm::ilist_iterator<llvm::Instruction>
>(llvm::ilist_iterator<llvm::Instruction> const&)

The call graph profile does not dive beneath the run()  method, presmably
because calls have been inlined.  Profiling of third-party compilers indictes
that RewriteSingleStoreAlloca is the culprit.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list