oota-llvm.git
16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 years agoMore working CellSPU tests:
Scott Michel [Thu, 20 Dec 2007 00:44:13 +0000 (00:44 +0000)]
More working CellSPU tests:
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads

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

16 years agoAdd lto version check mechanism.
Devang Patel [Thu, 20 Dec 2007 00:24:01 +0000 (00:24 +0000)]
Add lto version check mechanism.

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

16 years agoUse a module to group calling convention values, too.
Gordon Henriksen [Thu, 20 Dec 2007 00:13:26 +0000 (00:13 +0000)]
Use a module to group calling convention values, too.

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

16 years agoAllow iv reuse if the user is a PHI node which is in turn used as addresses.
Evan Cheng [Wed, 19 Dec 2007 23:33:23 +0000 (23:33 +0000)]
Allow iv reuse if the user is a PHI node which is in turn used as addresses.

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

16 years agoUsing modules to group enumerations in Ocaml bindings.
Gordon Henriksen [Wed, 19 Dec 2007 22:54:12 +0000 (22:54 +0000)]
Using modules to group enumerations in Ocaml bindings.

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

16 years agoAdding bindings for memory buffers and module providers. Switching
Gordon Henriksen [Wed, 19 Dec 2007 22:30:40 +0000 (22:30 +0000)]
Adding bindings for memory buffers and module providers. Switching
to exceptions rather than variants for error handling in Ocaml.

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

16 years agoEnable EH on PPC Darwin. This basically works; there
Dale Johannesen [Wed, 19 Dec 2007 21:54:36 +0000 (21:54 +0000)]
Enable EH on PPC Darwin.  This basically works; there
are a couple of issues that show up with the optimizer,
but I don't think they're really EH problems.
(llvm-gcc testsuite users note:  By default the testsuite
uses the unwinding code that's built as part of your local
llvm-gcc, which does not work.  You need to trick it into
using the installed system unwinding code to get useful
results.)

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

16 years agoCellSPU testcase, extract_elt.ll: extract vector element.
Scott Michel [Wed, 19 Dec 2007 21:17:42 +0000 (21:17 +0000)]
CellSPU testcase, extract_elt.ll: extract vector element.

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

16 years agoWhen inlining through an 'nounwind' call, mark inlined
Duncan Sands [Wed, 19 Dec 2007 21:13:37 +0000 (21:13 +0000)]
When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'.  It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.

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

16 years agoMore working CellSPU test cases:
Scott Michel [Wed, 19 Dec 2007 20:50:49 +0000 (20:50 +0000)]
More working CellSPU test cases:
- call.ll: Function call
- ctpop.ll: Count population
- dp_farith.ll: DP arithmetic
- eqv.ll: Equivalence primitives
- fcmp.ll: SP comparisons
- fdiv.ll: SP division
- fneg-fabs.ll: SP negation, aboslute value
- int2fp.ll: Integer -> SP conversion
- rotate_ops.ll: Rotation primitives
- select_bits.ll: (a & c) | (b & ~c) bit selection
- shift_ops.ll: Shift primitives
- sp_farith.ll: SP arithmentic

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

16 years agoTwo more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
Scott Michel [Wed, 19 Dec 2007 20:15:47 +0000 (20:15 +0000)]
Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
(vector insertions)

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

16 years agofix formatting
Chris Lattner [Wed, 19 Dec 2007 19:48:49 +0000 (19:48 +0000)]
fix formatting

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

16 years agoSimplify LowerCallTo by using a callsite.
Duncan Sands [Wed, 19 Dec 2007 09:48:52 +0000 (09:48 +0000)]
Simplify LowerCallTo by using a callsite.

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

16 years agoThe C++ exception handling personality function wants
Duncan Sands [Wed, 19 Dec 2007 07:36:31 +0000 (07:36 +0000)]
The C++ exception handling personality function wants
to know about calls that cannot throw ('nounwind'):
if such a call does throw for some reason then the
personality will terminate the program.  The distinction
between an ordinary call and a nounwind call is that
an ordinary call gets an entry in the exception table
but a nounwind call does not.  This patch sets up the
exception table appropriately.  One oddity is that
I've chosen to bracket nounwind calls with labels (like
invokes) - the other choice would have been to bracket
ordinary calls with labels.  While bracketing
ordinary calls is more natural (because bracketing
by labels would then correspond exactly to getting an
entry in the exception table), I didn't do it because
introducing labels impedes some optimizations and I'm
guessing that ordinary calls occur more often than
nounwind calls.  This fixes the gcc filter2 eh test,
at least at -O0 (the inliner needs some tweaking at
higher optimization levels).

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

16 years agoAdd new immed16.ll test case, fix CellSPU errata to make test case work.
Scott Michel [Wed, 19 Dec 2007 07:35:06 +0000 (07:35 +0000)]
Add new immed16.ll test case, fix CellSPU errata to make test case work.

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

16 years agoModified to support comments better.
Bill Wendling [Wed, 19 Dec 2007 06:20:05 +0000 (06:20 +0000)]
Modified to support comments better.

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

16 years agoMark the "isRemat" instruction as never having side effects.
Bill Wendling [Wed, 19 Dec 2007 06:07:48 +0000 (06:07 +0000)]
Mark the "isRemat" instruction as never having side effects.

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

