Commit Graph

74481 Commits

Author SHA1 Message Date
David Greene 9aa82842c7 [AVX] Make VarBitInit Unique
Make sure VarBitInits are unique and created only once.

llvm-svn: 136498
2011-07-29 19:07:22 +00:00
David Greene cde30d04b7 [AVX] Make VarInit Unique
Make sure VarInits are unique and created only once.

llvm-svn: 136497
2011-07-29 19:07:21 +00:00
David Greene daba48800f [AVX] Make TernOpInit Unique
Make sure TernOpInits are unique and created only once.  This will be
important for AVX/SIMD as many operators will be used to generate
patterns and other relevant data.

llvm-svn: 136496
2011-07-29 19:07:20 +00:00
David Greene 3acab9c5fe [AVX] Make BinOpInit Unique
Make sure BinOpInits are unique and created only once.  This will be
important for AVX/SIMD as many operators will be used to generate
patterns and other relevant data.

llvm-svn: 136495
2011-07-29 19:07:19 +00:00
David Greene 2b6c8b3794 [AVX] Make UnOpInit Unique
Make sure UnOpInits are unique and created only once.  This will be
important for AVX/SIMD as many operators will be used to generate
patterns and other relevant data.

llvm-svn: 136494
2011-07-29 19:07:18 +00:00
David Greene c52270be8a [AVX] Make ListInits Unique
Ensure ListInits are unique and only created once.  This will be
important for AVX as lists will be used extensively to pass generic
patterns, prefix information and other things to lower-level
pattern-generation classes.

llvm-svn: 136493
2011-07-29 19:07:16 +00:00
David Greene 3468b0f483 [AVX] Make CodeInit Unique
Use a StringMap to ensure CodeInits are unique and created only
once.

llvm-svn: 136492
2011-07-29 19:07:15 +00:00
David Greene 3ff33c9123 [AVX] Make StringInit Unique
Use a StringMap to ensure the StringInits are unique.  This is
especially important for AVX where we will have many smallish
strings representing instruction prefixes, suffixes and the like.

llvm-svn: 136491
2011-07-29 19:07:14 +00:00
David Greene a44263c0cc [AVX] Make IntInit Unique
Use a DenseMap to make sure only one IntInit of any value exists.

llvm-svn: 136490
2011-07-29 19:07:12 +00:00
David Greene dc7b96e909 [AVX] Make BitsInit Unique
Make BitsInit a FoldingSetNode so we can unique it.

llvm-svn: 136489
2011-07-29 19:07:11 +00:00
David Greene 772b2c6bf1 [AVX] Unique BitInit
Keep only two copies of BitInit: one for true and one for false.

llvm-svn: 136488
2011-07-29 19:07:10 +00:00
David Greene 377e12cf75 [AVX] Unique UnsetInit
Keep only one UnsetInit around.

llvm-svn: 136487
2011-07-29 19:07:09 +00:00
David Greene e32ebf220a [AVX] Create Inits Via Factory Method
Replace uses of new *Init with *Init::get.  This hides the allocation
implementation so that we can unique Inits in various ways.

llvm-svn: 136486
2011-07-29 19:07:07 +00:00
David Greene 1aa0e3e118 [AVX] Constify Inits
Make references to Inits const everywhere.  This is the final step
before making them unique.

llvm-svn: 136485
2011-07-29 19:07:05 +00:00
David Greene cdd64328c7 [AVX] Remove non-const Iterators
Remove all non-const iterators from Init classes.  This is another
step toward constifying Inits and ultimately turning them into
FoldingSetNodes.

llvm-svn: 136484
2011-07-29 19:07:02 +00:00
David Greene b3da8123c0 [AVX] Remove Mutating Members from Inits
Get rid of all Init members that modify internal state.  This is in
preparation for making references to Inits const.

llvm-svn: 136483
2011-07-29 19:07:00 +00:00
David Greene 4bd5aebaea Add ListInit::getValues
Add a getValues ListInit method to return the sequence of values in
the list.

llvm-svn: 136482
2011-07-29 19:06:59 +00:00
David Greene ea844f0bc9 Add a std::string Wrapper for TableGen
Create a std::string wrapper for use as a DenseMap key.  DenseMap is
not safe in generate with strings, so this wrapper indicates that only
strings guaranteed not to have certain values should be used in the
DenseMap.

llvm-svn: 136481
2011-07-29 19:06:58 +00:00
Devang Patel 3e02522fee Clean up debug info after reassociation.
llvm-svn: 136480
2011-07-29 19:00:35 +00:00
Jim Grosbach c4dc52cd52 ARM assembly parsing and encoding for RFE instruction.
Fill in the missing fixed bits and the register operand bits of the instruction
encoding. Refactor the definition to make the mode explicit, which is
consistent with how loads and stores are normally represented and makes
parsing much easier. Add parsing aliases for pseudo-instruction variants.
Update the disassembler for the new representations. Add tests for parsing and
encoding.

llvm-svn: 136479
2011-07-29 18:47:24 +00:00
Owen Anderson cb32ce2642 Third time's the charm for implementing tied operand decoding properly.
llvm-svn: 136478
2011-07-29 18:28:52 +00:00
Nick Lewycky 9ee5f77141 Don't look at $PWD in GetCurrentDirectory.
llvm-svn: 136477
2011-07-29 18:26:59 +00:00
Jim Grosbach 20d38124a2 ARM SRS and RFE instructions are not code-gen only.
llvm-svn: 136475
2011-07-29 17:51:39 +00:00
Jim Grosbach 3b764cfd48 ARM range checking for mode on CPS instruction.
llvm-svn: 136473
2011-07-29 17:42:17 +00:00
Jim Grosbach 1c1d2438aa ARM update tests for CPS instruction.
llvm-svn: 136472
2011-07-29 17:39:27 +00:00
Jim Grosbach e658f4faeb Update FIXME.
llvm-svn: 136470
2011-07-29 17:36:04 +00:00
Jim Grosbach 47859c8ab0 Tweak comment.
llvm-svn: 136468
2011-07-29 17:33:29 +00:00
Owen Anderson abe75904a8 Fix a case where, when trying to track tied operands, we'd accidentally overwrite our mapping.
llvm-svn: 136467
2011-07-29 17:32:03 +00:00
Douglas Gregor 72a9716073 Switch the CMake edis build over to add_llvm_library_dependencies
llvm-svn: 136463
2011-07-29 15:41:39 +00:00
Duncan Sands be64bbf979 Avoid undefined behaviour if somehow NUM_GRAPHS equals 2^32 (or
whatever the size of unsigned is), though this can't actually
occur for any integer value of NUM_NODES.

llvm-svn: 136460
2011-07-29 07:50:02 +00:00
Nick Lewycky 38b9b568b9 Teach Path::GetCurrentDirectory to use $PWD, to support users who like to do
screwy things by setting PWD != getcwd(). For example, some developers I know
will use this to control the value in gcc's DW_AT_comp_dir value in debug
output. With this patch, that trick will now work on clang too.

The only other effect of this change is that the static analysis will now
respect $PWD when reporting the directory of the files in its HTML output. I
think that's fine.

llvm-svn: 136459
2011-07-29 04:42:39 +00:00
Nick Lewycky 019d255d3e Fix a lot of typos, improve (but not necessarily fix) grammaros and reflow some
lines. No functionality change.

llvm-svn: 136458
2011-07-29 03:49:23 +00:00
Eli Friedman adec587d5c Misc optimizer+codegen work for 'cmpxchg' and 'atomicrmw'. They appear to be
working on x86 (at least for trivial testcases); other architectures will
need more work so that they actually emit the appropriate instructions for
orderings stricter than 'monotonic'. (As far as I can tell, the ARM, PPC,
Mips, and Alpha backends need such changes.)

llvm-svn: 136457
2011-07-29 03:05:32 +00:00
Jakub Staszak 0978426843 Remove incEdgeWeight and decEdgeWeight. Set edge weight directly to avoid
rounding errors.

llvm-svn: 136456
2011-07-29 02:36:53 +00:00
Chandler Carruth bc836c2c84 Fix the MCDisassembler dependencies. These were just absurdly wrong.
First off, only depend on the actual MC-ized disassemblers in the
targets, not all of the libraries those in turn depend on.

Second off, only depend on those MC-ized disassemblers for targets we're
building.

This should fix builds of fewer than all targets.

llvm-svn: 136455
2011-07-29 02:12:59 +00:00
Bruno Cardoso Lopes 65ce5ea3ba Fix two tests that I crashed in the previous commits. The mask elts
on the second half must be reindexed.

llvm-svn: 136454
2011-07-29 02:05:28 +00:00
Bruno Cardoso Lopes 81eb193f2e Match VPERMIL masks more strictly and update the target specific mask
generation to always catch the weird cases.

llvm-svn: 136453
2011-07-29 01:31:15 +00:00
Bruno Cardoso Lopes 795f558532 Add DecodeShuffle shuffle support for VPERMIPD variantes
llvm-svn: 136452
2011-07-29 01:31:11 +00:00
Bruno Cardoso Lopes d23709b18c Add v8i32 and v4i64 vpermil patterns
llvm-svn: 136451
2011-07-29 01:31:07 +00:00
Bruno Cardoso Lopes c00f6728bc Fix a bug while generating target specific VPERMIL masks: skip
undef mask elements. This fixes PR10529.

llvm-svn: 136450
2011-07-29 01:31:04 +00:00
Bruno Cardoso Lopes b9ba465de8 Enable usage of SSE4 extracts and inserts in their 128-bit AVX forms.
Also tidy up code a bit.

llvm-svn: 136449
2011-07-29 01:31:02 +00:00
Bruno Cardoso Lopes 6aee388423 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

llvm-svn: 136448
2011-07-29 01:30:59 +00:00
Bill Wendling 7eadbeaf62 Use the pointer type size.
With this, we can now compile a simple EH program.

llvm-svn: 136446
2011-07-29 01:15:29 +00:00
Bill Wendling 6a8cac735a And now something that compiles...
llvm-svn: 136445
2011-07-29 01:11:33 +00:00
Bill Wendling 4b0a365beb Make sure to sext or trunc the result from the register.
llvm-svn: 136444
2011-07-29 01:11:14 +00:00
Jakob Stoklund Olesen b28ee4115d Transfer implicit operands in NEONMoveFixPass.
Later passes /are/ using this information when running the register
scavenger.

This fixes the second problem in PR10520.

llvm-svn: 136440
2011-07-29 00:27:35 +00:00
Jakob Stoklund Olesen 9c3badceba 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.

llvm-svn: 136439
2011-07-29 00:27:32 +00:00
Eli Friedman 530341d748 Make sure to correctly clear the exact/nuw/nsw flags off of shifts when they are combined together. <rdar://problem/9859829>
llvm-svn: 136435
2011-07-29 00:18:19 +00:00
Chandler Carruth 9d7feab3e0 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.

llvm-svn: 136433
2011-07-29 00:14:25 +00:00
Jakub Staszak 9f56d02e6a Remove extra semicolon.
llvm-svn: 136432
2011-07-29 00:05:35 +00:00
Owen Anderson 53562d0551 Enhance the fixed-length decoder emitter to support tied operands.
llvm-svn: 136431
2011-07-28 23:56:20 +00:00
Bill Wendling 3cc87682e1 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."

llvm-svn: 136430
2011-07-28 23:44:58 +00:00
Bill Wendling 7fa7fe6b58 Add the AddLandingPadInfo function.
AddLandingPadInfo takes a landingpad instruction and grabs all of the
information from it that it needs for EH table generation.

llvm-svn: 136429
2011-07-28 23:42:57 +00:00
Jakub Staszak eec01ccbf9 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.

llvm-svn: 136428
2011-07-28 23:42:08 +00:00
Jim Grosbach dd475c39d7 PLD and PLI are not predicable in ARM mode.
llvm-svn: 136427
2011-07-28 23:22:41 +00:00
Jim Grosbach b9bebc1b03 CBZ/CBNZ are Thumb2 only. No need for ARM mode tests for them.
llvm-svn: 136408
2011-07-28 21:59:38 +00:00
Jim Grosbach a03ab0e3dc 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.

llvm-svn: 136406
2011-07-28 21:57:55 +00:00
Owen Anderson e3591657a0 Enhance the fixed-length decoder emitter to support parsing scattered fields.
llvm-svn: 136405
2011-07-28 21:54:31 +00:00
Eli Friedman c9a551ebed 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.

llvm-svn: 136404
2011-07-28 21:48:00 +00:00
Jakub Staszak 07f0f02bc5 If run with -debug give more information about Cyclic Probability.
llvm-svn: 136403
2011-07-28 21:46:58 +00:00
Jakub Staszak d07b2e159a Heuristics are in descending priority now. If we use one of them, skip the rest.
llvm-svn: 136402
2011-07-28 21:45:07 +00:00
Jakob Stoklund Olesen b16081ce8c 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.

llvm-svn: 136401
2011-07-28 21:38:51 +00:00
Jim Grosbach 7f45559e86 Remove obsolete FIXME reference in comment.
llvm-svn: 136400
2011-07-28 21:37:05 +00:00
Jim Grosbach 864b609491 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).

llvm-svn: 136399
2011-07-28 21:34:26 +00:00
Jakub Staszak bcb3c65bb4 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.

llvm-svn: 136398
2011-07-28 21:33:46 +00:00
Bill Wendling f8d95bc4c6 Use ArrayRef instead of requiring an std::vector.
llvm-svn: 136396
2011-07-28 21:25:33 +00:00
Bill Wendling 4f027233d2 The personality function should be a Function* and not just a Value*.
llvm-svn: 136392
2011-07-28 21:14:13 +00:00
Douglas Gregor b6aca01fc2 Fix Clang attribute reader tblgen output for a corresponding fix on the Clang side
llvm-svn: 136390
2011-07-28 20:55:16 +00:00
Jakob Stoklund Olesen cad845f4c0 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.

llvm-svn: 136388
2011-07-28 20:48:23 +00:00
Bill Wendling 7b563cde19 Initial code to convert ResumeInsts into calls to _Unwind_Resume.
This should be the only code necessary for DWARF EH prepare.

llvm-svn: 136387
2011-07-28 20:48:05 +00:00
Jakub Staszak 14852b182e Fix stupid mistake from commit 136381.
llvm-svn: 136384
2011-07-28 20:17:18 +00:00
Jakub Staszak d7ac43eed1 Speed up BlockFrequencyInfo a little bit.
llvm-svn: 136381
2011-07-28 20:09:31 +00:00
Jim Grosbach bfb439b140 Add fixme.
llvm-svn: 136375
2011-07-28 19:46:12 +00:00
Bill Wendling 2533842439 Use version 402 for the GCDA files when compiling for Apple.
llvm-svn: 136369
2011-07-28 18:12:20 +00:00
Owen Anderson 7c965e7520 Update comments.
llvm-svn: 136367
2011-07-28 17:56:55 +00:00
Owen Anderson 301f793ed5 Fill in some encoding information for STRD instructions.
llvm-svn: 136366
2011-07-28 17:53:25 +00:00
Owen Anderson b0e6899398 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.
llvm-svn: 136362
2011-07-28 17:18:57 +00:00
Jim Grosbach 8b3184e540 ARM parsing and encoding for ADR.
The label does not have a '#' prefix. Add parsing and encoding tests.

llvm-svn: 136360
2011-07-28 16:33:54 +00:00
Jim Grosbach 4356636fc0 Update ARM tests for parsing and encoding of WFE, WFI and YIELD.
llvm-svn: 136358
2011-07-28 16:00:41 +00:00
Nadav Rotem 9708aef2dc CR fix: The ANY_EXTEND can be removed because the input and putput type must be
identical.

llvm-svn: 136355
2011-07-28 14:38:46 +00:00
Duncan Sands 251daee2a7 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.

llvm-svn: 136354
2011-07-28 14:37:53 +00:00
Duncan Sands 6d0f0ffe83 Check an additional property specific to the way LLVM
iterates over SCC's.

llvm-svn: 136353
2011-07-28 14:33:01 +00:00
Duncan Sands dea551c59a 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.

llvm-svn: 136351
2011-07-28 14:17:11 +00:00
Duncan Sands 483354758f 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.

llvm-svn: 136349
2011-07-28 12:21:47 +00:00
Duncan Sands 5710211af0 This file was moved from Support to ADT. Correct a comment.
llvm-svn: 136344
2011-07-28 08:36:22 +00:00
Bill Wendling 9e5f0f8fce Some minor cleanups. No functionalitical change.
llvm-svn: 136341
2011-07-28 07:44:07 +00:00
Bill Wendling fa28440f15 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.

llvm-svn: 136339
2011-07-28 07:31:46 +00:00
Bill Wendling d8c1c1f23c Don't add in the asked for size so that we don't copy too much from the old to new vectors.
llvm-svn: 136338
2011-07-28 07:26:41 +00:00
Nick Lewycky 3255d1d25f 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!

llvm-svn: 136336
2011-07-28 06:48:33 +00:00
Bill Wendling 51affc8258 Automatically merge the landingpad clauses when we come across a callee's
landingpad.

llvm-svn: 136329
2011-07-28 02:40:13 +00:00
Oscar Fuentes a8666a3cdb 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'

llvm-svn: 136328
2011-07-28 02:33:52 +00:00
Oscar Fuentes 2d1e353966 Updated cmake library dependencies.
llvm-svn: 136327
2011-07-28 02:33:33 +00:00
Bill Wendling 4c93488999 Make sure that the landingpad instruction takes a Constant* as the clause's value.
llvm-svn: 136326
2011-07-28 02:27:12 +00:00
Bill Wendling a8f04e3034 Add a couple of convenience functions:
* InvokeInst: Get the landingpad instruction associated with this invoke.
* LandingPadInst: A method to reserve extra space for clauses.

llvm-svn: 136325
2011-07-28 02:15:52 +00:00
Bruno Cardoso Lopes 8c19a8b5d5 Invert the subvector insertion to be more likely to be taken as a COPY
llvm-svn: 136324
2011-07-28 01:26:53 +00:00
Bruno Cardoso Lopes 76bc28bac6 Add patterns to generate copies for extract_subvector instead of
using vextractf128. This will reduce the number of issued instruction
for several avx codes.

llvm-svn: 136323
2011-07-28 01:26:50 +00:00
Bruno Cardoso Lopes 3fb0b635bd movd/movq write zeros in the high 128-bit part of the vector. Use
them to match 256-bit scalar_to_vector+zext.

llvm-svn: 136322
2011-07-28 01:26:46 +00:00
Bruno Cardoso Lopes eca99c4b5a 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

llvm-svn: 136321
2011-07-28 01:26:43 +00:00
Bruno Cardoso Lopes 9e2a301216 Add SINT_TO_FP and FP_TO_SINT support for v8i32 types. Also move
a convert pattern close to the instruction definition.

llvm-svn: 136320
2011-07-28 01:26:39 +00:00
Benjamin Kramer e71b9c446d Fix a use after free. An instruction can't be both an intrinsic call and a fence.
llvm-svn: 136319
2011-07-28 01:20:19 +00:00
Bill Wendling 246eb96c8a 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.

llvm-svn: 136313
2011-07-28 00:38:23 +00:00
Jim Grosbach 4059137f56 ARM parsing and encoding tests.
UXTAB, UXTAB16, UXTAH, UXTB, UXTB16, and UXTH.

llvm-svn: 136312
2011-07-28 00:37:03 +00:00
Argyrios Kyrtzidis 348937de07 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.

llvm-svn: 136310
2011-07-28 00:29:20 +00:00
Owen Anderson b81af2abe0 Refactor and improve the encodings/decodings for addrmode3 loads, and make the writeback operand always the first.
llvm-svn: 136295
2011-07-27 23:36:57 +00:00
Evan Cheng eda1d4f3ba 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

llvm-svn: 136292
2011-07-27 23:22:03 +00:00
Jim Grosbach e37f7dc349 ARM assembly parsing and encoding for USUB16 and USUB8.
llvm-svn: 136289
2011-07-27 23:10:05 +00:00
Jim Grosbach 05f80d3add ARM assembly parsing and encoding for USAX.
llvm-svn: 136288
2011-07-27 23:07:00 +00:00
Kevin Enderby 5ef6c453a6 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.

llvm-svn: 136287
2011-07-27 23:01:50 +00:00
Jim Grosbach 16dd4adcbe Clean up tabs.
llvm-svn: 136286
2011-07-27 22:35:06 +00:00
Jim Grosbach 57e2d3cb84 ARM assembly parsing and encoding support for USAT and USAT16.
Use range checked immediate operands for instructions. Add tests.

llvm-svn: 136285
2011-07-27 22:34:17 +00:00
Jim Grosbach fea7a44a9b ARM assembly parsing and encoding tests for USAD8 and USADA8.
llvm-svn: 136284
2011-07-27 22:23:02 +00:00
Eli Friedman 26a484852e Code generation for 'fence' instruction.
llvm-svn: 136283
2011-07-27 22:21:52 +00:00
Jim Grosbach 1644409b47 ARM assembly parsing and encoding tests for UQSUB16 and UQSUB8.
llvm-svn: 136282
2011-07-27 22:13:08 +00:00
Jim Grosbach 1a3ddffc1c Fix comment copy/paste-o.
llvm-svn: 136281
2011-07-27 22:11:41 +00:00
Jim Grosbach 84ecab228a ARM assembly parsing and encoding tests for UQASX and UQSAX.
llvm-svn: 136280
2011-07-27 22:09:30 +00:00
Jim Grosbach 928f4175c0 ARM assembly parsing and encoding tests for UQADD16 and UQADD8.
llvm-svn: 136279
2011-07-27 22:08:14 +00:00
Jakub Staszak da3df4302a Use BlockFrequency instead of uint32_t in BlockFrequencyInfo.
llvm-svn: 136278
2011-07-27 22:05:51 +00:00
Jim Grosbach 39b062bfaa ARM assembly parsing and encoding for UMULL.
Fix parsing of the 's' suffix for the mnemonic. Add tests.

llvm-svn: 136277
2011-07-27 22:01:42 +00:00
Devang Patel 53dc616170 Remove outdated FIXME comment.
llvm-svn: 136275
2011-07-27 22:00:01 +00:00
Jim Grosbach 0c398b9c7e ARM assembly parsing and encoding for UMLAL.
Fix parsing of the 's' suffix for the mnemonic. Add tests.

llvm-svn: 136274
2011-07-27 21:58:11 +00:00
Jim Grosbach 121c21aba9 ARM assembly parsing and encoding tests for UMAAL.
llvm-svn: 136272
2011-07-27 21:53:42 +00:00
Bill Wendling 9c5b7ff807 Refuse to inline two functions which use different personality functions.
llvm-svn: 136269
2011-07-27 21:44:28 +00:00
Jim Grosbach 7cfd32a006 ARM assembly parsing and encoding tests for UHSUB16 and UHSUB8.
llvm-svn: 136267
2011-07-27 21:21:59 +00:00
Jim Grosbach 3f45383ef5 ARM assembly parsing and encoding tests for UHADD16, UHADD8 and UHASX.
llvm-svn: 136266
2011-07-27 21:20:45 +00:00
Jim Grosbach 03f56d9de6 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].

llvm-svn: 136264
2011-07-27 21:09:25 +00:00
Bill Wendling 2641d132d1 Keep enums stable. Append EH stuff to the end.
llvm-svn: 136263
2011-07-27 21:00:28 +00:00
Jim Grosbach 36ce7492a6 ARM assembly parsing and encoding tests for UADD16, UADD8 and UASX.
llvm-svn: 136261
2011-07-27 20:43:44 +00:00
Jim Grosbach 542333ea05 ARM assembly parsing and encoding tests for TST instruction.
llvm-svn: 136260
2011-07-27 20:38:58 +00:00
Jim Grosbach f176e1addb ARM assembly parsing and encoding tests for TEQ instruction.
llvm-svn: 136259
2011-07-27 20:37:36 +00:00
Owen Anderson fa9e6d43a0 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.
llvm-svn: 136255
2011-07-27 20:29:48 +00:00
Bill Wendling 6c923bb8d9 Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'.

llvm-svn: 136253
2011-07-27 20:18:04 +00:00
Jim Grosbach 833b9d3353 ARM assembly parsing and encoding for extend instructions.
Assembly parser handling for extend instruction rotate operands. Add tests
for the sign extend instructions.

llvm-svn: 136252
2011-07-27 20:15:40 +00:00
Nick Lewycky 8ac9ecedfd Teach the ConstantMerge pass about alignment. Fixes PR10514!
llvm-svn: 136250
2011-07-27 19:47:34 +00:00
Eli Friedman e6d1853e74 X86ISD::MEMBARRIER does not require SSE2; it doesn't actually generate any code, and all x86 processors will honor the required semantics.
llvm-svn: 136249
2011-07-27 19:43:50 +00:00
Eli Friedman 4fc946cc71 The numbering of LLVMOpcode is supposed to be stable; revert my earlier change, and append Fence onto the end.
llvm-svn: 136245
2011-07-27 18:59:19 +00:00
Jakub Staszak 8a3d4c43b1 Add test cases for BlockFrequency.
llvm-svn: 136244
2011-07-27 18:57:40 +00:00
Ted Kremenek 666bec46a0 Add a generic 'capacity_in_bytes' function to allow inspection of memory usage of various data structures.
llvm-svn: 136233
2011-07-27 18:40:45 +00:00
Jim Grosbach 66ee037863 ARM assembly parsing aliases for extend instructions w/o rotate.
llvm-svn: 136229
2011-07-27 18:19:32 +00:00
Devang Patel ac0a1f6146 Update document listing DIVariable elements to reflect recent changes.
llvm-svn: 136228
2011-07-27 18:14:50 +00:00
Jim Grosbach 38b5503d21 ARM cleanup of remaining extend instructions.
Refactor the rest of the extend instructions to not artificially distinguish
between a rotate of zero and a rotate of any other value. Replace the by-zero
versions with Pat<>'s for ISel.

llvm-svn: 136226
2011-07-27 17:48:13 +00:00
Jim Grosbach 8b31ef50c0 ARM extend instructions simplification.
Refactor the SXTB, SXTH, SXTB16, UXTB, UXTH, and UXTB16 instructions to not
have an 'r' and an 'r_rot' version, but just a single version with a rotate
that can be zero. Use plain Pat<>'s for the ISel of the non-rotated version.

llvm-svn: 136225
2011-07-27 16:47:19 +00:00
Jakub Staszak 9b8a6a3b2b Optimize 96-bit division a little bit.
llvm-svn: 136222
2011-07-27 16:00:40 +00:00
Jakub Staszak a9e8aa0482 Move static methods to the anonymous namespace.
llvm-svn: 136221
2011-07-27 15:51:51 +00:00
Jakub Staszak 107339e31a Edge to itself is backedge as well.
llvm-svn: 136219
2011-07-27 15:42:09 +00:00
Frits van Bommel ec9cd83905 Trim includes.
llvm-svn: 136218
2011-07-27 15:20:06 +00:00
Frits van Bommel 4d73ec957c Update CMake build for new gtest file.
llvm-svn: 136215
2011-07-27 10:19:32 +00:00
Jay Foad 4b27333440 Remove some code that is no longer needed now that googletest knows how
to print STL containers.

llvm-svn: 136213
2011-07-27 09:26:13 +00:00
Jay Foad 22a83d667e Merge gtest-1.6.0.
llvm-svn: 136212
2011-07-27 09:25:14 +00:00
Jeffrey Yasskin 6381c0100b Explicitly cast narrowing conversions inside {}s that will become errors in
C++0x.

llvm-svn: 136211
2011-07-27 06:22:51 +00:00
Dan Gohman 456b1edd0d Revert r136156, which broke several buildbots.
llvm-svn: 136206
2011-07-27 01:10:27 +00:00