Commit Graph

69774 Commits

Author SHA1 Message Date
Bob Wilson
69df72367f Fix 80-column violations and whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124819 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 21:46:10 +00:00
Oscar Fuentes
d538e24922 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
2011-02-03 20:57:36 +00:00
Jakob Stoklund Olesen
2dfbb3e912 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
2011-02-03 20:29:43 +00:00
Jakob Stoklund Olesen
97af98678c Tweak debug output from SlotIndexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124814 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 20:29:41 +00:00
Jakob Stoklund Olesen
c50f077b06 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
2011-02-03 20:29:39 +00:00
Jakob Stoklund Olesen
08eb8dd616 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
2011-02-03 20:29:36 +00:00
Jakob Stoklund Olesen
207c868c92 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
2011-02-03 17:04:16 +00:00
Jakob Stoklund Olesen
9590c7fbca Silence an MSVC warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124798 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 17:04:12 +00:00
David Greene
c38a03eeca [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
2011-02-03 15:50:00 +00:00
Richard Osborne
17c1e51d22 Add XCore intrinsics for resource instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124794 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 13:14:25 +00:00
NAKAMURA Takumi
76422f3e08 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
2011-02-03 11:41:27 +00:00
Duncan Sands
50ca4d37f7 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
2011-02-03 09:37:39 +00:00
Duncan Sands
ee64684710 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
2011-02-03 08:14:04 +00:00
NAKAMURA Takumi
ee0056d866 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
2011-02-03 07:36:02 +00:00
Eric Christopher
0f43811903 Reapply this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124779 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 06:18:29 +00:00
Eric Christopher
463a2977b1 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
2011-02-03 05:40:54 +00:00
Oscar Fuentes
254f35ca4a 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
2011-02-03 04:23:07 +00:00
Rafael Espindola
855ff183b9 Add -march to fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124774 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 04:21:01 +00:00
Rafael Espindola
f297c93191 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
2011-02-03 03:58:05 +00:00
Daniel Dunbar
b0cfa6cab8 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
2011-02-03 03:32:32 +00:00
Daniel Dunbar
3e46293c27 Regenerate configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124770 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 02:40:02 +00:00
Daniel Dunbar
5cd067f558 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
2011-02-03 02:39:58 +00:00
Jakob Stoklund Olesen
2cd2111959 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
2011-02-03 00:54:23 +00:00
Devang Patel
3728078509 Update docs to match reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124761 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 00:22:17 +00:00
Devang Patel
716a67f1b7 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124759 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 00:13:47 +00:00
Devang Patel
e7d93877c6 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
2011-02-02 22:35:53 +00:00
Devang Patel
7e2cb11655 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
2011-02-02 21:38:25 +00:00
Duncan Sands
4b720718fb 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
2011-02-02 20:52:00 +00:00
Kevin Enderby
79fcb6dec3 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
2011-02-02 18:20:55 +00:00
Bob Wilson
92e7195e43 Update comment to match my recent change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124725 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02 17:29:40 +00:00
Benjamin Kramer
56442dfdcf 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
2011-02-02 15:56:22 +00:00
Richard Osborne
ff0c5014b2 Add support for trampolines on the XCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124722 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02 14:57:41 +00:00
Duncan Sands
ae200c60c3 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
2011-02-02 10:08:38 +00:00
Nick Lewycky
8eb3e54592 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
2011-02-02 05:31:01 +00:00
Dan Gohman
5195b71941 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
2011-02-02 02:05:46 +00:00
Dan Gohman
46985a1440 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
2011-02-02 02:02:34 +00:00
Sean Callanan
1e1901a294 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
2011-02-02 01:09:02 +00:00
Evan Cheng
31959b19a7 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
2011-02-02 01:06:55 +00:00
Bob Wilson
63f8659d69 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124705 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02 00:46:09 +00:00
Bob Wilson
692df93de4 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
2011-02-01 22:30:51 +00:00
Matt Beaumont-Gay
9a14a362d0 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
2011-02-01 22:12:50 +00:00
Devang Patel
a3138424cf Update to match changes in lldb interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124687 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 21:47:35 +00:00
Anton Korobeynikov
cf2cdc9cae 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
2011-02-01 20:22:53 +00:00
Anton Korobeynikov
46a98cf1f1 Document the LLVM GIT mirror
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124677 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 20:08:28 +00:00
David Greene
9d7f011110 [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
2011-02-01 19:12:32 +00:00
Devang Patel
e136e506ec 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
2011-02-01 17:22:12 +00:00
Jay Foad
0faa60938a Make SwitchInst::removeCase() more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124659 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 09:22:34 +00:00
Duncan Sands
f9e4a986c0 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
2011-02-01 09:06:20 +00:00
Duncan Sands
93c780288d Add a m_SignBit pattern for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124656 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 08:50:33 +00:00
Duncan Sands
7681c6da60 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
2011-02-01 08:39:12 +00:00