oota-llvm.git
15 years agoMove this to the proper section.
Gordon Henriksen [Thu, 5 Jun 2008 12:51:50 +0000 (12:51 +0000)]
Move this to the proper section.

I misread Optimizer Improvements as Other Improvements for some reason.

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

15 years agoAdding release notes for bindings improvements.
Gordon Henriksen [Thu, 5 Jun 2008 12:48:32 +0000 (12:48 +0000)]
Adding release notes for bindings improvements.

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

15 years agoLet StructRetPromotion check if all if its users are really calls or invokesn,
Matthijs Kooijman [Thu, 5 Jun 2008 08:57:20 +0000 (08:57 +0000)]
Let StructRetPromotion check if all if its users are really calls or invokesn,
not other instructions. This fixes a crash with the added testcase.

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

15 years agoLet StructRetPromotion check if it's users are really calling it and not
Matthijs Kooijman [Thu, 5 Jun 2008 08:48:32 +0000 (08:48 +0000)]
Let StructRetPromotion check if it's users are really calling it and not
passing its pointer. Fixes test with added testcase.

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

15 years agoUse use_iterator::getOperandNo instead of CallSite::hasArgument to check if a
Matthijs Kooijman [Thu, 5 Jun 2008 08:34:25 +0000 (08:34 +0000)]
Use use_iterator::getOperandNo instead of CallSite::hasArgument to check if a
function is passed as an argument instead of called. Also do this check a bit
earlier.

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

15 years ago * Make CallSite::hasArgument const and let it take a const parameter.
Matthijs Kooijman [Thu, 5 Jun 2008 08:04:58 +0000 (08:04 +0000)]
 * Make CallSite::hasArgument const and let it take a const parameter.

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

15 years agomore updates and random notes, including changes up through Week-of-Mon-20080324.
Chris Lattner [Thu, 5 Jun 2008 08:02:49 +0000 (08:02 +0000)]
more updates and random notes, including changes up through Week-of-Mon-20080324.

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

15 years agoUpdate comments and documentation to reflect that GCSE and ValueNumbering are
Matthijs Kooijman [Thu, 5 Jun 2008 07:55:49 +0000 (07:55 +0000)]
Update comments and documentation to reflect that GCSE and ValueNumbering are
deprecated by the GVN and GVNPRE passes.

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

15 years agoCast because I think I know what I'm doing. There are warnings about converting
Bill Wendling [Thu, 5 Jun 2008 07:35:27 +0000 (07:35 +0000)]
Cast because I think I know what I'm doing. There are warnings about converting
from 64-bit to 32-bit.

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

15 years agoFix 80 column violations.
Matthijs Kooijman [Thu, 5 Jun 2008 07:26:15 +0000 (07:26 +0000)]
Fix 80 column violations.

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

15 years agoRemove unused parameter. Some clients might use -Werror when compiling and
Bill Wendling [Thu, 5 Jun 2008 07:24:08 +0000 (07:24 +0000)]
Remove unused parameter. Some clients might use -Werror when compiling and
cause drama.

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

15 years agoadd llvmc2 notes, stack realignment.
Chris Lattner [Thu, 5 Jun 2008 06:57:39 +0000 (06:57 +0000)]
add llvmc2 notes, stack realignment.

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

15 years agovarious status updates.
Chris Lattner [Thu, 5 Jun 2008 06:35:40 +0000 (06:35 +0000)]
various status updates.

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

15 years agoStart adding 2.3 content.
Chris Lattner [Thu, 5 Jun 2008 06:25:56 +0000 (06:25 +0000)]
Start adding 2.3 content.

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

15 years agoFix a memcpy lowering bug. Even though the memcpy alignment is smaller than the desir...
Evan Cheng [Wed, 4 Jun 2008 23:37:54 +0000 (23:37 +0000)]
Fix a memcpy lowering bug. Even though the memcpy alignment is smaller than the desired alignment, the frame destination alignment may still be larger than the desired alignment. Don't change its alignment to something smaller.

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

15 years agoRemove unneeded #include.
Owen Anderson [Wed, 4 Jun 2008 18:28:10 +0000 (18:28 +0000)]
Remove unneeded #include.

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

15 years agoFix inst_iterator example.
Chris Lattner [Wed, 4 Jun 2008 18:20:42 +0000 (18:20 +0000)]
Fix inst_iterator example.

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

15 years agoOops. Should not be enabled by default.
Evan Cheng [Wed, 4 Jun 2008 18:09:20 +0000 (18:09 +0000)]
Oops. Should not be enabled by default.

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

15 years agoRewrite a bunch of the CBE's inline asm code, giving it the
Chris Lattner [Wed, 4 Jun 2008 18:03:28 +0000 (18:03 +0000)]
Rewrite a bunch of the CBE's inline asm code, giving it the
ability to handle indirect input operands.  This fixes PR2407.

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

15 years agoCorrectly construct live intervals for the copies we inserted into the predecessors...
Owen Anderson [Wed, 4 Jun 2008 17:55:58 +0000 (17:55 +0000)]
Correctly construct live intervals for the copies we inserted into the predecessors of a block containing a PHI.

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

15 years agoRevert this.
Evan Cheng [Wed, 4 Jun 2008 17:21:44 +0000 (17:21 +0000)]
Revert this.

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

15 years agoReplace two manual loops with calls to CallSite::hasArguments (no functional changes).
Matthijs Kooijman [Wed, 4 Jun 2008 16:57:50 +0000 (16:57 +0000)]
Replace two manual loops with calls to CallSite::hasArguments (no functional changes).

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

15 years agoAdd CallSite::hasArgument to allow for seeing if a call passes a certain value as...
Matthijs Kooijman [Wed, 4 Jun 2008 16:31:12 +0000 (16:31 +0000)]
Add CallSite::hasArgument to allow for seeing if a call passes a certain value as an argument quickly.

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

15 years agoAdd a Name parameter to two of the init methods of GetElementPointer to make the...
Matthijs Kooijman [Wed, 4 Jun 2008 16:14:12 +0000 (16:14 +0000)]
Add a Name parameter to two of the init methods of GetElementPointer to make the name setting more consistent.

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

15 years agoFix example to be valid LLVM assembly.
Matthijs Kooijman [Wed, 4 Jun 2008 15:46:35 +0000 (15:46 +0000)]
Fix example to be valid LLVM assembly.

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

15 years agoImplement the two constructors in InsertValueInst and ExtractValueInst.
Matthijs Kooijman [Wed, 4 Jun 2008 14:40:55 +0000 (14:40 +0000)]
Implement the two constructors in InsertValueInst and ExtractValueInst.

Add a Name argment to two init methods in these classes as well to make things
a bit more consistent.

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

15 years agoAdd a stack slot coloring pass. Not yet enabled.
Evan Cheng [Wed, 4 Jun 2008 09:18:41 +0000 (09:18 +0000)]
Add a stack slot coloring pass. Not yet enabled.

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

15 years agoLowerSubregs should not clobber any analysis.
Evan Cheng [Wed, 4 Jun 2008 09:17:16 +0000 (09:17 +0000)]
LowerSubregs should not clobber any analysis.

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

15 years agoMove #include to right place.
Evan Cheng [Wed, 4 Jun 2008 09:16:33 +0000 (09:16 +0000)]
Move #include to right place.

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

15 years agoRegister if-converter pass for -debug-pass.
Evan Cheng [Wed, 4 Jun 2008 09:15:51 +0000 (09:15 +0000)]
Register if-converter pass for -debug-pass.

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

15 years agoMore pass manager debugging outputs.
Evan Cheng [Wed, 4 Jun 2008 09:13:31 +0000 (09:13 +0000)]
More pass manager debugging outputs.

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

