summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-04-30 03:01:02 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-04-30 03:01:02 +0000
commitab7747b727d79c9cc67b0ffb75528bf9bb67d9e8 (patch)
treef4ed5911b20fd7c3744ceb50de080ec81aebf951 /llvm/lib
parenteb71c0c961d4e0f9138164eb5c7ab22758385fdc (diff)
downloadbcm5719-llvm-ab7747b727d79c9cc67b0ffb75528bf9bb67d9e8.tar.gz
bcm5719-llvm-ab7747b727d79c9cc67b0ffb75528bf9bb67d9e8.zip
[analyzer] Treat functions without run-time branches as "small".
Currently we always inline functions that have no branches, i.e. have exactly three CFG blocks: ENTRY, some code, EXIT. This makes sense because when there are no branches, it means that there's no exponential complexity introduced by inlining such function. Such functions also don't trigger various fundamental problems with our inlining mechanism, such as the problem of inlined defensive checks. Sometimes the CFG may contain more blocks, but in practice it still has linear structure because all directions (except, at most, one) of all branches turned out to be unreachable. When this happens, still treat the function as "small". This is useful, in particular, for dealing with C++17 if constexpr. Differential Revision: https://reviews.llvm.org/D61051 llvm-svn: 359531
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud