[llvm-commits] discouraging use of x86_64 R12 and R13
Dan Gohman
gohman at apple.com
Tue Nov 18 13:12:46 PST 2008
On Nov 17, 2008, at 4:08 PM, Stuart Hastings wrote:
> A trivial patch for a mild (and unproven) performance improvement.
> (<rdar://problem/6351057
>> )
>
> The x86_64 R12 and R13 register encodings are related to the RBP and
> RSP encodings, and thus require slightly longer instructions than the
> other R8..R15 registers. Specifically, just like [RBP], the X86_64
> cannot encode [R12] directly; this is expressed as [R12+0]. In like
> manner, [R13] resembles [RSP], and requires an SIB byte.
>
> Since R14 and R15 don't have these drawbacks, here is a patch for LLVM
> to prefer them over R12 & R13. By "prefer," we really mean "allocate
> R14 and R15 first."
Along with Evan's comments, can you summarize the above two paragraphs
in a comment in the source?
Thanks,
Dan
More information about the llvm-commits
mailing list