15 years agoChange packed struct layout so that field sizes
Duncan Sands [Wed, 4 Jun 2008 08:21:45 +0000 (08:21 +0000)]
Change packed struct layout so that field sizes
are the same as in unpacked structs, only field
positions differ.  This only matters for structs
containing x86 long double or an apint; it may
cause backwards compatibility problems if someone
has bitcode containing a packed struct with a
field of one of those types.
The issue is that only 10 bytes are needed to
hold an x86 long double: the store size is 10
bytes, but the ABI size is 12 or 16 bytes (linux/
darwin) which comes from rounding the store size
up by the alignment.  Because it seemed silly not
to pack an x86 long double into 10 bytes in a
packed struct, this is what was done.  I now
think this was a mistake.  Reserving the ABI size
for an x86 long double field even in a packed
struct makes things more uniform: the ABI size is
now always used when reserving space for a type.
This means that developers are less likely to
make mistakes.  It also makes life easier for the
CBE which otherwise could not represent all LLVM
packed structs (PR2402).
Front-end people might need to adjust the way
they create LLVM structs - see following change
to llvm-gcc.

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

15 years agoAdd #includes required by GCC 4.3, thanks for Zhongxing Xu
Chris Lattner [Wed, 4 Jun 2008 04:46:14 +0000 (04:46 +0000)]
Add #includes required by GCC 4.3, thanks for Zhongxing Xu
for reporting this.

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

15 years agoSome Mips minor fixes
Bruno Cardoso Lopes [Wed, 4 Jun 2008 01:45:25 +0000 (01:45 +0000)]
Some Mips minor fixes
Added support for mips little endian arch => mipsel

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

15 years agoWe need to subtract one from this index because live ranges are open at the end.
Owen Anderson [Wed, 4 Jun 2008 00:38:56 +0000 (00:38 +0000)]
We need to subtract one from this index because live ranges are open at the end.

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

15 years agoFix spellnig error
Scott Michel [Tue, 3 Jun 2008 19:13:20 +0000 (19:13 +0000)]
Fix spellnig error

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

15 years agoTestcase for LoopIndexSplit and DomFrontier.
Owen Anderson [Tue, 3 Jun 2008 18:32:27 +0000 (18:32 +0000)]
Testcase for LoopIndexSplit and DomFrontier.

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

15 years agoLoopIndexSplit can sometimes result in cases where a block in its own domfrontier.
Owen Anderson [Tue, 3 Jun 2008 18:29:48 +0000 (18:29 +0000)]
LoopIndexSplit can sometimes result in cases where a block in its own domfrontier.
Don't crash when we encounter one of these.

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

15 years agoExpand documentation of StringConstantPrefix.
Dale Johannesen [Tue, 3 Jun 2008 18:15:03 +0000 (18:15 +0000)]
Expand documentation of StringConstantPrefix.

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

15 years agoPrevent a crash in debug dumps.
Dale Johannesen [Tue, 3 Jun 2008 18:14:29 +0000 (18:14 +0000)]
Prevent a crash in debug dumps.

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

15 years agoAdd StringConstantPrefix to control what the
Dale Johannesen [Tue, 3 Jun 2008 18:09:06 +0000 (18:09 +0000)]
Add StringConstantPrefix to control what the
assembler names of string constants look like.

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

15 years agoFind a better place to output hex constants corresponding to integers.
Scott Michel [Tue, 3 Jun 2008 15:39:51 +0000 (15:39 +0000)]
Find a better place to output hex constants corresponding to integers.

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

15 years agoFixed bug in bad behavior in calculateFrameObjectOffsets,
Bruno Cardoso Lopes [Tue, 3 Jun 2008 08:46:59 +0000 (08:46 +0000)]
Fixed bug in bad behavior in calculateFrameObjectOffsets,
the solution commited is different from the previous patch to
avoid int and unsigned comparison

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

15 years agoDo not run loop-aligner at -fast (e.g. -O0).
Evan Cheng [Tue, 3 Jun 2008 06:56:08 +0000 (06:56 +0000)]
Do not run loop-aligner at -fast (e.g. -O0).

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

