[PATCH] D37343: [CGP] Merge empty case blocks if no extra moves are added.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 19:33:58 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D37343#881515, @efriedma wrote:

> The real problem with computing DT there isn't how long it takes in common cases, it's that the total time will blow up quadratically for large functions.


This certainly makes me nervous.

Can you just precompute the DT for the function? Maintaining the DT while removing mostly-empty blocks might not be hard.

> Adding a couple more reviewers... the heuristic sort of makes sense to me, but I'd like another opinion.





================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:799
+    DominatorTree DT(F);
+    LoopInfo LI{DT};
     BPI.reset(new BranchProbabilityInfo(F, LI));
----------------
You don't need to change this line (AFAIKT).


https://reviews.llvm.org/D37343





More information about the llvm-commits mailing list