Skip to content
Commit 9572372a authored by David Majnemer's avatar David Majnemer
Browse files

[Target] Don't return a std::string in getRegAsmName

getRegAsmName ends up making a copy of the register's name in order to
make a lower-case version of it.  This is bad because
getRegForInlineAsmConstraint, it's sole caller, does a lowercase
comparison anyway.

This resulted in a significant regression in compile time for the Linux
kernel because getRegAsmName is called in a loop by
getRegForInlineAsmConstraint.

Instead, forgo the call to lower in getRegAsmName and have it return a
StringRef.

No functionality change is intended.

llvm-svn: 270099
parent 37e2664f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment