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
Anders Carlsson
c9d41e7d27
No need to do work that the folding builder does for us.
...
llvm-svn: 45361
2007-12-26 18:20:19 +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
Seo Sanghyeon
acb00f4a73
Remove broken assert from CodeGen. Better check is done in Sema.
...
llvm-svn: 45358
2007-12-26 05:21:37 +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
Christopher Lamb
2b84813441
Make output files binary mode for -emit-llvm-bc
...
llvm-svn: 45348
2007-12-24 23:49:33 +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
Christopher Lamb
d01dea749e
Almost the best possible handling of stdin/stdout for llvm-emit-bc!
...
llvm-svn: 45346
2007-12-24 20:59:36 +00:00
Christopher Lamb
1c0f5d2436
Better handing of stdin/stdout for -emit-llvm-bc
...
llvm-svn: 45345
2007-12-24 20:56:07 +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
Christopher Lamb
5a3416409f
Allow bitcode output to be redirected to stdout.
...
llvm-svn: 45340
2007-12-24 03:23:55 +00:00
Seo Sanghyeon
76270e6be6
Implement -emit-llvm-bc option
...
llvm-svn: 45339
2007-12-24 01:52:34 +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
Seo Sanghyeon
6f1b274976
String literal in aggregate expression
...
llvm-svn: 45330
2007-12-23 03:11:58 +00:00
Chris Lattner
b907c3fca1
remove use of alloca.
...
llvm-svn: 45329
2007-12-23 01:40:15 +00:00
Anton Korobeynikov
03f8a3630d
Unbreak mingw build
...
llvm-svn: 45328
2007-12-23 01:19:32 +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
Chris Lattner
00602f6105
fix some warnings. This code needs to be de-tabified :(
...
llvm-svn: 45325
2007-12-22 22:47:03 +00:00
Chris Lattner
91f3379660
fix strict-aliasing violation
...
llvm-svn: 45324
2007-12-22 22:45:38 +00:00
Chris Lattner
de272b1b63
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
afc8f13bf5
improve support for fgetsign
...
llvm-svn: 45322
2007-12-22 21:26:52 +00:00
Chris Lattner
efd1cddb5a
Tell TargetLoweringOpt whether it is running before
...
or after legalize.
llvm-svn: 45321
2007-12-22 20:56:36 +00:00
Chris Lattner
843cad4df2
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
1b1250770c
Erm, really disable :)
...
llvm-svn: 45319
2007-12-22 20:46:24 +00:00
Anton Korobeynikov
d34112a4ee
Disable, until we'll really need it
...
llvm-svn: 45318
2007-12-22 20:41:12 +00:00
Gordon Henriksen
0c43064daf
Fix a partial application typo.
...
llvm-svn: 45317
2007-12-22 19:41:30 +00:00
Gordon Henriksen
41689b52ab
Use getIntrinsicID instead of looking up intrinsic prototypes. Also
...
fixes a bug with indirect calls. (Test case will be included with
ocaml collector patch.)
llvm-svn: 45316
2007-12-22 17:27:01 +00:00
Anton Korobeynikov
eed7c0b9f7
Unbreak build on gcc 3.x
...
llvm-svn: 45315
2007-12-22 14:27:49 +00:00
Anton Korobeynikov
2ffb2c9e59
Unbreak mingw build
...
llvm-svn: 45314
2007-12-22 14:26:49 +00:00
Evan Cheng
345a00ba05
Preliminary PIC JIT support for X86 (32-bit) / Darwin.
...
llvm-svn: 45313
2007-12-22 09:40:20 +00:00
Evan Cheng
db33a0211b
Oops.
...
llvm-svn: 45312
2007-12-22 09:14:34 +00:00
Chris Lattner
74b2ab59fd
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.
llvm-svn: 45311
2007-12-22 09:07:47 +00:00