[PATCH] D51664: [IR] Lazily number instructions for local dominance queries

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 12:57:51 PST 2020


rnk added a comment.

I still think we should do this. I think @fhahn is reimplementing DSE using MemorySSA, so presumably the DSE cases won't be an issue soon, but setting all that aside, I still think it would be nice if we could say once and for all that `Instruction::dominates(Instruction*)` is amortized `O(1)` if you haven't modified the instruction stream. Otherwise this kind of pathology will pop up again. Putting the ordering on the IR saves clients from ferrying around and maintaining OrderedInstructions / OrderedBasicBlock data structures, and that seems like a win.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D51664/new/

https://reviews.llvm.org/D51664





More information about the llvm-commits mailing list