oota-llvm.git
16 years agoRemove spurious warnings from GCC:
Bill Wendling [Sun, 16 Dec 2007 09:16:12 +0000 (09:16 +0000)]
Remove spurious warnings from GCC:

warning: suggest a space before ';' or explicit braces around empty
body in 'for' statement

Patch by Mike Stump (modified slightly by yours truly).

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

16 years agoBreak local interferences in StrongPHIElimination. One step closer...
Owen Anderson [Sun, 16 Dec 2007 05:44:27 +0000 (05:44 +0000)]
Break local interferences in StrongPHIElimination.  One step closer...

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

16 years agoA few more comments.
Owen Anderson [Sun, 16 Dec 2007 04:07:23 +0000 (04:07 +0000)]
A few more comments.

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

16 years agoDefine addString() and lookup() out-of-line to dissuade the C++ compiler from inlinin...
Anton Korobeynikov [Sun, 16 Dec 2007 01:36:16 +0000 (01:36 +0000)]
Define addString() and lookup() out-of-line to dissuade the C++ compiler from inlining it.

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

16 years agoProvide GraphTraits and DOTGraphTraits interface for Trie.
Anton Korobeynikov [Sun, 16 Dec 2007 01:27:04 +0000 (01:27 +0000)]
Provide GraphTraits and DOTGraphTraits interface for Trie.
Retoss private/public stuff.
Make copy ctor and operator= private.

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

16 years agoConstify graph arguments
Anton Korobeynikov [Sun, 16 Dec 2007 00:42:19 +0000 (00:42 +0000)]
Constify graph arguments

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

16 years agoUse references in DF iterators. This eliminates copy-ctor calls on huge objects ...
Anton Korobeynikov [Sat, 15 Dec 2007 22:23:24 +0000 (22:23 +0000)]
Use references in DF iterators. This eliminates copy-ctor calls on huge objects (graphs)

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

16 years agoThese are more correctly called signaling NaNs.
Duncan Sands [Sat, 15 Dec 2007 17:37:40 +0000 (17:37 +0000)]
These are more correctly called signaling NaNs.

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

16 years agoMake better use of instructions that clear high bits; fix various 2-wide shuffle...
Evan Cheng [Sat, 15 Dec 2007 03:00:47 +0000 (03:00 +0000)]
Make better use of instructions that clear high bits; fix various 2-wide shuffle bugs.

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

16 years ago__builtin_ia32_movqv4si is now expanded to a shuffle.
Evan Cheng [Sat, 15 Dec 2007 02:54:12 +0000 (02:54 +0000)]
__builtin_ia32_movqv4si is now expanded to a shuffle.

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

16 years agoStart committing working test cases for CellSPU.
Scott Michel [Sat, 15 Dec 2007 00:38:50 +0000 (00:38 +0000)]
Start committing working test cases for CellSPU.

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

16 years agoActually, MOVPQIto64mr is a dup of MOVPQI2QImr, MOV64toPQIrm is a dup of MOVQI2PQIrm.
Evan Cheng [Fri, 14 Dec 2007 20:08:14 +0000 (20:08 +0000)]
Actually, MOVPQIto64mr is a dup of MOVPQI2QImr, MOV64toPQIrm is a dup of MOVQI2PQIrm.

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

16 years agoFix (mem) <-> low 64-bits of xmm bugs pointed out by David Greene. Mac OS X Leopard...
Evan Cheng [Fri, 14 Dec 2007 19:54:07 +0000 (19:54 +0000)]
Fix (mem) <-> low 64-bits of xmm bugs pointed out by David Greene. Mac OS X Leopard assembler recognizes movq.

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

16 years agoTeach the interpreter to read and write memory in the
Duncan Sands [Fri, 14 Dec 2007 19:38:31 +0000 (19:38 +0000)]
Teach the interpreter to read and write memory in the
endianness of the target not of the host.  Done by the
simple expedient of reversing bytes for primitive types
if the host and target endianness don't match.  This is
correct for integer and pointer types.  I don't know if
it is correct for floating point types.

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

16 years agox86-32 long doubles are 4-byte aligned on the stack
Dale Johannesen [Fri, 14 Dec 2007 19:25:34 +0000 (19:25 +0000)]
x86-32 long doubles are 4-byte aligned on the stack
for parameter passing (only for that, on Darwin).

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

16 years agoFix bsf / bsr jit encoding.
Evan Cheng [Fri, 14 Dec 2007 18:49:43 +0000 (18:49 +0000)]
Fix bsf / bsr jit encoding.

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

16 years agoOops. Forgot these.
Evan Cheng [Fri, 14 Dec 2007 18:25:34 +0000 (18:25 +0000)]
Oops. Forgot these.

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

16 years agoAdd explicit keywords, and fix a minor typo that they uncovered.
Dan Gohman [Fri, 14 Dec 2007 15:41:34 +0000 (15:41 +0000)]
Add explicit keywords, and fix a minor typo that they uncovered.

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

16 years agoDon't redirect stderr when it isn't needed.
Dan Gohman [Fri, 14 Dec 2007 15:15:11 +0000 (15:15 +0000)]
Don't redirect stderr when it isn't needed.

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

16 years agoFix a typo in a comment.
Dan Gohman [Fri, 14 Dec 2007 15:13:08 +0000 (15:13 +0000)]
Fix a typo in a comment.

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

16 years agoFix a typo in a comment.
Dan Gohman [Fri, 14 Dec 2007 15:11:58 +0000 (15:11 +0000)]
Fix a typo in a comment.

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

16 years agoFix Intel asm syntax for the bsr and bsf instructions.
Dan Gohman [Fri, 14 Dec 2007 15:10:00 +0000 (15:10 +0000)]
Fix Intel asm syntax for the bsr and bsf instructions.

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

16 years agoFix ctlz and cttz. llvm definition requires them to return number of bits in of the...
Evan Cheng [Fri, 14 Dec 2007 08:30:15 +0000 (08:30 +0000)]
Fix ctlz and cttz. llvm definition requires them to return number of bits in of the src type when value is zero.

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

16 years agoBug fix. Must also match ResNo when matching an operand with a user.
Evan Cheng [Fri, 14 Dec 2007 08:25:15 +0000 (08:25 +0000)]
Bug fix. Must also match ResNo when matching an operand with a user.

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

16 years agoAll MMX shift instructions took a <2 x i32> vector as the shift amount parameter...
Anders Carlsson [Fri, 14 Dec 2007 06:38:54 +0000 (06:38 +0000)]
All MMX shift instructions took a <2 x i32> vector as the shift amount parameter. Change this to be <1 x i64> instead, which matches the assembler instruction.

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

16 years agoImplement ctlz and cttz with bsr and bsf.
Evan Cheng [Fri, 14 Dec 2007 02:13:44 +0000 (02:13 +0000)]
Implement ctlz and cttz with bsr and bsf.

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

16 years agoAdd flags to indicate that there are "never" side effects or that there "may be"
Bill Wendling [Fri, 14 Dec 2007 01:48:59 +0000 (01:48 +0000)]
Add flags to indicate that there are "never" side effects or that there "may be"
side effects for machine instructions.

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

16 years agoMake it more clear that some things that can't be done in .td files can
Dan Gohman [Thu, 13 Dec 2007 20:43:47 +0000 (20:43 +0000)]
Make it more clear that some things that can't be done in .td files can
still be done in the LLVM code generator. And update the summary for the
X86 target.

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

16 years agoMake these loops follow GetGEPOperands() behavior.
Wojciech Matyjewicz [Thu, 13 Dec 2007 16:22:58 +0000 (16:22 +0000)]
Make these loops follow GetGEPOperands() behavior.
Let: %q = GEP %p, X, ...
If %p is a GEP, we can chase baseptr further, only if X==0.

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

16 years agoFix typo.
Evan Cheng [Thu, 13 Dec 2007 07:50:36 +0000 (07:50 +0000)]
Fix typo.

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

16 years agoAdd register pairs to the list to check for local interferences.
Owen Anderson [Thu, 13 Dec 2007 05:53:03 +0000 (05:53 +0000)]
Add register pairs to the list to check for local interferences.

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

16 years agoRemove ugly and horrible code. It's not necessary for correctness, and can be added...
Owen Anderson [Thu, 13 Dec 2007 05:43:37 +0000 (05:43 +0000)]
Remove ugly and horrible code.  It's not necessary for correctness, and can be added back later if it causes code quality issues.

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

16 years agoBe extra careful with extension use optimation. Now turned on by default.
Evan Cheng [Thu, 13 Dec 2007 03:32:53 +0000 (03:32 +0000)]
Be extra careful with extension use optimation. Now turned on by default.

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

16 years agoApply CBE/MSIL patch to autoconf
Nate Begeman [Thu, 13 Dec 2007 02:24:45 +0000 (02:24 +0000)]
Apply CBE/MSIL patch to autoconf

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

16 years agoAdd install-libs target which only installs libraries, not tools
Nate Begeman [Thu, 13 Dec 2007 02:17:17 +0000 (02:17 +0000)]
Add install-libs target which only installs libraries, not tools

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

16 years agoRemove this testcase as it will always fail on
Zhou Sheng [Thu, 13 Dec 2007 02:03:57 +0000 (02:03 +0000)]
Remove this testcase as it will always fail on
platform like Darwin.

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

16 years agoDo not build CBackend and MSIL regardless of configured targets
Nate Begeman [Thu, 13 Dec 2007 01:18:52 +0000 (01:18 +0000)]
Do not build CBackend and MSIL regardless of configured targets

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

16 years agoFold some and + shift in x86 addressing mode.
Evan Cheng [Thu, 13 Dec 2007 00:43:27 +0000 (00:43 +0000)]
Fold some and + shift in x86 addressing mode.

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

16 years agoOops. Forgot these.
Evan Cheng [Thu, 13 Dec 2007 00:42:35 +0000 (00:42 +0000)]
Oops. Forgot these.

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

16 years agoFix for edge profiling, patch by 'Marc' for PR1857
Chris Lattner [Thu, 13 Dec 2007 00:04:46 +0000 (00:04 +0000)]
Fix for edge profiling, patch by 'Marc' for PR1857

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

16 years agoCosmetic change.
Evan Cheng [Wed, 12 Dec 2007 23:15:59 +0000 (23:15 +0000)]
Cosmetic change.

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

16 years agoImplicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable...
Evan Cheng [Wed, 12 Dec 2007 23:12:09 +0000 (23:12 +0000)]
Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.

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

16 years agoRemove host endianness info from TargetData and
Duncan Sands [Wed, 12 Dec 2007 23:03:45 +0000 (23:03 +0000)]
Remove host endianness info from TargetData and
put it in a new header System/Host.h instead.
Instead of getting the endianness from configure,
calculate it directly.

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

16 years agoRemove a forward-declaration for a non-existant class.
Dan Gohman [Wed, 12 Dec 2007 22:25:09 +0000 (22:25 +0000)]
Remove a forward-declaration for a non-existant class.

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

16 years agoAllow vector integer constants to be created with
Dan Gohman [Wed, 12 Dec 2007 22:21:26 +0000 (22:21 +0000)]
Allow vector integer constants to be created with
SelectionDAG::getConstant, in the same way as vector floating-point
constants. This allows the legalize expansion code for @llvm.ctpop and
friends to be usable with vector types.

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

16 years agoUse vector for child storage instead of map. This will also make
Anton Korobeynikov [Wed, 12 Dec 2007 19:08:44 +0000 (19:08 +0000)]
Use vector for child storage instead of map. This will also make
our life during future GraphTraits'ing slightly easier.

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

