llvm-6502/lib
Chris Lattner 43a5ff8d40 Emit x86 instructions for: A = B op C, where A and B are 16-bit registers,
C is a constant which can be sign-extended from 8 bits without value loss,
and op is one of: add, sub, imul, and, or, xor.

This allows the JIT to emit the one byte version of the constant instead of
the two or 4 byte version.  Because these instructions are very common, this
can save a LOT of code space.  For example, I sampled two benchmarks, 176.gcc
and 254.gap.

BM        Old     New    Reduction
176.gcc 2673621 2548962  4.89%
254.gap  498261  475104  4.87%

Note that while the percentage is not spectacular, this did eliminate
124.6 _KILOBYTES_ of codespace from gcc.  Not bad.

Note that this doesn't effect the llc version at all, because the assembler
already does this optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9284 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 05:53:31 +00:00
..
Analysis Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions. 2003-10-19 21:34:28 +00:00
Archive Update file header for renamed file 2003-09-22 23:42:00 +00:00
AsmParser Eliminate unused class 2003-10-19 21:39:41 +00:00
Bytecode Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions. 2003-10-19 21:34:28 +00:00
CodeGen Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions. 2003-10-19 21:34:28 +00:00
ExecutionEngine Hrm, a relic from the past. How cute :) 2003-10-20 05:45:49 +00:00
Linker Add support for 'weak' linkage. 2003-10-16 18:29:00 +00:00
Support Add debugtype, make output marginally more nice 2003-10-19 02:27:40 +00:00
Target Emit x86 instructions for: A = B op C, where A and B are 16-bit registers, 2003-10-20 05:53:31 +00:00
Transforms Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions. 2003-10-19 21:34:28 +00:00
VMCore Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions. 2003-10-19 21:34:28 +00:00
Makefile Removed Support directory. It now lives in llvm/support/lib. 2003-09-29 16:10:43 +00:00