Commit Graph

24770 Commits

Author SHA1 Message Date
Evan Cheng 40ff2928ed Two more build_vector tests.
llvm-svn: 27944
2006-04-22 06:19:11 +00:00
Chris Lattner c8afdfec52 Teach the JIT how to relocate LI, this fixes the JIT on Prolangs-C/TimberWolfMC
llvm-svn: 27943
2006-04-22 06:17:56 +00:00
Chris Lattner 17aae4c516 This no longer needs the JIT.
llvm-svn: 27942
2006-04-22 05:04:23 +00:00
Chris Lattner fe36eaebda Fix JIT support for static ctors, which was apparently completely broken!
This allows Prolangs-C++/city and probably a bunch of other stuff to work
well with the new front-end

llvm-svn: 27941
2006-04-22 05:02:46 +00:00
Evan Cheng 14215c36b6 Revamp build_vector lowering to take advantage of movss and movd instructions.
movd always clear the top 96 bits and movss does so when it's loading the
value from memory.
The net result is codegen for 4-wide shuffles is much improved. It is near
optimal if one or more elements is a zero. e.g.

__m128i test(int a, int b) {
  return _mm_set_epi32(0, 0, b, a);
}

compiles to

_test:
	movd 8(%esp), %xmm1
	movd 4(%esp), %xmm0
	punpckldq %xmm1, %xmm0
	ret

compare to gcc:

_test:
	subl	$12, %esp
	movd	20(%esp), %xmm0
	movd	16(%esp), %xmm1
	punpckldq	%xmm0, %xmm1
	movq	%xmm1, %xmm0
	movhps	LC0, %xmm0
	addl	$12, %esp
	ret

or icc:

_test:
        movd      4(%esp), %xmm0                                #5.10
        movd      8(%esp), %xmm3                                #5.10
        xorl      %eax, %eax                                    #5.10
        movd      %eax, %xmm1                                   #5.10
        punpckldq %xmm1, %xmm0                                  #5.10
        movd      %eax, %xmm2                                   #5.10
        punpckldq %xmm2, %xmm3                                  #5.10
        punpckldq %xmm3, %xmm0                                  #5.10
        ret                                                     #5.10

There are still room for improvement, for example the FP variant of the above example:

__m128 test(float a, float b) {
  return _mm_set_ps(0.0, 0.0, b, a);
}

_test:
	movss 8(%esp), %xmm1
	movss 4(%esp), %xmm0
	unpcklps %xmm1, %xmm0
	xorps %xmm1, %xmm1
	movlhps %xmm1, %xmm0
	ret

The xorps and movlhps are unnecessary. This will require post legalizer optimization to handle.

llvm-svn: 27939
2006-04-21 23:03:30 +00:00
Nate Begeman 57a32f0bc1 Fix the comment
llvm-svn: 27938
2006-04-21 22:11:27 +00:00
Nate Begeman 516b393992 Change the PPC JIT to use a Static relocation model
llvm-svn: 27937
2006-04-21 22:04:15 +00:00
Chris Lattner 905bd17dc7 typo
llvm-svn: 27936
2006-04-21 21:37:40 +00:00
Chris Lattner 3e62d4b289 fix thinko
llvm-svn: 27935
2006-04-21 21:05:22 +00:00
Chris Lattner e1f9ab7d53 add some low-prio notes
llvm-svn: 27934
2006-04-21 21:03:21 +00:00
Chris Lattner b21d3bfd1f The BFS scheduler is apparently nondeterminstic (causes many llvmgcc bootstrap
miscompares).  Switch RISC targets to use the list-td scheduler, which isn't.

llvm-svn: 27933
2006-04-21 17:16:16 +00:00
Evan Cheng 236d23b88e movddup is a SSE3 instruction.
llvm-svn: 27932
2006-04-21 16:42:47 +00:00
Chris Lattner 28ead23d1c Remove a hack required by V9.
llvm-svn: 27931
2006-04-21 15:33:35 +00:00
Chris Lattner 662e940f73 Fix a couple more memory issues
llvm-svn: 27930
2006-04-21 15:32:26 +00:00
Reid Spencer d835ea4c1c Remove the extraneous --defined-only option to nm. This is the default and
some versions of nm don't recognize it (its a gnu option).

llvm-svn: 27928
2006-04-21 05:29:25 +00:00
Evan Cheng 9c2707ad5a Add && to each RUN: line (except the last one).
llvm-svn: 27927
2006-04-21 04:58:23 +00:00
Evan Cheng 8ef22ae8af More build_vector tests.
llvm-svn: 27926
2006-04-21 01:22:41 +00:00
Evan Cheng 5ddb6f991f Check for llc crash.
llvm-svn: 27925
2006-04-21 01:21:23 +00:00
Evan Cheng b3864a0ce4 To be replaced with another test.
llvm-svn: 27924
2006-04-21 01:12:32 +00:00
Evan Cheng e8b5180044 Now generating perfect (I think) code for "vector set" with a single non-zero
scalar value.

e.g.
        _mm_set_epi32(0, a, 0, 0);
