oota-llvm.git
13 years agoMerge .debug_loc entries whenever possible to reduce debug_loc size.
Devang Patel [Fri, 4 Feb 2011 22:57:18 +0000 (22:57 +0000)]
Merge .debug_loc entries whenever possible to reduce debug_loc size.

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

13 years agoMark that the return is using EAX so that we don't use it for some other
Nick Lewycky [Fri, 4 Feb 2011 22:44:08 +0000 (22:44 +0000)]
Mark that the return is using EAX so that we don't use it for some other
purpose. Fixes PR9080!

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

13 years agoBe more accurate about live range splitting at the end of blocks.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 21:42:06 +0000 (21:42 +0000)]
Be more accurate about live range splitting at the end of blocks.

If interference reaches the last split point, it is effectively live out and
should be marked as 'MustSpill'.

This can make a difference when the terminator uses a register. There is no way
that register can be reused in the outgoing CFG bundle, even if it isn't live
out.

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

13 years agoTeach ARM/MC/ELF about EF_ARM_EABI_VERSION. The magic number is set to
Jason W Kim [Fri, 4 Feb 2011 21:41:11 +0000 (21:41 +0000)]
Teach ARM/MC/ELF about EF_ARM_EABI_VERSION. The magic number is set to
5 to match the current doc.
Added FIXME reminder Make it really configurable later.

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

13 years agoTeach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
Jason W Kim [Fri, 4 Feb 2011 19:47:15 +0000 (19:47 +0000)]
Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
(yes, this is different from R_ARM_CALL)

- Adds a new method getARMBranchTargetOpValue() which handles the
  necessary distinction between the conditional and unconditional br/bl
  needed for ARM/ELF

At least for ARM mode, the needed fixup for conditional versus unconditional
br/bl is identical, but the ARM docs and existing ARM tools expect this
reloc type...

Added a few FIXME's for future naming fixups in ARMInstrInfo.td

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

13 years agoAdd LiveIntervals::getLastSplitPoint().
Jakob Stoklund Olesen [Fri, 4 Feb 2011 19:33:11 +0000 (19:33 +0000)]
Add LiveIntervals::getLastSplitPoint().

A live range cannot be split everywhere in a basic block. A split must go before
the first terminator, and if the variable is live into a landing pad, the split
must happen before the call that can throw.

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

13 years agoVerify that one of the ranges produced by region splitting is allocatable.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 19:33:07 +0000 (19:33 +0000)]
Verify that one of the ranges produced by region splitting is allocatable.

We should not be attempting a region split if it won't lead to at least one
directly allocatable interval. That could cause infinite splitting loops.

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

13 years agoMC/AsmParser: Add support for allowing the conversion process to fail (via
Daniel Dunbar [Fri, 4 Feb 2011 17:12:23 +0000 (17:12 +0000)]
MC/AsmParser: Add support for allowing the conversion process to fail (via
custom conversion functions).

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

13 years agobuild: Add MAKEFILE_UNITTEST_NO_INCLUDE_COMMON build variable, to be leveraged
Daniel Dunbar [Fri, 4 Feb 2011 17:12:18 +0000 (17:12 +0000)]
build: Add MAKEFILE_UNITTEST_NO_INCLUDE_COMMON build variable, to be leveraged
by Clang.

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

13 years agoMC/AsmMatcher: Add support for custom conversion functions.
Daniel Dunbar [Fri, 4 Feb 2011 17:12:15 +0000 (17:12 +0000)]
MC/AsmMatcher: Add support for custom conversion functions.

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

13 years agoSilence uninitialized value warnings.
David Greene [Fri, 4 Feb 2011 17:01:53 +0000 (17:01 +0000)]
Silence uninitialized value warnings.

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

13 years ago[AVX] Support VSINSERTF128 with more patterns and appropriate
David Greene [Fri, 4 Feb 2011 16:08:29 +0000 (16:08 +0000)]
[AVX] Support VSINSERTF128 with more patterns and appropriate
infrastructure.  This makes lowering 256-bit vectors to 128-bit
vectors simple when 256-bit vector support is not available.

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

13 years agoMake Win32's header file name lower for cross build on case-sensitive filesystem.
NAKAMURA Takumi [Fri, 4 Feb 2011 12:53:04 +0000 (12:53 +0000)]
Make Win32's header file name lower for cross build on case-sensitive filesystem.

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

13 years agoLLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.
Oscar Fuentes [Fri, 4 Feb 2011 05:40:04 +0000 (05:40 +0000)]
LLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.

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

13 years agoAdd the tablegenned files to the `clean' target.
Oscar Fuentes [Fri, 4 Feb 2011 03:47:50 +0000 (03:47 +0000)]
Add the tablegenned files to the `clean' target.

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

13 years agoIntroducing a new method of tracking register pressure. We can't
Andrew Trick [Fri, 4 Feb 2011 03:18:17 +0000 (03:18 +0000)]
Introducing a new method of tracking register pressure. We can't
precisely track pressure on a selection DAG, but we can at least keep
it balanced. This design accounts for various interesting aspects of
selection DAGS: register and subregister copies, glued nodes, dead
nodes, unused registers, etc.

Added SUnit::NumRegDefsLeft and ScheduleDAGSDNodes::RegDefIter.

Note: I disabled PrescheduleNodesWithMultipleUses when register
pressure is enabled, based on no evidence other than I don't think it
makes sense to have both enabled.

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

13 years agoDebugLoc associated with a machine instruction is used to emit location entries....
Devang Patel [Fri, 4 Feb 2011 01:43:25 +0000 (01:43 +0000)]
DebugLoc associated with a machine instruction is used to emit location entries. DebugLoc associated with a DBG_VALUE is used to identify lexical scope of the variable. After register allocation, while inserting DBG_VALUE remember original debug location for the first instruction and reuse it, otherwise dwarf writer may be mislead in identifying the variable's scope.

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

13 years agoUpdate comments.
Evan Cheng [Fri, 4 Feb 2011 01:10:12 +0000 (01:10 +0000)]
Update comments.

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

13 years agoSkip unused values.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 00:59:23 +0000 (00:59 +0000)]
Skip unused values.

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

13 years agoAlso compute interference intervals for blocks with no uses.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 00:39:20 +0000 (00:39 +0000)]
Also compute interference intervals for blocks with no uses.

When the live range is live through a block that doesn't use the register, but
that has interference, region splitting wants to split at the top and bottom of
the basic block.

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

13 years agoVerify kill flags conservatively.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 00:39:18 +0000 (00:39 +0000)]
Verify kill flags conservatively.

Allow a live range to end with a kill flag, but don't allow a kill flag that
doesn't end the live range.

This makes the machine code verifier more useful during register allocation when
kill flag computation is deferred.

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

13 years agoTidy up a bit.
Jim Grosbach [Thu, 3 Feb 2011 23:26:36 +0000 (23:26 +0000)]
Tidy up a bit.

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

13 years agoDo not sign extend floating-point values in the asm parser.
Bob Wilson [Thu, 3 Feb 2011 23:17:47 +0000 (23:17 +0000)]
Do not sign extend floating-point values in the asm parser.

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

13 years agoRemove trailing whitespace
Bob Wilson [Thu, 3 Feb 2011 23:17:44 +0000 (23:17 +0000)]
Remove trailing whitespace

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

13 years agoEdit a comment for consistency.
Bob Wilson [Thu, 3 Feb 2011 23:17:40 +0000 (23:17 +0000)]
Edit a comment for consistency.

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

13 years agowhitespace
Andrew Trick [Thu, 3 Feb 2011 23:00:17 +0000 (23:00 +0000)]
whitespace

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

13 years agoSimplifyCFG: Also transform switches that represent a range comparison but are not...
Benjamin Kramer [Thu, 3 Feb 2011 22:51:41 +0000 (22:51 +0000)]
SimplifyCFG: Also transform switches that represent a range comparison but are not sorted into sub+icmp.

This transforms another 1000 switches in gcc.c.

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

13 years agoMoved to Clang's source tree its configuration options and associated
Oscar Fuentes [Thu, 3 Feb 2011 22:47:59 +0000 (22:47 +0000)]
Moved to Clang's source tree its configuration options and associated
macros.

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

