summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-12-23 00:41:21 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-12-23 00:41:21 +0000
commit9a129807f3b4bdac356131550cbcb915de3db171 (patch)
treebff995e237d9cb8cbd2f4edfd69e8f36db929cf3 /clang/lib/Frontend/CompilerInvocation.cpp
parentcd613e9d6def274a6646f6bb128e7bd11c83189e (diff)
downloadbcm5719-llvm-9a129807f3b4bdac356131550cbcb915de3db171.tar.gz
bcm5719-llvm-9a129807f3b4bdac356131550cbcb915de3db171.zip
Reimplement depedency tracking in the ImplicitNullChecks pass
Summary: This change rewrites a core component in the ImplicitNullChecks pass for greater simplicity since the original design was over-complicated for no good reason. Please review this as essentially a new pass. The change is almost NFC and I've added a test case for a scenario that this new code handles that wasn't handled earlier. The implicit null check pass, at its core, is a code hoisting transform. It differs from "normal" code transforms in that it speculates potentially faulting instructions (by design), but a lot of the usual hazard detection logic (register read-after-write etc.) still applies. We previously detected hazards by keeping track of registers defined and used by machine instructions over an instruction range, but that was unwieldy and did not actually confer any performance benefits. The intent was to have linear time complexity over the number of machine instructions considered, but it ended up being N^2 is practice. This new version is more obviously O(N^2) (with N capped to 8 by default) in hazard detection. It does not attempt to be clever in tracking register uses or defs (the previous cleverness here was a source of bugs). Once this is checked in, I'll extract out the `IsSuitableMemoryOp` and `CanHoistLoadInst` lambda into member functions (they're too complicated to be inline lambdas) and do some other related NFC cleanups. Reviewers: reames, anna, atrick Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D27592 llvm-svn: 290394
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud