HomePhabricator

Add a version of Intrinsic::getName which is more efficient when there are no…

Description

Add a version of Intrinsic::getName which is more efficient when there are no overloads.

When running 'opt -O2 verify-uselistorder-nodbg.lto.bc', there are 33m allocations. 8.2m
come from std::string allocations in Intrinsic::getName(). Turns out this method only
returns a std::string because it needs to handle overloads, but that is not the common case.

This adds an overload of getName which just returns a StringRef when there are no overloads
and so saves on the allocations.

Details

Committed
peteAug 18 2016, 11:30 AM
Parents
rL279112: Use __has_include rather than a configure-time macro to determine if
Branches
Unknown
Tags
Unknown