1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib
Chris Lattner dcf2ca93e6 Change the canonical induction variable that we insert.
Instead of producing code like this:

Loop:
  X = phi 0, X2
  ...

  X2 = X + 1
  if (X != N-1) goto Loop

We now generate code that looks like this:

Loop:
  X = phi 0, X2
  ...

  X2 = X + 1
  if (X2 != N) goto Loop

This has two big advantages:
  1. The trip count of the loop is now explicit in the code, allowing
     the direct implementation of Loop::getTripCount()
  2. This reduces register pressure in the loop, and allows X and X2 to be
     put into the same register.

As a consequence of the second point, the code we generate for loops went
from:

.LBB2:  # no_exit.1
	...
        mov %EDI, %ESI
        inc %EDI
        cmp %ESI, 2
        mov %ESI, %EDI
        jne .LBB2 # PC rel: no_exit.1

To:

.LBB2:  # no_exit.1
	...
        inc %ESI
        cmp %ESI, 3
        jne .LBB2 # PC rel: no_exit.1

... which has two fewer moves, and uses one less register.

llvm-svn: 12961
2004-04-15 15:21:43 +00:00
..
Analysis add some helpful methods. Rearrange #includes to proper order 2004-04-15 15:16:02 +00:00
AsmParser Support getelementptr instructions which use uint's to index into structure 2004-04-05 01:30:04 +00:00
Bytecode Implement support for a new LLVM 1.3 bytecode format, which uses uint's 2004-04-05 01:27:26 +00:00
CodeGen Fix bug introduced in previous commit. 2004-04-12 20:26:39 +00:00
Debugger "fix" a nasty race condition 2004-01-14 21:18:03 +00:00
ExecutionEngine Add a TargetData to the PassManager regardless of the TargetMachine. 2004-04-14 17:45:52 +00:00
Support lli no longer takes the -quiet option! 2004-04-05 20:28:41 +00:00
Target Remove code to adjust the iterator for llvm.readio and llvm.writeio. 2004-04-14 21:27:56 +00:00
Transforms Change the canonical induction variable that we insert. 2004-04-15 15:21:43 +00:00
VMCore Remove the return type check for llvm.readio. This check is done for all 2004-04-14 15:06:48 +00:00
Makefile CBackend is no longer here 2004-02-13 23:29:37 +00:00