Chris Lattner
ebf5666abf
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
4e6cbb2fe2
this is done.
...
llvm-svn: 45408
2007-12-29 19:38:02 +00:00
Chris Lattner
d2b8a36f0e
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
0d90c8f016
upgrade this test
...
llvm-svn: 45406
2007-12-29 19:24:06 +00:00
Chris Lattner
3b6a82118b
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
33de0c6e92
this xform is implemented.
...
llvm-svn: 45404
2007-12-29 08:19:39 +00:00
Christopher Lamb
b053b80b79
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
2de9b85297
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
07ccbfa64a
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
5919b48fe9
don't fold fp_round(fp_extend(load)) -> fp_round(extload)
...
llvm-svn: 45400
2007-12-29 06:55:23 +00:00
Chris Lattner
8013bd339b
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
3f9c6a7260
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
62ba67c0f7
add a note
...
llvm-svn: 45397
2007-12-29 05:51:58 +00:00
Chris Lattner
7cafd92aa9
expand note.
...
llvm-svn: 45393
2007-12-29 01:05:01 +00:00
Chris Lattner
e96658392d
dead calls to llvm.stacksave can be deleted, even though they
...
have potential side-effects.
llvm-svn: 45392
2007-12-29 00:59:12 +00:00
Chris Lattner
bc03f70a07
upgrade this test
...
llvm-svn: 45391
2007-12-29 00:57:06 +00:00
Devang Patel
b57ff068cd
Test -simplifycfg only.
...
llvm-svn: 45389
2007-12-28 22:59:48 +00:00
Chris Lattner
9d53b611d1
add a note.
...
llvm-svn: 45388
2007-12-28 22:30:05 +00:00
Chris Lattner
d798002401
add a note.
...
llvm-svn: 45387
2007-12-28 21:50:40 +00:00
Owen Anderson
3de3f9981e
Add a testcase for my recent InstCombine fix, written by Nicholas.
...
llvm-svn: 45386
2007-12-28 21:08:43 +00:00
Owen Anderson
7363914ef7
Repair a transform that Chris noticed a bug in. Thanks to Nicholas for pointing out my stupid mistakes when writing this patch. :-)
...
llvm-svn: 45384
2007-12-28 07:42:12 +00:00
Chris Lattner
5179819beb
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.
llvm-svn: 45383
2007-12-28 06:24:31 +00:00
Chris Lattner
180f0e9044
add a note
...
llvm-svn: 45377
2007-12-28 04:42:05 +00:00
Anton Korobeynikov
4f00f531ad
Ignore functions with internal linkages during linking. This snipped mimics the
...
behaviour of LinkGlobals() function.
llvm-svn: 45375
2007-12-27 23:21:57 +00:00
Gordon Henriksen
05568bbd98
Adding bindings for target triple and data layout.
...
llvm-svn: 45369
2007-12-27 20:13:47 +00:00
Gordon Henriksen
823f9730d7
Switch the bindings to use LLVMFoldingBuilder.
...
llvm-svn: 45367
2007-12-27 18:25:59 +00:00
Gordon Henriksen
d4749de856
Adding an uninitialized builder constructor to the Ocaml bindings.
...
llvm-svn: 45362
2007-12-26 21:21:51 +00:00
Chris Lattner
bc13df19a8
one fewer uncond branch with my codegenprepare hack for single-mbb backedges.
...
llvm-svn: 45360
2007-12-26 17:23:47 +00:00
Gordon Henriksen
d89e645c38
Tests for changes made in r45356, where IPO optimizations would drop
...
collector algorithms.
llvm-svn: 45357
2007-12-26 02:47:37 +00:00
Gordon Henriksen
520e64c0c2
Fixing several transforms which would drop the collector attribute
...
when copying functions.
llvm-svn: 45356
2007-12-25 22:16:06 +00:00
Chris Lattner
bea11173f5
update to llvm 2.0 syntax.
...
llvm-svn: 45355
2007-12-25 20:34:52 +00:00
Chris Lattner
ef1bbfc762
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).
llvm-svn: 45354
2007-12-25 19:06:45 +00:00
Seo Sanghyeon
d42a60baa0
Actually parse q operation in llvm-ar
...
llvm-svn: 45353
2007-12-25 13:53:47 +00:00
Gordon Henriksen
f23d2a59c5
Disabling -g for ocaml builds; it's not downwards compatible.
...
llvm-svn: 45352
2007-12-25 08:37:43 +00:00
Gordon Henriksen
b969c5981b
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.
llvm-svn: 45351
2007-12-25 03:10:07 +00:00
Gordon Henriksen
fb56bde933
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.
llvm-svn: 45350
2007-12-25 02:31:26 +00:00
Gordon Henriksen
9157c499fc
Adjusting verification of "llvm.gc*" intrinsic prototypes to match
...
LangRef.
llvm-svn: 45349
2007-12-25 02:02:10 +00:00
Owen Anderson
bccb8c432d
Flesh out the Briggs implementation a little bit more, fix a few FIXMEs.
...
llvm-svn: 45347
2007-12-24 22:12:23 +00:00
Chris Lattner
62a806d565
add a -backedge-hack llc-beta option to codegenprepare.
...
When specified, don't split backedges of single-bb loops.
This helps address PR1877
llvm-svn: 45344
2007-12-24 19:32:55 +00:00
Chris Lattner
6c234bf58f
add a simple hack
...
llvm-svn: 45343
2007-12-24 19:27:46 +00:00
Anton Korobeynikov
ee6af40c95
Cygwin defines uint32_t as unsigned long. Unbreak call to std::min in this case
...
llvm-svn: 45342
2007-12-24 11:16:47 +00:00
Ted Kremenek
563b21b013
Added special support for stripping CRLF characters that may appear in the
...
output of nm.
llvm-svn: 45341
2007-12-24 08:04:39 +00:00
Gordon Henriksen
84c7325ca1
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.
llvm-svn: 45338
2007-12-23 20:58:16 +00:00
Owen Anderson
6d070f39b8
Get rid of an unneeded #include.
...
llvm-svn: 45337
2007-12-23 20:34:06 +00:00
Gordon Henriksen
83097d8818
Fix some Ocaml GC errors noticed upon review.
...
llvm-svn: 45336
2007-12-23 17:10:23 +00:00
Gordon Henriksen
2a8cd89d03
C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
...
llvm-svn: 45335
2007-12-23 16:59:28 +00:00
Owen Anderson
e110199916
Sketch out an implementation of Briggs' copy placement algorithm.
...
llvm-svn: 45334
2007-12-23 15:37:26 +00:00
Owen Anderson
ef41b910e5
Add GraphTraits specializations for machine dominators.
...
llvm-svn: 45333
2007-12-23 15:16:46 +00:00
Gordon Henriksen
e09a4f8515
Undo a wrong bit in that last patch.
...
llvm-svn: 45327
2007-12-22 23:34:26 +00:00
Gordon Henriksen
8790a22a30
Document a more robust implementation of performCustomLowering.
...
llvm-svn: 45326
2007-12-22 23:32:32 +00:00