mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Chris Lattner
cfa0f2edd3
Make the 2-address instruction lowering pass smarter in two ways:
1. If we are two-addressing a commutable instruction and the LHS is not the last use of the variable, see if the instruction is the last use of the RHS. If so, commute the instruction, allowing us to avoid a register-register copy in many cases for common instructions like ADD, OR, AND, etc on X86. 2. If #1 doesn't hold, and if this is an instruction that also existing in 3-address form, promote the instruction to a 3-address instruction to avoid the register-register copy. We can do this for several common instructions in X86, including ADDrr, INC, DEC, etc. This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll, overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19245 91177308-0d34-0410-b5e6-96231b3b80d8
Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for the Low Level Virtual Machine, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the HTML documentation provided in docs/index.html for further assistance with LLVM.
Description
Languages
C++
48.7%
LLVM
38.5%
Assembly
10.2%
C
0.9%
Python
0.4%
Other
1.2%