[PATCH] D48974: [DomTreeUpdater] Ignore updates when both DT and PDT are nullptrs
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 9 08:40:20 PDT 2018
kuhar added a comment.
Have you considered detecting that both trees are null and overriding the update strategy to Eager in that case? I think that should functionally be equivalent, although more confusing when the strategy you get can be different from what someone just set :P I'm just wondering what pros/cons there are.
================
Comment at: lib/IR/DomTreeUpdater.cpp:343
+ if (!DT && !PDT)
+ return true;
----------------
Same as below.
================
Comment at: lib/IR/DomTreeUpdater.cpp:390
+ if (!DT && !PDT)
+ return true;
----------------
Can you save some work by moving it at the top of the function such that it doesn't have to validate updates if both trees are null?
Or is it intentional to validate them and catch some logic errors in this case as well?
Repository:
rL LLVM
https://reviews.llvm.org/D48974
More information about the llvm-commits
mailing list