oota-llvm.git
16 years agoFix pr2566: incorrect assumption about bit_convert. It doesn't not have to output...
Evan Cheng [Tue, 22 Jul 2008 20:42:56 +0000 (20:42 +0000)]
Fix pr2566: incorrect assumption about bit_convert. It doesn't not have to output a vector value. Patch by Nicolas Capens!

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

16 years agoAdd insertvalue and extractvalue folding support in IRBuilder.
Dan Gohman [Tue, 22 Jul 2008 20:19:25 +0000 (20:19 +0000)]
Add insertvalue and extractvalue folding support in IRBuilder.

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

16 years agoRemove temp. files in the end.
Devang Patel [Tue, 22 Jul 2008 20:03:45 +0000 (20:03 +0000)]
Remove temp. files in the end.

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

16 years agoWhile creating temp. file on disk, if the current filename points to a existing direc...
Devang Patel [Tue, 22 Jul 2008 20:02:39 +0000 (20:02 +0000)]
While creating temp. file on disk, if the current filename points to a existing directory then create new temp. file inside the directory.

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

16 years agoFix PR2574: implement v2f32 scalar_to_vector.
Evan Cheng [Tue, 22 Jul 2008 18:39:19 +0000 (18:39 +0000)]
Fix PR2574: implement v2f32 scalar_to_vector.

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

16 years agoIRBuilder support for insertvalue and extractvalue.
Dan Gohman [Tue, 22 Jul 2008 18:25:25 +0000 (18:25 +0000)]
IRBuilder support for insertvalue and extractvalue.

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

16 years agoAssert that the DAG root value is a chain value.
Dan Gohman [Tue, 22 Jul 2008 18:04:23 +0000 (18:04 +0000)]
Assert that the DAG root value is a chain value.

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

16 years agoHandle bitcode wrappers.
Devang Patel [Tue, 22 Jul 2008 18:00:36 +0000 (18:00 +0000)]
Handle bitcode wrappers.

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

16 years agoMake the GraphRoot edge look like a chain edge, which is more accurate,
Dan Gohman [Tue, 22 Jul 2008 17:52:59 +0000 (17:52 +0000)]
Make the GraphRoot edge look like a chain edge, which is more accurate,
and use the right result number, in the off chance that the graph root
has multiple result values.

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

16 years agoProvide default implementation of different small-sections related stuff
Anton Korobeynikov [Tue, 22 Jul 2008 17:09:59 +0000 (17:09 +0000)]
Provide default implementation of different small-sections related stuff

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

16 years agoTie small stuff to non-small by default on ELF platforms
Anton Korobeynikov [Tue, 22 Jul 2008 17:09:41 +0000 (17:09 +0000)]
Tie small stuff to non-small by default on ELF platforms

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

16 years agosimplified small section logic
Bruno Cardoso Lopes [Tue, 22 Jul 2008 16:24:21 +0000 (16:24 +0000)]
simplified small section logic

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

16 years agoFix encoding of atomic compare and swap for i64
Anton Korobeynikov [Tue, 22 Jul 2008 16:22:48 +0000 (16:22 +0000)]
Fix encoding of atomic compare and swap for i64

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

16 years agoAdded small section asm emition logic for mips.
Bruno Cardoso Lopes [Tue, 22 Jul 2008 15:34:27 +0000 (15:34 +0000)]
Added small section asm emition logic for mips.
Fixed small bug.

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

16 years agoBasic support for small sections
Bruno Cardoso Lopes [Tue, 22 Jul 2008 15:26:53 +0000 (15:26 +0000)]
Basic support for small sections

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

16 years agoRemove more tabs.
Bill Wendling [Tue, 22 Jul 2008 09:08:05 +0000 (09:08 +0000)]
Remove more tabs.

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

16 years agoRemove another tab.
Bill Wendling [Tue, 22 Jul 2008 08:54:38 +0000 (08:54 +0000)]
Remove another tab.

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

16 years agoMore tab removals.
Bill Wendling [Tue, 22 Jul 2008 08:50:44 +0000 (08:50 +0000)]
More tab removals.

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

16 years agoRemoving tabs.
Bill Wendling [Tue, 22 Jul 2008 07:14:12 +0000 (07:14 +0000)]
Removing tabs.

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

16 years agoUse — because.
Bill Wendling [Tue, 22 Jul 2008 06:46:17 +0000 (06:46 +0000)]
Use — because.

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

16 years agoRemove references to llvm-gcc-4.0
Bill Wendling [Tue, 22 Jul 2008 01:37:48 +0000 (01:37 +0000)]
Remove references to llvm-gcc-4.0

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

16 years agoFix grammar.
Bill Wendling [Tue, 22 Jul 2008 01:10:25 +0000 (01:10 +0000)]
Fix grammar.

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

16 years agoAnother buildbot test commit.
Bill Wendling [Tue, 22 Jul 2008 00:53:37 +0000 (00:53 +0000)]
Another buildbot test commit.

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

16 years agoCorrect the name of MachineMemOperand's include guard.
Dan Gohman [Tue, 22 Jul 2008 00:52:54 +0000 (00:52 +0000)]
Correct the name of MachineMemOperand's include guard.

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

16 years agoFix a typo in a comment.
Dan Gohman [Tue, 22 Jul 2008 00:52:04 +0000 (00:52 +0000)]
Fix a typo in a comment.

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

16 years agoFix multiple-return-value-to-first-class-aggregates autoupgrade to
Dan Gohman [Tue, 22 Jul 2008 00:36:48 +0000 (00:36 +0000)]
Fix multiple-return-value-to-first-class-aggregates autoupgrade to
correctly handle the case where multiple-return-value constructs
were used to return one or zero values.

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

16 years agoTrivial check-in to test buildbot. No functionality change.
Bill Wendling [Tue, 22 Jul 2008 00:28:47 +0000 (00:28 +0000)]
Trivial check-in to test buildbot. No functionality change.

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

16 years agoInsertValue and ExtractValue constant expressions are always
Dan Gohman [Mon, 21 Jul 2008 23:30:30 +0000 (23:30 +0000)]
InsertValue and ExtractValue constant expressions are always
folded. Remove code that handled the case where they aren't
folded, and remove bitcode reader/writer support for them.

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

16 years agoProvide llvm bitcode file to native object file interface.
Devang Patel [Mon, 21 Jul 2008 23:04:39 +0000 (23:04 +0000)]
Provide llvm bitcode file to native object file interface.

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

16 years agoFix grammaros in comments.
Dan Gohman [Mon, 21 Jul 2008 22:38:59 +0000 (22:38 +0000)]
Fix grammaros in comments.

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

16 years agoAdd the PR number to the test.
Dan Gohman [Mon, 21 Jul 2008 21:50:25 +0000 (21:50 +0000)]
Add the PR number to the test.

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

16 years agoFix a bug in LSR's dead-PHI cleanup. If a PHI has a def-use chain that
Dan Gohman [Mon, 21 Jul 2008 21:45:02 +0000 (21:45 +0000)]
Fix a bug in LSR's dead-PHI cleanup. If a PHI has a def-use chain that
leads into a cycle involving a different PHI, LSR got stuck running
around that cycle looking for the original PHI. To avoid this, keep
track of visited PHIs and stop searching if we see one more than once.
This fixes PR2570.

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

16 years agoEnhance the GraphWriter support for edge destinations, and teach the
Dan Gohman [Mon, 21 Jul 2008 21:06:55 +0000 (21:06 +0000)]
Enhance the GraphWriter support for edge destinations, and teach the
SelectionDAG graph writer to make use of them. Now, nodes with multiple
values are displayed as such, with incoming edges pointing to the
specific value they use.

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

16 years agoAfter early-lowering the FORMAL_ARGUMENTS node, delete it.
Dan Gohman [Mon, 21 Jul 2008 21:04:07 +0000 (21:04 +0000)]
After early-lowering the FORMAL_ARGUMENTS node, delete it.

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

16 years agoEliminate a compilation warning.
Evan Cheng [Mon, 21 Jul 2008 20:02:45 +0000 (20:02 +0000)]
Eliminate a compilation warning.

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

16 years agoAdd titles to the various SelectionDAG viewGraph calls
Dan Gohman [Mon, 21 Jul 2008 20:00:07 +0000 (20:00 +0000)]
Add titles to the various SelectionDAG viewGraph calls
that include useful information like the name of the
block being viewed and the current phase of compilation.

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

16 years agoMake the GraphWriter be more consistent about the string
Dan Gohman [Mon, 21 Jul 2008 19:57:57 +0000 (19:57 +0000)]
Make the GraphWriter be more consistent about the string
used for the graph "title" and the graph "label", as there
are differences in interpretation of these strings
between viewers.

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

16 years agoFix uses of underscore-capital names.
Dan Gohman [Mon, 21 Jul 2008 19:48:15 +0000 (19:48 +0000)]
Fix uses of underscore-capital names.

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

16 years agoAdded initial support for small sections on Mips.
Bruno Cardoso Lopes [Mon, 21 Jul 2008 18:52:34 +0000 (18:52 +0000)]
Added initial support for small sections on Mips.
Added gp_rel relocations to support addressing small section contents.
Added command line to specify small section threshold in bytes.

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

16 years agoNow that the MachineInstr leaks are fixed, enable leak checking
Dan Gohman [Mon, 21 Jul 2008 18:47:29 +0000 (18:47 +0000)]
Now that the MachineInstr leaks are fixed, enable leak checking
in the MachineInstr clone code.

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

16 years agoTemporary hack to build with GCC 4.0 instead of 4.2.
Bill Wendling [Mon, 21 Jul 2008 18:33:09 +0000 (18:33 +0000)]
Temporary hack to build with GCC 4.0 instead of 4.2.

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

16 years agoUse better variable names
Anton Korobeynikov [Mon, 21 Jul 2008 18:29:23 +0000 (18:29 +0000)]
Use better variable names

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

16 years agoDon't use larger alignment.
Anton Korobeynikov [Mon, 21 Jul 2008 18:25:17 +0000 (18:25 +0000)]
Don't use larger alignment.

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

16 years agoAdd VerifyNode, a place to put sanity checks on
Duncan Sands [Mon, 21 Jul 2008 10:20:31 +0000 (10:20 +0000)]
Add VerifyNode, a place to put sanity checks on
generic SDNode's (nodes with their own constructors
should do sanity checking in the constructor).  Add
sanity checks for BUILD_VECTOR and fix all the places
that were producing bogus BUILD_VECTORs, as found by
"make check".  My favorite is the BUILD_VECTOR with
only two operands that was being used to build a
vector with four elements!

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

16 years agoUse movaps instead of movups to spill 16-byte vector values when default alignment...
Evan Cheng [Mon, 21 Jul 2008 06:34:17 +0000 (06:34 +0000)]
Use movaps instead of movups to spill 16-byte vector values when default alignment is >= 16. This fixes some massive performance regressions.

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

16 years agoRevert r53812 -- premature. LegalizeTypes isn't actually on yet!
Nick Lewycky [Mon, 21 Jul 2008 04:03:00 +0000 (04:03 +0000)]
Revert r53812 -- premature. LegalizeTypes isn't actually on yet!

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

16 years agoSwitch on the use of arbitrary precision integers in scalar evolution. This will
Nick Lewycky [Mon, 21 Jul 2008 02:51:31 +0000 (02:51 +0000)]
Switch on the use of arbitrary precision integers in scalar evolution. This will
bail after 256-bits to avoid producing code that the backends can't handle.
Previously, we capped it at 64-bits, preferring to miscompile in those cases.

This change also reverts much of r52248 because the invariants the code was
expecting are now being met.

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

16 years agoThis header isn't necessary now.
Wojciech Matyjewicz [Sun, 20 Jul 2008 17:35:32 +0000 (17:35 +0000)]
This header isn't necessary now.

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

16 years agoFix PR2088. Use modulo linear equation solver to compute loop iteration
Wojciech Matyjewicz [Sun, 20 Jul 2008 15:55:14 +0000 (15:55 +0000)]
Fix PR2088. Use modulo linear equation solver to compute loop iteration
count.

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

16 years agoUpdated VC++ projects
Cedric Venet [Sun, 20 Jul 2008 12:04:49 +0000 (12:04 +0000)]
Updated VC++ projects

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

16 years agoFix for first part of PR2562. Generate the "pinsrw" instruction for inserts
Bill Wendling [Sun, 20 Jul 2008 02:32:23 +0000 (02:32 +0000)]
Fix for first part of PR2562. Generate the "pinsrw" instruction for inserts
into v4i16 vectors.

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

16 years agoPull r53795 from Gaz into mainline:
Bill Wendling [Sun, 20 Jul 2008 00:11:19 +0000 (00:11 +0000)]
Pull r53795 from Gaz into mainline:

If .loc and .file aren't used, always emit the "debug_line" section. This
requires at least one entry in the line matrix. So if there's nothing to emit
into the matrix, emit an end of matrix value anyway.

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

16 years agoUnbreak build: 'DarwinTargetAsmInfo' was already taken as PPC TAI flavour.
Anton Korobeynikov [Sat, 19 Jul 2008 21:44:57 +0000 (21:44 +0000)]
Unbreak build: 'DarwinTargetAsmInfo' was already taken as PPC TAI flavour.

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

16 years agoMake sure custom lowering for LegalizeTypes
Duncan Sands [Sat, 19 Jul 2008 16:26:02 +0000 (16:26 +0000)]
Make sure custom lowering for LegalizeTypes
returns a node with the right number of
return values.  This fixes codegen of
Generic/cast-fp.ll, Generic/fp_to_int.ll
and PowerPC/multiple-return-values.ll
when using -march=ppc32 -mattr=+64bit.

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

16 years agoXFAIL this test.
Nick Lewycky [Sat, 19 Jul 2008 15:52:06 +0000 (15:52 +0000)]
XFAIL this test.

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

16 years agoWhile testing particular algorithms to compute loop iteration count the brute
Wojciech Matyjewicz [Sat, 19 Jul 2008 13:26:15 +0000 (13:26 +0000)]
While testing particular algorithms to compute loop iteration count the brute
force evaluation (ComputeIterationCountExhaustively) should be turned off.

It doesn't apply to trip-count2.ll because this file tests the brute force
evaluation.

The test for PR2364 (2008-05-25-NegativeStepToZero.ll) currently fails
showing that the patch for this bug doesn't work. I'll fix it in a few hours
with a patch for PR2088.

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

16 years agoUse chars, where possible
Anton Korobeynikov [Sat, 19 Jul 2008 13:16:32 +0000 (13:16 +0000)]
Use chars, where possible

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

16 years agoSwitch MIPS to new ELFTargetAsmInfo. Add few FIXMEs.
Anton Korobeynikov [Sat, 19 Jul 2008 13:16:11 +0000 (13:16 +0000)]
Switch MIPS to new ELFTargetAsmInfo. Add few FIXMEs.

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

16 years agoFix a FIXME :)
Anton Korobeynikov [Sat, 19 Jul 2008 13:15:46 +0000 (13:15 +0000)]
Fix a FIXME :)

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

16 years agoUse generic ELFTargetAsmInfo and DarwinTargetAsmInfo for X86 code
Anton Korobeynikov [Sat, 19 Jul 2008 13:15:21 +0000 (13:15 +0000)]
Use generic ELFTargetAsmInfo and DarwinTargetAsmInfo for X86 code

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

16 years agoAdd TargetAsmInfo stuff for all darwin-based targets
Anton Korobeynikov [Sat, 19 Jul 2008 13:14:46 +0000 (13:14 +0000)]
Add TargetAsmInfo stuff for all darwin-based targets

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

16 years agoAdd TargetAsmInfo for all ELF-based targets
Anton Korobeynikov [Sat, 19 Jul 2008 13:14:11 +0000 (13:14 +0000)]
Add TargetAsmInfo for all ELF-based targets

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

16 years agoTestcase for PR2549
Anton Korobeynikov [Sat, 19 Jul 2008 06:31:12 +0000 (06:31 +0000)]
Testcase for PR2549

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

16 years agoUse aligned stack spills, where possible. This fixes PR2549.
Anton Korobeynikov [Sat, 19 Jul 2008 06:30:51 +0000 (06:30 +0000)]
Use aligned stack spills, where possible. This fixes PR2549.

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

16 years agoRemove bogus assertion. This unbreaks mingw, where ConstantSDNode
Anton Korobeynikov [Sat, 19 Jul 2008 05:52:44 +0000 (05:52 +0000)]
Remove bogus assertion. This unbreaks mingw, where ConstantSDNode
has alignment 8 and LoadSDNode (used as LargestT template) - 4.

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

16 years agotentative definitions are default visibility
Nick Kledzik [Sat, 19 Jul 2008 00:58:07 +0000 (00:58 +0000)]
tentative definitions are default visibility

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

16 years agoFix a memory leak in LiveIntervalAnalysis.
Evan Cheng [Sat, 19 Jul 2008 00:37:25 +0000 (00:37 +0000)]
Fix a memory leak in LiveIntervalAnalysis.

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

16 years agotypo.
Devang Patel [Fri, 18 Jul 2008 23:47:27 +0000 (23:47 +0000)]
typo.

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

