mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
LLVM backend for 6502
f718e70c7e
and num operands in the User class. this allows us to embed the operands directly in the subclasses if possible. For example, for binary operators we store the two operands in the derived class. The has several effects: 1. it improves locality because the operands and instruction are together 2. it makes accesses to operands faster (one less load) if you access them through the derived class pointer. For example this: Value *GetBinaryOperatorOp(BinaryOperator *I, int i) { return I->getOperand(i); } Was compiled to: _Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi: movl 4(%esp), %edx movl 8(%esp), %eax sall $4, %eax movl 24(%edx), %ecx addl %ecx, %eax movl (%eax), %eax ret and is now compiled to: _Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi: movl 8(%esp), %eax movl 4(%esp), %edx sall $4, %eax addl %edx, %eax movl 44(%eax), %eax ret Accesses through "Instruction*" are unmodified. 3. This reduces memory consumption (by about 3%) by eliminating 1 word of vector overhead and a malloc header on a seperate object. 4. This speeds up gccas about 10% (both debug and release builds) on large things (such as 176.gcc). For example, it takes a debug build from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19883 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
autoconf | ||
docs | ||
examples | ||
include/llvm | ||
lib | ||
projects | ||
runtime | ||
test | ||
tools | ||
utils | ||
win32 | ||
.cvsignore | ||
configure | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
llvm.spec | ||
llvm.spec.in | ||
Makefile | ||
Makefile.common | ||
Makefile.config.in | ||
Makefile.rules | ||
README.txt |
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.