Commit Graph

36019 Commits

Author SHA1 Message Date
Chris Lattner
5116784826 remove attributions from tools/utils makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Chris Lattner
7ed47a1335 Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:59:42 +00:00
Chris Lattner
ab2b10c3a9 Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45409 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:56:08 +00:00
Chris Lattner
a5e90d7b74 this is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45408 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:38:02 +00:00
Chris Lattner
03c079d5fc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45407 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:31:47 +00:00
Chris Lattner
18f07f49c5 upgrade this test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45406 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 19:24:06 +00:00
Chris Lattner
63079f0757 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 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45405 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 08:37:08 +00:00
Chris Lattner
69bfbdfaee this xform is implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45404 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 08:19:39 +00:00
Christopher Lamb
b15147ea4c 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45403 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 07:56:53 +00:00
Chris Lattner
b253a8b382 make sure not to zap volatile stores, thanks a lot to Dale for noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45402 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 07:15:45 +00:00
Chris Lattner
d60eedca01 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45401 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 06:57:38 +00:00
Chris Lattner
5938bef2d2 don't fold fp_round(fp_extend(load)) -> fp_round(extload)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45400 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 06:55:23 +00:00
Chris Lattner
112dedc520 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(); }



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45399 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 06:41:28 +00:00
Chris Lattner
3c87285af6 Delete a store whose input is a load from the same pointer:
x = load p
  store x -> p


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45398 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 06:26:16 +00:00
Chris Lattner
7ede51b964 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45397 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 05:51:58 +00:00
Chris Lattner
92c06a01de expand note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45393 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 01:05:01 +00:00
Chris Lattner
741c0aea08 dead calls to llvm.stacksave can be deleted, even though they
have potential side-effects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45392 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 00:59:12 +00:00
Chris Lattner
26d5f661d6 upgrade this test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45391 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 00:57:06 +00:00
Devang Patel
c49c08f747 Test -simplifycfg only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45389 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 22:59:48 +00:00
Chris Lattner
a1643ba71a add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45388 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 22:30:05 +00:00
Chris Lattner
9bfcc624ba add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45387 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 21:50:40 +00:00
Owen Anderson
2910f68a52 Add a testcase for my recent InstCombine fix, written by Nicholas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45386 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 21:08:43 +00:00
Owen Anderson
f5783f825d Repair a transform that Chris noticed a bug in. Thanks to Nicholas for pointing out my stupid mistakes when writing this patch. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45384 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 07:42:12 +00:00
Chris Lattner
c48b138869 disable this instcombine xform, it miscompiles:
define i32 @main() {
entry:
	%z = alloca i32		; <i32*> [#uses=2]
	store i32 0, i32* %z
	%tmp = load i32* %z		; <i32> [#uses=1]
	%sub = sub i32 %tmp, 1		; <i32> [#uses=1]
	%cmp = icmp ult i32 %sub, 0		; <i1> [#uses=1]
	%retval = select i1 %cmp, i32 1, i32 0		; <i32> [#uses=1]
	ret i32 %retval
}

into ret 1, instead of ret 0.

Christopher, please investigate.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45383 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 06:24:31 +00:00
Chris Lattner
166a268656 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45377 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 04:42:05 +00:00
Anton Korobeynikov
650d5053bf Ignore functions with internal linkages during linking. This snipped mimics the
behaviour of LinkGlobals() function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45375 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-27 23:21:57 +00:00
Gordon Henriksen
a353ffa7e5 Adding bindings for target triple and data layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45369 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-27 20:13:47 +00:00
Gordon Henriksen
1d2e49cd84 Switch the bindings to use LLVMFoldingBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45367 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-27 18:25:59 +00:00
Gordon Henriksen
a09a89983b Adding an uninitialized builder constructor to the Ocaml bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45362 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-26 21:21:51 +00:00
Chris Lattner
8d2a922814 one fewer uncond branch with my codegenprepare hack for single-mbb backedges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45360 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-26 17:23:47 +00:00
Gordon Henriksen
e86ce7d94a Tests for changes made in r45356, where IPO optimizations would drop
collector algorithms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45357 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-26 02:47:37 +00:00
Gordon Henriksen
194c90ed2a Fixing several transforms which would drop the collector attribute
when copying functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45356 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 22:16:06 +00:00
Chris Lattner
64910eeec4 update to llvm 2.0 syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45355 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 20:34:52 +00:00
Chris Lattner
ff26ab2277 Don't break critical edges for single-bb loops, this helps with PR1877, though
it is only a partial fix.  This change is noise for most programs, but
speeds up Shootout-C++/matrix by 20%, Ptrdist/ks by 24%, smg2000 by 8%,
hexxagon by 9%, bzip2 by 9% (not sure I trust this), ackerman by 13%, etc.

OTOH, it slows down Shootout/fib2 by 40% (I'll update PR1877 with this info).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45354 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 19:06:45 +00:00
Seo Sanghyeon
dc32d19c1c Actually parse q operation in llvm-ar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45353 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 13:53:47 +00:00
Gordon Henriksen
4e20a09b6f Disabling -g for ocaml builds; it's not downwards compatible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45352 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 08:37:43 +00:00
Gordon Henriksen
0e13821c96 GC poses hazards to the inliner. Consider:
define void @f() {
            ...
            call i32 @g()
            ...
    }

    define void @g() {
            ...
    }

The hazards are:

  - @f and @g have GC, but they differ GC. Inlining is invalid. This
    may never occur.
  - @f has no GC, but @g does. g's GC must be propagated to @f.

The other scenarios are safe:

  - @f and @g have the same GC.
  - @f and @g have no GC.
  - @g has no GC.

This patch adds inliner checks for the former two scenarios.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45351 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 03:10:07 +00:00
Gordon Henriksen
e1433f24cf Noting and enforcing that GC intrinsics are valid only within a
function with GC.

This will catch the error when the inliner inlines a function with
GC into a caller with no GC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45350 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 02:31:26 +00:00
Gordon Henriksen
27acd3a999 Adjusting verification of "llvm.gc*" intrinsic prototypes to match
LangRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 02:02:10 +00:00
Owen Anderson
f1519e8361 Flesh out the Briggs implementation a little bit more, fix a few FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45347 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24 22:12:23 +00:00
Chris Lattner
ebe807597f add a -backedge-hack llc-beta option to codegenprepare.
When specified, don't split backedges of single-bb loops.
This helps address PR1877



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45344 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24 19:32:55 +00:00
Chris Lattner
44cb8efdc1 add a simple hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45343 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24 19:27:46 +00:00
Anton Korobeynikov
97d37260df Cygwin defines uint32_t as unsigned long. Unbreak call to std::min in this case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45342 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24 11:16:47 +00:00
Ted Kremenek
ec9e7163b8 Added special support for stripping CRLF characters that may appear in the
output of nm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45341 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24 08:04:39 +00:00
Gordon Henriksen
81361d6a28 Setting GlobalDirective in TargetAsmInfo by default rather than
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45338 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 20:58:16 +00:00
Owen Anderson
99d562d8fc Get rid of an unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45337 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 20:34:06 +00:00
Gordon Henriksen
15ac8b9e6d Fix some Ocaml GC errors noticed upon review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45336 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 17:10:23 +00:00
Gordon Henriksen
2e855e68d8 C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45335 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 16:59:28 +00:00
Owen Anderson
efbcebc95d Sketch out an implementation of Briggs' copy placement algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45334 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 15:37:26 +00:00
Owen Anderson
96fa396039 Add GraphTraits specializations for machine dominators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45333 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 15:16:46 +00:00