[PATCH] D84763: DomTree: Make PostDomTree immune to block successors swap

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 04:10:59 PDT 2020


nikic added inline comments.


================
Comment at: llvm/include/llvm/Support/GenericDomTreeConstruction.h:392
+      // reverse unreachable nodes.
+      Optional<DenseMap<NodePtr, unsigned>> SuccOrder;
+      auto InitSuccOrderOnce = [&]() {
----------------
yrouban wrote:
> nikic wrote:
> > You might want to use a SmallDenseMap, as number of successors is usually small.
> It is a successor set for all reverse unreachable nodes (like infinite loops). There are could be many of those. Ok let us try 16.
> 
Oh, I see. Looks like switching to the SmallDenseMap does make things worse rather than better: https://llvm-compile-time-tracker.com/compare.php?from=63b8e6e79174411d9340790fa5e4f67bc73620a0&to=a0b0ea28c422a3e65c8df71b392f77047485f470&stat=instructions

So it's probably better to go with your original version here.


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

https://reviews.llvm.org/D84763



More information about the llvm-commits mailing list