1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

36000 Commits

Author SHA1 Message Date
Chris Lattner
46e4658c95 eliminate a copy of the machineoperand printing stuff. Keep the copy that
knows how to print offsets.

llvm-svn: 45457
2007-12-30 21:03:30 +00:00
Chris Lattner
ff61fe680e Simplify and clean up some machine operand/instr printing/dumping stuff.
llvm-svn: 45456
2007-12-30 21:01:27 +00:00
Chris Lattner
98c3fabf47 two register machineoperands are not identical unless their subregs match.
llvm-svn: 45455
2007-12-30 20:55:08 +00:00
Chris Lattner
4a4943a78f MachineOperand::getImmedValue -> MachineOperand::getImm
llvm-svn: 45454
2007-12-30 20:50:28 +00:00
Chris Lattner
12477d46b4 Use MachineOperand::getImm instead of MachineOperand::getImmedValue. Likewise setImmedValue -> setImm
llvm-svn: 45453
2007-12-30 20:49:49 +00:00
Gordon Henriksen
2d87c21eff Trying r45451 again, but this time warning-free on 3.10.x.
llvm-svn: 45452
2007-12-30 18:12:41 +00:00
Gordon Henriksen
28347a471e Remove some lines that are nonportable to Ocaml 3.06.
llvm-svn: 45451
2007-12-30 17:48:11 +00:00
Gordon Henriksen
8082358f86 Add some doxygen comments to llvm-c/Core.h.
llvm-svn: 45450
2007-12-30 17:46:33 +00:00
Chris Lattner
d6051f028d make machine operands fatter: give each one an up-pointer to the
machineinstr that owns it.

llvm-svn: 45449
2007-12-30 06:11:04 +00:00
Gordon Henriksen
81148ffd7e Strengthening this test so it fails in release mode.
llvm-svn: 45446
2007-12-30 05:45:49 +00:00
Chris Lattner
9a820ae865 split machineoperand out into its own header file.
llvm-svn: 45445
2007-12-30 04:40:25 +00:00
Bill Wendling
4c22e299ef If we have a load of a global address that's not modified during the
function, then go ahead and hoist it out of the loop. This is the result:

$ cat a.c
volatile int G;

int A(int N) {
  for (; N > 0; --N)
    G++;
}
$ llc -o - -relocation-model=pic
_A:
...
LBB1_2: # bb
        movl    L_G$non_lazy_ptr-"L1$pb"(%eax), %esi
        incl    (%esi)
        incl    %edx
        cmpl    %ecx, %edx
        jne     LBB1_2  # bb
...
$ llc -o - -relocation-model=pic -machine-licm
_A:
...
        movl    L_G$non_lazy_ptr-"L1$pb"(%eax), %eax
LBB1_2: # bb
        incl    (%eax)
        incl    %edx
        cmpl    %ecx, %edx
        jne     LBB1_2  # bb
...

I'm limiting this to the MOV32rm x86 instruction for now.

llvm-svn: 45444
2007-12-30 03:18:58 +00:00
Chris Lattner
ed584991ba remove unneeded #includes.
llvm-svn: 45439
2007-12-30 01:11:43 +00:00
Chris Lattner
0331a3297f remove a bunch of now-dead methods.
llvm-svn: 45438
2007-12-30 01:04:05 +00:00
Chris Lattner
fac8748ca7 use simplified operand addition methods.
llvm-svn: 45437
2007-12-30 01:01:54 +00:00
Chris Lattner
c2f0543beb use simplified operand addition methods.
llvm-svn: 45436
2007-12-30 00:57:42 +00:00
Chris Lattner
1b0ad80f53 use simplified operand addition methods.
llvm-svn: 45435
2007-12-30 00:51:11 +00:00
Chris Lattner
171f5ea6c4 make offset operand optional.
llvm-svn: 45434
2007-12-30 00:50:55 +00:00
Chris Lattner
4d0361fbf2 Shrinkify the machine operand creation method names.
llvm-svn: 45433
2007-12-30 00:45:46 +00:00
Chris Lattner
19dd6c4eac Start using the simplified methods for adding operands.
llvm-svn: 45432
2007-12-30 00:41:17 +00:00
Chris Lattner
6d4b58a29a switch MIBuilder over to use the simplified operand addition methods.
llvm-svn: 45431
2007-12-30 00:35:18 +00:00
Chris Lattner
8b6d0b0fab 1. Make a static MachineOperand::create* method for every
operand type.
2. Move these create methods below the accessors.
3. Simplify all the MachineInstr::add* methods to use these.

