Commit Graph

39551 Commits

Author SHA1 Message Date
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
Owen Anderson 5a4c05d047 Note what still needs doing.
llvm-svn: 45310
2007-12-22 04:59:10 +00:00
Owen Anderson 4534100765 Remove critical edge breaking. It won't be necessary as long as we are very careful when inserting copies.
llvm-svn: 45309
2007-12-22 04:50:11 +00:00
Gordon Henriksen 1621129e6b Ignoring generated files.
llvm-svn: 45308
2007-12-22 04:44:11 +00:00
Evan Cheng f4f52dbc8c Fix JIT code emission of X86::MovePCtoStack.
llvm-svn: 45307
2007-12-22 02:26:46 +00:00
Ted Kremenek dbc5385608 Added (incomplete) implementation of SimulEngine, a worklist-based dataflow
solver for path-sensitive, intra-procedural analysis.

llvm-svn: 45306
2007-12-22 01:43:37 +00:00
Devang Patel 7a2c66b11e 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.

llvm-svn: 45305
2007-12-22 01:32:53 +00:00
Evan Cheng ac134551c6 Allow JIT with non-static relocation model.
llvm-svn: 45304
2007-12-22 01:12:14 +00:00
Fariborz Jahanian 4f41b272c9 Another test case, testing a variety of objective-c type comparisons.
llvm-svn: 45302
2007-12-22 00:17:49 +00:00
Fariborz Jahanian 24e1a0bd35 Another test for objective-c's type comparison.
llvm-svn: 45301
2007-12-21 23:48:59 +00:00