Go to file
Justin Lebar 62c20d8b3b [StructurizeCFG] Refactor NearestCommonDominator.
Summary:
As far as I can tell, doing our own computations in
NearestCommonDominator is a false optimization -- DomTree will build up
what appears to be exactly this data when it decides it's worthwhile.
Moreover, by building the cache ourselves, we cannot take advantage of
the cache that the domtree might have available.

In addition, I am not convinced of the correctness of the original code.
In particular, setting ResultIndex = 1 on the first addBlock instead of
setting it to 0 is quite fishy.  Similarly, it's not clear to me that
setting IndexMap[Node] = 0 for every node as we walk up the tree finding
a common parent is correct.  But rather than ponder over these
questions, I'd rather just make the code do the obviously-correct thing.

This patch also changes the NearestCommonDominator API a bit, improving
the names and getting rid of the boolean parameter in addBlock -- see
http://jlebar.com/2011/12/16/Boolean_parameters_to_API_functions_considered_harmful..html

Reviewers: arsenm

Subscribers: aemerson, wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D26998

llvm-svn: 288050
2016-11-28 18:49:59 +00:00
clang [OPENMP] Fix for PR31137: Wrong DSA for members in struct. 2016-11-28 15:55:15 +00:00
clang-tools-extra [include-fixer] Don't interfere with typo correction if we found nothing. 2016-11-28 17:16:18 +00:00
compiler-rt [tsan] Fix the lit expansion of %deflake not to eat a space 2016-11-26 19:09:32 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Fix build since r286752. 2016-11-14 16:06:33 +00:00
libcxx Implement conjuntion/disjuntion/negation for LFTS v2. Same code and tests for the ones in std:: 2016-11-26 18:45:03 +00:00
libcxxabi __cxa_demangle: use default member initialization 2016-11-18 19:01:53 +00:00
libunwind EHABI: mark some functions as exported 2016-11-17 23:53:35 +00:00
lld [ELF] - Do not put non exec sections first when -no-rosegment 2016-11-28 10:26:21 +00:00
lldb fix up Xcode build for r287916 2016-11-28 17:19:03 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm [StructurizeCFG] Refactor NearestCommonDominator. 2016-11-28 18:49:59 +00:00
openmp Set task->td_dephash to NULL after free 2016-11-21 16:24:59 +00:00
parallel-libs [Acxxel] Remove setActiveDeviceForThread 2016-10-28 00:54:02 +00:00
polly [ScopInfo] Use SCEVRewriteVisitor to simplify SCEVSensitiveParameterRewriter [NFC] 2016-11-26 17:58:40 +00:00