llvm-svn: 45430
2007-12-30 00:29:19 +00:00
Chris Lattner
6460f1a60a tblgen shouldn't include headers from llvm codegen.
llvm-svn: 45429
2007-12-30 00:25:23 +00:00
Chris Lattner
e868c77f16 simplify some code by factoring operand construction better.
llvm-svn: 45428
2007-12-30 00:12:25 +00:00
Chris Lattner
7a9b0bf0eb remove attribution from a variety of miscellaneous files.
llvm-svn: 45425
2007-12-29 22:59:10 +00:00
Chris Lattner
a58796338b regenerate
llvm-svn: 45424
2007-12-29 20:47:37 +00:00
Chris Lattner
8e3ec201ea remove attributions
llvm-svn: 45423
2007-12-29 20:46:15 +00:00
Gordon Henriksen
36da9ea958 Bindings for instruction calling conventions.
llvm-svn: 45422
2007-12-29 20:45:00 +00:00
Chris Lattner
309aeb140b remove attributions from tools.
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Chris Lattner
c11dd606b0 remove attributions from examples.
llvm-svn: 45420
2007-12-29 20:37:57 +00:00
Chris Lattner
c4006845a6 remove attributions from utils.
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
6aece93d5c remove attributions from the rest of the llvm makefiles.
llvm-svn: 45416
2007-12-29 20:11:13 +00:00
Chris Lattner
8193d4af33 remove attribution from lib Makefiles.
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Chris Lattner
11718ad357 remove attributions from tools/utils makefiles.
llvm-svn: 45414
2007-12-29 20:07:17 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
5c09e20cab Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.

llvm-svn: 45409
2007-12-29 19:56:08 +00:00
Chris Lattner
d82b30a996 this is done.
llvm-svn: 45408
2007-12-29 19:38:02 +00:00
Chris Lattner
d55e743cfe One readme entry is done, one is really easy (Evan, want to investigate
eliminating the llvm.x86.sse2.loadl.pd intrinsic?), one shuffle optzn
may be done (if shufps is better than pinsw, Evan, please review), and
we already know about LICM of simple instructions.

llvm-svn: 45407
2007-12-29 19:31:47 +00:00
Chris Lattner
ed55329cc9 upgrade this test
llvm-svn: 45406
2007-12-29 19:24:06 +00:00
Chris Lattner
cd147e5596 Fold comparisons against a constant nan, and optimize ORD/UNORD
comparisons with a constant.  This allows us to compile isnan to:

_foo:
	fcmpu cr7, f1, f1
	mfcr r2
	rlwinm r3, r2, 0, 31, 31
	blr 

instead of:

LCPI1_0:					;  float
	.space	4
_foo:
	lis r2, ha16(LCPI1_0)
	lfs f0, lo16(LCPI1_0)(r2)
	fcmpu cr7, f1, f0
	mfcr r2
	rlwinm r3, r2, 0, 31, 31
	blr 

llvm-svn: 45405
2007-12-29 08:37:08 +00:00
Chris Lattner
b36a4a7a84 this xform is implemented.
llvm-svn: 45404
2007-12-29 08:19:39 +00:00
Christopher Lamb
dfad5f19b4 Disable null pointer folding transforms for non-generic address spaces. This should probably be a target-specific predicate based on address space. That way for targets where this isn't applicable the predicate can be optimized away.
llvm-svn: 45403
2007-12-29 07:56:53 +00:00
Chris Lattner
38687aa2b2 make sure not to zap volatile stores, thanks a lot to Dale for noticing this!
llvm-svn: 45402
2007-12-29 07:15:45 +00:00
Chris Lattner
f8e408b7b1 Codegen:
as:

_bar:
	pushl	%esi
	subl	$8, %esp
	movl	16(%esp), %esi
	call	L_foo$stub
	fstps	(%esi)
	addl	$8, %esp
	popl	%esi
	#FP_REG_KILL
	ret

instead of:

_bar:
	pushl	%esi
	subl	$8, %esp
	movl	16(%esp), %esi
	call	L_foo$stub
	fstpl	(%esi)
	cvtsd2ss	(%esi), %xmm0
	movss	%xmm0, (%esi)
	addl	$8, %esp
	popl	%esi
	#FP_REG_KILL
	ret

llvm-svn: 45401
2007-12-29 06:57:38 +00:00
Chris Lattner
78ae7ff876 don't fold fp_round(fp_extend(load)) -> fp_round(extload)
llvm-svn: 45400
2007-12-29 06:55:23 +00:00
Chris Lattner
e3515220d2 avoid going through a stack slot to convert from fpstack to xmm reg
if we are just going to store it back anyway.  This improves things 
like:
double foo();
void bar(double *P) { *P = foo(); }

llvm-svn: 45399
2007-12-29 06:41:28 +00:00
Chris Lattner
7cb2de8e48 Delete a store whose input is a load from the same pointer:
x = load p
  store x -> p

llvm-svn: 45398
2007-12-29 06:26:16 +00:00
Chris Lattner
ac72965e02 add a note
llvm-svn: 45397
2007-12-29 05:51:58 +00:00
Chris Lattner
78c7878ca4 expand note.
llvm-svn: 45393
2007-12-29 01:05:01 +00:00