16 years agoIf all linker input files are native object files then lto-bugpoint is not useful.
Devang Patel [Fri, 18 Jul 2008 23:46:41 +0000 (23:46 +0000)]
If all linker input files are native object files then lto-bugpoint is not useful.

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

16 years agoStart writing lto-bugpoint tool.
Devang Patel [Fri, 18 Jul 2008 22:59:45 +0000 (22:59 +0000)]
Start writing lto-bugpoint tool.

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

16 years agoSoftfloat support for FDIV. Patch by
Duncan Sands [Fri, 18 Jul 2008 21:18:48 +0000 (21:18 +0000)]
Softfloat support for FDIV.  Patch by
Richard Pennington.

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

16 years agoEliminate unused variable.
Duncan Sands [Fri, 18 Jul 2008 21:07:41 +0000 (21:07 +0000)]
Eliminate unused variable.

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

16 years agoSupress a gcc-4.3 warning.
Duncan Sands [Fri, 18 Jul 2008 21:06:02 +0000 (21:06 +0000)]
Supress a gcc-4.3 warning.

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

16 years agoRevert 53729, after waking up in the middle of
Duncan Sands [Fri, 18 Jul 2008 20:12:05 +0000 (20:12 +0000)]
Revert 53729, after waking up in the middle of
the night realising that it was wrong :)  I
think the reason the same type was being used
for the shufflevec of indices as for the actual
indices is so that if one of them needs splitting
then so does the other.  After my patch it might
be that the indices need splitting but not the
rest, yet there is no good way of handling that.
I think the right solution is to not have the
shufflevec be an operand at all: just have it
be the list of numbers it actually is, stored
as extra info in the node.

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

16 years agoIn the CBackend, use casts to force integer add, subtract, and
Dan Gohman [Fri, 18 Jul 2008 18:43:12 +0000 (18:43 +0000)]
In the CBackend, use casts to force integer add, subtract, and
multiply to be done as unsigned, so that they have well defined
behavior on overflow. This fixes PR2408.

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

16 years agoFix a LocalSpiller leak. This fixes tramp3d-v4.
Dan Gohman [Fri, 18 Jul 2008 18:28:56 +0000 (18:28 +0000)]
Fix a LocalSpiller leak. This fixes tramp3d-v4.

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

16 years agoMake PRE actually handle critical edges (by splitting them). Confirmed that bootstra...
Owen Anderson [Fri, 18 Jul 2008 18:03:38 +0000 (18:03 +0000)]
Make PRE actually handle critical edges (by splitting them).  Confirmed that bootstrap passes with this change.

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

16 years agoReapply r53735. My last patch fixed the failures Dan observed.
Owen Anderson [Fri, 18 Jul 2008 17:49:43 +0000 (17:49 +0000)]
Reapply r53735.  My last patch fixed the failures Dan observed.

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

16 years agoAdd some checks that got lost in the shuffle. This fixes 464.h264ref.
Owen Anderson [Fri, 18 Jul 2008 17:46:41 +0000 (17:46 +0000)]
Add some checks that got lost in the shuffle.  This fixes 464.h264ref.

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

16 years agoRevert r53735. It broke SPEC 464.h264ref.
Dan Gohman [Fri, 18 Jul 2008 16:44:49 +0000 (16:44 +0000)]
Revert r53735. It broke SPEC 464.h264ref.

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

16 years agoverify limits-fndefn.c from the GCC testsuite before the
Chris Lattner [Fri, 18 Jul 2008 05:23:39 +0000 (05:23 +0000)]
verify limits-fndefn.c from the GCC testsuite before the
heat death of the universe, fixing an O(N^2) problem in the
size of a basic block.

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

16 years agoRe-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.
Dan Gohman [Thu, 17 Jul 2008 23:49:46 +0000 (23:49 +0000)]
Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.
Fix a leak that this turned up in LowerSubregs.cpp.
And, comment a leak in LiveIntervalAnalysis.cpp.

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

16 years agoWhen printing MemOperand nodes, only use print() for
Dan Gohman [Thu, 17 Jul 2008 21:12:16 +0000 (21:12 +0000)]
When printing MemOperand nodes, only use print() for
PseudoSourceValue values, which never have names. Use getName()
for all other values, because we want to print just a short summary
of the value, not the entire instruction.

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

