LLVM backend for 6502
Go to file
Chris Lattner ffddf6ba1c Enable deleting branches to successor blocks. With the previous patches,
branch folding can now compile stuff like this:

void foo(int W, int X, int Y, int Z) {
  if (W & 1) {
    for (; X;--X) bar();
  } else if (W & 2) {
    for (; Y;--Y) bar();
  } else if (W & 4) {
    for (; Z;--Z) bar();
  } else if (W & 8) {
    for (; W;--W) bar();
  }

  if (W) {
    bar();
  }
}

contrived testcase where loops exits all end up merging together.  To have
the loop merges be:

...
        cmplw cr0, r30, r27
        bne cr0, LBB1_14        ;bb38
LBB1_16:        ;cond_next48.loopexit
        mr r27, r29
LBB1_20:        ;cond_next48
        cmplwi cr0, r27, 0
        beq cr0, LBB1_22        ;UnifiedReturnBlock
...

instead of:


...
        cmplw cr0, r30, r27
        bne cr0, LBB1_14        ;bb38
LBB1_16:        ;cond_next48.loopexit
        mr r27, r29
        b LBB1_20       ;cond_next48
LBB1_17:        ;cond_next48.loopexit1
        b LBB1_20       ;cond_next48
LBB1_18:        ;cond_next48.loopexit2
        b LBB1_20       ;cond_next48
LBB1_19:        ;cond_next48.loopexit3
LBB1_20:        ;cond_next48
        cmplwi cr0, r27, 0
        beq cr0, LBB1_22        ;UnifiedReturnBlock
...


This is CodeGen/PowerPC/branch-opt.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31006 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 18:16:40 +00:00
autoconf Fix misleading warning message 2006-10-02 17:23:42 +00:00
docs clarify 2006-10-15 20:05:59 +00:00
examples Use llvm-config to determine what to link in 2006-09-04 06:04:03 +00:00
include/llvm Clean up interface to getGlobalLinkName. 2006-10-17 17:17:24 +00:00
lib Enable deleting branches to successor blocks. With the previous patches, 2006-10-17 18:16:40 +00:00
projects Don't build the runtime library if LLVMGCC is not configured. 2006-10-02 19:10:56 +00:00
runtime Describe and date modifications we made per LGPL requirements. 2006-08-08 14:47:54 +00:00
test new testcase 2006-10-17 18:14:39 +00:00
tools Make the bugpoint reduction heuristics more effective. Patch submitted by 2006-10-10 21:42:25 +00:00
utils Passing isel root and use operands to ComplexPattern functions, these should do the usual load folding checks as well. 2006-10-16 06:33:44 +00:00
win32 Keep Visual Studio happy. 2006-05-03 00:28:50 +00:00
Xcode Adding new files. 2006-09-07 22:07:57 +00:00
.cvsignore Ignore stuff built by "make dist". 2006-04-07 15:55:18 +00:00
configure fix misleading warning 2006-10-02 17:24:55 +00:00
CREDITS.TXT The list is sorted by name. 2006-08-29 01:42:47 +00:00
LICENSE.TXT burg is gone 2006-09-11 17:28:11 +00:00
llvm.spec.in Minor technical correction in documentation. 2006-08-21 01:58:57 +00:00
Makefile Document build order dependencies. Make sure that llvm-config is built before 2006-09-04 04:27:07 +00:00
Makefile.common Update comments to reflect new variable names. Patch contributed by 2005-02-14 16:02:19 +00:00
Makefile.config.in Make the name of the project consistent with that specified in the 2006-08-07 23:23:39 +00:00
Makefile.rules Move CompileCommonOpts to the end of the list so that EXTRA_OPTIONS=-O0 will 2006-09-29 18:47:13 +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.