16 years agoRevert r44626, which turned off the use of readonly
Duncan Sands [Wed, 12 Dec 2007 16:01:40 +0000 (16:01 +0000)]
Revert r44626, which turned off the use of readonly
and readnone for functions with bodies because it
broke llvm-gcc-4.2 bootstrap.  It turns out that,
because of LLVM's array_ref hack, gcc was computing
pure/const attributes wrong (now fixed by turning
off the gcc ipa-pure-const pass).

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

16 years ago1. "Upgrage" comments.
Wojciech Matyjewicz [Wed, 12 Dec 2007 15:21:32 +0000 (15:21 +0000)]
1. "Upgrage" comments.
2. Using zero-extended value of Scale and unsigned division is safe provided
   that Scale doesn't have the sign bit set.
   Previously these 2 instructions:
        %p = bitcast [100 x {i8,i8,i8}]* %x to i8*
        %q = getelementptr i8* %p, i32 -4
   were combined into:
        %q = getelementptr [100 x { i8, i8, i8 }]* %x, i32 0,
               i32 1431655764, i32 0
   what was incorrect.

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

16 years agoRegenerate.
Christopher Lamb [Wed, 12 Dec 2007 08:45:45 +0000 (08:45 +0000)]
Regenerate.

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

16 years agoImplement part of review feedback for address spaces.
Christopher Lamb [Wed, 12 Dec 2007 08:44:39 +0000 (08:44 +0000)]
Implement part of review feedback for address spaces.

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

16 years agoUse shuffles to implement insert_vector_elt for i32, i64, f32, and f64.
Evan Cheng [Wed, 12 Dec 2007 07:55:34 +0000 (07:55 +0000)]
Use shuffles to implement insert_vector_elt for i32, i64, f32, and f64.

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

16 years agoAdd a test case for -optimize-ext-uses.
Evan Cheng [Wed, 12 Dec 2007 07:54:08 +0000 (07:54 +0000)]
Add a test case for -optimize-ext-uses.

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

16 years agoLower a build_vector with all constants into a constpool load unless it can be done...
Evan Cheng [Wed, 12 Dec 2007 06:45:40 +0000 (06:45 +0000)]
Lower a build_vector with all constants into a constpool load unless it can be done with a move to low part.

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

16 years agoAdd a guard to cxxabi header as other platform may
Zhou Sheng [Wed, 12 Dec 2007 06:16:47 +0000 (06:16 +0000)]
Add a guard to cxxabi header as other platform may
not support it.

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

16 years agoFixed PR1629.
Zhou Sheng [Wed, 12 Dec 2007 04:55:43 +0000 (04:55 +0000)]
Fixed PR1629.
Make lli interpreter correctly call external functions sin()/cos(),
__cxa_guard_acquire() and __cxa_guard_release().

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

16 years agoFix a bug in my previous patch, thanks to Jay Foad for
Chris Lattner [Wed, 12 Dec 2007 03:56:54 +0000 (03:56 +0000)]
Fix a bug in my previous patch, thanks to Jay Foad for
pointing this out and correcting the patch!

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

16 years agoDon't muck with phi nodes; bug fixes.
Evan Cheng [Wed, 12 Dec 2007 02:53:41 +0000 (02:53 +0000)]
Don't muck with phi nodes; bug fixes.

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

16 years agoCorrect typo for Linux: s/esp/%rsp/
Scott Michel [Wed, 12 Dec 2007 02:38:28 +0000 (02:38 +0000)]
Correct typo for Linux: s/esp/%rsp/

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

16 years agoBit masks conflicted. Needed to bump them by one.
Bill Wendling [Wed, 12 Dec 2007 01:51:58 +0000 (01:51 +0000)]
Bit masks conflicted. Needed to bump them by one.

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

16 years agoForgot to remove a register from the PHI-union after I'd determined that it
Owen Anderson [Wed, 12 Dec 2007 01:25:08 +0000 (01:25 +0000)]
Forgot to remove a register from the PHI-union after I'd determined that it
interfered with other registers.  Seems like that might be a good thing to do. :-)

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

16 years agoAdd (very basic) bindings for ModuleProvider.
Gordon Henriksen [Wed, 12 Dec 2007 01:04:30 +0000 (01:04 +0000)]
Add (very basic) bindings for ModuleProvider.

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

16 years agoBug fix. Only safe to perform extension uses optimization if the source of extension...
Evan Cheng [Wed, 12 Dec 2007 00:51:06 +0000 (00:51 +0000)]
Bug fix. Only safe to perform extension uses optimization if the source of extension is also defined in the same BB as the extension.

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

16 years agoChanges from Curtis Dunham implementing lazy cycle detection algorithm.
Daniel Berlin [Wed, 12 Dec 2007 00:37:04 +0000 (00:37 +0000)]
Changes from Curtis Dunham implementing lazy cycle detection algorithm.
Changes from me implementing different way of representing points-to anything.
Changes from me that improve slightly on LCD.

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

16 years agoIf deleting a reload instruction due to reuse (value is available in register R and...
Evan Cheng [Tue, 11 Dec 2007 23:36:57 +0000 (23:36 +0000)]
If deleting a reload instruction due to reuse (value is available in register R and reload is targeting R), make sure to invalidate the kill information of the last kill.

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

16 years agoNeed to grow the indexed map. Added debug statements.
Bill Wendling [Tue, 11 Dec 2007 23:27:51 +0000 (23:27 +0000)]
Need to grow the indexed map. Added debug statements.

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

16 years agoSimplify slightly.
Bill Wendling [Tue, 11 Dec 2007 22:22:22 +0000 (22:22 +0000)]
Simplify slightly.

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

16 years agoRemove Trie::Edge class. Now edge labels are stored into nodes itself.
Anton Korobeynikov [Tue, 11 Dec 2007 21:55:38 +0000 (21:55 +0000)]
Remove Trie::Edge class. Now edge labels are stored into nodes itself.

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

16 years agoMore progress on StrongPHIElimination. Now we actually USE the DomForest!
Owen Anderson [Tue, 11 Dec 2007 20:12:11 +0000 (20:12 +0000)]
More progress on StrongPHIElimination.  Now we actually USE the DomForest!

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

16 years agoBlark! How in the world did this work without this?!
Bill Wendling [Tue, 11 Dec 2007 19:40:06 +0000 (19:40 +0000)]
Blark! How in the world did this work without this?!

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

16 years ago- Update the virtual reg to machine instruction map when hoisting.
Bill Wendling [Tue, 11 Dec 2007 19:17:04 +0000 (19:17 +0000)]
- Update the virtual reg to machine instruction map when hoisting.
- Fix subtle bug when creating initially creating this map.

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

16 years agoChecking for "zero operands" during the "CanHoistInst()" method isn't necessary
Bill Wendling [Tue, 11 Dec 2007 18:45:11 +0000 (18:45 +0000)]
Checking for "zero operands" during the "CanHoistInst()" method isn't necessary
because those with side effects will be caught by other checks in here.

Also, simplify the check for a BB in a sub loop.

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

16 years agoAllow the JIT to encode MMX instructions
Nate Begeman [Tue, 11 Dec 2007 18:06:14 +0000 (18:06 +0000)]
Allow the JIT to encode MMX instructions

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

16 years agoUse correct member access operator.
Wojciech Matyjewicz [Tue, 11 Dec 2007 17:46:25 +0000 (17:46 +0000)]
Use correct member access operator.
(my test commit as well)

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

16 years agoRename these tests to use the appropriate suffixes.
Dan Gohman [Tue, 11 Dec 2007 15:55:52 +0000 (15:55 +0000)]
Rename these tests to use the appropriate suffixes.

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

16 years agoUse not instead of ignore when an exit status is expected to always
Dan Gohman [Tue, 11 Dec 2007 15:50:23 +0000 (15:50 +0000)]
Use not instead of ignore when an exit status is expected to always
be non-zero.

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

16 years agoDon't redirect stderr when it isn't needed.
Dan Gohman [Tue, 11 Dec 2007 15:41:11 +0000 (15:41 +0000)]
Don't redirect stderr when it isn't needed.

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

16 years agoFix compilation.
Duncan Sands [Tue, 11 Dec 2007 12:20:47 +0000 (12:20 +0000)]
Fix compilation.

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

16 years agoUpdate credits.
Christopher Lamb [Tue, 11 Dec 2007 09:32:07 +0000 (09:32 +0000)]
Update credits.

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

16 years agoAdd information on address space qualifiers for pointer types and global
Christopher Lamb [Tue, 11 Dec 2007 09:31:00 +0000 (09:31 +0000)]
Add information on address space qualifiers for pointer types and global
declarations to the LangRef.

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

16 years agoRegenerate.
Christopher Lamb [Tue, 11 Dec 2007 09:02:08 +0000 (09:02 +0000)]
Regenerate.

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

16 years agoImplement address space attribute for LLVM pointer types. Address spaces are
Christopher Lamb [Tue, 11 Dec 2007 08:59:05 +0000 (08:59 +0000)]
Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the
Embedded C Technical Report.

This also implements the 2007-12-11-AddressSpaces test,
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards
compatible manner), such that the pointer type, rather than the pointee type, is
encoded. This permits type information in the pointer (e.g. address space) to be
preserved for stores.

