You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL][NFC] Remove a bunch of unnecessary std::string allocations (#3347)
Apparently we have some static globals of type std::string to represent
a string-literal. The result is that we get some std::string
constructors (and thus allocations!) for no reason. These are only ever
used as StringRef.
This patch replaces those with constexpr llvm::StringLiteral types,
which is a constexpr-constructed StringRef. These don't require
allocations like std::string, so the initialization becomes a no-op.
Additionally, these were being copied at least 1x later on, so the
switch there likely saves runtime allocations as well.
0 commit comments