13 years agoFactor the computation of the basename of libraries. This avoids renaming
Rafael Espindola [Thu, 3 Feb 2011 22:01:15 +0000 (22:01 +0000)]
Factor the computation of the basename of libraries. This avoids renaming
them on install. Before we would have LLVMgold.so on the build directory but
libLLVMgold.so on the install dir.

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

13 years agoFix 80-column violations and whitespace.
Bob Wilson [Thu, 3 Feb 2011 21:46:10 +0000 (21:46 +0000)]
Fix 80-column violations and whitespace.

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

13 years agoChanges for building Clang and others using LLVM as an external
Oscar Fuentes [Thu, 3 Feb 2011 20:57:36 +0000 (20:57 +0000)]
Changes for building Clang and others using LLVM as an external
library.

Installs tblgen (required by Clang).

Translates handling of user settings and platform-dependant options to
its own file, where it can included by another project.

Installs the .cmake files required by projects like Clang.

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

13 years agoEnsure that the computed interference intervals actually overlap their basic blocks.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:43 +0000 (20:29 +0000)]
Ensure that the computed interference intervals actually overlap their basic blocks.

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

13 years agoTweak debug output from SlotIndexes.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:41 +0000 (20:29 +0000)]
Tweak debug output from SlotIndexes.

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

13 years agoAdd debug output and asserts to the phi-connecting code.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:39 +0000 (20:29 +0000)]
Add debug output and asserts to the phi-connecting code.

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

13 years agoFix coloring bug when mapping values in the middle of a live-through block.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:36 +0000 (20:29 +0000)]
Fix coloring bug when mapping values in the middle of a live-through block.

If the found value is not live-through the block, we should only add liveness up
to the requested slot index. When the value is live-through, the whole block
should be colored.

Bug found by SSA verification in the machine code verifier.

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

13 years agoReturn live range end points from SplitEditor::enter*/leave*.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 17:04:16 +0000 (17:04 +0000)]
Return live range end points from SplitEditor::enter*/leave*.

These end points come from the inserted copies, and can be passed directly to
useIntv. This simplifies the coloring code.

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

13 years agoSilence an MSVC warning
Jakob Stoklund Olesen [Thu, 3 Feb 2011 17:04:12 +0000 (17:04 +0000)]
Silence an MSVC warning

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

13 years ago[AVX] VEXTRACTF128 support. This commit includes patterns for
David Greene [Thu, 3 Feb 2011 15:50:00 +0000 (15:50 +0000)]
[AVX] VEXTRACTF128 support.  This commit includes patterns for
matching EXTRACT_SUBVECTOR to VEXTRACTF128 along with support routines
to examine and translate index values.  VINSERTF128 comes next.  With
these two in place we can begin supporting more AVX operations as
INSERT/EXTRACT can be used as a fallback when 256-bit support is not
available.

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

13 years agoAdd XCore intrinsics for resource instructions.
Richard Osborne [Thu, 3 Feb 2011 13:14:25 +0000 (13:14 +0000)]
Add XCore intrinsics for resource instructions.

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