15 years agoRevert this patch
Scott Michel [Tue, 3 Jun 2008 06:18:19 +0000 (06:18 +0000)]
Revert this patch

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

15 years agonounwindify.
Dan Gohman [Tue, 3 Jun 2008 01:21:11 +0000 (01:21 +0000)]
nounwindify.

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

15 years ago"Unable to schedule <A> required by <B>" is more helpful then
Devang Patel [Tue, 3 Jun 2008 01:20:02 +0000 (01:20 +0000)]
"Unable to schedule <A> required by <B>" is more helpful then
"Unable to handle Pass that requires lower level Analysis pass"

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

15 years agoAdd debugging aid.
Devang Patel [Tue, 3 Jun 2008 01:02:16 +0000 (01:02 +0000)]
Add debugging aid.

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

15 years agoFix whitespace in whitespace-significant pseudocode in a comment.
Dan Gohman [Tue, 3 Jun 2008 00:57:21 +0000 (00:57 +0000)]
Fix whitespace in whitespace-significant pseudocode in a comment.

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

15 years agoConstant folding for insertvalue and extractvalue.
Dan Gohman [Tue, 3 Jun 2008 00:15:20 +0000 (00:15 +0000)]
Constant folding for insertvalue and extractvalue.

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

15 years agoUpdate dom tree. Fix PR 2372.
Devang Patel [Mon, 2 Jun 2008 22:52:56 +0000 (22:52 +0000)]
Update dom tree. Fix PR 2372.

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

15 years agoFold adds and subtracts of zero immediately, instead of waiting
Dan Gohman [Mon, 2 Jun 2008 22:27:05 +0000 (22:27 +0000)]
Fold adds and subtracts of zero immediately, instead of waiting
for dagcombine to do this.

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

15 years agoMinor cosmetic patch so that the hex equivalent of a decimal
Scott Michel [Mon, 2 Jun 2008 22:19:12 +0000 (22:19 +0000)]
Minor cosmetic patch so that the hex equivalent of a decimal
constant shows up in the assembly language output. Helps with
debugging without a HP calculator having to be handy.

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

15 years agoAdd necessary 64-bit support so that gcc frontend compiles (mostly). Current
Scott Michel [Mon, 2 Jun 2008 22:18:03 +0000 (22:18 +0000)]
Add necessary 64-bit support so that gcc frontend compiles (mostly). Current
issue is operand promotion for setcc/select... but looks like the fundamental
stuff is implemented for CellSPU.

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

15 years agoImplement CBE support for first-class structs and array values,
Dan Gohman [Mon, 2 Jun 2008 21:30:49 +0000 (21:30 +0000)]
Implement CBE support for first-class structs and array values,
and insertvalue and extractvalue instructions.

First-class array values are not trivial because C doesn't
support them. The approach I took here is to wrap all arrays
in structs. Feedback is welcome.

The 2007-01-15-NamedArrayType.ll test needed to be modified
because it has a "not grep" for a string that now exists,
because array types now have associated struct types, and
those struct types have names.

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

15 years agoUpdate the polygen grammer for the new insertvalue and extractvalue syntax.
Dan Gohman [Mon, 2 Jun 2008 19:47:09 +0000 (19:47 +0000)]
Update the polygen grammer for the new insertvalue and extractvalue syntax.

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

15 years agoRemove unneeded code I added.
Chris Lattner [Mon, 2 Jun 2008 18:39:07 +0000 (18:39 +0000)]
Remove unneeded code I added.

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

15 years agoFix the position of MemOperands in nodes that use variadic_ops
Dan Gohman [Mon, 2 Jun 2008 17:40:38 +0000 (17:40 +0000)]
Fix the position of MemOperands in nodes that use variadic_ops
in DAGISelEmitter output. This bug was recently uncovered by the
addition of patterns for CALL32m and CALL64m, which are nodes
that now have both MemOperands and variadic_ops.

