Skip to content
  • Chris Lattner's avatar
    Do not let the numbering of PHI nodes placed in the function depend on · a52ab6f5
    Chris Lattner authored
    non-deterministic things like the ordering of blocks in the dominance
    frontier of a BB.  Unfortunately, I don't know of a better way to solve
    this problem than to explicitly sort the BB's in function-order before
    processing them.  This is guaranteed to slow the pass down a bit, but
    is absolutely necessary to get usable diffs between two different tools
    executing the mem2reg or scalarrepl pass.
    
    Before this, bazillions of spurious diff failures occurred all over the
    place due to the different order of processing PHIs:
    
    -       %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.0, uint 0, uint 0
    +       %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.1, uint 0, uint 0
    
    Now, the diffs match.
    
    llvm-svn: 14244
    a52ab6f5
Loading