oota-llvm.git
14 years agoremove attributions from the rest of the llvm makefiles.
Chris Lattner [Sat, 29 Dec 2007 20:11:13 +0000 (20:11 +0000)]
remove attributions from the rest of the llvm makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45416 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove attribution from lib Makefiles.
Chris Lattner [Sat, 29 Dec 2007 20:09:26 +0000 (20:09 +0000)]
remove attribution from lib Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45415 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove attributions from tools/utils makefiles.
Chris Lattner [Sat, 29 Dec 2007 20:07:17 +0000 (20:07 +0000)]
remove attributions from tools/utils makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't attribute in file headers anymore. See llvmdev for the
Chris Lattner [Sat, 29 Dec 2007 19:59:42 +0000 (19:59 +0000)]
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

14 years agoDon't attribute in file headers anymore. See llvmdev for the
Chris Lattner [Sat, 29 Dec 2007 19:56:08 +0000 (19:56 +0000)]
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

14 years agothis is done.
Chris Lattner [Sat, 29 Dec 2007 19:38:02 +0000 (19:38 +0000)]
this is done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45408 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOne readme entry is done, one is really easy (Evan, want to investigate
Chris Lattner [Sat, 29 Dec 2007 19:31:47 +0000 (19:31 +0000)]
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

14 years agoupgrade this test
Chris Lattner [Sat, 29 Dec 2007 19:24:06 +0000 (19:24 +0000)]
upgrade this test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45406 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFold comparisons against a constant nan, and optimize ORD/UNORD
Chris Lattner [Sat, 29 Dec 2007 08:37:08 +0000 (08:37 +0000)]
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

14 years agothis xform is implemented.
Chris Lattner [Sat, 29 Dec 2007 08:19:39 +0000 (08:19 +0000)]
this xform is implemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45404 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDisable null pointer folding transforms for non-generic address spaces. This should...
Christopher Lamb [Sat, 29 Dec 2007 07:56:53 +0000 (07:56 +0000)]
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

14 years agomake sure not to zap volatile stores, thanks a lot to Dale for noticing this!
Chris Lattner [Sat, 29 Dec 2007 07:15:45 +0000 (07:15 +0000)]
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

14 years agoCodegen:
Chris Lattner [Sat, 29 Dec 2007 06:57:38 +0000 (06:57 +0000)]
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

14 years agodon't fold fp_round(fp_extend(load)) -> fp_round(extload)
Chris Lattner [Sat, 29 Dec 2007 06:55:23 +0000 (06:55 +0000)]
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

14 years agoavoid going through a stack slot to convert from fpstack to xmm reg
Chris Lattner [Sat, 29 Dec 2007 06:41:28 +0000 (06:41 +0000)]
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

14 years agoDelete a store whose input is a load from the same pointer:
Chris Lattner [Sat, 29 Dec 2007 06:26:16 +0000 (06:26 +0000)]
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

14 years agoadd a note
Chris Lattner [Sat, 29 Dec 2007 05:51:58 +0000 (05:51 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45397 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoexpand note.
Chris Lattner [Sat, 29 Dec 2007 01:05:01 +0000 (01:05 +0000)]
expand note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45393 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodead calls to llvm.stacksave can be deleted, even though they
Chris Lattner [Sat, 29 Dec 2007 00:59:12 +0000 (00:59 +0000)]
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

14 years agoupgrade this test
Chris Lattner [Sat, 29 Dec 2007 00:57:06 +0000 (00:57 +0000)]
upgrade this test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45391 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest -simplifycfg only.
Devang Patel [Fri, 28 Dec 2007 22:59:48 +0000 (22:59 +0000)]
Test -simplifycfg only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45389 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a note.
Chris Lattner [Fri, 28 Dec 2007 22:30:05 +0000 (22:30 +0000)]
add a note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45388 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a note.
Chris Lattner [Fri, 28 Dec 2007 21:50:40 +0000 (21:50 +0000)]
add a note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45387 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a testcase for my recent InstCombine fix, written by Nicholas.
Owen Anderson [Fri, 28 Dec 2007 21:08:43 +0000 (21:08 +0000)]
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

14 years agoRepair a transform that Chris noticed a bug in. Thanks to Nicholas for pointing...
Owen Anderson [Fri, 28 Dec 2007 07:42:12 +0000 (07:42 +0000)]
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

14 years agodisable this instcombine xform, it miscompiles:
Chris Lattner [Fri, 28 Dec 2007 06:24:31 +0000 (06:24 +0000)]
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

14 years agoadd a note
Chris Lattner [Fri, 28 Dec 2007 04:42:05 +0000 (04:42 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45377 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIgnore functions with internal linkages during linking. This snipped mimics the
Anton Korobeynikov [Thu, 27 Dec 2007 23:21:57 +0000 (23:21 +0000)]
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

14 years agoAdding bindings for target triple and data layout.
Gordon Henriksen [Thu, 27 Dec 2007 20:13:47 +0000 (20:13 +0000)]
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

14 years agoSwitch the bindings to use LLVMFoldingBuilder.
Gordon Henriksen [Thu, 27 Dec 2007 18:25:59 +0000 (18:25 +0000)]
Switch the bindings to use LLVMFoldingBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45367 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdding an uninitialized builder constructor to the Ocaml bindings.
Gordon Henriksen [Wed, 26 Dec 2007 21:21:51 +0000 (21:21 +0000)]
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

14 years agoone fewer uncond branch with my codegenprepare hack for single-mbb backedges.
Chris Lattner [Wed, 26 Dec 2007 17:23:47 +0000 (17:23 +0000)]
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

14 years agoTests for changes made in r45356, where IPO optimizations would drop
Gordon Henriksen [Wed, 26 Dec 2007 02:47:37 +0000 (02:47 +0000)]
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

14 years agoFixing several transforms which would drop the collector attribute
Gordon Henriksen [Tue, 25 Dec 2007 22:16:06 +0000 (22:16 +0000)]
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

14 years agoupdate to llvm 2.0 syntax.
Chris Lattner [Tue, 25 Dec 2007 20:34:52 +0000 (20:34 +0000)]
update to llvm 2.0 syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45355 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't break critical edges for single-bb loops, this helps with PR1877, though
Chris Lattner [Tue, 25 Dec 2007 19:06:45 +0000 (19:06 +0000)]
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

14 years agoActually parse q operation in llvm-ar
Seo Sanghyeon [Tue, 25 Dec 2007 13:53:47 +0000 (13:53 +0000)]
Actually parse q operation in llvm-ar

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45353 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDisabling -g for ocaml builds; it's not downwards compatible.
Gordon Henriksen [Tue, 25 Dec 2007 08:37:43 +0000 (08:37 +0000)]
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

14 years agoGC poses hazards to the inliner. Consider:
Gordon Henriksen [Tue, 25 Dec 2007 03:10:07 +0000 (03:10 +0000)]
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

14 years agoNoting and enforcing that GC intrinsics are valid only within a
Gordon Henriksen [Tue, 25 Dec 2007 02:31:26 +0000 (02:31 +0000)]
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

14 years agoAdjusting verification of "llvm.gc*" intrinsic prototypes to match
Gordon Henriksen [Tue, 25 Dec 2007 02:02:10 +0000 (02:02 +0000)]
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

14 years agoFlesh out the Briggs implementation a little bit more, fix a few FIXMEs.
Owen Anderson [Mon, 24 Dec 2007 22:12:23 +0000 (22:12 +0000)]
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

14 years agoadd a -backedge-hack llc-beta option to codegenprepare.
Chris Lattner [Mon, 24 Dec 2007 19:32:55 +0000 (19:32 +0000)]
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

14 years agoadd a simple hack
Chris Lattner [Mon, 24 Dec 2007 19:27:46 +0000 (19:27 +0000)]
add a simple hack

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45343 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCygwin defines uint32_t as unsigned long. Unbreak call to std::min in this case
Anton Korobeynikov [Mon, 24 Dec 2007 11:16:47 +0000 (11:16 +0000)]
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

14 years agoAdded special support for stripping CRLF characters that may appear in the
Ted Kremenek [Mon, 24 Dec 2007 08:04:39 +0000 (08:04 +0000)]
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

14 years agoSetting GlobalDirective in TargetAsmInfo by default rather than
Gordon Henriksen [Sun, 23 Dec 2007 20:58:16 +0000 (20:58 +0000)]
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

14 years agoGet rid of an unneeded #include.
Owen Anderson [Sun, 23 Dec 2007 20:34:06 +0000 (20:34 +0000)]
Get rid of an unneeded #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45337 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix some Ocaml GC errors noticed upon review.
Gordon Henriksen [Sun, 23 Dec 2007 17:10:23 +0000 (17:10 +0000)]
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

14 years agoC and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
Gordon Henriksen [Sun, 23 Dec 2007 16:59:28 +0000 (16:59 +0000)]
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

14 years agoSketch out an implementation of Briggs' copy placement algorithm.
Owen Anderson [Sun, 23 Dec 2007 15:37:26 +0000 (15:37 +0000)]
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

14 years agoAdd GraphTraits specializations for machine dominators.
Owen Anderson [Sun, 23 Dec 2007 15:16:46 +0000 (15:16 +0000)]
Add GraphTraits specializations for machine dominators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45333 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUndo a wrong bit in that last patch.
Gordon Henriksen [Sat, 22 Dec 2007 23:34:26 +0000 (23:34 +0000)]
Undo a wrong bit in that last patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45327 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDocument a more robust implementation of performCustomLowering.
Gordon Henriksen [Sat, 22 Dec 2007 23:32:32 +0000 (23:32 +0000)]
Document a more robust implementation of performCustomLowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45326 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix some warnings. This code needs to be de-tabified :(
Chris Lattner [Sat, 22 Dec 2007 22:47:03 +0000 (22:47 +0000)]
fix some warnings.  This code needs to be de-tabified :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45325 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix strict-aliasing violation
Chris Lattner [Sat, 22 Dec 2007 22:45:38 +0000 (22:45 +0000)]
fix strict-aliasing violation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45324 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoinitial code for forming an FGETSIGN node. This is disabled until
Chris Lattner [Sat, 22 Dec 2007 21:35:38 +0000 (21:35 +0000)]
initial code for forming an FGETSIGN node. This is disabled until
legalizer support goes in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45323 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove support for fgetsign
Chris Lattner [Sat, 22 Dec 2007 21:26:52 +0000 (21:26 +0000)]
improve support for fgetsign

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45322 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTell TargetLoweringOpt whether it is running before
Chris Lattner [Sat, 22 Dec 2007 20:56:36 +0000 (20:56 +0000)]
Tell TargetLoweringOpt whether it is running before
or after legalize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45321 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a new FGETSIGN operation, which defaults to expand on all
Chris Lattner [Sat, 22 Dec 2007 20:47:56 +0000 (20:47 +0000)]
Add a new FGETSIGN operation, which defaults to expand on all
targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45320 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoErm, really disable :)
Anton Korobeynikov [Sat, 22 Dec 2007 20:46:24 +0000 (20:46 +0000)]
Erm, really disable :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45319 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDisable, until we'll really need it
Anton Korobeynikov [Sat, 22 Dec 2007 20:41:12 +0000 (20:41 +0000)]
Disable, until we'll really need it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45318 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a partial application typo.
Gordon Henriksen [Sat, 22 Dec 2007 19:41:30 +0000 (19:41 +0000)]
Fix a partial application typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45317 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse getIntrinsicID instead of looking up intrinsic prototypes. Also
Gordon Henriksen [Sat, 22 Dec 2007 17:27:01 +0000 (17:27 +0000)]
Use getIntrinsicID instead of looking up intrinsic prototypes. Also
fixes a bug with indirect calls. (Test case will be included with
ocaml collector patch.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45316 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUnbreak build on gcc 3.x
Anton Korobeynikov [Sat, 22 Dec 2007 14:27:49 +0000 (14:27 +0000)]
Unbreak build on gcc 3.x

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45315 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUnbreak mingw build
Anton Korobeynikov [Sat, 22 Dec 2007 14:26:49 +0000 (14:26 +0000)]
Unbreak mingw build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45314 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPreliminary PIC JIT support for X86 (32-bit) / Darwin.
Evan Cheng [Sat, 22 Dec 2007 09:40:20 +0000 (09:40 +0000)]
Preliminary PIC JIT support for X86 (32-bit) / Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45313 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOops.
Evan Cheng [Sat, 22 Dec 2007 09:14:34 +0000 (09:14 +0000)]
Oops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45312 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement InstCombine/shift-trunc-shift.ll. This allows
Chris Lattner [Sat, 22 Dec 2007 09:07:47 +0000 (09:07 +0000)]
implement InstCombine/shift-trunc-shift.ll.  This allows
us to compile:
#include <math.h>
int t1(double d) { return signbit(d); }

into:

_t1:
movd %xmm0, %rax
shrq $63, %rax
ret

instead of:

_t1:
movd %xmm0, %rax
shrq $32, %rax
shrl $31, %eax
ret

on x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45311 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNote what still needs doing.
Owen Anderson [Sat, 22 Dec 2007 04:59:10 +0000 (04:59 +0000)]
Note what still needs doing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45310 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove critical edge breaking. It won't be necessary as long as we are very careful...
Owen Anderson [Sat, 22 Dec 2007 04:50:11 +0000 (04:50 +0000)]
Remove critical edge breaking.  It won't be necessary as long as we are very careful when inserting copies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45309 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIgnoring generated files.
Gordon Henriksen [Sat, 22 Dec 2007 04:44:11 +0000 (04:44 +0000)]
Ignoring generated files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45308 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix JIT code emission of X86::MovePCtoStack.
Evan Cheng [Sat, 22 Dec 2007 02:26:46 +0000 (02:26 +0000)]
Fix JIT code emission of X86::MovePCtoStack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45307 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIf succ has succ itself as one of the predecessors then do
Devang Patel [Sat, 22 Dec 2007 01:32:53 +0000 (01:32 +0000)]
If succ has succ itself as one of the predecessors then do
not merge current bb and succ even if bb's terminator is
unconditional branch to succ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45305 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllow JIT with non-static relocation model.
Evan Cheng [Sat, 22 Dec 2007 01:12:14 +0000 (01:12 +0000)]
Allow JIT with non-static relocation model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45304 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix silly typo in the FP CEP handling.
Anton Korobeynikov [Fri, 21 Dec 2007 23:33:44 +0000 (23:33 +0000)]
Fix silly typo in the FP CEP handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45300 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a brain fart by our beloved leader (the content
Duncan Sands [Fri, 21 Dec 2007 20:18:41 +0000 (20:18 +0000)]
Fix a brain fart by our beloved leader (the content
of this patch is the last line).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45289 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGet the verifier to check attributes on calls as well
Duncan Sands [Fri, 21 Dec 2007 19:19:01 +0000 (19:19 +0000)]
Get the verifier to check attributes on calls as well
as on functions.  Make it verify invokes and not just
ordinary calls.  As a (desired) side-effect, it is no
longer legal to have call attributes on arguments that
are being passed to the varargs part of a varargs
function (llvm-as drops them on the floor anyway).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45286 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake DAE not wipe out attributes on calls, and not drop
Duncan Sands [Fri, 21 Dec 2007 19:16:16 +0000 (19:16 +0000)]
Make DAE not wipe out attributes on calls, and not drop
return attributes on the floor.  In the case of a call
to a varargs function where the varargs arguments are
being removed, any call attributes on those arguments
need to be dropped.  I didn't do this because I plan to
make it illegal to have such attributes (see next patch).
With this change, compiling the gcc filter2 eh test at -O0
and then running opt -std-compile-opts on it results in
a correctly working program (compiling at -O1 or higher
results in the test failing due to a problem with how we
output eh info into the IR).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45285 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix unintented change from last commit
Nicolas Geoffray [Fri, 21 Dec 2007 12:22:29 +0000 (12:22 +0000)]
Fix unintented change from last commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45282 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEnable EH for linux/ppc32 targets
Nicolas Geoffray [Fri, 21 Dec 2007 12:19:44 +0000 (12:19 +0000)]
Enable EH for linux/ppc32 targets

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45281 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNew entry.
Evan Cheng [Fri, 21 Dec 2007 01:31:58 +0000 (01:31 +0000)]
New entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45280 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a few more missing gcc builtin's.
Evan Cheng [Fri, 21 Dec 2007 01:30:39 +0000 (01:30 +0000)]
Add a few more missing gcc builtin's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45278 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemoved scoped_ptr, as its functionality is subsumed by OwningPtr.
Ted Kremenek [Fri, 21 Dec 2007 00:15:29 +0000 (00:15 +0000)]
Removed scoped_ptr, as its functionality is subsumed by OwningPtr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45274 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix JIT encoding for CMPSD as well.
Evan Cheng [Thu, 20 Dec 2007 19:57:09 +0000 (19:57 +0000)]
Fix JIT encoding for CMPSD as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45268 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded OwningArrayPtr smart pointer class to provide an analogous class to
Ted Kremenek [Thu, 20 Dec 2007 19:53:47 +0000 (19:53 +0000)]
Added OwningArrayPtr smart pointer class to provide an analogous class to
OwningPtr except that it works for pointers to arrays.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45266 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd new smart pointer for clang.
Chris Lattner [Thu, 20 Dec 2007 19:14:02 +0000 (19:14 +0000)]
add new smart pointer for clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45261 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoType specification didn't match gcc's.
Evan Cheng [Thu, 20 Dec 2007 09:35:28 +0000 (09:35 +0000)]
Type specification didn't match gcc's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45260 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore accurate checks for two-address constraints.
Evan Cheng [Thu, 20 Dec 2007 09:25:31 +0000 (09:25 +0000)]
More accurate checks for two-address constraints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45259 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement review feedback, including additional transforms
Christopher Lamb [Thu, 20 Dec 2007 07:21:11 +0000 (07:21 +0000)]
Implement review feedback, including additional transforms

(icmp slt (sub A B) 1) -> (icmp sle A B)
icmp sgt (sub A B) -1) -> (icmp sge A B)

and add testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45256 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd m_Zero().
Chris Lattner [Thu, 20 Dec 2007 04:47:44 +0000 (04:47 +0000)]
Add m_Zero().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45255 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove xfail. This is fixed.
Evan Cheng [Thu, 20 Dec 2007 02:25:21 +0000 (02:25 +0000)]
Remove xfail. This is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45254 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe physical register + virtual register joining requirement was much too strict.
Evan Cheng [Thu, 20 Dec 2007 02:23:25 +0000 (02:23 +0000)]
The physical register + virtual register joining requirement was much too strict.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45253 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBring back a burr scheduling heuristic that's still needed.
Evan Cheng [Thu, 20 Dec 2007 02:22:36 +0000 (02:22 +0000)]
Bring back a burr scheduling heuristic that's still needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45252 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClean up previous patch: PHI uses should not prevent iv reuse if all other uses are...
Evan Cheng [Thu, 20 Dec 2007 02:20:53 +0000 (02:20 +0000)]
Clean up previous patch: PHI uses should not prevent iv reuse if all other uses are addresses. This trades a constant multiply for one fewer iv.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45251 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosimplify this code with the new m_Zero() pattern. Make sure the select only
Chris Lattner [Thu, 20 Dec 2007 01:56:58 +0000 (01:56 +0000)]
simplify this code with the new m_Zero() pattern.  Make sure the select only
has a single use, and generalize it to not require N to be a constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45250 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert my previous check-in.
Devang Patel [Thu, 20 Dec 2007 01:46:01 +0000 (01:46 +0000)]
Revert my previous check-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45249 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore eye-candy stuff :)
Anton Korobeynikov [Thu, 20 Dec 2007 01:30:27 +0000 (01:30 +0000)]
More eye-candy stuff :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45247 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd iterators for child traversal.
Anton Korobeynikov [Thu, 20 Dec 2007 01:21:50 +0000 (01:21 +0000)]
Add iterators for child traversal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45246 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdated comments to reflect what "side effects" means in this situation.
Bill Wendling [Thu, 20 Dec 2007 01:08:10 +0000 (01:08 +0000)]
Updated comments to reflect what "side effects" means in this situation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45245 91177308-0d34-0410-b5e6-96231b3b80d8