LLVM backend for 6502
Go to file
Chris Lattner f718e70c7e Instead of storing operands as std::vector<Use>, just maintain a pointer
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
2005-01-29 00:29:39 +00:00
autoconf let configure recognize Alphas 2005-01-24 17:33:52 +00:00
docs Add some initial documentation for the SelectionDAG based instruction selectors 2005-01-28 17:22:53 +00:00
examples Use LLVMLIBS=JIT to get JIT libraries 2004-11-29 07:17:18 +00:00
include/llvm Instead of storing operands as std::vector<Use>, just maintain a pointer 2005-01-29 00:29:39 +00:00
lib fix ExprMap, partially teach about add long 2005-01-28 23:17:54 +00:00
projects Update per new Makefile requirements for projects 2005-01-16 02:21:42 +00:00
runtime Hrm, who knows what 'uint' is, but it seems to work sometimes? Wierd. 2005-01-28 19:37:35 +00:00
test New testcase. 2005-01-28 19:08:32 +00:00
tools Add support for fp tolerances 2005-01-23 03:45:26 +00:00
utils This method takes sys::Path objects now. 2005-01-23 03:32:16 +00:00
win32 Get VC++ compiling again 2005-01-28 07:29:32 +00:00
.cvsignore Ignore the autom4te.cache directoy. 2004-12-24 15:11:23 +00:00
configure let configure recognize Alphas 2005-01-24 17:25:41 +00:00
CREDITS.TXT Add MMC 2004-11-18 21:04:21 +00:00
LICENSE.TXT Another year, another copyright update. 2005-01-08 19:10:44 +00:00
llvm.spec
llvm.spec.in
Makefile Remove the check target. Its now in Makefile.rules 2004-12-06 05:35:00 +00:00
Makefile.common Make this file capable of being used by both LLVM and its projects 2005-01-16 02:20:30 +00:00
Makefile.config.in Don't confuse the LLVM_OBJ_DIR and the PROJ_OBJ_DIR because there might be 2005-01-16 06:53:48 +00:00
Makefile.rules Fix some typos in the Makefile.rules. 2005-01-28 19:52:32 +00:00
README.txt Make the text of this file a little more useful. 2004-09-02 22:49:27 +00:00

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.