Commit Graph

24382 Commits

Author SHA1 Message Date
Evan Cheng 60bb622e4d Added addJumpTableIndex
llvm-svn: 27956
2006-04-24 06:42:15 +00:00
Evan Cheng ab0ee6340c MakeMIInst() should handle jump table index operands.
llvm-svn: 27955
2006-04-24 05:37:35 +00:00
Chris Lattner f110527a29 Add a note
llvm-svn: 27954
2006-04-23 19:47:09 +00:00
Evan Cheng b4f31dd1a8 MOVL shuffle (i.e. movd or movss / movsd from memory) of undef, V2 == V2
llvm-svn: 27953
2006-04-23 06:35:19 +00:00
Nate Begeman 866b4b4d45 Fix the updating of the machine CFG when a PHI node was in a successor of
the jump table's range check block.  This re-enables 100% dense jump tables
by default on PPC & x86

llvm-svn: 27952
2006-04-23 06:26:20 +00:00
Jeff Cohen 7a2a972ba9 Keep Visual Studio informed.
llvm-svn: 27951
2006-04-23 04:37:08 +00:00
Nate Begeman 3e04bb482b Code cleanup associated with jump tables, thanks to Chris for noticing
these.

llvm-svn: 27950
2006-04-22 23:52:35 +00:00
Nate Begeman ecb1dafd3d Turn of jump tables for a bit, there are still some issues to work out with
updating the machine CFG.

llvm-svn: 27949
2006-04-22 23:51:56 +00:00
Nate Begeman 9f0b13c885 Optimized stores to the constant pool, while cool, are unnecessary.
llvm-svn: 27948
2006-04-22 22:31:45 +00:00
Nate Begeman 4ca2ea5b43 JumpTable support! What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.

llvm-svn: 27947
2006-04-22 18:53:45 +00:00
Evan Cheng e728efdfce Don't do all the lowering stuff for 2-wide build_vector's. Also, minor optimization for shuffle of undef.
llvm-svn: 27946
2006-04-22 08:34:05 +00:00
Evan Cheng 16ef94f4e8 Fix a performance regression. Use {p}shuf* when there are only two distinct elements in a build_vector.
llvm-svn: 27945
2006-04-22 06:21:46 +00:00
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