Chris Lattner
f8e408b7b1
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
78ae7ff876
don't fold fp_round(fp_extend(load)) -> fp_round(extload)
...
llvm-svn: 45400
2007-12-29 06:55:23 +00:00
Chris Lattner
e3515220d2
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
7cb2de8e48
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
ac72965e02
add a note
...
llvm-svn: 45397
2007-12-29 05:51:58 +00:00
Chris Lattner
78c7878ca4
expand note.
...
llvm-svn: 45393
2007-12-29 01:05:01 +00:00
Chris Lattner
2369d2f4ab
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
e26989231e
upgrade this test
...
llvm-svn: 45391
2007-12-29 00:57:06 +00:00
Devang Patel
d601ada369
Test -simplifycfg only.
...
llvm-svn: 45389
2007-12-28 22:59:48 +00:00
Chris Lattner
b8e060f7a6
add a note.
...
llvm-svn: 45388
2007-12-28 22:30:05 +00:00
Chris Lattner
2248a22bda
add a note.
...
llvm-svn: 45387
2007-12-28 21:50:40 +00:00
Owen Anderson
ddb5d73f0a
Add a testcase for my recent InstCombine fix, written by Nicholas.
...
llvm-svn: 45386
2007-12-28 21:08:43 +00:00
Owen Anderson
ebd3e9c500
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
2456399ce5
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
e53df84267
add a note
...
llvm-svn: 45377
2007-12-28 04:42:05 +00:00
Anton Korobeynikov
f12327cd32
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
86e98275ff
Adding bindings for target triple and data layout.
...
llvm-svn: 45369
2007-12-27 20:13:47 +00:00
Gordon Henriksen
d96b3222e5
Switch the bindings to use LLVMFoldingBuilder.
...
llvm-svn: 45367
2007-12-27 18:25:59 +00:00
Gordon Henriksen
997a800e99
Adding an uninitialized builder constructor to the Ocaml bindings.
...
llvm-svn: 45362
2007-12-26 21:21:51 +00:00
Chris Lattner
a432f12b76
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
e8226d70a9
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
90d48b077d
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
233cd2bbcd
update to llvm 2.0 syntax.
...
llvm-svn: 45355
2007-12-25 20:34:52 +00:00
Chris Lattner
90df7f7424
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
28edc56597
Actually parse q operation in llvm-ar
...
llvm-svn: 45353
2007-12-25 13:53:47 +00:00
Gordon Henriksen
653a9e4c7f
Disabling -g for ocaml builds; it's not downwards compatible.
...
llvm-svn: 45352
2007-12-25 08:37:43 +00:00
Gordon Henriksen
c0a3899bbf
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
a9f4ed4070
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
44841db057
Adjusting verification of "llvm.gc*" intrinsic prototypes to match
...
LangRef.
llvm-svn: 45349
2007-12-25 02:02:10 +00:00
Owen Anderson
1064e276a9
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
7e1e1f2933
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
232e097cff
add a simple hack
...
llvm-svn: 45343
2007-12-24 19:27:46 +00:00
Anton Korobeynikov
a0113f6c70
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
3ba98109c9
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
3e409a37ac
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
7133e76b12
Get rid of an unneeded #include.
...
llvm-svn: 45337
2007-12-23 20:34:06 +00:00
Gordon Henriksen
2d254558ca
Fix some Ocaml GC errors noticed upon review.
...
llvm-svn: 45336
2007-12-23 17:10:23 +00:00
Gordon Henriksen
606ac32019
C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
...
llvm-svn: 45335
2007-12-23 16:59:28 +00:00
Owen Anderson
e9538b78ce
Sketch out an implementation of Briggs' copy placement algorithm.
...
llvm-svn: 45334
2007-12-23 15:37:26 +00:00
Owen Anderson
5db3336e50
Add GraphTraits specializations for machine dominators.
...
llvm-svn: 45333
2007-12-23 15:16:46 +00:00
Gordon Henriksen
c9025501ea
Undo a wrong bit in that last patch.
...
llvm-svn: 45327
2007-12-22 23:34:26 +00:00
Gordon Henriksen
586644cc15
Document a more robust implementation of performCustomLowering.
...
llvm-svn: 45326
2007-12-22 23:32:32 +00:00
Chris Lattner
a2156b160a
fix some warnings. This code needs to be de-tabified :(
...
llvm-svn: 45325
2007-12-22 22:47:03 +00:00
Chris Lattner
1c6a1f71cb
fix strict-aliasing violation
...
llvm-svn: 45324
2007-12-22 22:45:38 +00:00
Chris Lattner
084002dcb0
initial code for forming an FGETSIGN node. This is disabled until
...
legalizer support goes in.
llvm-svn: 45323
2007-12-22 21:35:38 +00:00
Chris Lattner
24b2a6de5c
improve support for fgetsign
...
llvm-svn: 45322
2007-12-22 21:26:52 +00:00
Chris Lattner
a8f6fac7a3
Tell TargetLoweringOpt whether it is running before
...
or after legalize.
llvm-svn: 45321
2007-12-22 20:56:36 +00:00
Chris Lattner
f2aa80e0de
Add a new FGETSIGN operation, which defaults to expand on all
...
targets.
llvm-svn: 45320
2007-12-22 20:47:56 +00:00
Anton Korobeynikov
4275f59e61
Erm, really disable :)
...
llvm-svn: 45319
2007-12-22 20:46:24 +00:00
Anton Korobeynikov
9f148a1a2a
Disable, until we'll really need it
...
llvm-svn: 45318
2007-12-22 20:41:12 +00:00