For a file in WebKit, this brings the time spent in CodeGenPrepare from
10 minutes to 50 milliseconds. The reduction comes from using a cache of
visited instructions to speed up block-local dominance queries.
Testing: I built LNT using the Os-g cmake cache with & without this
patch, then diffed the object files to verify there was no binary diff
(and check-llvm of course).
rdar://59446577
I guess by the same reasoning this is still useful even if we had D51664. Although, if no reordering is required because all defs are before uses, D51664 would still help, and I think that is the common case. I assume the webkit case is a long BB of: