oota-llvm.git
13 years agoAdd DecodeShuffle shuffle support for VPERMIPD variantes
Bruno Cardoso Lopes [Fri, 29 Jul 2011 01:31:11 +0000 (01:31 +0000)]
Add DecodeShuffle shuffle support for VPERMIPD variantes

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

13 years agoAdd v8i32 and v4i64 vpermil patterns
Bruno Cardoso Lopes [Fri, 29 Jul 2011 01:31:07 +0000 (01:31 +0000)]
Add v8i32 and v4i64 vpermil patterns

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

13 years agoFix a bug while generating target specific VPERMIL masks: skip
Bruno Cardoso Lopes [Fri, 29 Jul 2011 01:31:04 +0000 (01:31 +0000)]
Fix a bug while generating target specific VPERMIL masks: skip
undef mask elements. This fixes PR10529.

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

13 years agoEnable usage of SSE4 extracts and inserts in their 128-bit AVX forms.
Bruno Cardoso Lopes [Fri, 29 Jul 2011 01:31:02 +0000 (01:31 +0000)]
Enable usage of SSE4 extracts and inserts in their 128-bit AVX forms.
Also tidy up code a bit.

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

13 years agoCleanup PALIGNR handling and remove the old palign pattern fragment.
Bruno Cardoso Lopes [Fri, 29 Jul 2011 01:30:59 +0000 (01:30 +0000)]
Cleanup PALIGNR handling and remove the old palign pattern fragment.
Also make PALIGNR masks to don't match 256-bits, which isn't supported
It's also a step to solve PR10489

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

13 years agoUse the pointer type size.
Bill Wendling [Fri, 29 Jul 2011 01:15:29 +0000 (01:15 +0000)]
Use the pointer type size.

With this, we can now compile a simple EH program.

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

13 years agoAnd now something that compiles...
Bill Wendling [Fri, 29 Jul 2011 01:11:33 +0000 (01:11 +0000)]
And now something that compiles...

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

13 years agoMake sure to sext or trunc the result from the register.
Bill Wendling [Fri, 29 Jul 2011 01:11:14 +0000 (01:11 +0000)]
Make sure to sext or trunc the result from the register.

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

13 years agoTransfer implicit operands in NEONMoveFixPass.
Jakob Stoklund Olesen [Fri, 29 Jul 2011 00:27:35 +0000 (00:27 +0000)]
Transfer implicit operands in NEONMoveFixPass.

Later passes /are/ using this information when running the register
scavenger.

This fixes the second problem in PR10520.

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

13 years agoAdd -verify-arm-pseudo-expand.
Jakob Stoklund Olesen [Fri, 29 Jul 2011 00:27:32 +0000 (00:27 +0000)]
Add -verify-arm-pseudo-expand.

This hidden llc option runs the machine code verifier after expanding
ARM pseudo-instructions, but before if-conversion.

The machine code verifier is much better at pointing out liveness errors
that can trip up the register scavenger.

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

13 years agoMake sure to correctly clear the exact/nuw/nsw flags off of shifts when they are...
Eli Friedman [Fri, 29 Jul 2011 00:18:19 +0000 (00:18 +0000)]
Make sure to correctly clear the exact/nuw/nsw flags off of shifts when they are combined together. <rdar://problem/9859829>

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

13 years agoRewrite the CMake build to use explicit dependencies between libraries,
Chandler Carruth [Fri, 29 Jul 2011 00:14:25 +0000 (00:14 +0000)]
Rewrite the CMake build to use explicit dependencies between libraries,
specified in the same file that the library itself is created. This is
more idiomatic for CMake builds, and also allows us to correctly specify
dependencies that are missed due to bugs in the GenLibDeps perl script,
or change from compiler to compiler. On Linux, this returns CMake to
a place where it can relably rebuild several targets of LLVM.

I have tried not to change the dependencies from the ones in the current
auto-generated file. The only places I've really diverged are in places
where I was seeing link failures, and added a dependency. The goal of
this patch is not to start changing the dependencies, merely to move
them into the correct location, and an explicit form that we can control
and change when necessary.

This also removes a serialization point in the build because we don't
have to scan all the libraries before we begin building various tools.
We no longer have a step of the build that regenerates a file inside the
source tree. A few other associated cleanups fall out of this.

This isn't really finished yet though. After talking to dgregor he urged
switching to a single CMake macro to construct libraries with both
sources and dependencies in the arguments. Migrating from the two macros
to that style will be a follow-up patch.

Also, llvm-config is still generated with GenLibDeps.pl, which means it
still has slightly buggy dependencies. The internal CMake
'llvm-config-like' macro uses the correct explicitly specified
dependencies however. A future patch will switch llvm-config generation
(when using CMake) to be based on these deps as well.

This may well break Windows. I'm getting a machine set up now to dig
into any failures there. If anyone can chime in with problems they see
or ideas of how to solve them for Windows, much appreciated.

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

13 years agoRemove extra semicolon.
Jakub Staszak [Fri, 29 Jul 2011 00:05:35 +0000 (00:05 +0000)]
Remove extra semicolon.

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

13 years agoEnhance the fixed-length decoder emitter to support tied operands.
Owen Anderson [Thu, 28 Jul 2011 23:56:20 +0000 (23:56 +0000)]
Enhance the fixed-length decoder emitter to support tied operands.

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

13 years agoVisit the landingpad instruction.
Bill Wendling [Thu, 28 Jul 2011 23:44:58 +0000 (23:44 +0000)]
Visit the landingpad instruction.

This generates the correct SDNodes for the landingpad instruction. It makes an
assumption that the result of the landingpad instruction has at least two
values. And that the first value is a pointer to the exception object and the
second value is the "selector."

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

13 years agoAdd the AddLandingPadInfo function.
Bill Wendling [Thu, 28 Jul 2011 23:42:57 +0000 (23:42 +0000)]
Add the AddLandingPadInfo function.

AddLandingPadInfo takes a landingpad instruction and grabs all of the
information from it that it needs for EH table generation.

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

13 years agoChange LBH_TAKEN_WEIGHT to 124 (from 128). Right now, sum of
Jakub Staszak [Thu, 28 Jul 2011 23:42:08 +0000 (23:42 +0000)]
Change LBH_TAKEN_WEIGHT to 124 (from 128). Right now, sum of
LBH_TAKEN_WEIGHT + LBH_NONTAKEN_WEIGHT = 128 which in _most_ cases reduce
number of rounding errors.

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

13 years agoPLD and PLI are not predicable in ARM mode.
Jim Grosbach [Thu, 28 Jul 2011 23:22:41 +0000 (23:22 +0000)]
PLD and PLI are not predicable in ARM mode.

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

13 years agoCBZ/CBNZ are Thumb2 only. No need for ARM mode tests for them.
Jim Grosbach [Thu, 28 Jul 2011 21:59:38 +0000 (21:59 +0000)]
CBZ/CBNZ are Thumb2 only. No need for ARM mode tests for them.

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

13 years agoARM assembly parsing and encoding for BLX (immediate).
Jim Grosbach [Thu, 28 Jul 2011 21:57:55 +0000 (21:57 +0000)]
ARM assembly parsing and encoding for BLX (immediate).

Add parsing support for BLX (immediate). Since the register operand version is
predicated and the label operand version is not, we have to use some special
handling to get the operand list right for matching.

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

13 years agoEnhance the fixed-length decoder emitter to support parsing scattered fields.
Owen Anderson [Thu, 28 Jul 2011 21:54:31 +0000 (21:54 +0000)]
Enhance the fixed-length decoder emitter to support parsing scattered fields.

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

13 years agoLangRef and basic memory-representation/reading/writing for 'cmpxchg' and
Eli Friedman [Thu, 28 Jul 2011 21:48:00 +0000 (21:48 +0000)]
LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.

The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.

As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible.  I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.

Optimizer/codegen support coming soon.

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

13 years agoIf run with -debug give more information about Cyclic Probability.
Jakub Staszak [Thu, 28 Jul 2011 21:46:58 +0000 (21:46 +0000)]
If run with -debug give more information about Cyclic Probability.

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

13 years agoHeuristics are in descending priority now. If we use one of them, skip the rest.
Jakub Staszak [Thu, 28 Jul 2011 21:45:07 +0000 (21:45 +0000)]
Heuristics are in descending priority now. If we use one of them, skip the rest.

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

13 years agoHandle REG_SEQUENCE with implicitly defined operands.
Jakob Stoklund Olesen [Thu, 28 Jul 2011 21:38:51 +0000 (21:38 +0000)]
Handle REG_SEQUENCE with implicitly defined operands.

Code like that would only be produced by bugpoint, but we should still
handle it correctly.

When a register is defined by a REG_SEQUENCE of undefs, the register
itself is undef. Previously, we would create a register with uses but no
defs.

Fixes part of PR10520.

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

13 years agoRemove obsolete FIXME reference in comment.
Jim Grosbach [Thu, 28 Jul 2011 21:37:05 +0000 (21:37 +0000)]
Remove obsolete FIXME reference in comment.

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

13 years agoARM assembly parsing and encoding for BFC and BFI.
Jim Grosbach [Thu, 28 Jul 2011 21:34:26 +0000 (21:34 +0000)]
ARM assembly parsing and encoding for BFC and BFI.

Add parsing support that handles converting the lsb+width source into the
odd way we represent the instruction (an inverted bitfield mask).

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

13 years agoAdd InEdges (edges from header to the loop) in Loop Branch Heuristics, so
Jakub Staszak [Thu, 28 Jul 2011 21:33:46 +0000 (21:33 +0000)]
Add InEdges (edges from header to the loop) in Loop Branch Heuristics, so
there is no frequency difference whether condition is in the header or in
the latch.

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

13 years agoUse ArrayRef instead of requiring an std::vector.
Bill Wendling [Thu, 28 Jul 2011 21:25:33 +0000 (21:25 +0000)]
Use ArrayRef instead of requiring an std::vector.

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

13 years agoThe personality function should be a Function* and not just a Value*.
Bill Wendling [Thu, 28 Jul 2011 21:14:13 +0000 (21:14 +0000)]
The personality function should be a Function* and not just a Value*.

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

13 years agoFix Clang attribute reader tblgen output for a corresponding fix on the Clang side
Douglas Gregor [Thu, 28 Jul 2011 20:55:16 +0000 (20:55 +0000)]
Fix Clang attribute reader tblgen output for a corresponding fix on the Clang side

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

13 years agoReverse order of RS_Split live ranges under -compact-regions.
Jakob Stoklund Olesen [Thu, 28 Jul 2011 20:48:23 +0000 (20:48 +0000)]
Reverse order of RS_Split live ranges under -compact-regions.

There are two conflicting strategies in play:

- Under high register pressure, we want to assign large live ranges
  first. Smaller live ranges are easier to place afterwards.

- Live range splitting is guided by interference, so splitting should be
  deferred until interference is as realistic as possible.

With the recent changes to the live range stages, and with compact
regions enabled, it is less traumatic to split a live range too early.
If some of the split products were too big, they can often be split
again.

By reversing the RS_Split order, we get this queue order:

1. Normal live ranges, large to small.
2. RS_Split live ranges, large to small.

The large-to-small order improves RAGreedy's puzzle solving skills under
high register pressure. It may cause a bit more iterated splitting, but
we handle that better now.

With this change, -compact-regions is mostly an improvement on SPEC.

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

13 years agoInitial code to convert ResumeInsts into calls to _Unwind_Resume.
Bill Wendling [Thu, 28 Jul 2011 20:48:05 +0000 (20:48 +0000)]
Initial code to convert ResumeInsts into calls to _Unwind_Resume.

This should be the only code necessary for DWARF EH prepare.

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

13 years agoFix stupid mistake from commit 136381.
Jakub Staszak [Thu, 28 Jul 2011 20:17:18 +0000 (20:17 +0000)]
Fix stupid mistake from commit 136381.

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

13 years agoSpeed up BlockFrequencyInfo a little bit.
Jakub Staszak [Thu, 28 Jul 2011 20:09:31 +0000 (20:09 +0000)]
Speed up BlockFrequencyInfo a little bit.

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

13 years agoAdd fixme.
Jim Grosbach [Thu, 28 Jul 2011 19:46:12 +0000 (19:46 +0000)]
Add fixme.

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

13 years agoUse version 402 for the GCDA files when compiling for Apple.
Bill Wendling [Thu, 28 Jul 2011 18:12:20 +0000 (18:12 +0000)]
Use version 402 for the GCDA files when compiling for Apple.

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

13 years agoUpdate comments.
Owen Anderson [Thu, 28 Jul 2011 17:56:55 +0000 (17:56 +0000)]
Update comments.

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

13 years agoFill in some encoding information for STRD instructions.
Owen Anderson [Thu, 28 Jul 2011 17:53:25 +0000 (17:53 +0000)]
Fill in some encoding information for STRD instructions.

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

13 years agoRevert r136295. It broke nightly testers because some parts of codegen weren't aware...
Owen Anderson [Thu, 28 Jul 2011 17:18:57 +0000 (17:18 +0000)]
Revert r136295.  It broke nightly testers because some parts of codegen weren't aware of the changes to operand ordering.  I hope to revive this sometime in the future, but it's not strictly necessary for now.

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

13 years agoARM parsing and encoding for ADR.
Jim Grosbach [Thu, 28 Jul 2011 16:33:54 +0000 (16:33 +0000)]
ARM parsing and encoding for ADR.

The label does not have a '#' prefix. Add parsing and encoding tests.

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

13 years agoUpdate ARM tests for parsing and encoding of WFE, WFI and YIELD.
Jim Grosbach [Thu, 28 Jul 2011 16:00:41 +0000 (16:00 +0000)]
Update ARM tests for parsing and encoding of WFE, WFI and YIELD.

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

13 years agoCR fix: The ANY_EXTEND can be removed because the input and putput type must be
Nadav Rotem [Thu, 28 Jul 2011 14:38:46 +0000 (14:38 +0000)]
CR fix: The ANY_EXTEND can be removed because the input and putput type must be
identical.

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

13 years agoUse unsigned rather than uint16_t in case anyone feels like testing
Duncan Sands [Thu, 28 Jul 2011 14:37:53 +0000 (14:37 +0000)]
Use unsigned rather than uint16_t in case anyone feels like testing
more graphs, like all graphs with 5 nodes or less.  With a 32 bit
unsigned type, the maximum is graphs with 6 nodes or less, but that
would take a while to test - 5 nodes or less already requires a few
seconds.

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

13 years agoCheck an additional property specific to the way LLVM
Duncan Sands [Thu, 28 Jul 2011 14:33:01 +0000 (14:33 +0000)]
Check an additional property specific to the way LLVM
iterates over SCC's.

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

13 years agoAdd a unittest for the simply connected components (SCC) iterator class.
Duncan Sands [Thu, 28 Jul 2011 14:17:11 +0000 (14:17 +0000)]
Add a unittest for the simply connected components (SCC) iterator class.
This computes every graph with 4 or fewer nodes, and checks that the SCC
class indeed returns exactly the simply connected components reachable
from the initial node.

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

13 years agoDue to changes coming from the new LLVM type system, you now get
Duncan Sands [Thu, 28 Jul 2011 12:21:47 +0000 (12:21 +0000)]
Due to changes coming from the new LLVM type system, you now get
bitcasts in this test rather than getelementptr instructions;
llvm-gcc produces two bitcasts, clang produces one.

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

13 years agoThis file was moved from Support to ADT. Correct a comment.
Duncan Sands [Thu, 28 Jul 2011 08:36:22 +0000 (08:36 +0000)]
This file was moved from Support to ADT.  Correct a comment.

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

13 years agoSome minor cleanups. No functionalitical change.
Bill Wendling [Thu, 28 Jul 2011 07:44:07 +0000 (07:44 +0000)]
Some minor cleanups. No functionalitical change.

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

13 years agoLeverage some of the code that John wrote to manage the landing pads.
Bill Wendling [Thu, 28 Jul 2011 07:31:46 +0000 (07:31 +0000)]
Leverage some of the code that John wrote to manage the landing pads.

The new EH is more simple in many respects. Mainly, we don't have to worry about
the "llvm.eh.exception" and "llvm.eh.selector" calls being in weird places.

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

13 years agoDon't add in the asked for size so that we don't copy too much from the old to new...
Bill Wendling [Thu, 28 Jul 2011 07:26:41 +0000 (07:26 +0000)]
Don't add in the asked for size so that we don't copy too much from the old to new vectors.

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

13 years agoIn DenseMapInfo<pair<T, U>> tombstone key, use the tombstone for T and U instead
Nick Lewycky [Thu, 28 Jul 2011 06:48:33 +0000 (06:48 +0000)]
In DenseMapInfo<pair<T, U>> tombstone key, use the tombstone for T and U instead
of the empty key for U. This shouldn't really matter because the tombstone key
for the pair was still distinct from every other key, but it is odd. Patch by
Michael Ilseman!

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

13 years agoAutomatically merge the landingpad clauses when we come across a callee's
Bill Wendling [Thu, 28 Jul 2011 02:40:13 +0000 (02:40 +0000)]
Automatically merge the landingpad clauses when we come across a callee's
landingpad.

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

13 years agoExplicitly declare a library dependency of LLVM*Desc to
Oscar Fuentes [Thu, 28 Jul 2011 02:33:52 +0000 (02:33 +0000)]
Explicitly declare a library dependency of LLVM*Desc to
LLVM*AsmPrinter.

GenLibDeps.pl fails to detect vtable references. As this is the only
referenced symbol from LLVM*Desc to LLVM*AsmPrinter on optimized
builds, the algorithm that creates the list of libraries to be linked
into tools doesn't know about the dependency and sometimes places the
libraries on the wrong order, yielding error messages like this:

../../lib/libLLVMARMDesc.a(ARMMCTargetDesc.cpp.o): In function
`llvm::ARMInstPrinter::ARMInstPrinter(llvm::MCAsmInfo const&)':
ARMMCTargetDesc.cpp:(.text._ZN4llvm14ARMInstPrinterC1ERKNS_9MCAsmInfoE
[llvm::ARMInstPrinter::ARMInstPrinter(llvm::MCAsmInfo
const&)]+0x2a): undefined reference to `vtable for
llvm::ARMInstPrinter'

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

13 years agoUpdated cmake library dependencies.
Oscar Fuentes [Thu, 28 Jul 2011 02:33:33 +0000 (02:33 +0000)]
Updated cmake library dependencies.

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

13 years agoMake sure that the landingpad instruction takes a Constant* as the clause's value.
Bill Wendling [Thu, 28 Jul 2011 02:27:12 +0000 (02:27 +0000)]
Make sure that the landingpad instruction takes a Constant* as the clause's value.

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

13 years agoAdd a couple of convenience functions:
Bill Wendling [Thu, 28 Jul 2011 02:15:52 +0000 (02:15 +0000)]
Add a couple of convenience functions:

* InvokeInst: Get the landingpad instruction associated with this invoke.
* LandingPadInst: A method to reserve extra space for clauses.

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

13 years agoInvert the subvector insertion to be more likely to be taken as a COPY
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:53 +0000 (01:26 +0000)]
Invert the subvector insertion to be more likely to be taken as a COPY

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

13 years agoAdd patterns to generate copies for extract_subvector instead of
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:50 +0000 (01:26 +0000)]
Add patterns to generate copies for extract_subvector instead of
using vextractf128. This will reduce the number of issued instruction
for several avx codes.

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

13 years agomovd/movq write zeros in the high 128-bit part of the vector. Use
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:46 +0000 (01:26 +0000)]
movd/movq write zeros in the high 128-bit part of the vector. Use
them to match 256-bit scalar_to_vector+zext.

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

13 years agoAdd a few patterns to match allzeros without having to use the fp unit.
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:43 +0000 (01:26 +0000)]
Add a few patterns to match allzeros without having to use the fp unit.
Take advantage that the 128-bit vpxor zeros the higher part and use it.
This also fixes PR10491

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

13 years agoAdd SINT_TO_FP and FP_TO_SINT support for v8i32 types. Also move
Bruno Cardoso Lopes [Thu, 28 Jul 2011 01:26:39 +0000 (01:26 +0000)]
Add SINT_TO_FP and FP_TO_SINT support for v8i32 types. Also move
a convert pattern close to the instruction definition.

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

13 years agoFix a use after free. An instruction can't be both an intrinsic call and a fence.
Benjamin Kramer [Thu, 28 Jul 2011 01:20:19 +0000 (01:20 +0000)]
Fix a use after free. An instruction can't be both an intrinsic call and a fence.

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

13 years agoInitial stab at getting inlining working with the EH rewrite.
Bill Wendling [Thu, 28 Jul 2011 00:38:23 +0000 (00:38 +0000)]
Initial stab at getting inlining working with the EH rewrite.

This takes the new 'resume' instruction and turns it into a direct jump to the
caller's landing pad code. The caller's landingpad instruction is merged with
the landingpad instructions of the callee. This is a bit rough and makes some
assumptions in how the code works. But it passes a simple test.

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

13 years agoARM parsing and encoding tests.
Jim Grosbach [Thu, 28 Jul 2011 00:37:03 +0000 (00:37 +0000)]
ARM parsing and encoding tests.

UXTAB, UXTAB16, UXTAH, UXTB, UXTB16, and UXTH.

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

13 years agoAdd an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
Argyrios Kyrtzidis [Thu, 28 Jul 2011 00:29:20 +0000 (00:29 +0000)]
Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.

If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.

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

13 years agoRefactor and improve the encodings/decodings for addrmode3 loads, and make the writeb...
Owen Anderson [Wed, 27 Jul 2011 23:36:57 +0000 (23:36 +0000)]
Refactor and improve the encodings/decodings for addrmode3 loads, and make the writeback operand always the first.

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

13 years agoEmit an error is asm parser parsed X86_64 only registers, e.g. %rax, %sil.
Evan Cheng [Wed, 27 Jul 2011 23:22:03 +0000 (23:22 +0000)]
Emit an error is asm parser parsed X86_64 only registers, e.g. %rax, %sil.
This can happen in cases where TableGen generated asm matcher cannot check
whether a register operand is in the right register class. e.g. mem operands.

rdar://8204588

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

13 years agoARM assembly parsing and encoding for USUB16 and USUB8.
Jim Grosbach [Wed, 27 Jul 2011 23:10:05 +0000 (23:10 +0000)]
ARM assembly parsing and encoding for USUB16 and USUB8.

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

13 years agoARM assembly parsing and encoding for USAX.
Jim Grosbach [Wed, 27 Jul 2011 23:07:00 +0000 (23:07 +0000)]
ARM assembly parsing and encoding for USAX.

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

13 years agoFix llvm-mc handing of x86 instructions that take 8-bit unsigned immediates.
Kevin Enderby [Wed, 27 Jul 2011 23:01:50 +0000 (23:01 +0000)]
Fix llvm-mc handing of x86 instructions that take 8-bit unsigned immediates.

llvm-mc gives an "invalid operand" error for instructions that take an unsigned
immediate which have the high bit set such as:
    pblendw $0xc5, %xmm2, %xmm1
llvm-mc treats all x86 immediates as signed values and range checks them.
A small number of x86 instructions use the imm8 field as a set of bits.
This change only changes those instructions and where the high bit is not
ignored.  The others remain unchanged.

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

13 years agoClean up tabs.
Jim Grosbach [Wed, 27 Jul 2011 22:35:06 +0000 (22:35 +0000)]
Clean up tabs.

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

13 years agoARM assembly parsing and encoding support for USAT and USAT16.
Jim Grosbach [Wed, 27 Jul 2011 22:34:17 +0000 (22:34 +0000)]
ARM assembly parsing and encoding support for USAT and USAT16.

Use range checked immediate operands for instructions. Add tests.

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

13 years agoARM assembly parsing and encoding tests for USAD8 and USADA8.
Jim Grosbach [Wed, 27 Jul 2011 22:23:02 +0000 (22:23 +0000)]
ARM assembly parsing and encoding tests for USAD8 and USADA8.

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

13 years agoCode generation for 'fence' instruction.
Eli Friedman [Wed, 27 Jul 2011 22:21:52 +0000 (22:21 +0000)]
Code generation for 'fence' instruction.

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

13 years agoARM assembly parsing and encoding tests for UQSUB16 and UQSUB8.
Jim Grosbach [Wed, 27 Jul 2011 22:13:08 +0000 (22:13 +0000)]
ARM assembly parsing and encoding tests for UQSUB16 and UQSUB8.

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

13 years agoFix comment copy/paste-o.
Jim Grosbach [Wed, 27 Jul 2011 22:11:41 +0000 (22:11 +0000)]
Fix comment copy/paste-o.

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

13 years agoARM assembly parsing and encoding tests for UQASX and UQSAX.
Jim Grosbach [Wed, 27 Jul 2011 22:09:30 +0000 (22:09 +0000)]
ARM assembly parsing and encoding tests for UQASX and UQSAX.

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

13 years agoARM assembly parsing and encoding tests for UQADD16 and UQADD8.
Jim Grosbach [Wed, 27 Jul 2011 22:08:14 +0000 (22:08 +0000)]
ARM assembly parsing and encoding tests for UQADD16 and UQADD8.

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

13 years agoUse BlockFrequency instead of uint32_t in BlockFrequencyInfo.
Jakub Staszak [Wed, 27 Jul 2011 22:05:51 +0000 (22:05 +0000)]
Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.

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

13 years agoARM assembly parsing and encoding for UMULL.
Jim Grosbach [Wed, 27 Jul 2011 22:01:42 +0000 (22:01 +0000)]
ARM assembly parsing and encoding for UMULL.

Fix parsing of the 's' suffix for the mnemonic. Add tests.

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

13 years agoRemove outdated FIXME comment.
Devang Patel [Wed, 27 Jul 2011 22:00:01 +0000 (22:00 +0000)]
Remove outdated FIXME comment.

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

13 years agoARM assembly parsing and encoding for UMLAL.
Jim Grosbach [Wed, 27 Jul 2011 21:58:11 +0000 (21:58 +0000)]
ARM assembly parsing and encoding for UMLAL.

Fix parsing of the 's' suffix for the mnemonic. Add tests.

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

13 years agoARM assembly parsing and encoding tests for UMAAL.
Jim Grosbach [Wed, 27 Jul 2011 21:53:42 +0000 (21:53 +0000)]
ARM assembly parsing and encoding tests for UMAAL.

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

13 years agoRefuse to inline two functions which use different personality functions.
Bill Wendling [Wed, 27 Jul 2011 21:44:28 +0000 (21:44 +0000)]
Refuse to inline two functions which use different personality functions.

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

13 years agoARM assembly parsing and encoding tests for UHSUB16 and UHSUB8.
Jim Grosbach [Wed, 27 Jul 2011 21:21:59 +0000 (21:21 +0000)]
ARM assembly parsing and encoding tests for UHSUB16 and UHSUB8.

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

13 years agoARM assembly parsing and encoding tests for UHADD16, UHADD8 and UHASX.
Jim Grosbach [Wed, 27 Jul 2011 21:20:45 +0000 (21:20 +0000)]
ARM assembly parsing and encoding tests for UHADD16, UHADD8 and UHASX.

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

13 years agoARM parsing and encoding of SBFX and UBFX.
Jim Grosbach [Wed, 27 Jul 2011 21:09:25 +0000 (21:09 +0000)]
ARM parsing and encoding of SBFX and UBFX.

Encode the width operand as it encodes in the instruction, which simplifies
the disassembler and the encoder, by using the imm1_32 operand def. Add a
diagnostic for the context-sensitive constraint that the width must be in
the range [1,32-lsb].

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

13 years agoKeep enums stable. Append EH stuff to the end.
Bill Wendling [Wed, 27 Jul 2011 21:00:28 +0000 (21:00 +0000)]
Keep enums stable. Append EH stuff to the end.

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

13 years agoARM assembly parsing and encoding tests for UADD16, UADD8 and UASX.
Jim Grosbach [Wed, 27 Jul 2011 20:43:44 +0000 (20:43 +0000)]
ARM assembly parsing and encoding tests for UADD16, UADD8 and UASX.

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

13 years agoARM assembly parsing and encoding tests for TST instruction.
Jim Grosbach [Wed, 27 Jul 2011 20:38:58 +0000 (20:38 +0000)]
ARM assembly parsing and encoding tests for TST instruction.

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

13 years agoARM assembly parsing and encoding tests for TEQ instruction.
Jim Grosbach [Wed, 27 Jul 2011 20:37:36 +0000 (20:37 +0000)]
ARM assembly parsing and encoding tests for TEQ instruction.

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

13 years agoRefactor the STRT and STRBT instructions to distinguish between the register-addend...
Owen Anderson [Wed, 27 Jul 2011 20:29:48 +0000 (20:29 +0000)]
Refactor the STRT and STRBT instructions to distinguish between the register-addend and immediate-addend versions.  Temporarily XFAIL the asm parsing tests for these instructions.

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

13 years agoMerge the contents from exception-handling-rewrite to the mainline.
Bill Wendling [Wed, 27 Jul 2011 20:18:04 +0000 (20:18 +0000)]
Merge the contents from exception-handling-rewrite to the mainline.

This adds the new instructions 'landingpad' and 'resume'.

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

13 years agoARM assembly parsing and encoding for extend instructions.
Jim Grosbach [Wed, 27 Jul 2011 20:15:40 +0000 (20:15 +0000)]
ARM assembly parsing and encoding for extend instructions.

Assembly parser handling for extend instruction rotate operands. Add tests
for the sign extend instructions.

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

13 years agoTeach the ConstantMerge pass about alignment. Fixes PR10514!
Nick Lewycky [Wed, 27 Jul 2011 19:47:34 +0000 (19:47 +0000)]
Teach the ConstantMerge pass about alignment. Fixes PR10514!

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

13 years agoX86ISD::MEMBARRIER does not require SSE2; it doesn't actually generate any code,...
Eli Friedman [Wed, 27 Jul 2011 19:43:50 +0000 (19:43 +0000)]
X86ISD::MEMBARRIER does not require SSE2; it doesn't actually generate any code, and all x86 processors will honor the required semantics.

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

13 years agoThe numbering of LLVMOpcode is supposed to be stable; revert my earlier change, and...
Eli Friedman [Wed, 27 Jul 2011 18:59:19 +0000 (18:59 +0000)]
The numbering of LLVMOpcode is supposed to be stable; revert my earlier change, and append Fence onto the end.

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

13 years agoAdd test cases for BlockFrequency.
Jakub Staszak [Wed, 27 Jul 2011 18:57:40 +0000 (18:57 +0000)]
Add test cases for BlockFrequency.

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

13 years agoAdd a generic 'capacity_in_bytes' function to allow inspection of memory usage of...
Ted Kremenek [Wed, 27 Jul 2011 18:40:45 +0000 (18:40 +0000)]
Add a generic 'capacity_in_bytes' function to allow inspection of memory usage of various data structures.

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