16 years agofix more table abuses.
Chris Lattner [Wed, 19 Dec 2007 05:04:11 +0000 (05:04 +0000)]
fix more table abuses.

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

16 years agoDon't leave newly created nodes around if it turns out they are not needed.
Evan Cheng [Wed, 19 Dec 2007 01:34:38 +0000 (01:34 +0000)]
Don't leave newly created nodes around if it turns out they are not needed.

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

16 years agoAdded "GetCurrentDirectory()" to sys::Path.
Ted Kremenek [Tue, 18 Dec 2007 22:07:33 +0000 (22:07 +0000)]
Added "GetCurrentDirectory()" to sys::Path.

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

16 years agoAdd debugging info. Use the newly created "hasUnmodelledSideEffects" method.
Bill Wendling [Tue, 18 Dec 2007 21:38:04 +0000 (21:38 +0000)]
Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.

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

16 years agoFold subtracts into integer compares vs. zero. This improves generate code for this...
Christopher Lamb [Tue, 18 Dec 2007 21:32:20 +0000 (21:32 +0000)]
Fold subtracts into integer compares vs. zero. This improves generate code for this case on X86
from
_foo:
        movl    $99, %ecx
        movl    4(%esp), %eax
        subl    %eax, %ecx
        xorl    %edx, %edx
        testl   %ecx, %ecx
        cmovs   %edx, %eax
        ret

to
_foo:
        xorl    %ecx, %ecx
        movl    4(%esp), %eax
        cmpl    $99, %eax
        cmovg   %ecx, %eax
        ret

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

16 years agoSupport more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).
Anton Korobeynikov [Tue, 18 Dec 2007 20:53:41 +0000 (20:53 +0000)]
Support more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).

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

16 years agoFix comments
Christopher Lamb [Tue, 18 Dec 2007 20:33:11 +0000 (20:33 +0000)]
Fix comments

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

16 years agoRemove an orthogonal transformation of the selection condition from my most recent...
Christopher Lamb [Tue, 18 Dec 2007 20:30:28 +0000 (20:30 +0000)]
Remove an orthogonal transformation of the selection condition from my most recent submission.

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

16 years agoAdded "isDirectory" method to llvm::sys::Path.
Ted Kremenek [Tue, 18 Dec 2007 19:46:22 +0000 (19:46 +0000)]
Added "isDirectory" method to llvm::sys::Path.

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

16 years agoFix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store...
Evan Cheng [Tue, 18 Dec 2007 19:38:14 +0000 (19:38 +0000)]
Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store node id.

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

16 years agoIgnore shell scripts when doing "dsymutil" call.
Bill Wendling [Tue, 18 Dec 2007 19:21:52 +0000 (19:21 +0000)]
Ignore shell scripts when doing "dsymutil" call.

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

16 years agoremove obviously dead uses of IncludeFile.
Chris Lattner [Tue, 18 Dec 2007 19:15:48 +0000 (19:15 +0000)]
remove obviously dead uses of IncludeFile.

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

16 years agoAlso print alignment and volatileness.
Evan Cheng [Tue, 18 Dec 2007 19:06:30 +0000 (19:06 +0000)]
Also print alignment and volatileness.

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

16 years agoremove a dead annotation
Chris Lattner [Tue, 18 Dec 2007 19:04:24 +0000 (19:04 +0000)]
remove a dead annotation

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

16 years agoAdded some sectioning comments to Serialize.h.
Ted Kremenek [Tue, 18 Dec 2007 18:25:55 +0000 (18:25 +0000)]
Added some sectioning comments to Serialize.h.
Added additional serialization functors for use with std::foreach.

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

16 years agoadd an obvious load folding missed optzn.
Chris Lattner [Tue, 18 Dec 2007 16:48:14 +0000 (16:48 +0000)]
add an obvious load folding missed optzn.

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

16 years agoRename isNoReturn to doesNotReturn, and isNoUnwind to
Duncan Sands [Tue, 18 Dec 2007 09:59:50 +0000 (09:59 +0000)]
Rename isNoReturn to doesNotReturn, and isNoUnwind to
doesNotThrow.

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

16 years agoFix typos.
Christopher Lamb [Tue, 18 Dec 2007 09:45:40 +0000 (09:45 +0000)]
Fix typos.

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

16 years agoFold certain additions through selects (and their compares) so as to eliminate subtra...
Christopher Lamb [Tue, 18 Dec 2007 09:34:41 +0000 (09:34 +0000)]
Fold certain additions through selects (and their compares) so as to eliminate subtractions. This code is often produced by the SMAX expansion in SCEV.

This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll

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

16 years agoFIX for PR1799: When a load is unfolded from an instruction, check if it is a new...
Evan Cheng [Tue, 18 Dec 2007 08:42:10 +0000 (08:42 +0000)]
FIX for PR1799: When a load is unfolded from an instruction, check if it is a new node. If not, do not create a new SUnit.

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

16 years agoSelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.
Evan Cheng [Tue, 18 Dec 2007 07:02:08 +0000 (07:02 +0000)]
SelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.

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