LangRef updates are forthcoming.

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

16 years agoTeach VMCore to constant fold shufflevectors with constant operands.
Chris Lattner [Tue, 11 Dec 2007 07:49:37 +0000 (07:49 +0000)]
Teach VMCore to constant fold shufflevectors with constant operands.
This allows us to compile:

#include <emmintrin.h>
typedef __m128i VSInt16;
typedef short vSInt16 __attribute__ ((__vector_size__ (16)));
VSInt16 t3() {
  return (VSInt16)((vSInt16)_mm_set1_epi16(6518));
}

into:

_t3:
movaps LCPI1_0, %xmm0
ret

instead of:
_t3:
movl $6518, %eax
movd %eax, %xmm0
pextrw $0, %xmm0, %eax
xorps %xmm0, %xmm0
pinsrw $0, %eax, %xmm0
punpcklwd %xmm0, %xmm0
pshufd $0, %xmm0, %xmm0
ret

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

16 years agoImplement constant folding if vector<->vector bitcasts where the number
Chris Lattner [Tue, 11 Dec 2007 07:29:44 +0000 (07:29 +0000)]
Implement constant folding if vector<->vector bitcasts where the number
of source/dest elements changes.  This implements
test/Transforms/InstCombine/bitcast-vector-fold.ll

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

16 years agoDon't have APInt.cpp depend upon DerivedTypes.h. This helps with splitting the
Reid Spencer [Tue, 11 Dec 2007 06:53:58 +0000 (06:53 +0000)]
Don't have APInt.cpp depend upon DerivedTypes.h. This helps with splitting the
Support libraries separately into their own module.

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

16 years agoAdd first and really dirty version of generic Trie structure
Anton Korobeynikov [Tue, 11 Dec 2007 06:53:44 +0000 (06:53 +0000)]
Add first and really dirty version of generic Trie structure

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

16 years agosignificantly simplify some code, no functionality change.
Chris Lattner [Tue, 11 Dec 2007 06:07:39 +0000 (06:07 +0000)]
significantly simplify some code, no functionality change.

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

16 years agorefactor some code, no functionality change.
Chris Lattner [Tue, 11 Dec 2007 05:55:02 +0000 (05:55 +0000)]
refactor some code, no functionality change.

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

