HomePhabricator

[CodeGen] only add nobuiltin to inline builtins if we'll emit them
3ab301b4d970Unpublished

Authored by george.burgess.iv on Apr 15 2020, 11:05 AM.

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

[CodeGen] only add nobuiltin to inline builtins if we'll emit them

There are some inline builtin definitions that we can't emit
(isTriviallyRecursive & callers go into why). Marking these
nobuiltin is only useful if we actually emit the body, so don't mark
these as such unless we _do_ plan on emitting that.

This suboptimality was encountered in Linux (see some discussion on
D71082, and https://github.com/ClangBuiltLinux/linux/issues/979).

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

(cherry picked from commit 2dd17ff08165e6118e70f00e22b2c36d2d4e0a9a)