16 years agoUse MergeBlockIntoPredecessor to simplify some code.
Owen Anderson [Thu, 17 Jul 2008 20:00:46 +0000 (20:00 +0000)]
Use MergeBlockIntoPredecessor to simplify some code.

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

16 years agoSubreg live interval valno may not have a corresponding def machineinstr since it...
Evan Cheng [Thu, 17 Jul 2008 19:48:53 +0000 (19:48 +0000)]
Subreg live interval valno may not have a corresponding def machineinstr since it's less precise.

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

16 years agoAdd nounwind.
Evan Cheng [Thu, 17 Jul 2008 19:48:04 +0000 (19:48 +0000)]
Add nounwind.

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

16 years agotest commit access
Daniel Dunbar [Thu, 17 Jul 2008 19:46:54 +0000 (19:46 +0000)]
test commit access

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

16 years agoMake MergeBlockIntoPredecessor more aggressive when the same successor appears
Owen Anderson [Thu, 17 Jul 2008 19:42:29 +0000 (19:42 +0000)]
Make MergeBlockIntoPredecessor more aggressive when the same successor appears
more than once.

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

16 years agoEnable PRE. My last batch of changes fixed the miscompile.
Owen Anderson [Thu, 17 Jul 2008 19:41:00 +0000 (19:41 +0000)]
Enable PRE.  My last batch of changes fixed the miscompile.

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

16 years agoUse a legal type for elements of the vector_shuffle
Duncan Sands [Thu, 17 Jul 2008 19:28:41 +0000 (19:28 +0000)]
Use a legal type for elements of the vector_shuffle
mask.  These are just indices into the shuffled vector
so their type is unrelated to the type of the
shuffled elements (which is what was being used before).
This fixes vec_shuffle-11.ll when using LegalizeTypes.
What seems to have happened is that Dan's recent change
r53687, which corrected the result type of the shuffle,
somehow caused LegalizeTypes to notice that the mask
operand was a BUILD_VECTOR with a legal type but elements
of an illegal type (i64).  LegalizeTypes legalized this
by introducing a new BUILD_VECTOR of i32 and bitcasting
it to the old type.  But the mask operand is not supposed
to be a bitcast but a straight BUILD_VECTOR of constants,
causing a crash.

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

16 years agoAdd a new function, ReplaceAllUsesOfValuesWith, which handles bulk
Dan Gohman [Thu, 17 Jul 2008 19:10:17 +0000 (19:10 +0000)]
Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.

Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.

This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.

These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.

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

16 years agoIndentation.
Evan Cheng [Thu, 17 Jul 2008 18:41:20 +0000 (18:41 +0000)]
Indentation.

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

16 years agoLegalizeTypes support for what seems to be the
Duncan Sands [Thu, 17 Jul 2008 17:35:14 +0000 (17:35 +0000)]
LegalizeTypes support for what seems to be the
only missing ppc long double operations: FNEG
and FP_EXTEND.

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

16 years agoRemove unnecessary readme entry
Nate Begeman [Thu, 17 Jul 2008 17:21:14 +0000 (17:21 +0000)]
Remove unnecessary readme entry

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

16 years agoTurn LegalizeTypes back off again for the moment:
Duncan Sands [Thu, 17 Jul 2008 17:06:03 +0000 (17:06 +0000)]
Turn LegalizeTypes back off again for the moment:
it is breaking Darwin bootstrap due to missing
functionality.

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

16 years agoFix a typo in last commit
Nate Begeman [Thu, 17 Jul 2008 17:04:58 +0000 (17:04 +0000)]
Fix a typo in last commit

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

16 years agoSSE codegen for vsetcc nodes
Nate Begeman [Thu, 17 Jul 2008 16:51:19 +0000 (16:51 +0000)]
SSE codegen for vsetcc nodes

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

16 years agoMake GlobalOpt preserve address spaces when scalar replacing aggregate globals.
Matthijs Kooijman [Thu, 17 Jul 2008 11:59:53 +0000 (11:59 +0000)]
Make GlobalOpt preserve address spaces when scalar replacing aggregate globals.

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

16 years agoFix PR2553
Chris Lattner [Thu, 17 Jul 2008 06:07:20 +0000 (06:07 +0000)]
Fix PR2553

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

16 years agoWhen lowering certain atomics, we need to copy the memoperand from the old
Mon P Wang [Thu, 17 Jul 2008 04:54:06 +0000 (04:54 +0000)]
When lowering certain atomics, we need to copy the memoperand from the old
atomic operation to the new one.

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