1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
Commit Graph

3382 Commits

Author SHA1 Message Date
Nick Lewycky
73b6cfd90c Rework the logic to not rely on undefined behaviour (1LL << 64). Also simplify.
llvm-svn: 132537
2011-06-03 08:25:39 +00:00
Jakob Stoklund Olesen
4f76a2bdc8 Make it possible to have unallocatable register classes.
Some register classes are only used for instruction operand constraints.
They should never be used for virtual registers. Previously, those
register classes were given an empty allocation order, but now you can
say 'let isAllocatable=0' in the register class definition.

TableGen calculates if a register is part of any allocatable register
class, and makes that information available in TargetRegisterDesc::inAllocatableClass.

The goal here is to eliminate use cases for overriding allocation_order_*
methods.

llvm-svn: 132508
2011-06-02 23:07:20 +00:00
Joerg Sonnenberger
ffa79cb359 Add new -d option to tblgen. It writes a make(1)-style dependency file.
llvm-svn: 132395
2011-06-01 13:10:15 +00:00
Bruno Cardoso Lopes
0bdb365634 Fix ssat and ssat16 encodings for ARM and Thumb. The bit position value
must be encoded decremented by one. Only add encoding tests for ssat16
because ssat can't be parsed yet.

llvm-svn: 132324
2011-05-31 03:33:27 +00:00
Rafael Espindola
33f7d7f9fa Use the dwarf->llvm mapping to print register names in the cfi
directives.

Fixes PR9826.

llvm-svn: 132317
2011-05-30 20:20:15 +00:00
Rafael Espindola
5917c1f6ec Introduce the DwarfRegAlias class for declaring that two registers have the
same dwarf number. This will be used for creating a dwarf number to register
mapping.

The only case that needs this so far is the XMM/YMM registers that unfortunately
do have the same numbers.

llvm-svn: 132314
2011-05-30 17:49:59 +00:00
John McCall
fd85fdee7c Change how tblgen generates attributes for intrinsics to use a single
switch.  With this newfound organization, teach tblgen how not to give
all intrinsics the 'nounwind' attribute.  Introduce a new intrinsic,
llvm.eh.resume, which does not have this attribute.  Documentation and uses
to follow.

llvm-svn: 132252
2011-05-28 06:31:34 +00:00
Rafael Espindola
386c4259db Fix the root cause of the bootstrap failure:
There was no way to check if a given register/mode pair was valid. We now return
an error code (-2) instead of asserting. If anyone thinks that an assert
at this point  is really needed, we can autogen a hasValidDwarfRegNum instead.

llvm-svn: 132236
2011-05-28 00:13:01 +00:00
Argyrios Kyrtzidis
f5fe5499f9 [tablegen] A couple of changes to ClangDiagnosticEmmitter.
-Emit an empty warning option as string ("") instead of 0.
-For diagnostic names also emit the size of the string.

llvm-svn: 132046
2011-05-25 05:04:22 +00:00
Bill Wendling
6f30676150 Use a more efficient data structure for the "operand map". The number of
operands to an instruction aren't great, so an iterative search is fairly quick
and doesn't have the overhead of std::map.

llvm-svn: 131886
2011-05-23 00:18:33 +00:00
Cameron Zwarich
e876d96b4e Fix PR9947 by placing OPFL_MemRefs on the node using memory operands rather than
the root if there is only one such node. This leaves only 2 verifier failures in
the entire test suite when running "make check".

llvm-svn: 131677
2011-05-19 21:13:30 +00:00
Tanya Lattner
06cb9cbf98 In r131488 I misunderstood how VREV works. It splits the vector in half and splits each half. Therefore, the real problem was that we were using a VREV64 for a 4xi16, when we should have been using a VREV32.
Updated test case and reverted change to the PerfectShuffle Table.

llvm-svn: 131529
2011-05-18 06:42:21 +00:00
Tanya Lattner
7145d69427 vrev is incorrectly defined in the perfect shuffle table. The ordering is backwards (should be 0x3210 versus 0x1032) which exposed a bug when doing a shuffle on a 4xi16. I've attached a test case.
llvm-svn: 131488
2011-05-17 20:48:40 +00:00
Jakob Stoklund Olesen
509b4ecd92 Downgrade a tablegen warning to an error.
Ambiguous sub-register index compositions are OK as long as the backend writer
knows what he is doing.

llvm-svn: 131134
2011-05-10 17:52:59 +00:00
Mon P Wang
08d3b69861 Fixed MC encoding for index_align for VLD1/VST1 (single element from one lane) for size 32
llvm-svn: 131085
2011-05-09 17:47:27 +00:00
Jakob Stoklund Olesen
3bc1816380 Teach TableGen to automatically generate missing SubRegIndex instances.
The RegisterInfo.td file should only specify the indexes that sources need to
refer to. The rest is inferred.

llvm-svn: 131058
2011-05-07 21:22:39 +00:00
Jim Grosbach
780c27bb61 Improve diagnostics for some parse errors. Not asserting when a user input
error is detected is a good thing.

llvm-svn: 131005
2011-05-06 18:47:45 +00:00
Jim Grosbach
f1f78457f3 ParseFile() may throw, so extend the try/catch to handle that.
llvm-svn: 131004
2011-05-06 18:39:28 +00:00
Mikhail Glushenkov
14e7792820 llvmc: Make it possible to provide an argument to (join).
llvm-svn: 130914
2011-05-05 04:24:58 +00:00
Nick Lewycky
90307d5608 The system suppression file should catch these, but since they *once again* are
not, I'll just add them here and be done with it.

llvm-svn: 130819
2011-05-04 01:03:02 +00:00
Jim Grosbach
833ffeb2cd Tidy up. Add missing newline to generated file.
llvm-svn: 130779
2011-05-03 19:09:56 +00:00
Eli Friedman
0667319d62 Filter out pattterns from the FastISel emitter which it doesn't actually know how to handle. No significant functionality change at the moment, but it's necessary for some changes I'm planning.
llvm-svn: 130547
2011-04-29 21:58:31 +00:00
Nick Lewycky
ea1dbad689 Rename profile_rt.so to libprofile_rt.so under configure+make (it already was
under cmake).

Add libprofile_rt.a so that we can tell clang to link against it in --coverage
mode. Also turn it on by default in cmake builds.

Oscar, this touches a change you made for EXCLUDE_FROM_ALL support -- I think
I've done the right thing, but please let me know (or fix and commit) if not!

llvm-svn: 130470
2011-04-29 02:12:06 +00:00
Owen Anderson
5ea854079d Fix a bug in tblgen that caused incorrect encodings on instructions that specified operands with "bit" instead of "bits<1>".
Unfortunately, my only testcase for this is fragile, and the ARM AsmParser can't round trip the instruction in question.
<rdar://problem/9345702>

llvm-svn: 130410
2011-04-28 17:51:45 +00:00
Mikhail Glushenkov
e2c4cc8224 Add a TODO.
llvm-svn: 130092
2011-04-24 14:17:41 +00:00
Jay Foad
c146569beb Remove unused STL header includes.
llvm-svn: 130068
2011-04-23 19:53:52 +00:00
Johnny Chen
dfac31bc1b Disassembly of A8.6.59 LDR (literal) Encoding T1 (16-bit thumb instruction) should
print out ldr, not ldr.n.

rdar://problem/9267772

llvm-svn: 130008
2011-04-22 19:12:43 +00:00
Bob Wilson
dbe2447934 Define Neon load/store intrinsics for Clang as macros instead of functions.
This is needed so the front-end can see "aligned" attributes on the type
for the pointer arguments.  Radar 9311427.

llvm-svn: 129964
2011-04-22 00:37:01 +00:00
Jakob Stoklund Olesen
5168088bcf Don't allow per-register spill size and alignment.
These values were not used for anything. Spill size and alignment is a property
of the register class, not the register.

llvm-svn: 129906
2011-04-21 03:43:21 +00:00
Jakob Stoklund Olesen
6501ea2557 Prefer cheap registers for busy live ranges.
On the x86-64 and thumb2 targets, some registers are more expensive to encode
than others in the same register class.

Add a CostPerUse field to the TableGen register description, and make it
available from TRI->getCostPerUse. This represents the cost of a REX prefix or a
32-bit instruction encoding required by choosing a high register.

Teach the greedy register allocator to prefer cheap registers for busy live
ranges (as indicated by spill weight).

llvm-svn: 129864
2011-04-20 18:19:48 +00:00
Eric Christopher
bd8bbe5934 Invert the meaning of printAliasInstr's return value. It now returns
true on success and false on failure. Update callers.

llvm-svn: 129722
2011-04-18 21:28:11 +00:00
Owen Anderson
d98b684f30 Enhance the fixed-length disassembler to support the callbacks necessary for symbolic disassembly.
llvm-svn: 129708
2011-04-18 18:42:26 +00:00
Chris Lattner
a473329704 Add a new bit that ImmLeaf's can opt into, which allows them to duck out of
the generated FastISel.  X86 doesn't need to generate code to match ADD16ri8 
since ADD16ri will do just fine.  This is a small codesize win in the generated
instruction selector.

llvm-svn: 129692
2011-04-18 06:36:55 +00:00
Chris Lattner
eb78c66d3a Implement major new fastisel functionality: the matcher can now handle immediates with
value constraints on them (when defined as ImmLeaf's).  This is particularly important
for X86-64, where almost all reg/imm instructions take a i64immSExt32 immediate operand,
which has a value constraint.  Before this patch we ended up iseling the examples into
such amazing code as:

	movabsq	$7, %rax
	imulq	%rax, %rdi
	movq	%rdi, %rax
	ret

now we produce:

	imulq	$7, %rdi, %rax
	ret

This dramatically shrinks the generated code at -O0 on x86-64.

llvm-svn: 129691
2011-04-18 06:22:33 +00:00
Chris Lattner
ffa308d572 introduce a new OpKind abstraction which wraps up operand flavors in a tidy little wrapper.
No functionality change.

llvm-svn: 129680
2011-04-17 23:29:05 +00:00
Chris Lattner
6bf4d85361 change OperandsSignature to use SmallVector<char> instead of std::vector<string>
since the strings are always exactly one character, and there are usually only 2-3 operands.

llvm-svn: 129678
2011-04-17 22:24:13 +00:00
Chris Lattner
7ca810dd13 since the VT is fixed for a ImmLeaf, there is no reason to expose it to the matching code.
llvm-svn: 129677
2011-04-17 22:17:27 +00:00
Chris Lattner
2d89feb795 now that predicates have a decent abstraction layer on them, introduce a new
kind of predicate: one that is specific to imm nodes.  The predicate function
specified here just checks an int64_t directly instead of messing around with
SDNode's.  The virtue of this is that it means that fastisel and other things
can reason about these predicates.

llvm-svn: 129675
2011-04-17 22:05:17 +00:00
Chris Lattner
d776e76c44 Rework our internal representation of node predicates to expose more
structure and fix some fixmes.  We now have a TreePredicateFn class
that handles all of the decoding of these things.  This is an internal
cleanup that has no impact on the code generated by tblgen.

llvm-svn: 129670
2011-04-17 21:38:24 +00:00
Chris Lattner
835ef2b8f4 remove some debugging code I added.
llvm-svn: 129668
2011-04-17 21:36:19 +00:00
Chris Lattner
28eaf6be7f 1. merge fast-isel-shift-imm.ll into fast-isel-x86-64.ll
2. implement rdar://9289501 - fast isel should fold trivial multiplies to shifts
3. teach tblgen to handle shift immediates that are different sizes than the 
   shifted operands, eliminating some code from the X86 fast isel backend.
4. Have FastISel::SelectBinaryOp use (the poorly named) FastEmit_ri_ function
   instead of FastEmit_ri to simplify code.

llvm-svn: 129666
2011-04-17 20:23:29 +00:00
Douglas Gregor
2bebd9880d Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
llvm-svn: 129613
2011-04-15 22:04:07 +00:00
Evan Cheng
e33e4028a6 Increase SubtargetFeatureKV Value and Implies fields to 64 bits since some targets are getting very close to 32 subtarget features. Also teach tablegen to error when there are more than 64 features to guard against undefined behavior. rdar://9282332
llvm-svn: 129590
2011-04-15 19:35:46 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Bill Wendling
500b41a7a5 Add an option to not print the alias of an instruction. It defaults to "print
the alias".

llvm-svn: 129485
2011-04-13 23:36:21 +00:00
Johnny Chen
443a6902bf Thumb disassembler was erroneously rejecting "blx sp" instruction.
rdar://problem/9267838

llvm-svn: 129320
2011-04-11 23:33:30 +00:00
NAKAMURA Takumi
0e00d1971e TableGen: Keep the order of DECL_CONTEXT() for DeclNodes.td. RecordVector may be used instead of RecordSet.
The result of DeclNodes.inc was unstable on msys, Windows 7 x64.

llvm-svn: 129317
2011-04-11 23:20:28 +00:00
Daniel Dunbar
a01ae2f598 build: Add support for a SHOW_DIAGNOSTICS build variable.
If enabled, this will attempt to use the CC_LOG_DIAGNOSTICS feature I dropped
into Clang to print a log of all the diagnostics generated during an individual
build (from the top-level). Not sure if this will actually be useful, but for
now it is handy for testing the option.

llvm-svn: 129312
2011-04-11 22:37:39 +00:00
Chris Lattner
9308e08aad fix PR9629 - We were lowering regexes like a{{b|c}}d into ab|cd, which
is substantially different than a(b|c)d.  Form the latter regex instead.
This found a few problems in the testsuite, which serves as its test.

llvm-svn: 129196
2011-04-09 06:37:03 +00:00
Chris Lattner
9b791ceb9b various cleanups, no functionality change.
llvm-svn: 129192
2011-04-09 06:18:02 +00:00
Bill Wendling
fafa0c2509 Only emit the AvailableFeatures variable if it's used.
llvm-svn: 129124
2011-04-08 04:08:57 +00:00
Bill Wendling
342ba5c4b6 Replace the old algorithm that emitted the "print the alias for an instruction"
with the newer, cleaner model. It uses the IAPrinter class to hold the
information that is needed to match an instruction with its alias. This also
takes into account the available features of the platform.

There is one bit of ugliness. The way the logic determines if a pattern is
unique is O(N**2), which is gross. But in reality, the number of items it's
checking against isn't large. So while it's N**2, it shouldn't be a massive time
sink.

llvm-svn: 129110
2011-04-07 21:20:06 +00:00
Joerg Sonnenberger
1cbd300346 Add support for the VIA PadLock instructions.
llvm-svn: 128826
2011-04-04 16:58:13 +00:00
Joerg Sonnenberger
aedfaff262 Use array_lengthof
llvm-svn: 128823
2011-04-04 16:25:38 +00:00
Joerg Sonnenberger
4acf601864 Change loops to derive the number of tables automatically
llvm-svn: 128818
2011-04-04 14:42:22 +00:00
Daniel Dunbar
7e8cb9fc5e tlbgen/MC: StringRef's to temporary objects considered harmful.
llvm-svn: 128735
2011-04-01 20:23:52 +00:00
Andrew Trick
5d212b6374 Add annotations to tablegen-generated processor itineraries, or replace them with something meaningful. I want to be able to read and debug the generated tables.
llvm-svn: 128703
2011-04-01 02:22:47 +00:00
Andrew Trick
ee4b7e695a whitespace
llvm-svn: 128701
2011-04-01 01:56:55 +00:00
Nick Lewycky
6429481136 Fix typo in generated HTML.
llvm-svn: 128594
2011-03-31 00:23:57 +00:00
Bob Wilson
5e30c4c931 Use intrinsics for Neon vmull operations. Radar 9208957.
llvm-svn: 128591
2011-03-31 00:09:35 +00:00
Argyrios Kyrtzidis
bea6ccf737 ClangSAEmClangSACheckersEmitter, emit info about groups.
llvm-svn: 128515
2011-03-30 00:22:00 +00:00
Matt Beaumont-Gay
bf215beedb Quiet a gcc warning about changed name lookup rules
llvm-svn: 128497
2011-03-29 22:25:36 +00:00
Argyrios Kyrtzidis
e923f22a2e In ClangSACheckersEmitter:
- Also emit a list of packages and groups sorted by name
  - Avoid iterating over DenseSet so that the output of the arrays is deterministic.

llvm-svn: 128489
2011-03-29 21:16:19 +00:00
Argyrios Kyrtzidis
71261edb9b For ClangSACheckersEmitter, allow a package to belong to checker group, in which all its checkers will go into the group.
llvm-svn: 128474
2011-03-29 18:53:00 +00:00
Devang Patel
ce52d006e1 Remove scripts used by TEST=dbg from here. They now live inside llvm test suite.
llvm-svn: 128425
2011-03-28 20:28:30 +00:00
Duncan Sands
c9b450fae7 Partially revert commit 127155: I think it is much more convenient
to have structured log files rather than one big file produced by
piping output.

llvm-svn: 128378
2011-03-27 13:52:32 +00:00
Douglas Gregor
88d8c14766 Extend Clang's TableGen emitter for attributes to support bool arguments.
llvm-svn: 128330
2011-03-26 03:40:01 +00:00
Duncan Sands
4d240b1e9e Useful script for finding regressions in the nightly testsuite.
I think it was written by Pawel Worach.

llvm-svn: 128268
2011-03-25 07:17:44 +00:00
Johnny Chen
a4f73530a5 delegate the disassembly of t2ADR to the more generic t2ADDri12/t2SUBri12 instructions, and add a test case for that.
llvm-svn: 128249
2011-03-25 00:17:42 +00:00
Johnny Chen
4a55a733b8 The opcode names ("tLDM", "tLDM_UPD") used for conflict resolution have been stale since
the change to ("tLDMIA", "tLDMIA_UPD").  Update the conflict resolution code and add
test cases for that.

llvm-svn: 128247
2011-03-24 23:42:31 +00:00
Johnny Chen
6345e6a882 The ARM disassembler was confused with the 16-bit tSTMIA instruction.
According to A8.6.189 STM/STMIA/STMEA (Encoding T1), there's only tSTMIA_UPD available.
Ignore tSTMIA for the decoder emitter and add a test case for that.

llvm-svn: 128246
2011-03-24 23:21:14 +00:00
Bruno Cardoso Lopes
a5de5df6d8 Add asm parsing support w/ testcases for strex/ldrex family of instructions
llvm-svn: 128236
2011-03-24 21:04:58 +00:00
Johnny Chen
ae5d27987a ADR was added with the wrong encoding for inst{24-21}, and the ARM decoder was fooled.
Set the encoding bits to {0,?,?,0}, not 0.  Plus delegate the disassembly of ADR to
the more generic ADDri/SUBri instructions, and add a test case for that.

llvm-svn: 128234
2011-03-24 20:42:48 +00:00
Douglas Gregor
d11c0d2ab8 Update the Clang attribute emitter to handle attributes of 'version'
kind, and fix serialization/deserialization of IdentifierInfo
attributes. These are requires for the new 'availability' attribute.

llvm-svn: 128130
2011-03-23 01:05:46 +00:00
Bill Wendling
52c4596a0f Call static functions so that they aren't left unused.
llvm-svn: 128020
2011-03-21 21:08:27 +00:00
Bill Wendling
9adf1c9edd A WIP commit of the InstAlias printing cleanup. This code will soon replace the
code below it. Even though it looks very similar, it will match more precisely
and geneate better functions in the long run.

llvm-svn: 127991
2011-03-21 08:59:17 +00:00
Bill Wendling
4cdb29548b Add the IAPrinter class.
This is a helper class that will make it easier to say which InstAliases can be
printed and which cannot (because of ambiguity).

llvm-svn: 127990
2011-03-21 08:40:31 +00:00
Bill Wendling
e3b0820ad4 * Add classes that support the "feature" information.
* Move the code that emits the reg in reg class matching into its own function.

llvm-svn: 127988
2011-03-21 08:31:53 +00:00
Owen Anderson
c23c6e0c1a Thumb2 PC-relative loads require a fixup rather than just an immediate.
llvm-svn: 127888
2011-03-18 17:42:55 +00:00
NAKAMURA Takumi
cdd69c874f raw_ostream: [PR6745] Tweak formatting (double)%e for Windows hosts.
On MSVCRT and compatible, output of %e is incompatible to Posix by default. Number of exponent digits should be at least 2. "%+03d"

FIXME: Implement our formatter in future!
llvm-svn: 127872
2011-03-18 09:30:10 +00:00
NAKAMURA Takumi
82c316b78a lit/ProgressBar.py: [PR7919] Improve line wrap for XN-incapable terminals.
On Win32 console, emitting char to col#79 causes linefeed, and the cursor will not return to col#79 upper line with backspace.

llvm-svn: 127696
2011-03-15 21:07:44 +00:00
Evan Cheng
14eff5d627 - Add "Bitcast" target instruction property for instructions which perform
nothing more than a bitcast.
- Teach tablegen to automatically infer "Bitcast" property.

llvm-svn: 127667
2011-03-15 05:09:26 +00:00
Sean Callanan
5a51ccdc0f X86 table-generator and disassembler support for the AVX
instruction set.  This code adds support for the VEX prefix
and for the YMM registers accessible on AVX-enabled
architectures.  Instruction table support that enables AVX
instructions for the disassembler is in an upcoming patch.

llvm-svn: 127644
2011-03-15 01:23:15 +00:00
Owen Anderson
49965661d5 Ignore isCodeGenOnly instructions when generating diassembly tables.
llvm-svn: 127619
2011-03-14 20:58:49 +00:00
Jim Grosbach
973ab94013 Trailing whitespace.
llvm-svn: 127592
2011-03-14 17:32:49 +00:00
Francois Pichet
0e434150f9 Correct small comment order typo.
llvm-svn: 127575
2011-03-14 02:30:32 +00:00
Jim Grosbach
a87f223848 Remove no-longer-correct special case for disasm of ARM BL instructions.
llvm-svn: 127517
2011-03-12 01:05:29 +00:00
Jim Grosbach
daffeb06fb Pseudo-ize the ARM 'B' instruction.
llvm-svn: 127510
2011-03-11 23:24:15 +00:00
Jim Grosbach
2226dfbea2 Remove dead code. These ARM instruction definitions no longer exist.
llvm-svn: 127509
2011-03-11 23:15:02 +00:00
Jim Grosbach
01a937ac07 Remove dead code. These ARM instruction definitions no longer exist.
llvm-svn: 127508
2011-03-11 23:11:41 +00:00
Jim Grosbach
009af69d6d Pseudo-ize VMOVDcc and VMOVScc.
llvm-svn: 127506
2011-03-11 23:09:50 +00:00
Jim Grosbach
b480da2317 Remove dead code. These ARM instruction definitions don't exist.
llvm-svn: 127491
2011-03-11 20:51:07 +00:00
Jim Grosbach
ee6075cda5 ARM VDUPfd and VDUPfq can just be patterns. The instruction is the same
as for VDUP32d and VDUP32q, respectively.

llvm-svn: 127489
2011-03-11 20:44:08 +00:00
Jim Grosbach
cb57d3b1d9 Remove dead code. These ARM instruction definitions don't exist.
llvm-svn: 127488
2011-03-11 20:38:18 +00:00
Jim Grosbach
3329263352 ARM VDUPLNfq and VDUPLNfd definitions can just be Pat<>s for VDUPLN32q
and VDUPLN32d, respectively.

llvm-svn: 127486
2011-03-11 20:31:17 +00:00
Jim Grosbach
431682981d ARM VREV64df and VREV64qf can just be patterns. The instruction is the same
as for VREV64d32 and VREV64q32, respectively.

llvm-svn: 127485
2011-03-11 20:18:05 +00:00
Jim Grosbach
9e8cf109dc Add missing 'return on failure'. Previously we'd crash after emitting
the diagnostic.

llvm-svn: 127480
2011-03-11 19:52:52 +00:00
Jim Grosbach
c7548fce48 Teach TableGen to pre-calculate register enum values when creating the
CodeGenRegister entries. Use this information to more intelligently build
the literal register entires in the DAGISel matcher table. Specifically,
use a single-byte OPC_EmitRegister entry for registers with a value of
less than 256 and OPC_EmitRegister2 entry for registers with a larger value.

rdar://9066491

llvm-svn: 127456
2011-03-11 02:19:02 +00:00
Jim Grosbach
6e41ec016b Make the register enum value part of the CodeGenRegister struct.
llvm-svn: 127448
2011-03-11 01:33:54 +00:00
Jim Grosbach
2c9ce71360 Trailing whitespace.
llvm-svn: 127447
2011-03-11 01:27:24 +00:00
Jim Grosbach
9834ed0ef4 Trailing whitespace.
llvm-svn: 127446
2011-03-11 01:19:05 +00:00
Jim Grosbach
9cddc3746d Tidy up since ARM MOVCCi and MOVCCi16 are now pseudos.
llvm-svn: 127445
2011-03-11 01:16:49 +00:00
Jim Grosbach
1986d9ac8f Properly pseudo-ize MOVCCr and MOVCCs.
llvm-svn: 127434
2011-03-10 23:56:09 +00:00
Jim Grosbach
41694b91ad Memory barrier instructions don't need special handling in tblgen anymore.
llvm-svn: 127419
2011-03-10 19:05:48 +00:00
Stuart Hastings
f4420e43f1 Stop building PPC parts on OSX. Radar 8637926.
llvm-svn: 127262
2011-03-08 19:28:28 +00:00
NAKAMURA Takumi
c989c9adfa Use $(ECHOPATH) to make llvm-lit from llvm-lit.in.
llvm-svn: 127240
2011-03-08 12:25:19 +00:00
Bill Wendling
db6712f416 Don't show commands.
llvm-svn: 127224
2011-03-08 08:34:49 +00:00
Bill Wendling
958e854f40 Rename the narrow shift right immediate operands to "shr_imm*" operands. Also
expand the testing of the narrowing shift right instructions.

No functionality change.

llvm-svn: 127193
2011-03-07 23:38:41 +00:00
Bill Wendling
e07a701cb9 Don't keep the log files around. Just pipe to a log file instead.
llvm-svn: 127155
2011-03-07 07:37:37 +00:00
Jakob Stoklund Olesen
d415589edc Revert r127073: "Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of $(ECHO)."
It broke the llvm-gcc-native-mingw32 buildbot, and we need all of them to be green for the 2.9 branch.

Takumi, please reapply after we branch, preferably with a fix ;-)

llvm-svn: 127107
2011-03-05 18:55:06 +00:00
NAKAMURA Takumi
0afd9bcaec utils/lit/lit/TestRunner.py: bash is available with MSYS on Python/W32. Then we can execute "bash tests".
llvm-svn: 127074
2011-03-05 09:46:53 +00:00
NAKAMURA Takumi
9cab0faea2 Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of $(ECHO).
On mingw and python/w32, lit would not be expected to understand MSYS-style path.

llvm-svn: 127073
2011-03-05 09:46:45 +00:00
NAKAMURA Takumi
355800852d On Windows hosts, Python scripts in test/Scripts did not accept binary files from stdin. The environment variable "PYTHONUNBUFFERED" makes stdin as binary. Thanks to Danil Malyshev!
llvm-svn: 127072
2011-03-05 09:46:36 +00:00
David Greene
125709b0ea Fix the case where the number of jobs is less than the
number of threads.  In that case make the number of threads
equal to the number of jobs and launch one jobs on each
thread.  This makes things work like make -j.

llvm-svn: 127045
2011-03-04 23:02:52 +00:00
Bob Wilson
e24bee9ce8 TableGen should not ignore BX instructions for the ARM disassembler. pr9368.
llvm-svn: 126931
2011-03-03 07:19:52 +00:00
Bob Wilson
42f80596ca pr9367: Add missing predicated BLX instructions.
Patch by Jyun-Yan You, with some minor adjustments and a testcase from me.

llvm-svn: 126915
2011-03-03 01:41:01 +00:00
John McCall
8346b49836 Teach the clang attribute emitter about InheritableParamAttr.
Intended to be atomic with clang r126828.

llvm-svn: 126827
2011-03-02 04:00:52 +00:00
Oscar Fuentes
15a668f50b Fixes warnings emitted by Visual Studio 2010 compiler.
Patch by Erik Olofsson!

llvm-svn: 126796
2011-03-01 23:11:57 +00:00
Jim Grosbach
3b72823981 trailing whitespace.
llvm-svn: 126733
2011-03-01 01:39:05 +00:00
Jim Grosbach
fbdcd70f4b Generalize the register matching code in DAGISel a bit.
llvm-svn: 126731
2011-03-01 01:37:19 +00:00
Bill Wendling
304dda7810 Narrow right shifts need to encode their immediates differently from a normal
shift.

   16-bit: imm6<5:3> = '001', 8 - <imm> is encded in imm6<2:0>
   32-bit: imm6<5:4> = '01',16 - <imm> is encded in imm6<3:0>
   64-bit: imm6<5> = '1', 32 - <imm> is encded in imm6<4:0>

llvm-svn: 126723
2011-03-01 01:00:59 +00:00
NAKAMURA Takumi
9c6821e474 Don't install libUnitTestMain.a. It might be useless without gtest headers.
llvm-svn: 126632
2011-02-28 05:18:07 +00:00
Bill Wendling
91cce6cc1d A new TableGen feature! (Not turned on just yet.)
InstAlias<{alias}, {aliasee}>;

The InstAlias instruction should be able to go from the MCInst to the
{alias}. All of the information is there to match the MCInst with the
{aliasee}. From there, it's a simple matter to emit the {alias}, with the
correct operands from the {aliasee}.

The code this patch generates can be used by the InstPrinter to automatically
print out the alias without having to write special C++ code to handle the
situation.

This is a WIP, and therefore are several limitations. For instance, it cannot
handle AsmOperands at the moment. It also doesn't know what to do when two
{alias}es match the same {aliasee}. (Currently, it just ignores those two cases
and allows the printInstruction method to handle them.)

llvm-svn: 126538
2011-02-26 03:09:12 +00:00
Bob Wilson
d1f7c57667 Removed unnecessary dylibs from Apple builds, with or without "lib" prefix.
Radar 9056686

llvm-svn: 126534
2011-02-26 00:22:17 +00:00
Bob Wilson
b25dc65fdb Add a new "Embedded" makefile target for Apple-style builds.
This one just installs the default build into a different destination directory.

llvm-svn: 126533
2011-02-25 23:42:03 +00:00
Stuart Hastings
027804988e Fix bad comment marker.
llvm-svn: 126525
2011-02-25 22:47:58 +00:00
David Greene
ce1bb42907 Add some options for building LLVM in different environments:
--force-configure to force running configure before building.

--extra-llvm-config-flags
--extra-llvm-gcc-config-flags
--extra-gcc-config-flags

Pass additional argument to the various configure invocations.

This also eliminates a default build flavor because explicitly
specifying builds could result in build flavors being run repeatedly.

Finally, turn off fortran builds for the moment because install
appears to be broken.

llvm-svn: 126510
2011-02-25 20:51:27 +00:00
Stuart Hastings
e43cfa5329 Omit lto.h from the llvmCore result; henceforth, this will be supplied
by clang.  Radar 9042056.

llvm-svn: 126507
2011-02-25 20:42:39 +00:00
Argyrios Kyrtzidis
1b1e152fc0 In utils/TableGen/ClangSACheckersEmitter.cpp, set the 'Hidden' bit for checkers.
llvm-svn: 126436
2011-02-24 21:33:49 +00:00
David Greene
f37b51af6b Fix Builder::execute() to more properly pass the desired environment
to tools.

llvm-svn: 126263
2011-02-22 23:30:45 +00:00
Cameron Zwarich
4c6c791d94 Eliminate valgrind warnings from Python on the 32-bit as well.
llvm-svn: 126171
2011-02-22 01:00:10 +00:00
Rafael Espindola
e4a04cce2b Implement xgetbv and xsetbv.
Patch by Jai Menon.

llvm-svn: 126165
2011-02-22 00:35:18 +00:00
David Greene
daf8097c16 Add a convenience tool for doing comparison builds of the LLVM
ecosystem.  This is a handy utility for checking changes before
committing them to the repository.