This bug was especially visible with PIC in various configurations,
because the new patterns are matching the indirect call code used
in many PIC configurations.

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

15 years agoCorrectly handle removed instructions at the beginning of MBBs when renumbering.
Owen Anderson [Mon, 2 Jun 2008 17:36:36 +0000 (17:36 +0000)]
Correctly handle removed instructions at the beginning of MBBs when renumbering.

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

15 years agoFixes PR2395. Looking for a constant in a GEP tail (when the first GEP
Wojciech Matyjewicz [Mon, 2 Jun 2008 17:26:12 +0000 (17:26 +0000)]
Fixes PR2395. Looking for a constant in a GEP tail (when the first GEP
is longer than the second one) should stop after finding one. Added break
instruction guarantees it. It also changes difference between offsets to
absolute value of this difference in the condition.

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

15 years agoupdate vc configure project for renaming of
Steve Naroff [Mon, 2 Jun 2008 16:37:36 +0000 (16:37 +0000)]
update vc configure project for renaming of
hash_map/hash_set/iterator to have a .h suffix.

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

15 years agoDon't use the GOT for symbols that are not externally visible.
Rafael Espindola [Mon, 2 Jun 2008 07:52:43 +0000 (07:52 +0000)]
Don't use the GOT for symbols that are not externally visible.

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

15 years agomove CannotBeNegativeZero to ValueTracking. Simplify some signbit comparisons.
Chris Lattner [Mon, 2 Jun 2008 01:29:46 +0000 (01:29 +0000)]
move CannotBeNegativeZero to ValueTracking.  Simplify some signbit comparisons.

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

15 years agomove ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits
Chris Lattner [Mon, 2 Jun 2008 01:18:21 +0000 (01:18 +0000)]
move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits
out of instcombine into a new file in libanalysis.  This also teaches
ComputeNumSignBits about the number of sign bits in a constantint.

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

15 years agoFix two issues that Eli Friedman pointed out, where would misoptimized code like:
Owen Anderson [Sun, 1 Jun 2008 22:26:26 +0000 (22:26 +0000)]
Fix two issues that Eli Friedman pointed out, where would misoptimized code like:

char a[200];
init(a, a+200);

OR

int a[200];
char* b = (char*)a;
char* c = (char*)a;
foo(b, c);

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

15 years agoTest for PR2401
Owen Anderson [Sun, 1 Jun 2008 21:55:55 +0000 (21:55 +0000)]
Test for PR2401

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

15 years agoDon't remove the memcpy when call slot substitution fails.
Owen Anderson [Sun, 1 Jun 2008 21:52:16 +0000 (21:52 +0000)]
Don't remove the memcpy when call slot substitution fails.

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

15 years agoRemember to update the reverse non-local cache when cleaning up dirty entries. This...
Owen Anderson [Sun, 1 Jun 2008 21:03:52 +0000 (21:03 +0000)]
Remember to update the reverse non-local cache when cleaning up dirty entries.  This fixes PR2397.

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

15 years agoMake ping more aggressive in finding nonlocal caching errors.
Owen Anderson [Sun, 1 Jun 2008 20:51:41 +0000 (20:51 +0000)]
Make ping more aggressive in finding nonlocal caching errors.

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

15 years agoPrune empty dirs
Anton Korobeynikov [Sun, 1 Jun 2008 20:11:03 +0000 (20:11 +0000)]
Prune empty dirs

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

15 years agoadd a predicate.
Chris Lattner [Sun, 1 Jun 2008 18:09:04 +0000 (18:09 +0000)]
add a predicate.

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

15 years agoInitialize members properly during construction
Anton Korobeynikov [Sun, 1 Jun 2008 16:22:49 +0000 (16:22 +0000)]
Initialize members properly during construction

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

15 years agoWhen simplifying a call to a bitcast function, tighten up
Duncan Sands [Sun, 1 Jun 2008 07:38:42 +0000 (07:38 +0000)]
When simplifying a call to a bitcast function, tighten up
the conditions for performing the transform when only the
function declaration is available: no longer allow turning
i32 into i64 for example.  Only allow changing between
pointer types, and between pointer types and integers of
the same size.  For return values ptr -> intptr was already
allowed; I added ptr -> ptr and intptr -> ptr while there.
As shown by a recent objc testcase, changing the way
parameters/return values are passed can be fatal when calling
code written in assembler that directly manipulates call
arguments and return values unless the transform has no
impact on the way they are passed at the codegen level.
While it is possible to imagine an ABI that treats integers
of pointer size differently to pointers, I don't think LLVM
supports any so the transform should now be safe while still
being useful.

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

15 years agoFixed flag issue that was generating infinite loop while in list scheduling.
Bruno Cardoso Lopes [Sun, 1 Jun 2008 03:49:39 +0000 (03:49 +0000)]
Fixed flag issue that was generating infinite loop while in list scheduling.

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

15 years agoAdd a standard for control-flow unreachable assertions in functions that return
Nick Lewycky [Sat, 31 May 2008 23:54:55 +0000 (23:54 +0000)]
Add a standard for control-flow unreachable assertions in functions that return
values, so as to avoid warnings on some platforms.

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

15 years agoupdates to some svn:ignore properties
Gabor Greif [Sat, 31 May 2008 22:59:42 +0000 (22:59 +0000)]
updates to some svn:ignore properties

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

15 years agoupdate this patch to handle an extraneous &1. This should be pulled
Chris Lattner [Sat, 31 May 2008 19:50:53 +0000 (19:50 +0000)]
update this patch to handle an extraneous &1.  This should be pulled
into the 2.3 release branch.

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

15 years agoAsmWriter support for insertvalue/extractvalue. These instructions can
Dan Gohman [Sat, 31 May 2008 19:12:39 +0000 (19:12 +0000)]
AsmWriter support for insertvalue/extractvalue. These instructions can
now round-trip through assembly and bitcode.

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

15 years agoImproved bitcode support for insertvalue/extractvalue.
Dan Gohman [Sat, 31 May 2008 19:11:15 +0000 (19:11 +0000)]
Improved bitcode support for insertvalue/extractvalue.

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

15 years agoFix a copy+paste error in a comment.
Dan Gohman [Sat, 31 May 2008 19:09:47 +0000 (19:09 +0000)]
Fix a copy+paste error in a comment.

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

15 years agoFix some bugs with the handling of indices in insertvalue/extractvalue.
Dan Gohman [Sat, 31 May 2008 19:09:08 +0000 (19:09 +0000)]
Fix some bugs with the handling of indices in insertvalue/extractvalue.

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

15 years agoPeer through sext/zext when looking for not(cmp).
Nick Lewycky [Sat, 31 May 2008 19:01:33 +0000 (19:01 +0000)]
Peer through sext/zext when looking for not(cmp).

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

15 years agoYay us! Every one of these examples turns into icmp/zext/ret.
Nick Lewycky [Sat, 31 May 2008 18:20:26 +0000 (18:20 +0000)]
Yay us! Every one of these examples turns into icmp/zext/ret.

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

15 years agoAdd more i1 optimizations. add, sub, mul, s/udiv on i1 are now simplified away.
Nick Lewycky [Sat, 31 May 2008 17:59:52 +0000 (17:59 +0000)]
Add more i1 optimizations. add, sub, mul, s/udiv on i1 are now simplified away.

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

15 years agoAdding i1 is always Xor.
Nick Lewycky [Sat, 31 May 2008 17:10:28 +0000 (17:10 +0000)]
Adding i1 is always Xor.

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

15 years agoCallback was not executed on OS X when it was a function.
Mikhail Glushenkov [Sat, 31 May 2008 13:43:21 +0000 (13:43 +0000)]
Callback was not executed on OS X when it was a function.

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

15 years agoFix the CBE's handling of instructions whose result is an i1. Previously,
Chris Lattner [Sat, 31 May 2008 09:23:55 +0000 (09:23 +0000)]
Fix the CBE's handling of instructions whose result is an i1.  Previously,
we did not truncate the value down to i1 with (x&1).  This caused a problem
when the computation of x was nontrivial, for example, "add i1 1, 1" would
return 2 instead of 0.

This makes the testcase compile into:

...
  llvm_cbe_t = (((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u))&1);
  llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t));
