Skip to content
  • Chris Lattner's avatar
    Fix a problem that Dan Berlin noticed, where reassociation would not succeed · b5e381a8
    Chris Lattner authored
    in building maximal expressions before simplifying them.  In particular, i
    cases like this:
    
    X-(A+B+X)
    
    the code would consider A+B+X to be a maximal expression (not understanding
    that the single use '-' would be turned into a + later), simplify it (a noop)
    then later get simplified again.
    
    Each of these simplify steps is where the cost of reassociation comes from,
    so this patch should speed up the already fast pass a bit.
    
    Thanks to Dan for noticing this!
    
    llvm-svn: 23214
    b5e381a8
Loading