13 years agocmake/*: Add svn:eol-style=native and fix CRLF.
NAKAMURA Takumi [Thu, 3 Feb 2011 11:41:27 +0000 (11:41 +0000)]
cmake/*: Add svn:eol-style=native and fix CRLF.

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

13 years agoImprove threading of comparisons over select instructions (spotted by my
Duncan Sands [Thu, 3 Feb 2011 09:37:39 +0000 (09:37 +0000)]
Improve threading of comparisons over select instructions (spotted by my
auto-simplifier).  This has a big impact on Ada code, but not much else.
Unfortunately the impact is mostly negative!  This is due to PR9004 (aka
SCCP failing to resolve conditional branch conditions in the destination
blocks of the branch), in which simple correlated expressions are not
resolved but complicated ones are, so simplifying has a bad effect!

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

13 years agoPart of this test is invariant inside the inner loop - move it outside
Duncan Sands [Thu, 3 Feb 2011 08:14:04 +0000 (08:14 +0000)]
Part of this test is invariant inside the inner loop - move it outside
the loop.

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

13 years agotest/Makefile: "check-all" should update tools/clang/test/Unit/lit.site.cfg, too...
NAKAMURA Takumi [Thu, 3 Feb 2011 07:36:02 +0000 (07:36 +0000)]
test/Makefile: "check-all" should update tools/clang/test/Unit/lit.site.cfg, too. Follow up to clang r124777.

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

13 years agoReapply this.
Eric Christopher [Thu, 3 Feb 2011 06:18:29 +0000 (06:18 +0000)]
Reapply this.

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

13 years agoTemporarily revert 124765 in an attempt to find the cycle breaking bootstrap.
Eric Christopher [Thu, 3 Feb 2011 05:40:54 +0000 (05:40 +0000)]
Temporarily revert 124765 in an attempt to find the cycle breaking bootstrap.

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

13 years agoPlatform tests for `sys/uio.h' header and `writev' function.
Oscar Fuentes [Thu, 3 Feb 2011 04:23:07 +0000 (04:23 +0000)]
Platform tests for `sys/uio.h' header and `writev' function.

This is the cmake equivalent for r124769.

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

13 years agoAdd -march to fix the bots.
Rafael Espindola [Thu, 3 Feb 2011 04:21:01 +0000 (04:21 +0000)]
Add -march to fix the bots.

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

13 years agoFix PR9127 by reversing the operands even if they have more then one use.
Rafael Espindola [Thu, 3 Feb 2011 03:58:05 +0000 (03:58 +0000)]
Fix PR9127 by reversing the operands even if they have more then one use.
Reversing the operands allows us to fold, but doesn't force us to. Also, at
this point the DAG is still being optimized, so the check for hasOneUse is not
very precise.

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

13 years agoraw_fd_ostream: Add a SetUseAtomicWrites() method (uses writev).
Daniel Dunbar [Thu, 3 Feb 2011 03:32:32 +0000 (03:32 +0000)]
raw_fd_ostream: Add a SetUseAtomicWrites() method (uses writev).

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

13 years agoRegenerate configure.
Daniel Dunbar [Thu, 3 Feb 2011 02:40:02 +0000 (02:40 +0000)]
Regenerate configure.

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

13 years agoconfigure: Add checks for <sys/uio.h> and writev().
Daniel Dunbar [Thu, 3 Feb 2011 02:39:58 +0000 (02:39 +0000)]
configure: Add checks for <sys/uio.h> and writev().

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

13 years agoDefer SplitKit value mapping until all defs are available.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 00:54:23 +0000 (00:54 +0000)]
Defer SplitKit value mapping until all defs are available.

The greedy register allocator revealed some problems with the value mapping in
SplitKit. We would sometimes start mapping values before all defs were known,
and that could change a value from a simple 1-1 mapping to a multi-def mapping
that requires ssa update.

The new approach collects all defs and register assignments first without
filling in any live intervals. Only when finish() is called, do we compute
liveness and mapped values. At this time we know with certainty which values map
to multiple values in a split range.

This also has the advantage that we can compute live ranges based on the
remaining uses after rematerializing at split points.

The current implementation has many opportunities for compile time optimization.

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

13 years agoUpdate docs to match reality.
Devang Patel [Thu, 3 Feb 2011 00:22:17 +0000 (00:22 +0000)]
Update docs to match reality.

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

13 years agoFix typo in comment.
Devang Patel [Thu, 3 Feb 2011 00:13:47 +0000 (00:13 +0000)]
Fix typo in comment.

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

13 years agoAdd support to describe template value parameter in debug info.
Devang Patel [Wed, 2 Feb 2011 22:35:53 +0000 (22:35 +0000)]
Add support to describe template value parameter in debug info.

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

13 years agoAdd support to describe template parameter type in debug info.
Devang Patel [Wed, 2 Feb 2011 21:38:25 +0000 (21:38 +0000)]
Add support to describe template parameter type in debug info.

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

13 years agoReenable the transform "(X*Y)/Y->X" when the multiplication is known not to
Duncan Sands [Wed, 2 Feb 2011 20:52:00 +0000 (20:52 +0000)]
Reenable the transform "(X*Y)/Y->X" when the multiplication is known not to
overflow (nsw flag), which was disabled because it breaks 254.gap.  I have
informed the GAP authors of the mistake in their code, and arranged for the
testsuite to use -fwrapv when compiling this benchmark.

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

13 years agoChanged the TableGen created MatchInstructionImpl() setting of ErrorInfo.
Kevin Enderby [Wed, 2 Feb 2011 18:20:55 +0000 (18:20 +0000)]
Changed the TableGen created MatchInstructionImpl() setting of ErrorInfo.

The algorithm for identifying which operand is invalid will now always point to
some operand and not the mnemonic sometimes.  The change is now that ErrorInfo
is the index of the highest operand that does not match for any of the matching
mnemonics records.  And no longer the ~0U value when the mnemonic matches and
not every record with a matching mnemonic has the same mismatching operand
index.

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

13 years agoUpdate comment to match my recent change.
Bob Wilson [Wed, 2 Feb 2011 17:29:40 +0000 (17:29 +0000)]
Update comment to match my recent change.

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

13 years agoSimplifyCFG: Turn switches into sub+icmp+branch if possible.
Benjamin Kramer [Wed, 2 Feb 2011 15:56:22 +0000 (15:56 +0000)]
SimplifyCFG: Turn switches into sub+icmp+branch if possible.

This makes the job of the later optzn passes easier, allowing the vast amount of
icmp transforms to chew on it.

We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting
binary on i386-linux.

The testcase from README.txt now compiles into
  decl  %edi
  cmpl  $3, %edi
  sbbl  %eax, %eax
  andl  $1, %eax
  ret

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

13 years agoAdd support for trampolines on the XCore.
Richard Osborne [Wed, 2 Feb 2011 14:57:41 +0000 (14:57 +0000)]
Add support for trampolines on the XCore.

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

13 years agoRemove NoVendor and NoOS, added in commit 123990, from Triple. While it
Duncan Sands [Wed, 2 Feb 2011 10:08:38 +0000 (10:08 +0000)]
Remove NoVendor and NoOS, added in commit 123990, from Triple.  While it
may be useful to understand "none", this is not the place for it.  Tweak
the fix to Normalize while there: the fix added in 123990 works correctly,
but I like this way better.  Finally, now that Triple understands some
non-trivial environment values, teach the unittests about them.

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

13 years agoRemove wasteful caching. This isn't needed for correctness because any function
Nick Lewycky [Wed, 2 Feb 2011 05:31:01 +0000 (05:31 +0000)]
Remove wasteful caching. This isn't needed for correctness because any function
that might have changed been affected by a merge elsewhere will have been
removed from the function set, and it isn't needed for performance because we
call grow() ahead of time to prevent reallocations.

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

13 years agoConservatively, clear optional flags, such as nsw, when performing
Dan Gohman [Wed, 2 Feb 2011 02:05:46 +0000 (02:05 +0000)]
Conservatively, clear optional flags, such as nsw, when performing
reassociation. No testcase, because I wasn't able to create a testcase
which actually demonstrates a problem.

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

13 years agoFix reassociate to clear optional flags, such as nsw.
Dan Gohman [Wed, 2 Feb 2011 02:02:34 +0000 (02:02 +0000)]
Fix reassociate to clear optional flags, such as nsw.

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

13 years agoFixed a bug in the disassembler where the mandatory 0x66
Sean Callanan [Wed, 2 Feb 2011 01:09:02 +0000 (01:09 +0000)]
Fixed a bug in the disassembler where the mandatory 0x66
prefix would be misinterpreted in some cases on 32-bit
x86 platforms.  Thanks to Olivier Meurant for identifying
the bug.

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

13 years agoGiven a pair of floating point load and store, if there are no other uses of
Evan Cheng [Wed, 2 Feb 2011 01:06:55 +0000 (01:06 +0000)]
Given a pair of floating point load and store, if there are no other uses of
the load, then it may be legal to transform the load and store to integer
load and store of the same width.

This is done if the target specified the transformation as profitable. e.g.
On arm, this can transform:
vldr.32 s0, []
vstr.32 s0, []

to

ldr r12, []
str r12, []

rdar://8944252

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

13 years agoFix comment typo.
Bob Wilson [Wed, 2 Feb 2011 00:46:09 +0000 (00:46 +0000)]
Fix comment typo.

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

13 years agoPR9081: Split up LDM instruction with deprecated use of both LR and PC.
Bob Wilson [Tue, 1 Feb 2011 22:30:51 +0000 (22:30 +0000)]
PR9081: Split up LDM instruction with deprecated use of both LR and PC.
This is completely untested but pretty straightforward, so hopefully I
got it right.

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

13 years agoTake Bill Wendling's suggestion for structuring a couple of asserts.
Matt Beaumont-Gay [Tue, 1 Feb 2011 22:12:50 +0000 (22:12 +0000)]
Take Bill Wendling's suggestion for structuring a couple of asserts.

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

13 years agoUpdate to match changes in lldb interface.
Devang Patel [Tue, 1 Feb 2011 21:47:35 +0000 (21:47 +0000)]
Update to match changes in lldb interface.

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

13 years agoFix imm printing for logical instructions.
Anton Korobeynikov [Tue, 1 Feb 2011 20:22:53 +0000 (20:22 +0000)]
Fix imm printing for logical instructions.
Patch by Brian G. Lucas!

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

13 years agoDocument the LLVM GIT mirror
Anton Korobeynikov [Tue, 1 Feb 2011 20:08:28 +0000 (20:08 +0000)]
Document the LLVM GIT mirror

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

13 years ago[AVX] Implement EnforceSmallerThan for mixed int/fp type lists. This
David Greene [Tue, 1 Feb 2011 19:12:32 +0000 (19:12 +0000)]
[AVX] Implement EnforceSmallerThan for mixed int/fp type lists.  This
makes type checking for extract_subvector and insert_subvector more
robust and will allow stricter typechecking of more patterns in the
future.

This change handles int and fp as disjoint sets so that it will
enforce integer types to be smaller than the largest integer type and
fp types to be smaller than the largest fp type.  There is no attempt
to check type sizes across the int/fp sets.

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

13 years agoRemove stale references of obsolete @llvm.dbg.variable.
Devang Patel [Tue, 1 Feb 2011 17:22:12 +0000 (17:22 +0000)]
Remove stale references of obsolete @llvm.dbg.variable.

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

13 years agoMake SwitchInst::removeCase() more efficient.
Jay Foad [Tue, 1 Feb 2011 09:22:34 +0000 (09:22 +0000)]
Make SwitchInst::removeCase() more efficient.

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

13 years agoAdd a m_Undef pattern for convenience. This is so that code that uses
Duncan Sands [Tue, 1 Feb 2011 09:06:20 +0000 (09:06 +0000)]
Add a m_Undef pattern for convenience.  This is so that code that uses
pattern matching can also pattern match undef, creating a more uniform
style.

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

13 years agoAdd a m_SignBit pattern for convenience.
Duncan Sands [Tue, 1 Feb 2011 08:50:33 +0000 (08:50 +0000)]
Add a m_SignBit pattern for convenience.

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

13 years agoHave m_One also match constant vectors for which every element is 1.
Duncan Sands [Tue, 1 Feb 2011 08:39:12 +0000 (08:39 +0000)]
Have m_One also match constant vectors for which every element is 1.

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

13 years agoTest commit - fix a double 'should' in a comment.
Carl Norum [Tue, 1 Feb 2011 07:38:42 +0000 (07:38 +0000)]
Test commit - fix a double 'should' in a comment.

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

13 years agoCorrectly merge available_externally and regular definitions when they have
Rafael Espindola [Tue, 1 Feb 2011 05:33:52 +0000 (05:33 +0000)]
Correctly merge available_externally and regular definitions when they have
different visibilities.

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

13 years agoFix bogus assert condition noticed by Csaba Raduly.
Evan Cheng [Tue, 1 Feb 2011 01:50:49 +0000 (01:50 +0000)]
Fix bogus assert condition noticed by Csaba Raduly.

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

13 years agoReapply 124275 since the Dragonegg failure was unreproducible.
Eric Christopher [Tue, 1 Feb 2011 01:16:32 +0000 (01:16 +0000)]
Reapply 124275 since the Dragonegg failure was unreproducible.

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

13 years agoFix test for non-darwin targets.
Evan Cheng [Tue, 1 Feb 2011 01:16:18 +0000 (01:16 +0000)]
Fix test for non-darwin targets.

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

13 years agoPatches to build EFI with Clang/LLVM. By Carl Norum.
Evan Cheng [Tue, 1 Feb 2011 01:14:13 +0000 (01:14 +0000)]
Patches to build EFI with Clang/LLVM. By Carl Norum.

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

13 years agoRemove stale test that has never worked, afaik.
Devang Patel [Tue, 1 Feb 2011 00:47:16 +0000 (00:47 +0000)]
Remove stale test that has never worked, afaik.

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

13 years agoDon't tell the linker about available_externally definitions. If we do, it will
Rafael Espindola [Tue, 1 Feb 2011 00:41:51 +0000 (00:41 +0000)]
Don't tell the linker about available_externally definitions. If we do, it will
complain about duplicated definitions.

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

13 years agoKeep track of incoming argument's location while emitting LiveIns.
Devang Patel [Mon, 31 Jan 2011 21:38:14 +0000 (21:38 +0000)]
Keep track of incoming argument's location while emitting LiveIns.

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

13 years agoWhile printing "interesting" breakpoint locations for debug info quality test harness...
Devang Patel [Mon, 31 Jan 2011 21:36:24 +0000 (21:36 +0000)]
While printing "interesting" breakpoint locations for debug info quality test harness, focus only on entry block's terminator for now.

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

13 years agoEnumerate .code16/32/64 instead of checking .code prefix. This
Roman Divacky [Mon, 31 Jan 2011 21:19:43 +0000 (21:19 +0000)]
Enumerate .code16/32/64 instead of checking .code prefix. This
unbreaks some ARM tests.

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

13 years agoTidy up.
Devang Patel [Mon, 31 Jan 2011 21:16:37 +0000 (21:16 +0000)]
Tidy up.

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

13 years agoFocus on arguments for now.
Devang Patel [Mon, 31 Jan 2011 21:15:39 +0000 (21:15 +0000)]
Focus on arguments for now.

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

13 years agoError on all .code* directives instead of just .code16 as they
Roman Divacky [Mon, 31 Jan 2011 20:56:49 +0000 (20:56 +0000)]
Error on all .code* directives instead of just .code16 as they
all lead to a silent miscompilation of code.

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

13 years agoFix vector sign extend to put the source and destination types in the
David Greene [Mon, 31 Jan 2011 20:39:01 +0000 (20:39 +0000)]
Fix vector sign extend to put the source and destination types in the
correct places.

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

13 years agoadd a note, progress unblocked by PR8575 being fixed.
Chris Lattner [Mon, 31 Jan 2011 20:23:28 +0000 (20:23 +0000)]
add a note, progress unblocked by PR8575 being fixed.

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

13 years agoAdds some platform checks to cmake/config-ix.cmake and fixes checking
Oscar Fuentes [Mon, 31 Jan 2011 18:25:25 +0000 (18:25 +0000)]
Adds some platform checks to cmake/config-ix.cmake and fixes checking
for dlopen/dlerror.

Patch by arrowdodger!

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

13 years agoFix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.
Richard Osborne [Mon, 31 Jan 2011 17:41:44 +0000 (17:41 +0000)]
Fix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.

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

13 years agoCMake: Fix a few definition to suppress warnings.
NAKAMURA Takumi [Mon, 31 Jan 2011 09:41:20 +0000 (09:41 +0000)]
CMake: Fix a few definition to suppress warnings.

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

13 years agoSave a mapping between original and cloned constpool entries.
Anton Korobeynikov [Sun, 30 Jan 2011 22:07:39 +0000 (22:07 +0000)]
Save a mapping between original and cloned constpool entries.

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

13 years agoClarify the LSDASection NULL check
Anton Korobeynikov [Sun, 30 Jan 2011 22:07:31 +0000 (22:07 +0000)]
Clarify the LSDASection NULL check

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