llvm-svn: 126136
2011-02-21 19:23:22 +00:00
Oscar Fuentes
22247bd624 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126092
2011-02-20 22:06:10 +00:00
Cameron Zwarich
02f45a268f Try to fix the MC/AsmParser/section.s failure on the llvm-x86_64-linux-vg_leak
bot. I am not sure if this is valid Valgrind exclusion file syntax, but the
Internet seems to think so.

llvm-svn: 126051
2011-02-19 21:44:35 +00:00
Oscar Fuentes
704198a74e CMake: updated list of tblgen source files.
llvm-svn: 125969
2011-02-18 22:06:23 +00:00
Owen Anderson
a2d2de33c5 Add FixedLenDecoderEmitter, the skeleton of a new disassembler emitter for fixed-length instruction encodings.
A major part of its (eventual) goal is to support a much cleaner separation between disassembly callbacks
provided by the target and the disassembler emitter itself, i.e. not requiring hardcoding of knowledge in tblgen
like the existing disassembly emitters do.

The hope is that some day this will allow us to replace the existing non-Thumb ARM disassembler and remove
some of the hacks the old one introduced to tblgen.

llvm-svn: 125966
2011-02-18 21:51:29 +00:00
Joerg Sonnenberger
adef15e109 Check that MnemonicAlias doesn't map back to the same string.
llvm-svn: 125792
2011-02-17 23:22:19 +00:00
NAKAMURA Takumi
f9affc1dc9 lit/TestingConfig.py: Add the environment variable PRINTF_EXPONENT_DIGITS as workaround [PR6745] for mingw's tests. Danil Malyshev suggested this.
FIXME: It does not improve MSVC's issue.

[Danil Malyshev] Defining PRINTF_EXPONENT_DIGITS env is the suggested way to make MinGW ANSI/POSIX compatible. This is not only about the case we are discussing, but in general, I'd like to have explicitly defined compatibility mode for all the tests running on MinGW.

llvm-svn: 125725
2011-02-17 05:56:41 +00:00
Alexis Hunt
be0782975d Add serialization for Expr* arguments for attributes to clang tablegen files.
Patch thanks to Zach Anderson.

llvm-svn: 125721
2011-02-17 03:30:09 +00:00
Argyrios Kyrtzidis
f19978df28 When tablegen'ing the clang analyzer checkers:
-Use the tablegen class name for the checker class name.
-Mark checker packages as hidden/not hidden.

llvm-svn: 125558
2011-02-15 07:42:16 +00:00
Argyrios Kyrtzidis
c5c3ca71c0 Add the ClangSACheckersEmitter tablegen backend which will be used for the clang static analyzer.
llvm-svn: 125493
2011-02-14 17:58:52 +00:00
Bruno Cardoso Lopes
e65a98b127 Fix encoding and add parsing support for the arm/thumb CPS instruction:
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.

llvm-svn: 125489
2011-02-14 13:09:44 +00:00
Argyrios Kyrtzidis
aded28619c Wrap the struct in an anonymous namespace.
llvm-svn: 125452
2011-02-13 07:51:19 +00:00
Jim Grosbach
c359122d78 AsmMatcher custom operand parser failure enhancements.
Teach the AsmMatcher handling to distinguish between an error custom-parsing
an operand and a failure to match. The former should propogate the error
upwards, while the latter should continue attempting to parse with
alternative matchers.

Update the ARM asm parser accordingly.

llvm-svn: 125426
2011-02-12 01:34:40 +00:00
Jim Grosbach
1ba77f9624 Tidy out asm matcher .inc output.
llvm-svn: 125408
2011-02-11 21:31:55 +00:00
NAKAMURA Takumi
80343d0f2a lit/TestFormats.py: Unittests may be found with suffix .exe also on Cygwin.
llvm-svn: 125273
2011-02-10 09:11:57 +00:00
NAKAMURA Takumi
ce0e9c3c13 lit/Util.py: On Cygwin, 'PATHEXT' may exist but it should not be used.
llvm-svn: 125272
2011-02-10 09:11:48 +00:00
Bill Wendling
bbb31e6663 Don't return before calling the post-processing function(s).
llvm-svn: 125256
2011-02-10 01:28:26 +00:00
Jim Grosbach
48e8554772 Do AsmMatcher operand classification per-opcode.
When matching operands for a candidate opcode match in the auto-generated
AsmMatcher, check each operand against the expected operand match class.
Previously, operands were classified independently of the opcode being
handled, which led to difficulties when operand match classes were
more complicated than simple subclass relationships.

llvm-svn: 125245
2011-02-10 00:08:28 +00:00