==>
	movd 4(%esp), %xmm0
	pshufd $69, %xmm0, %xmm0

        _mm_set_epi8(0, 0, 0, 0, 0, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
==>
	movzbw 4(%esp), %ax
	movzwl %ax, %eax
	pxor %xmm0, %xmm0
	pinsrw $5, %eax, %xmm0

llvm-svn: 27923
2006-04-21 01:05:10 +00:00
Chris Lattner cc47ab3305 Fix a really subtle and obnoxious memory bug that caused issues with an
llvm-gcc4 boostrap.  Whenever a node is deleted by the dag combiner, it
*must* be returned by the visit function, or the dag combiner will not
know that the node has been processed (and will, e.g., send it to the
target dag combine xforms).

llvm-svn: 27922
2006-04-20 23:55:59 +00:00
Reid Spencer 5e6f97b7c9 Don't require the "dot" program if -flat option is given, and don't produce
any of the fancy graphs or other output. Just produce the flat, makefile
style output on stdout.

llvm-svn: 27921
2006-04-20 23:09:57 +00:00
Jeff Cohen 9c0ba827f7 Keep Visual Studio informed.
llvm-svn: 27920
2006-04-20 22:19:06 +00:00
Reid Spencer aff245875b Configure llvm-config in tools, not utils.
llvm-svn: 27919
2006-04-20 22:15:30 +00:00
Reid Spencer 0a1de79808 Remove the llvm-config directory. Its now in tools.
llvm-svn: 27918
2006-04-20 21:16:32 +00:00
Reid Spencer 6826031c70 llvm-config doesn't live here anymore ==> tools
llvm-svn: 27917
2006-04-20 21:15:41 +00:00
Reid Spencer 2b1041cf13 Okay, llvm-config is good to go now.
llvm-svn: 27916
2006-04-20 21:14:39 +00:00
Reid Spencer 5952201b67 Several Changes To Support Building llvm-config:
1. If Perl is not available, don't run Perl dependent targets.
2. Check in FinalLibDeps.txt for build environments that can't build it
   because there's no Perl processor.
3. Ensure that FinalLibDeps.txt depends on LibDeps.txt so it is
   automatically regenerated.
4. Support objdir != srcdir building.

llvm-svn: 27915
2006-04-20 21:13:58 +00:00
Reid Spencer 62b9b71ff7 Don't build llvm-config until issues are resolved.
llvm-svn: 27914
2006-04-20 21:00:24 +00:00
Reid Spencer 57d891afe1 Build the llvm-config directory as a tool.
llvm-svn: 27913
2006-04-20 20:53:23 +00:00
Chris Lattner dae49df407 Fix Transforms/ScalarRepl/2006-04-20-PromoteCrash.ll
llvm-svn: 27912
2006-04-20 20:48:50 +00:00
Chris Lattner c11f4f4214 new testcase
llvm-svn: 27911
2006-04-20 20:48:32 +00:00
Reid Spencer 8794317843 Update the library dependencies for 1.8 with SparcV9 now gone.
llvm-svn: 27910
2006-04-20 19:50:53 +00:00
Evan Cheng 968db7ffb7 Don't know what I was thinking...
llvm-svn: 27909
2006-04-20 19:47:28 +00:00
Chris Lattner 99d3da9d2c Fix the CodeGen/PowerPC/buildvec_canonicalize.ll regression last night.
llvm-svn: 27908
2006-04-20 19:01:30 +00:00
Chris Lattner d1c3a067ee add a note
llvm-svn: 27907
2006-04-20 18:49:28 +00:00
Reid Spencer 53345be5e2 Remove Burg as a directory to be considered.
llvm-svn: 27906
2006-04-20 18:47:13 +00:00
Reid Spencer a278128a59 Remove more references to Burg.
llvm-svn: 27905
2006-04-20 18:46:45 +00:00
Reid Spencer 355913aa7a Remove reference to BURG variable. It no longer exists.
llvm-svn: 27904
2006-04-20 18:44:24 +00:00
Chris Lattner 32150b90b7 remove some stuff
llvm-svn: 27903
2006-04-20 18:43:59 +00:00
Reid Spencer 9597684ba7 Remove traces of Burg utility now that its gone and not needed.
llvm-svn: 27902
2006-04-20 18:42:24 +00:00
Reid Spencer 06502b6135 Burg not needed any more now that SparcV9 is gone.
llvm-svn: 27901
2006-04-20 18:39:19 +00:00
Chris Lattner 3e5521799c remove some v9 specific code
llvm-svn: 27900
2006-04-20 18:33:11 +00:00
Chris Lattner dcc1f995eb This field no longer exists
llvm-svn: 27899
2006-04-20 18:32:41 +00:00
Chris Lattner 778509c844 Don't fill in fields that no longer exist.
llvm-svn: 27898
2006-04-20 18:32:22 +00:00
Chris Lattner f2a5922fa9 Remove a bunch of dead stuff, shrinkifying TargetInstrDescriptor significantly.
llvm-svn: 27897
2006-04-20 18:32:02 +00:00
Chris Lattner 7d7ed24b96 Remove some obsolete interfaces
llvm-svn: 27896
2006-04-20 18:17:21 +00:00
Chris Lattner 2a875285f7 Remove this obsolete file
llvm-svn: 27895
2006-04-20 18:16:45 +00:00
Chris Lattner 862755b95b Remove some of the obvious v9-specific cruft
llvm-svn: 27894
2006-04-20 18:09:13 +00:00
Chris Lattner a38c3580bd Remove some of the obvious V9-specific cruft
llvm-svn: 27893
2006-04-20 18:08:53 +00:00