diff options
author | Samuel Benzaquen <sbenza@google.com> | 2014-12-02 18:29:00 +0000 |
---|---|---|
committer | Samuel Benzaquen <sbenza@google.com> | 2014-12-02 18:29:00 +0000 |
commit | b6f0a83f417e857c27be13d625e9f205feab777d (patch) | |
tree | 95e0871aa9a01115206d6e6602e3638ff6813a05 /llvm/lib/Transforms/Utils/LowerSwitch.cpp | |
parent | 54b7d334c7d1c5e0a28f91852fdbeae2da464565 (diff) | |
download | bcm5719-llvm-b6f0a83f417e857c27be13d625e9f205feab777d.tar.gz bcm5719-llvm-b6f0a83f417e857c27be13d625e9f205feab777d.zip |
Skip some unnecessary type checks.
Summary:
Skip some unnecessary type checks wrt DynTypedNodes.
Add DynTypedNode::getUnchecked() to skip the runtime check when the type
is known.
Speed up DynTypedNode::operator== by using isSame() instead of
isBaseOf().
Skip the type check in MatcherInterface<T>::matches(). All calls come
from DynTypedMatcher::matches(), which already did the type check.
This change speeds up our clang-tidy benchmark by ~4%.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6468
llvm-svn: 223134
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
0 files changed, 0 insertions, 0 deletions