...

instead of:

...
  llvm_cbe_t = ((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u));
  llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t));
...

This fixes a miscompilation of mediabench/adpcm/rawdaudio/rawdaudio and
403.gcc with the CBE, regressions from LLVM 2.2. Tanya, please pull
this into the release branch.

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

15 years agoFactor several methods, including getInversePredicate and
Dan Gohman [Sat, 31 May 2008 02:47:54 +0000 (02:47 +0000)]
Factor several methods, including getInversePredicate and
getSwappedPredicate, from ICmpInst and FCmpInst into common
methods in CmpInst. This allows CmpInsts to be manipulated
generically.

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

15 years agoTeach the DAGISelEmitter to not compute the variable_ops operand
Dan Gohman [Sat, 31 May 2008 02:11:25 +0000 (02:11 +0000)]
Teach the DAGISelEmitter to not compute the variable_ops operand
index for the input pattern in terms of the output pattern. Instead
keep track of how many fixed operands the input pattern actually
has, and have the input matching code pass the output-emitting
function that index value. This simplifies the code, disentangles
variables_ops from the support for predication operations, and
makes variable_ops more robust.

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

15 years agoRemove an unused variable.
Dan Gohman [Sat, 31 May 2008 01:44:25 +0000 (01:44 +0000)]
Remove an unused variable.

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

15 years agoIR, bitcode reader, bitcode writer, and asmparser changes to
Dan Gohman [Sat, 31 May 2008 00:58:22 +0000 (00:58 +0000)]
IR, bitcode reader, bitcode writer, and asmparser changes to
insertvalue and extractvalue to use constant indices instead of
Value* indices. And begin updating LangRef.html.

There's definately more to come here, but I'm checking this
basic support in now to make it available to people who are
interested.

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

15 years agoRevert 51775.
Evan Cheng [Fri, 30 May 2008 22:47:19 +0000 (22:47 +0000)]
Revert 51775.

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

15 years agoAdd an isAggregateType predicate.
Dan Gohman [Fri, 30 May 2008 22:40:06 +0000 (22:40 +0000)]
Add an isAggregateType predicate.

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

15 years agoFix indentation.
Evan Cheng [Fri, 30 May 2008 22:39:32 +0000 (22:39 +0000)]
Fix indentation.

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

15 years agoFix indentation.
Evan Cheng [Fri, 30 May 2008 22:39:18 +0000 (22:39 +0000)]
Fix indentation.

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

15 years agoAdd an operator< for SmallVector.
Dan Gohman [Fri, 30 May 2008 22:37:47 +0000 (22:37 +0000)]
Add an operator< for SmallVector.

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

15 years agoThe coalescer doesn't need LiveVariables now that we have register use iterators.
Owen Anderson [Fri, 30 May 2008 22:37:27 +0000 (22:37 +0000)]
The coalescer doesn't need LiveVariables now that we have register use iterators.

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

15 years agorewrite operand loops to use iterators
Gabor Greif [Fri, 30 May 2008 21:24:22 +0000 (21:24 +0000)]
rewrite operand loops to use iterators

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

15 years agoMake all help strings start in upper case.
Mikhail Glushenkov [Fri, 30 May 2008 21:14:10 +0000 (21:14 +0000)]
Make all help strings start in upper case.

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

15 years agoForgot to commit this file.
Owen Anderson [Fri, 30 May 2008 20:14:04 +0000 (20:14 +0000)]
Forgot to commit this file.

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