diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-02 01:41:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-02 01:41:49 +0000 |
commit | 55402d4403c2852da9c94e0fa7286ae11ccbbe53 (patch) | |
tree | 0158bf24467a1def67ccc6dbe880112d8bf9d489 /llvm/lib/Bytecode | |
parent | 454b5c9bcef9e406e17f533e45b7dd1b3f0392bf (diff) | |
download | bcm5719-llvm-55402d4403c2852da9c94e0fa7286ae11ccbbe53.tar.gz bcm5719-llvm-55402d4403c2852da9c94e0fa7286ae11ccbbe53.zip |
Allow the getRegForInlineAsmConstraint method to return a register class with
no fixes physreg. Treat this as permission to use any register in the register
class. When this happens and it is safe, allow the llvm register allcoator to
allocate the register instead of doing it at isel time. This eliminates a ton
of copies around common inline asms. For example:
int test2(int Y, int X) {
asm("foo %0, %1" : "=r"(X): "r"(X));
return X;
}
now compiles to:
_test2:
foo r3, r4
blr
instead of:
_test2:
mr r2, r4
foo r2, r2
mr r3, r2
blr
GCC produces:
_test2:
foo r4, r4
mr r3,r4
blr
llvm-svn: 31366
Diffstat (limited to 'llvm/lib/Bytecode')
0 files changed, 0 insertions, 0 deletions