If the "delete" update is ordered before the "insert" update, DeleteUnreachable will delete all the descendants of the basic block, so the update isn't really incremental. Changing the order makes the update incremental and fast. This makes an extreme C++ testcase compile three times faster.
I don't currently have a testcase I can upload, but I can try to construct one if it would be helpful.
I'm not sure this is the right fix; I'm not deeply familiar with how domtree updating works. Should the batch updating code handle this itself, somehow?
I would appreciate a comment explaining that the order of updates matter in this place, in case we want to revisit it some time later.