Skip to content
  1. Dec 01, 2008
    • Chris Lattner's avatar
      The PreVerifier pass preserves everything. In practice, this · 856684d3
      Chris Lattner authored
      prevents the passmgr from adding yet-another domtree invocation
      for Verifier if there is already one live.
      
      llvm-svn: 60326
      856684d3
    • Chris Lattner's avatar
      Change instcombine to use FoldPHIArgGEPIntoPHI to fold two operand PHIs · 084b3a47
      Chris Lattner authored
      instead of using FoldPHIArgBinOpIntoPHI.  In addition to being more
      obvious, this also fixes a problem where instcombine wouldn't merge two
      phis that had different variable indices.  This prevented instcombine
      from factoring big chunks of code in 403.gcc.  For example:
      
       insn_cuid.exit:                
      -       %tmp336 = load i32** @uid_cuid, align 4      
      -       %tmp337 = getelementptr %struct.rtx_def* %insn_addr.0.ph.i, i32 0, i32 3    
      -       %tmp338 = bitcast [1 x %struct.rtunion]* %tmp337 to i32*               
      -       %tmp339 = load i32* %tmp338, align 4           
      -       %tmp340 = getelementptr i32* %tmp336, i32 %tmp339     
              br label %bb62
       
       bb61:       
      -       %tmp341 = load i32** @uid_cuid, align 4     
      -       %tmp342 = getelementptr %struct.rtx_def* %insn, i32 0, i32 3        
      -       %tmp343 = bitcast [1 x %struct.rtunion]* %tmp342 to i32*           
      -       %tmp344 = load i32* %tmp343, align 4        
      -       %tmp345 = getelementptr i32* %tmp341, i32 %tmp344          
              br label %bb62
       
       bb62:      
      -       %iftmp.62.0.in = phi i32* [ %tmp345, %bb61 ], [ %tmp340, %insn_cuid.exit ]         
      +       %insn.pn2 = phi %struct.rtx_def* [ %insn, %bb61 ], [ %insn_addr.0.ph.i, %insn_cuid.exit ]         
      +       %tmp344.pn.in.in = getelementptr %struct.rtx_def* %insn.pn2, i32 0, i32 3     
      +       %tmp344.pn.in = bitcast [1 x %struct.rtunion]* %tmp344.pn.in.in to i32*  
      +       %tmp341.pn = load i32** @uid_cuid     
      +       %tmp344.pn = load i32* %tmp344.pn.in 
      +       %iftmp.62.0.in = getelementptr i32* %tmp341.pn, i32 %tmp344.pn   
              %iftmp.62.0 = load i32* %iftmp.62.0.in     
      
      llvm-svn: 60325
      084b3a47
    • Anders Carlsson's avatar
      Change more code over to using the new Expr::Evaluate · 8628645e
      Anders Carlsson authored
      llvm-svn: 60324
      8628645e
    • Anders Carlsson's avatar
      Change more code over to using the new Expr::Evaluate · 38eef1de
      Anders Carlsson authored
      llvm-svn: 60323
      38eef1de
    • Chris Lattner's avatar
      Teach inst combine to merge GEPs through PHIs. This is really · 9d02a70a
      Chris Lattner authored
      important because it is sinking the loads using the GEPs, but
      not the GEPs themselves.  This triggers 647 times on 403.gcc
      and makes the .s file much much nicer.  For example before:
      
              je      LBB1_87 ## bb78
      LBB1_62:        ## bb77
              leal    84(%esi), %eax
      LBB1_63:        ## bb79
              movl    (%eax), %eax
      ...
      LBB1_87:        ## bb78
              movl    $0, 4(%esp)
              movl    %esi, (%esp)
              call    L_make_decl_rtl$stub
              jmp     LBB1_62 ## bb77
      
      
      after:
      
              jne     LBB1_63 ## bb79
      LBB1_62:        ## bb78
              movl    $0, 4(%esp)
              movl    %esi, (%esp)
              call    L_make_decl_rtl$stub
      LBB1_63:        ## bb79
              movl    84(%esi), %eax
      
      The input code was (and the GEPs are merged and
      the PHI is now eliminated by instcombine):
      
              br i1 %tmp233, label %bb78, label %bb77
      bb77:           
              %tmp234 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22              
              br label %bb79
      bb78:           
              call void @make_decl_rtl(%struct.tree_node* %t_addr.3, i8* null) nounwind
              %tmp235 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22              
              br label %bb79
      bb79:           
              %iftmp.12.0.in = phi %struct.rtx_def** [ %tmp235, %bb78 ], [ %tmp234, %bb77 ]           
              %iftmp.12.0 = load %struct.rtx_def** %iftmp.12.0.in             
      
      llvm-svn: 60322
      9d02a70a
    • Anders Carlsson's avatar
      Use the new Expr::Evaluate · c9687907
      Anders Carlsson authored
      llvm-svn: 60321
      c9687907
    • Anders Carlsson's avatar
      Remove dead code. · e7c2ac4b
      Anders Carlsson authored
      llvm-svn: 60320
      e7c2ac4b
    • Anders Carlsson's avatar
      Add Sema::isNullPointerConstant which extwarns if necessary. Use it in... · 1dbffc6e
      Anders Carlsson authored
      Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands.
      
      llvm-svn: 60319
      1dbffc6e
    • Anders Carlsson's avatar
      4bb9113d
    • Anders Carlsson's avatar
      Use VerifyIntegerConstantExpression for case values. · f7fba463
      Anders Carlsson authored
      llvm-svn: 60317
      f7fba463
    • Anders Carlsson's avatar
      Emit the correct diagnostic when a comma is in an ICE. · 564730a8
      Anders Carlsson authored
      llvm-svn: 60316
      564730a8
    • Chris Lattner's avatar
      testcase for my previous commit. · 8facc59e
      Chris Lattner authored
      llvm-svn: 60315
      8facc59e
    • Chris Lattner's avatar
      Make GVN be more intelligent about redundant load · 9ce8995d
      Chris Lattner authored
      elimination: when finding dependent load/stores, realize that
      they are the same if aliasing claims must alias instead of relying
      on the pointers to be exactly equal.  This makes load elimination
      more aggressive.  For example, on 403.gcc, we had:
      
      <     68 gvn    - Number of instructions PRE'd
      < 152718 gvn    - Number of instructions deleted
      <  49699 gvn    - Number of loads deleted
      <   6153 memdep - Number of dirty cached non-local responses
      < 169336 memdep - Number of fully cached non-local responses
      < 162428 memdep - Number of uncached non-local responses
      
      now we have:
      
      >     64 gvn    - Number of instructions PRE'd
      > 153623 gvn    - Number of instructions deleted
      >  49856 gvn    - Number of loads deleted
      >   5022 memdep - Number of dirty cached non-local responses
      > 159030 memdep - Number of fully cached non-local responses
      > 162443 memdep - Number of uncached non-local responses
      
      That's an extra 157 loads deleted and extra 905 other instructions nuked.
      
      This slows down GVN very slightly, from 3.91 to 3.96s.
      
      llvm-svn: 60314
      9ce8995d
    • Chris Lattner's avatar
      Reimplement the non-local dependency data structure in terms of a sorted · 7e61dafc
      Chris Lattner authored
      vector instead of a densemap.  This shrinks the memory usage of this thing
      substantially (the high water mark) as well as making operations like
      scanning it faster.  This speeds up memdep slightly, gvn goes from
      3.9376 to 3.9118s on 403.gcc
      
      This also splits out the statistics for the cached non-local case to
      differentiate between the dirty and clean cached case.  Here's the stats
      for 403.gcc:
      
        6153 memdep - Number of dirty cached non-local responses
      169336 memdep - Number of fully cached non-local responses
      162428 memdep - Number of uncached non-local responses
      
      yay for caching :)
      
      llvm-svn: 60313
      7e61dafc
    • Bill Wendling's avatar
      Implement ((A|B)&1)|(B&-2) -> (A&1) | B transformation. This also takes care of · 5b902c5b
      Bill Wendling authored
      permutations of this pattern.
      
      llvm-svn: 60312
      5b902c5b
    • Eli Friedman's avatar
      Fix bogus assertion using getSExtValue for legitimate values, like -1 in · 6f0730ff
      Eli Friedman authored
      an 128-bit-wide integer.  No testcase; the issue I ran into depends on 
      local changes.
      
      llvm-svn: 60311
      6f0730ff
    • Chris Lattner's avatar
      Cache analyses in ivars and add some useful DEBUG output. · 8541edec
      Chris Lattner authored
      This speeds up GVN from 4.0386s to 3.9376s.
      
      llvm-svn: 60310
      8541edec
    • Chris Lattner's avatar
      improve indentation, do cheap checks before expensive ones, · 80c7d81e
      Chris Lattner authored
      remove some fixme's.  This speeds up GVN very slightly on 403.gcc 
      (4.06->4.03s)
      
      llvm-svn: 60309
      80c7d81e
    • Chris Lattner's avatar
      Eliminate the DepResultTy abstraction. It is now completely · 47e81d0e
      Chris Lattner authored
      redundant with MemDepResult, and MemDepResult has a nicer interface.
      
      llvm-svn: 60308
      47e81d0e
  2. Nov 30, 2008
Loading