Give the Reassociate pass a bit more flexibility and autonomy when optimizing expressions.
Particularly, it addresses cases where Reassociate breaks Subtracts but then fails to optimize combinations like I1 + -I2 where I1 and I2 have the same rank and are identical.

Patch by Dmitri Shtilman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219092 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Fix up trailing whitespace and formatting in the pass regitsry
code prior to hacking on it more significantly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219094 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Switch to using range-based for loops in two very obvious
places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219095 91177308-0d34-0410-b5e6-96231b3b80d8
[PM] Remove the (deeply misguided) 'unregister' functionality from the
pass registry.

This style of registry is somewhat questionable, but it being
non-monotonic is crazy. No one is (or should be) unloading DSOs with
passes and unregistering them here. I've checked with a few folks and
I don't know of anyone using this functionality or any important use
case where it is necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219096 91177308-0d34-0410-b5e6-96231b3b80d8