16 years agoSwitch over to MachineLoopInfo.
Evan Cheng [Tue, 11 Dec 2007 02:09:15 +0000 (02:09 +0000)]
Switch over to MachineLoopInfo.

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

16 years agoPretty print shuffle mask operand.
Evan Cheng [Tue, 11 Dec 2007 02:08:35 +0000 (02:08 +0000)]
Pretty print shuffle mask operand.

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

16 years ago- Improved v8i16 shuffle lowering. It now uses pshuflw and pshufhw as much as
Evan Cheng [Tue, 11 Dec 2007 01:46:18 +0000 (01:46 +0000)]
- Improved v8i16 shuffle lowering. It now uses pshuflw and pshufhw as much as
possible before resorting to pextrw and pinsrw.
- Better codegen for v4i32 shuffles masquerading as v8i16 or v16i8 shuffles.
- Improves (i16 extract_vector_element 0) codegen by recognizing
  (i32 extract_vector_element 0) does not require a pextrw.

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

16 years agox86 doesn't actually want to custom lower v3i32
Nate Begeman [Tue, 11 Dec 2007 01:41:33 +0000 (01:41 +0000)]
x86 doesn't actually want to custom lower v3i32

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

16 years agoCollectorMetadata and Collector are rejiggered to get along with
Gordon Henriksen [Tue, 11 Dec 2007 00:30:17 +0000 (00:30 +0000)]
CollectorMetadata and Collector are rejiggered to get along with
per-function collector model. Collector is now the factory for
CollectorMetadata, so the latter may be subclassed.

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

16 years agoProject file maintenance.
Gordon Henriksen [Tue, 11 Dec 2007 00:29:16 +0000 (00:29 +0000)]
Project file maintenance.

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

16 years agoMove TargetData::hostIsLittleEndian out of line, which means we
Chris Lattner [Tue, 11 Dec 2007 00:28:59 +0000 (00:28 +0000)]
Move TargetData::hostIsLittleEndian out of line, which means we
don't have to #include config.h in it.  #including config.h breaks
other projects that have their own autoconf stuff and try to #include
the llvm headers.  One obscure example is llvm-gcc.

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

16 years agoAdding Ocaml bindings for the bitreader as requested by Sarah
Gordon Henriksen [Tue, 11 Dec 2007 00:20:48 +0000 (00:20 +0000)]
Adding Ocaml bindings for the bitreader as requested by Sarah
Thompson. Usage should be something like this:

open Llvm
open Llvm_bitreader

match read_bitcode_file fn with
  | Bitreader_failure msg ->
      prerr_endline msg
  | Bitreader_success m ->
      ...;
      dispose_module m

Compile with: ocamlc llvm.cma llvm_bitreader.cma
              ocamlopt llvm.cmxa llvm_bitreader.cmxa

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

16 years agoHey, English is not my native language :)
Anton Korobeynikov [Mon, 10 Dec 2007 23:10:20 +0000 (23:10 +0000)]
Hey, English is not my native language :)

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

16 years agoClarify the need of CFI() stuff
Anton Korobeynikov [Mon, 10 Dec 2007 23:08:35 +0000 (23:08 +0000)]
Clarify the need of CFI() stuff

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

16 years agoProvide convenient way to disable CFI stuff for old/broken assemblers.
Anton Korobeynikov [Mon, 10 Dec 2007 23:04:38 +0000 (23:04 +0000)]
Provide convenient way to disable CFI stuff for old/broken assemblers.
Use it for Darwin.

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

16 years agoFix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Chris Lattner [Mon, 10 Dec 2007 22:53:04 +0000 (22:53 +0000)]
Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

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

16 years agoAdded two bounds checks to the BitVector class to detect
Ted Kremenek [Mon, 10 Dec 2007 22:28:35 +0000 (22:28 +0000)]
Added two bounds checks to the BitVector class to detect
out-of-bounds bit accesses.  The checks are only performed
in a Debug build.

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