1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

4074 Commits

Author SHA1 Message Date
Jim Grosbach
050ec9bce7 Replace some uses of std:map<std::string,...> with StringMap.
llvm-svn: 155037
2012-04-18 19:13:59 +00:00
Jim Grosbach
e29486798c Use SmallVector for the requirements on an InstAlias.
llvm-svn: 155034
2012-04-18 19:02:43 +00:00
Jim Grosbach
ae2ac1f597 Tidy up. Formatting.
llvm-svn: 155032
2012-04-18 18:56:33 +00:00
Jim Grosbach
26c6c85855 Move a few more warnings to use PrintWarning().
llvm-svn: 155027
2012-04-18 18:39:31 +00:00
Jim Grosbach
f8c6a6ba04 Tidy up. No need for a Twine here, as it's just constants.
llvm-svn: 155026
2012-04-18 18:39:27 +00:00
Jim Grosbach
5e14805a0f Formatting.
llvm-svn: 155025
2012-04-18 18:39:23 +00:00
Jim Grosbach
e846a32427 Tidy up. Add a '.' at the end of the sentence.
llvm-svn: 155024
2012-04-18 18:39:19 +00:00
Jim Grosbach
78b59b30e7 Clean up warning text. Remove extraneous prefix.
llvm-svn: 155015
2012-04-18 18:09:50 +00:00
Jim Grosbach
3c537f8fb4 TableGen use PrintWarning rather than fprintf(stderr,...) for warnings.
That way we get source line number information from the diagnostics.

llvm-svn: 155014
2012-04-18 17:46:41 +00:00
Silviu Baranga
8e0ebc8ed7 Fixed decoding for the ARM cdp2 instruction. The restriction on the coprocessor number was removed for this instruction.
llvm-svn: 155000
2012-04-18 13:02:55 +00:00
Jim Grosbach
d32ea4a8a9 Sanity check error handling for TokenAlias.
llvm-svn: 154951
2012-04-17 21:23:52 +00:00
Manuel Klimek
47de8bd0ef Goodbye, JSONParser...
llvm-svn: 154930
2012-04-17 17:21:17 +00:00
Bill Wendling
be2b67fb44 Download and build the compiler-rt project.
llvm-svn: 154905
2012-04-17 05:11:51 +00:00
Bill Wendling
7412502e7a Don't tag libcxx and libcxxabi since we don't release them just yet.
llvm-svn: 154889
2012-04-17 01:01:55 +00:00
Jim Grosbach
ced1f200a3 Tidy up. 80 columns.
llvm-svn: 154881
2012-04-17 00:01:04 +00:00
Bob Wilson
da87e36649 Remove old code to strip out unwanted PPC slices for Apple llvmCore.
llvm-svn: 154706
2012-04-13 22:58:53 +00:00
Craig Topper
da52eeedcb Fix target specific intrinsic handling to adjust intrinsic number before doing attribute table lookup. Also fix attribute table lookup to handle 'invalid' intrinsic correctly. Fixes PR12542
llvm-svn: 154658
2012-04-13 06:14:57 +00:00
Jim Grosbach
8327980405 Remove incorrect comment.
llvm-svn: 154533
2012-04-11 21:09:54 +00:00
Jim Grosbach
80c9f4d837 Tidy up. Remove hard tab characters.
llvm-svn: 154532
2012-04-11 21:02:33 +00:00
Jim Grosbach
51aa44347a Tidy up. Whitespace.
llvm-svn: 154531
2012-04-11 21:02:30 +00:00
Andrew Trick
6d7aff8241 TableGen's regpressure: emit per-registerclass weight limits.
llvm-svn: 154518
2012-04-11 18:16:28 +00:00
Andrew Trick
2628429e92 TableGen'd regpressure: register unit set pruning.
The pruning is more complete if it is not done incrementally. The code
is also a tad less convluted.

llvm-svn: 154510
2012-04-11 17:35:26 +00:00
Andrew Trick
a2a5c3bb71 Tablegen'd regpressure: emit the weighted pressure limit.
llvm-svn: 154477
2012-04-11 04:31:33 +00:00
Andrew Trick
ccfe0f1fc6 Table-generated register pressure fixes.
Handle mixing allocatable and unallocatable register gracefully.
Simplify the pruning of register unit sets.

llvm-svn: 154474
2012-04-11 03:19:15 +00:00
Andrew Trick
0c60300f39 TableGen/reginfo potential bug: typo from previous checkin.
llvm-svn: 154452
2012-04-10 23:53:32 +00:00
Andrew Trick
360c19ad86 Fix for register pressure tables.
Recent refactoring introduced a bug. Fix: added buildRegUnitSets.

llvm-svn: 154382
2012-04-10 03:36:49 +00:00
Andrew Trick
218abb3a9c Use std::includes instead of my own implementation.
Jakob's review.

llvm-svn: 154377
2012-04-10 03:12:29 +00:00
Andrew Trick
6b7d15e240 Added register unit sets to the target description.
This is a new algorithm that finds sets of register units that can be
used to model registers pressure. This handles arbitrary, overlapping
register classes. Each register class is associated with a (small)
list of pressure sets. These are the dimensions of pressure affected
by the register class's liveness.

llvm-svn: 154374
2012-04-10 02:25:24 +00:00
Andrew Trick
f73fa6bef2 Added register unit weights to the target description.
This is a new algorithm that associates registers with weighted
register units to accuretely model their effect on register
pressure. This handles registers with multiple overlapping
subregisters. It is possible, but almost inconceivable that the
algorithm fails to find an exact solution for a target description. If
an exact solution cannot be found, an inexact, but reasonable solution
will be chosen.

llvm-svn: 154373
2012-04-10 02:25:21 +00:00
Andrew Trick
7b51eb5f5e Fix header comment
llvm-svn: 154372
2012-04-10 02:25:18 +00:00
Bob Wilson
fcde5a3ac5 Do not include multiple -arch options in CPPFLAGS.
llvm-svn: 154070
2012-04-05 00:35:55 +00:00
Craig Topper
2a4fe8b344 Convert assert(false) followed by a return to llvm_unreachable
llvm-svn: 153997
2012-04-04 04:55:46 +00:00
Bob Wilson
ba2b9f1272 Fix the install location for the Embedded makefile target.
svn r145378 inadvertently changed the destination for the Embedded target
in the makefile.  Add a "/Developer" suffix to DSTROOT to compensate.

llvm-svn: 153980
2012-04-03 23:44:39 +00:00
Bob Wilson
3e0c867151 Remove dead code for installing libLTO when building llvmCore.
llvm-svn: 153978
2012-04-03 23:13:26 +00:00
Michael J. Spencer
2f9beb2374 Add YAML parser to Support.
llvm-svn: 153977
2012-04-03 23:09:22 +00:00
Bob Wilson
f68ed1883e When building llvmCore, pass the SDKROOT and -arch setting to configure.
So far all of configure tests have been run against the default SDK and
architecture, regardless of what is actually being built.  We've gotten
lucky until now.  <rdar://problem/11112479>

llvm-svn: 153972
2012-04-03 21:50:26 +00:00
Bob Wilson
1944a74c98 Remove a reference to the C backend.
llvm-svn: 153971
2012-04-03 21:50:24 +00:00
Craig Topper
b4929c0302 Tidy up spacing in some tablegen outputs.
llvm-svn: 153937
2012-04-03 06:52:47 +00:00
Craig Topper
ce6c05e0df Add support for AVX enhanced comparison predicates. Patch from Kay Tiong Khoo.
llvm-svn: 153935
2012-04-03 05:20:24 +00:00
Bill Wendling
7680143edf As Eric pointed out, even a Debug build should be equal. Leave the flag that can turn off comparisons though.
llvm-svn: 153927
2012-04-03 03:27:43 +00:00
Andrew Trick
a1e25f74dd Cleanup set_union usage. The same thing but a bit cleaner now.
llvm-svn: 153922
2012-04-03 01:35:52 +00:00
Andrew Trick
a92546a4bb Use std::set_union instead of nasty custom code.
I just noticed Jakob's examples of the proper application of
std::set... routines.

llvm-svn: 153918
2012-04-03 00:47:23 +00:00
Bill Wendling
e3ff2c3ce6 Compare the .o files only for release builds. Add an option to bypass the comparison altogether.
llvm-svn: 153909
2012-04-02 23:27:43 +00:00
Silviu Baranga
af228a1538 Second part for the 153874 one
llvm-svn: 153875
2012-04-02 15:46:46 +00:00
Benjamin Kramer
d960cf6265 Emit the asm writer's mnemonic table with SequenceToOffsetTable.
This way we can get AVX v-prefixed instructions tail merged with the normal insns.

llvm-svn: 153869
2012-04-02 09:13:46 +00:00
Craig Topper
52dc5e74e5 Reorder fields in MatchEntry and OperandMatchEntry to reduce padding. A bit tricky due to the target specific sizes for some of the fields so the ordering is only optimal for the targets in the tree.
llvm-svn: 153865
2012-04-02 07:48:39 +00:00
Craig Topper
fe02cb5e8b Remove getInstructionName from MCInstPrinter implementations in favor of using the instruction name table from MCInstrInfo. Reduces static data in the InstPrinter implementations.
llvm-svn: 153863
2012-04-02 07:01:04 +00:00
Craig Topper
949f3bef7a Use SequenceToOffsetTable to generate instruction name table for AsmWriter.
llvm-svn: 153857
2012-04-02 00:47:39 +00:00
Craig Topper
56bc73a030 Use SequenceToOffsetTable to create instruction name table. Saves space particularly on X86 where AVX instructions just add a 'v' to the front of other instructions.
llvm-svn: 153841
2012-04-01 18:14:14 +00:00
Benjamin Kramer
84a17ab494 Emit the LLVM<->DWARF register mapping as a sorted table and use binary search to do the lookup.
This also avoids emitting the information twice, which led to code bloat. On i386-linux-Release+Asserts
with all targets built this change shaves a whopping 1.3 MB off clang. The number is probably exaggerated
by recent inliner changes but the methods were already enormous with the old inline cost computation.

The DWARF reg -> LLVM reg mapping doesn't seem to have holes in it, so it could be a simple lookup table.
I didn't implement that optimization yet to avoid potentially changing functionality.

There is still some duplication both in tablegen and the generated code that should be cleaned up eventually.

llvm-svn: 153837
2012-04-01 14:23:58 +00:00
Andrew Trick
e5028d95da comment typo
llvm-svn: 153796
2012-03-31 02:39:17 +00:00
Andrew Trick
f1fa07f326 Introduce Register Units: Give each leaf register a number.
First small step toward modeling multi-register multi-pressure. In the
future, register units can also be used to model liveness and
aliasing.

llvm-svn: 153794
2012-03-31 01:35:59 +00:00
Benjamin Kramer
dbd6a33c45 Rip out emission of the regIsInRegClass function for the asm printer.
It's slow, bloated and completely redundant with MCRegisterClass::contains.

llvm-svn: 153782
2012-03-30 23:13:40 +00:00
Jakob Stoklund Olesen
a29c0a3bac Use SequenceToOffsetTable in emitRegisterNameString.
This allows suffix sharing in register names. (AX is a suffix of EAX).

llvm-svn: 153777
2012-03-30 21:12:52 +00:00
Jakob Stoklund Olesen
0255173d11 Reapply 153764 and 153761 with a fix.
Use an explicit comparator instead of the default.

The sets are sorted, but not using the default comparator. Hopefully,
this will unbreak the Linux builders.

llvm-svn: 153772
2012-03-30 20:24:14 +00:00
Rafael Espindola
34915bd5fa Revert 153764 and 153761. They broke a --enable-optimized --enable-assertions
--enable-expensive-checks build.

llvm-svn: 153771
2012-03-30 20:09:06 +00:00
Jakob Stoklund Olesen
25b63f35f8 Compress SimpleValueType lists by sharing.
Many register classes have the same value types. Share the table space.

llvm-svn: 153764
2012-03-30 17:42:04 +00:00
Jakob Stoklund Olesen
cf79a76c01 Compress register lists by sharing suffixes.
TableGen emits lists of sub-registers, super-registers, and overlaps. Put
them all in a single table and use a SequenceToOffsetTable to share
suffixes.

llvm-svn: 153761
2012-03-30 17:25:43 +00:00
Jakob Stoklund Olesen
dab150c9cd Add a SequenceToOffsetTable to TableGen.
This is similar to the StringToOffsetTable we use to produce string
tables, but it can be used for other sequences than strings, and it
eliminates entries for suffixes.

llvm-svn: 153760
2012-03-30 17:25:40 +00:00
Jakob Stoklund Olesen
3da52049b4 Add more constness to CodeGenRegisters.
llvm-svn: 153667
2012-03-29 18:03:59 +00:00
Jakob Stoklund Olesen
7623979dd6 Spill DPair registers, not just QPR.
The arm_neon intrinsics can create virtual registers from the DPair
register class which allows both even-odd and odd-even D-register pairs.

This fixes PR12389.

llvm-svn: 153603
2012-03-28 21:20:32 +00:00
Chris Lattner
bf1b6e4fc5 fix a failure path to print the right thing, part of PR12357
llvm-svn: 153457
2012-03-26 19:11:51 +00:00
Benjamin Kramer
773a45650a TableGen: Don't emit the llvm intrinsic -> gcc builtin table, its only user was the c backend.
llvm-svn: 153432
2012-03-26 11:08:03 +00:00
Eli Bendersky
a9eb78009f Fix lit failure on cmake-clang-x64_64-linux bot, apparently due to its having
a very (*very*) old version of Python (2.4?)

llvm-svn: 153409
2012-03-25 09:42:28 +00:00
Eli Bendersky
3ef88c1833 Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu
* Removed test/lib/llvm.exp - it is no longer needed 
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
  left in the test suite so this code is no longer required. test/lit.cfg is
  now much shorter and clearer 
* Removed a lot of duplicate code in lit.local.cfg files that need access to
  the root configuration, by adding a "root" attribute to the TestingConfig
  object. This attribute is dynamically computed to provide the same
  information as was previously provided by the custom getRoot functions. 
* Documented the config.root attribute in docs/CommandGuide/lit.pod

llvm-svn: 153408
2012-03-25 09:02:19 +00:00
Benjamin Kramer
a41ae12bd5 Include cstdio in a few place that depended on getting it transitively through StringExtras.h
llvm-svn: 153328
2012-03-23 11:35:30 +00:00
Eric Christopher
3839c1ffd3 Remove the C backend.
llvm-svn: 153307
2012-03-23 05:50:46 +00:00
Nico Weber
3f84548106 Add a ${pathsep} variable to lit that expands to : (or ; on win32).
This is in braces so that it doesn't conflict with the existing %p.
It uses braces instead of parens because parens would have to be
regex-escaped.

llvm-svn: 153213
2012-03-21 19:56:42 +00:00
NAKAMURA Takumi
955feb18b4 lit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python Win32 Extensions.
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.

Disable win32file at ImportError. Thanks to Francois to let me know.

FIXME: Could we report warning or notification if win32file were not found?
llvm-svn: 153172
2012-03-21 07:49:44 +00:00
Evan Cheng
a23be6ef85 Reserve number of MI operands to accom,odate complex patterns.
llvm-svn: 153125
2012-03-20 21:07:51 +00:00
Francois Pichet
d7e89c29c2 Revert r152915. Chapuni's WinWaitReleased refactoring: It doesn't work for me
llvm-svn: 152958
2012-03-16 22:50:01 +00:00
NAKAMURA Takumi
b2d7bb031a lit/TestRunner.py: [Win32] Check all opened_files[] released, rather than (obsoleted) written_files[].
In previous case,
RUN: foo -o %t
RUN: FileCheck < %t
RUN: bar -o %t

2nd read handle might prevent manipulation of 3rd %t in bar, to remove and rename.

llvm-svn: 152916
2012-03-16 10:48:10 +00:00
NAKAMURA Takumi
14c056f6e8 lit/TestRunner.py: [Win32] Rework WinWaitReleased().
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.

llvm-svn: 152915
2012-03-16 10:48:03 +00:00
Craig Topper
8440abd184 More const-correcting of FixedLenDecoderEmitter.
llvm-svn: 152906
2012-03-16 06:52:56 +00:00
Craig Topper
7eb05588b8 Const-correct the FixedLenDecoderEmitter. Pass a few things by const reference instead of value to avoid some copying.
llvm-svn: 152899
2012-03-16 05:58:09 +00:00
Craig Topper
60adb4d322 Spacing fixes. Mostly aligning arguments that spilled onto next line with the opening parenthese instead of 2 spaces in.
llvm-svn: 152889
2012-03-16 01:19:24 +00:00
Craig Topper
71e5d799ba Remove unused field NumVariable from Filter class. Even it was needed the same result could be found with VariableInstructions.size(). Also fix some typos in comments.
llvm-svn: 152885
2012-03-16 00:56:01 +00:00
Jakob Stoklund Olesen
0d11262816 Make MnemonicTable const again. That part of r152202 was OK.
llvm-svn: 152840
2012-03-15 21:22:53 +00:00
Jakob Stoklund Olesen
01cebc3291 Don't assume all mnemonics fit in 64k.
We currently assume that all targets have less than 64k opcodes. We
shouldn't limit it further.

llvm-svn: 152833
2012-03-15 20:44:06 +00:00
Jakob Stoklund Olesen
16a890c018 Revert r152202: "Use uint16_t to store InstrNameIndices in MCInstrInfo."
We cannot limit the concatenated instruction names to 64K.  ARM is
already at 32K, and it is easy to imagine a target with more
instructions.

llvm-svn: 152817
2012-03-15 18:05:57 +00:00
Jakob Stoklund Olesen
00f5108289 Revert r152105: "Use uint16_t to store indices into string table"
This patch limited the concatenated register names to 64K which meant
that the total number of registers was many times less than 64K.

If any compilers actually enforce the 64K limit on string literals, and
it turns out to be a problem, we should fix that problem by not using
long string literals.

llvm-svn: 152816
2012-03-15 18:05:54 +00:00
Craig Topper
8541c0f470 Remove unused field from FixedLenDecoderEmitter. Move NumberedInstructions declaration from class to run method since its only used there and was being reinitialized anyway.
llvm-svn: 152616
2012-03-13 06:39:00 +00:00
NAKAMURA Takumi
d5f8656288 lit: Pass %INCLUDE% to tests on Win32. clang may expect existence of %INCLUDE% in vcvarsall.bat.
llvm-svn: 152588
2012-03-13 00:02:06 +00:00
Benjamin Kramer
0c62fda38c DFAPacketizerEmitter: Prune includes.
llvm-svn: 152581
2012-03-12 21:32:58 +00:00
Craig Topper
df2bf795d6 Convert more static tables of registers used by calling convention to uint16_t to reduce space.
llvm-svn: 152538
2012-03-11 07:57:25 +00:00
Craig Topper
3ab8ff7a42 Shrink and reorder some fields in MCOperandInfo to fit it in 8 bytes to reduce size of static tables.
llvm-svn: 152524
2012-03-11 01:57:56 +00:00
Kevin Enderby
1a3b6570f8 Fix the x86 disassembler to at least print the lock prefix if it is the first
prefix.  Added a FIXME to remind us this still does not work when it is not the
first prefix.

llvm-svn: 152414
2012-03-09 17:52:49 +00:00
NAKAMURA Takumi
08182a8dfd TableGen/CodeEmitterGen.cpp: Fix an expression of generating bitmask.
~0U might be i32 on 32-bit hosts, then (uint64_t)~0U might not be expected as (i64)0xFFFFFFFF_FFFFFFFF, but as (i64)0x00000000_FFFFFFFF.

llvm-svn: 152407
2012-03-09 14:52:44 +00:00
Craig Topper
79f1e75059 Use uint16_t to store instruction implicit uses and defs. Reduces static data.
llvm-svn: 152301
2012-03-08 08:22:45 +00:00
Craig Topper
b41a7a21e6 Re-commit r152202 hopefully fixing the MSVC linker error.
Original commit message:
Use uint16_t to store InstrNameIndices in MCInstrInfo. Add asserts to protect all 16-bit string table offsets. Also make sure the string to offset table string is not larger than 65536 characters since larger string literals aren't portable.

llvm-svn: 152296
2012-03-08 06:55:27 +00:00
Chad Rosier
42837769dc Revert r152202 as it's causing internal buildbot failures.
Original commit message:
Use uint16_t to store InstrNameIndices in MCInstrInfo. Add asserts to protect 
all 16-bit string table offsets. Also make sure the string to offset table 
string is not larger than 65536 characters since larger string literals aren't 
portable.

llvm-svn: 152233
2012-03-07 17:06:40 +00:00
Craig Topper
42ddd0840a Use uint16_t to store InstrNameIndices in MCInstrInfo. Add asserts to protect all 16-bit string table offsets. Also make sure the string to offset table string is not larger than 65536 characters since larger string literals aren't portable.
llvm-svn: 152202
2012-03-07 05:17:23 +00:00
Jim Grosbach
3b5f99f716 ARM more NEON VLD/VST composite physical register refactoring.
Register pair, all lanes subscripting.

llvm-svn: 152157
2012-03-06 23:10:38 +00:00
Jim Grosbach
a3eeee8a91 ARM refactor more NEON VLD/VST instructions to use composite physregs
Register pair VLD1/VLD2 all-lanes instructions. Kill off more of the
pseudos as a result.

llvm-svn: 152150
2012-03-06 22:01:44 +00:00
Owen Anderson
7bc84e0b4b Fix support for encodings up to 64-bits in length. TableGen was silently truncating them to 32-bits prior to this.
llvm-svn: 152148
2012-03-06 21:48:32 +00:00
Craig Topper
86f61a903c Use uint16_t to store indices into string table since C++ only allows 64K string literals so the index into the big string can never be larger than that.
llvm-svn: 152105
2012-03-06 06:04:39 +00:00
Craig Topper
7efb0c3034 Add asserts to ensure that values will fit into the tables.
llvm-svn: 152104
2012-03-06 04:39:52 +00:00
Jim Grosbach
b0d6469b77 Nuke a bit of dead code.
llvm-svn: 152067
2012-03-05 23:09:51 +00:00
Jim Grosbach
a6b09b4691 ARM Refactor VLD/VST spaced pair instructions.
Use the new composite physical registers.

llvm-svn: 152063
2012-03-05 21:43:40 +00:00
Jim Grosbach
fdfaed95ae ARM refactor away a bunch of VLD/VST pseudo instructions.
With the new composite physical registers to represent arbitrary pairs
of DPR registers, we don't need the pseudo-registers anymore. Get rid of
a bunch of them that use DPR register pairs and just use the real
instructions directly instead.

llvm-svn: 152045
2012-03-05 19:33:30 +00:00
Craig Topper
3362e91b1d Shrink and reorder fields in MCRegisterClass to reduce size of static data.
llvm-svn: 152019
2012-03-05 08:33:33 +00:00
Craig Topper
a95d527c6a Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce static data size.
llvm-svn: 152016
2012-03-05 05:37:41 +00:00
Craig Topper
8cc9d75c6a Use uint16_t to store register overlaps to reduce static data.
llvm-svn: 152001
2012-03-04 10:43:23 +00:00
Craig Topper
4ca8c48cc1 Use uint16_t instead of unsigned to store registers in reg classes. Reduces static data size.
llvm-svn: 151998
2012-03-04 10:16:38 +00:00
Craig Topper
585b4225c3 Use uint16_t to store registers in callee saved register tables to reduce size of static data.
llvm-svn: 151996
2012-03-04 03:33:22 +00:00
Craig Topper
231243e781 Use uint8_t instead of enums to store values in X86 disassembler table. Shaves 150k off the size of X86DisassemblerDecoder.o
llvm-svn: 151995
2012-03-04 02:16:41 +00:00
Benjamin Kramer
6f40ab7172 Perform the string table optimization for OperandMatchEntries too.
llvm-svn: 151986
2012-03-03 20:44:43 +00:00
Benjamin Kramer
ed4150f84d Shrink the asm matcher tables.
- Shrink the opcode field to 16 bits.
- Shrink the AsmVariantID field to 8 bits.
- Store the mnemonic string in a string table, store a 16 bit index.
- Store a pascal-style length byte in the string instead of a null terminator,
  so we can avoid calling strlen on every entry we visit during mnemonic search.

Shrinks X86AsmParser.o from 434k to 201k on x86_64 and eliminates relocs from the table.

llvm-svn: 151984
2012-03-03 19:13:26 +00:00
Benjamin Kramer
5f51357d66 StringToOffsetTable: Allow uniquing the first element, add an option to skip appending a terminating null.
llvm-svn: 151983
2012-03-03 19:13:20 +00:00
Duncan Sands
ce079960e5 Honour --config-prefix also for lit.local.cfg.
llvm-svn: 151977
2012-03-03 13:30:56 +00:00
Benjamin Kramer
111608aae1 Move getSubRegIndex out of generated code into MCRegisterInfo, devirtualize it.
llvm-svn: 151821
2012-03-01 18:16:35 +00:00
Jim Grosbach
9b3f9f1d37 Move TargetRegisterInfo::getSubReg() to MCRegisterInfo.
Allows us to de-virtualize the function and provides access to it in
the instruction printer, which is useful for handling composite
physical registers (e.g., ARM register lists).

llvm-svn: 151815
2012-03-01 17:30:39 +00:00
Jim Grosbach
36aec6e397 Revert "Emit the SubRegTable with the smallest possible integer type."
This reverts commit 151760.

We want to move getSubReg() from TargetRegisterInfo into MCRegisterInfo,
but to do that, the type of the lookup table needs to be the same for
all targets.

llvm-svn: 151814
2012-03-01 17:30:35 +00:00
Benjamin Kramer
44c3c88cb7 Make TargetRegisterClasses non-virtual by making the only virtual function a function pointer.
This allows us to make TRC non-polymorphic and value-initializable, eliminating a huge static
initializer and a ton of cruft from the generated code.

Shrinks ARMBaseRegisterInfo.o by ~100k.

llvm-svn: 151806
2012-03-01 13:37:55 +00:00
Benjamin Kramer
c57a6d4a2a Emit the "is an intrinsic overloaded" table as a bitfield.
llvm-svn: 151792
2012-03-01 02:16:57 +00:00
Benjamin Kramer
14d729cf6a Emit the intrinsic modref info as a lookup table instead of a huge switch.
Shrinks BasicAliasAnalysis.o from 106k to 56k on i386.

llvm-svn: 151781
2012-03-01 01:18:32 +00:00
Benjamin Kramer
16bdd01e87 Implement getSubRegIndex as a linear search on the SubRegTable instead of using a big switch.
- The search bounds are constant, in the worst case (ARM target) it will scan over 30 uint16_ts.
- This method isn't very hot, I had problems finding a testcase where it's called more than a dozen of times (no perf impact).

llvm-svn: 151773
2012-02-29 23:46:50 +00:00
Jim Grosbach
2c1ad70f1e Tidy up. 80 columns.
llvm-svn: 151764
2012-02-29 22:07:56 +00:00
Benjamin Kramer
e4ab085322 Emit the SubRegTable with the smallest possible integer type.
Doesn't help ARM with its massive register set, but halves the size on x86 and all other targets.

llvm-svn: 151760
2012-02-29 21:57:08 +00:00
Jim Grosbach
ccc97aa21e Tidy up. Spelling.
llvm-svn: 151758
2012-02-29 21:46:32 +00:00
Jim Grosbach
f0509324e0 Move the subregister indicies enum into the REGINFO_ENUM section.
llvm-svn: 151756
2012-02-29 21:43:16 +00:00
Jim Grosbach
1105208aec Switch TargetRegisterInfo::getSubReg() to use a lookup table.
Instead of nested switch statements, use a lookup table. On ARM, this replaces
a 23k (x86_64 release build) function with a 16k table. Its not unlikely to
be faster, as well.

llvm-svn: 151751
2012-02-29 20:31:17 +00:00
Craig Topper
f86322b091 Convert generated intrinsic attributes to use an array lookup as Chris suggested in PR11951.
llvm-svn: 151622
2012-02-28 06:32:00 +00:00
Craig Topper
ae4e236c50 Update tblgen command guide. Remove unused tblgen InstrEnumEmitter files.
llvm-svn: 151513
2012-02-27 02:31:09 +00:00
Craig Topper
ab46706aa9 X86 disassembler support for jcxz, jecxz, and jrcxz. Fixes PR11643. Patch by Kay Tiong Khoo.
llvm-svn: 151510
2012-02-27 01:54:29 +00:00
Craig Topper
b1b20ead88 Remove 'if' from getSuperRegisters, getSubRegisters, and getOverlaps that were added in r151038.
llvm-svn: 151246
2012-02-23 08:42:06 +00:00
Bill Wendling
92bf9ddcc7 Remove bad comma from .el file.
llvm-svn: 151189
2012-02-22 19:38:03 +00:00
David Greene
7cabd2e787 Add Foreach Loop
Add some data structures to represent for loops.  These will be
referenced during object processing to do any needed iteration and
instantiation.

Add foreach keyword support to the lexer.

Add a mode to indicate that we're parsing a foreach loop.  This allows
the value parser to early-out when processing the foreach value list.

Add a routine to parse foreach iteration declarations.  This is
separate from ParseDeclaration because the type of the named value
(the iterator) doesn't match the type of the initializer value (the
value list).  It also needs to add two values to the foreach record:
the iterator and the value list.

Add parsing support for foreach.

Add the code to process foreach loops and create defs based
on iterator values.

Allow foreach loops to be matched at the top level.

When parsing an IDValue check if it is a foreach loop iterator for one
of the active loops.  If so, return a VarInit for it.

Add Emacs keyword support for foreach.

Add VIM keyword support for foreach.

Add tests to check foreach operation.

Add TableGen documentation for foreach.

Support foreach with multiple objects.

Support non-braced foreach body with one object.

Do not require types for the foreach declaration.  Assume the iterator
type from the iteration list element type.

llvm-svn: 151164
2012-02-22 16:09:41 +00:00
Craig Topper
d8faffd93b Declare register classes as const. Fix a couple pointers to register classes that weren't already const.
llvm-svn: 151138
2012-02-22 07:28:11 +00:00
Craig Topper
3ed929de0a Make all pointers to TargetRegisterClass const since they are all pointers to static data that should not be modified.
llvm-svn: 151134
2012-02-22 05:59:10 +00:00
Craig Topper
f1056941f6 Reorder some members in MCRegisterClass to remove padding on 64-bit builds.
llvm-svn: 151043
2012-02-21 07:36:39 +00:00
Craig Topper
24cc28c7b8 In generated RegisterInfo files, replace a pointer to the end of an array with just the size of the array to avoid relocations.
llvm-svn: 151041
2012-02-21 06:54:41 +00:00
Craig Topper
91a96474a1 Merge some tables in generated RegisterInfo file. Store indices into larger table instead of pointers to reduce relocations and shrink table size on 64-bit builds. Shaves ~24K off X86MCTargetDesc.o. Accidentally commited only part of this in r151038.
llvm-svn: 151039
2012-02-21 06:23:21 +00:00
Ahmed Charles
745c53c2a7 Remove dead code. Improve llvm_unreachable text. Simplify some control flow.
llvm-svn: 150918
2012-02-19 11:37:01 +00:00
Craig Topper
cfbfa3dcd1 Add vmfunc instruction to X86 assembler and disassembler.
llvm-svn: 150899
2012-02-19 01:39:49 +00:00
Craig Topper
ecf21d8132 Add X86 assembler and disassembler support for AMD SVM instructions. Original patch by Kay Tiong Khoo. Few tweaks by me for code density and to reduce replication.
llvm-svn: 150873
2012-02-18 08:19:49 +00:00
Daniel Dunbar
81ccdef572 utils: Kill NewNightlyTest.pl, which has been replaced by LNT (as far as I know).
llvm-svn: 150610
2012-02-15 19:24:11 +00:00
Benjamin Kramer
44e872829d Make the EDis tables const.
llvm-svn: 150304
2012-02-11 14:51:07 +00:00
Benjamin Kramer
675a84a6ea Reuse the enum names from X86Desc in the X86Disassembler.
This requires some gymnastics to make it available for C code. Remove the names
from the disassembler tables, making them relocation free.

llvm-svn: 150303
2012-02-11 14:50:54 +00:00
Benjamin Kramer
ba4dff0d18 Put instruction names into an indexed string table on the side, removing a pointer from MCInstrDesc.
Make them accessible through MCInstrInfo. They are only used for debugging purposes so this doesn't
have an impact on performance. X86MCTargetDesc.o goes from 630K to 461K on x86_64.

llvm-svn: 150245
2012-02-10 13:18:44 +00:00
Benjamin Kramer
260bef228a Store just the SimpleValueType in the generated VT tables for each register class, eliminating static ctors.
llvm-svn: 150173
2012-02-09 12:35:37 +00:00
Benjamin Kramer
005987fe7a Move the Name field in MCInstrDesc to the end, saving 8 bytes of padding per entry on x86_64.
No change on i386.

llvm-svn: 150170
2012-02-09 11:25:09 +00:00
James Molloy
85be8f7f88 Teach the MC and disassembler about SoftFail, and hook it up to UNPREDICTABLE on ARM. Wire this to tBLX in order to provide test coverage.
llvm-svn: 150169
2012-02-09 10:56:31 +00:00
Craig Topper
c20605c287 More tweaks to get the size of the X86 disassembler tables down.
llvm-svn: 150167
2012-02-09 08:58:07 +00:00
Craig Topper
82b0ee4558 Flatten some of the arrays in the X86 disassembler tables to reduce space needed to store pointers on 64-bit hosts and reduce relocations needed at startup. Part of PR11953.
llvm-svn: 150161
2012-02-09 07:45:30 +00:00
Benjamin Kramer
38ab261390 Don't map registers to the invalid dwarf register (-1). It's the default value.
X86GenRegisterInfo.inc | 1032 -------------------------------------------------
  1 file changed, 1032 deletions(-)

llvm-svn: 150080
2012-02-08 18:46:26 +00:00
Benjamin Kramer
b42d2a7238 Value initialize MCRegisterClasses. Not sure how could miss this during the MCTargetDesc refactor.
llvm-svn: 150076
2012-02-08 14:43:53 +00:00
Andrew Trick
3e1478c558 This is a small patch with a couple of improvements for running lit with --debug:
1. Added a status note when a config file is loaded directly with load_config. This helps notice loads of lit.cfg from lit.site.cfg
2. Added a status note on the result of a config load. Previously, it was just notifying that it tries to load a config file. Now it will also say whether the load succeeded or the file wasn't found

The two changes give better visibility into which config files were actually loaded by lit. The effect is only on --debug runs.

Patch by Eli Bendersky!

llvm-svn: 149932
2012-02-06 23:34:52 +00:00
Craig Topper
dfa8617ab9 Convert assert(0) to llvm_unreachable
llvm-svn: 149814
2012-02-05 07:21:30 +00:00
Brendon Cahoon
6db000fe17 Increment DFAStateEntryTable index for sentinel entry.
When adding the {-1, -1} entry to the DFAStateInputTable, we
need to increment the index used to populate the DFAStateEntryTable.
Otherwise, the entry table will be off by one for each transition
after the {-1, -1} entry. PR11908.

llvm-svn: 149713
2012-02-03 21:08:25 +00:00
Rafael Espindola
3440cd1895 Replace the old --with-cxx-* configure options with a single --with-gcc-toolchain
that just uses the new toolchain probing logic. This fixes linking with -m32 on
64 bit systems (the /32 dir was not being added to the search).

llvm-svn: 149651
2012-02-03 00:59:30 +00:00
Jakob Stoklund Olesen
230a0a4b40 Specify SubRegIndex components on the index itself.
It is simpler to define a composite index directly:

  def ssub_2 : SubRegIndex<[dsub_1, ssub_0]>;
  def ssub_3 : SubRegIndex<[dsub_1, ssub_1]>;

Than specifying the composite indices on each register:

  CompositeIndices = [(ssub_2 dsub_1, ssub_0),
                      (ssub_3 dsub_1, ssub_1)] in ...

This also makes it clear that SubRegIndex composition is supposed to be
unique.

llvm-svn: 149556
2012-02-01 23:16:41 +00:00
Jakob Stoklund Olesen
b1190d3876 Fix a bug in the TopoOrderRC comparison function.
The final tie breaker comparison also needs to return +/-1, or 0.
This is not a less() function.

This could cause otherwise identical super-classes to be ordered
unstably, depending on what the system qsort routine does with a bad
compare function.

llvm-svn: 149549
2012-02-01 22:19:26 +00:00
Jakob Stoklund Olesen
758a27584a Avoid emitting empty arrays, they're not standard C++.
It's only by luck that we haven't produced any yet, and clang refuses to
compile them.

llvm-svn: 149546
2012-02-01 22:12:51 +00:00
Jakob Stoklund Olesen
22b91563a5 Don't assign a value to NUM_TARGET_NAMED_SUBREGS.
It was wrong and completely unused.

llvm-svn: 149433
2012-01-31 21:51:53 +00:00
Jakob Stoklund Olesen
6ce052d3b3 Move the composite map into CodeGenSubRegIndex.
Each SubRegIndex keeps track of how it composes.

llvm-svn: 149423
2012-01-31 21:44:11 +00:00
Jakob Stoklund Olesen
6ec7412170 Add a TableGen CodeGenSubRegIndex class.
This class is used to represent SubRegIndex instances instead of the raw
Record pointers that were used before.

No functional change intended.

llvm-svn: 149418
2012-01-31 20:57:55 +00:00
David Greene
de918de31c Remove Deprecated Features
Move to a model where we build whatever branches are checked out
in the source directories.  This was a bit too smart (and complicated)
in handling details best left to the user and the revision control
system.

In addition, get rid of support for llvm-gcc and building gcc as
these are no longer necessary.

llvm-svn: 149149
2012-01-27 23:01:35 +00:00
Eric Christopher
d7893ec4b6 Use -H on darwin as well.
Patch by Liang Wang!

llvm-svn: 149085
2012-01-26 22:06:23 +00:00
Jim Grosbach
8ed72f3cc0 Tidy up. Trailing whitespace.
llvm-svn: 148856
2012-01-24 21:06:59 +00:00
Owen Anderson
7492e4ff85 Widen the instruction encoder that TblGen emits to a 64 bits, which should accomodate every target I can think of offhand.
llvm-svn: 148833
2012-01-24 18:37:29 +00:00
Jakob Stoklund Olesen
3ff9738293 Add an (interleave A, B, ...) SetTheory operator.
This will interleave the elements from two or more lists.

llvm-svn: 148824
2012-01-24 18:06:05 +00:00
David Blaikie
05fe2f515d Help GCC along with code that's actually unreachable.
Unfortunately I don't think there's a fix for this that will work upstream and
also satisfy Clang's -Wunreachable-code, which is a pity. But I'll give it some
more thought -perhaps there's some way out.

llvm-svn: 148645
2012-01-22 01:17:04 +00:00
David Blaikie
93fafabfea Remove unreachable defaults from gtest.
This will ensure LLVM and Clang build -Wswitch-enum-redundant-default (an on-by-default warning I'm about to add to Clang).

llvm-svn: 148639
2012-01-21 18:02:01 +00:00
Kostya Serebryany
b37a1263e1 Extend Attributes to 64 bits
Problem: LLVM needs more function attributes than currently available (32 bits).
One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).

Solution:
- extend the Attributes from 32 bits to 64-bits
- wrap the object into a class so that unsigned is never erroneously used instead
- change "unsigned" to "Attributes" throughout the code, including one place in clang.
- the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
- the class has "safe operator bool()" to support the common idiom:  if (Attributes attr = getAttrs()) useAttrs(attr);
- The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
- Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
- Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.

Tested:
"make check" on Linux (32-bit and 64-bit) and Mac (10.6)
built/run spec CPU 2006 on Linux with clang -O2.


This change will break clang build in lib/CodeGen/CGCall.cpp.
The following patch will fix it.

llvm-svn: 148553
2012-01-20 17:56:17 +00:00
Jakob Stoklund Olesen
e9c53bc69b Add a CoveredBySubRegs property to Register descriptions.
When set, this bit indicates that a register is completely defined by
the value of its sub-registers.

Use the CoveredBySubRegs property to infer which super-registers are
call-preserved given a list of callee-saved registers.  For example, the
ARM registers D8-D15 are callee-saved.  This now automatically implies
that Q4-Q7 are call-preserved.

Conversely, Win64 callees save XMM6-XMM15, but the corresponding
YMM6-YMM15 registers are not call-preserved because they are not fully
defined by their sub-registers.

llvm-svn: 148363
2012-01-18 00:16:39 +00:00
Daniel Dunbar
f17ae2a76a [lit] Add a --filter option which is useful when dealing with virtual test
paths.

llvm-svn: 148362
2012-01-18 00:03:12 +00:00
Jakob Stoklund Olesen
c5fac0a05c Add TableGen support for callee saved registers.
Targets can now add CalleeSavedRegs defs to their *CallingConv.td file.
TableGen will use this to create a *_SaveList array suitable for
returning from getCalleeSavedRegs() as well as a *_RegMask bit mask
suitable for returning from getCallPreservedMask().

llvm-svn: 148346
2012-01-17 22:46:58 +00:00
Devang Patel
84d275a823 Intel syntax: Ignore mnemonic aliases.
llvm-svn: 148316
2012-01-17 18:30:45 +00:00
Benjamin Kramer
72726c8396 Add an LLDB data formatter script for llvm::SmallVector, maybe this is helpful to someone else.
This lets lldb give sane output for SmallVectors, e.g.
Before:
(lldb) p sv
(llvm::SmallVector<int, 10>) $0 = {
  (llvm::SmallVectorImpl<int>) llvm::SmallVectorImpl<int> = {
    (llvm::SmallVectorTemplateBase<int>) llvm::SmallVectorTemplateBase<int> = {
      (llvm::SmallVectorTemplateCommon<int>) llvm::SmallVectorTemplateCommon<int> = {
        (llvm::SmallVectorBase) llvm::SmallVectorBase = {
          (void *) BeginX = 0x00007fff5fbff960
...
}

After:
(lldb) p sv
(llvm::SmallVector<int, 10>) $0 = {
  (int) [0] = 42
  (int) [1] = 23
...
}

The script is still a bit rough so expect crashes for vectors of complex types.
Synthetic children are _not_ available in xcode 4.2, newer LLDBs should work though.

llvm-svn: 148308
2012-01-17 14:52:12 +00:00
David Blaikie
81e875f888 Provide better messages in llvm_unreachable.
llvm-svn: 148293
2012-01-17 07:00:13 +00:00
David Blaikie
2526691971 Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)
llvm-svn: 148284
2012-01-17 04:43:56 +00:00
David Blaikie
067ad0b263 Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly.
(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them)

llvm-svn: 148262
2012-01-16 23:24:27 +00:00
Jakob Stoklund Olesen
c477c8d35e Skip the NAME field when forming tuples.
llvm-svn: 148147
2012-01-13 22:23:50 +00:00
Jakob Stoklund Olesen
9ba097a208 Delete CodeInit and CodeRecTy from TableGen.
The code type was always identical to a string anyway. Now it is simply
a synonym. The code literal syntax [{...}] is still valid.

llvm-svn: 148092
2012-01-13 03:38:34 +00:00
Pete Cooper
f3141fef55 Added MVT::v2f16
llvm-svn: 148067
2012-01-12 23:14:13 +00:00
Argyrios Kyrtzidis
42ff94f069 Disable the crash reporter when running lit tests.
llvm-svn: 147965
2012-01-11 20:53:25 +00:00
Devang Patel
c1e4ca5839 Record asm variant id in MatchEntry and check it while matching instruction.
llvm-svn: 147858
2012-01-10 17:50:43 +00:00
David Blaikie
8d47bb30e3 Remove unnecessary default cases in switches that cover all enum values.
llvm-svn: 147855
2012-01-10 16:47:17 +00:00
Devang Patel
77ab1ea721 Use descriptive variable name and remove incorrect operand number check.
llvm-svn: 147802
2012-01-09 21:30:46 +00:00
Devang Patel
921a16318d Split AsmParser into two components - AsmParser and AsmParserVariant
AsmParser holds info specific to target parser.
AsmParserVariant holds info specific to asm variants supported by the target.

llvm-svn: 147787
2012-01-09 19:13:28 +00:00
Benjamin Kramer
0ce9fd3032 Remove VectorExtras. This unused helper was written for a type of API that is discouraged now.
llvm-svn: 147738
2012-01-07 19:42:13 +00:00
Cameron Zwarich
49330adc9c Fix TableGen so that it will emit the correct signature for FastEmit_f:
/// FastEmit_f - This method is called by target-independent code
  /// to request that an instruction with the given type, opcode, and
  /// floating-point immediate operand be emitted.
  virtual unsigned FastEmit_f(MVT VT,
                              MVT RetVT,
                              unsigned Opcode,
                              const ConstantFP *FPImm);

Currently, it emits an accidentally overloaded version without the const on the
ConstantFP*. This doesn't affect anything in the tree, since nothing causes that
method to be autogenerated, but I have been playing with some ARM TableGen
refactorings that hit this problem.

llvm-svn: 147727
2012-01-07 08:18:37 +00:00
Devang Patel
114ec077a0 Refactor.
Store AsmParser info locally. A small step towards emitting match entries for multiple asm variants.

llvm-svn: 147710
2012-01-07 01:33:34 +00:00
Devang Patel
d58787bd93 Eliminate an error check that may not work with all asm syntax variants.
llvm-svn: 147708
2012-01-07 01:22:23 +00:00
Daniel Dunbar
3237171aa4 lit/lit.TestRunner: Add an extra_substitutions argument for executeShTest --
useful for test suites which want to piggyback onto the "shtest" format style.

llvm-svn: 147684
2012-01-06 21:39:06 +00:00
Devang Patel
66d6d745d1 Do not hard code asm variant number.
llvm-svn: 147583
2012-01-05 00:51:28 +00:00
Jakob Stoklund Olesen
5a959fda3b Don't use enums larger than 1 << 31 for target features.
Patch by Andy Zhang!

llvm-svn: 147491
2012-01-03 23:04:28 +00:00
Craig Topper
b4db8689ee Add disassembler support for VPERMIL2PD and VPERMIL2PS.
llvm-svn: 147368
2011-12-30 06:23:39 +00:00
Craig Topper
089be4fefa Add FMA4 instructions to disassembler.
llvm-svn: 147367
2011-12-30 05:20:36 +00:00
Jim Grosbach
a678ad9ecc ARM VFP assembly parsing and encoding for VCVT(float <--> fixed point).
rdar://10558523

llvm-svn: 147189
2011-12-22 22:19:05 +00:00
Bob Wilson
cc2bf6e234 Remove broken command to copy tblgen tool.
tblgen has been renamed to llvm-tblgen so this command has been failing,
and it's no longer needed because llvm-tblgen is already installed by default.

llvm-svn: 147187
2011-12-22 22:12:40 +00:00
Manuel Klimek
2147506d8b Changes the JSON parser to use the SourceMgr.
Diagnostics are now emitted via the SourceMgr and we use MemoryBuffer
for buffer management. Switched the code to make use of the trailing
'0' that MemoryBuffer guarantees where it makes sense.

llvm-svn: 147063
2011-12-21 18:16:39 +00:00
Jim Grosbach
6bd1044b03 ARM NEON VLD2 assembly parsing for structure to all lanes, non-writeback.
llvm-svn: 147025
2011-12-21 00:38:54 +00:00
Manuel Klimek
8c643f1ae2 Fixing option for JSON benchmark broken since the change to size_t.
llvm-svn: 146970
2011-12-20 10:34:29 +00:00
Chandler Carruth
1663697160 Fix up the CMake build for the new files added in r146960, they're
likely to stay either way that discussion ends up resolving itself.

llvm-svn: 146966
2011-12-20 08:42:11 +00:00
David Blaikie
0c4ffec904 Revert pragma clang suppressions that confuse GCC. (I'll worry about how to suppress/fix these problems properly when we figure out how to keep LLVM -Wweak-vtables clean)
llvm-svn: 146965
2011-12-20 08:22:49 +00:00
David Blaikie
576aba04f1 Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146960
2011-12-20 02:50:00 +00:00
Dan Gohman
7940e4e81d Add basic generic CodeGen support for half.
llvm-svn: 146927
2011-12-20 00:02:33 +00:00
Jakob Stoklund Olesen
0aa2f7755a Emit a getMatchingSuperRegClass() implementation for every target.
Use information computed while inferring new register classes to emit
accurate, table-driven implementations of getMatchingSuperRegClass().

Delete the old manual, error-prone implementations in the targets.

llvm-svn: 146873
2011-12-19 16:53:34 +00:00
Jakob Stoklund Olesen
78291d0bac Synthesize register classes for TRI::getMatchingSuperRegClass().
Teach TableGen to create the missing register classes needed for
getMatchingSuperRegClass() to return maximal results.  The function is
still not auto-generated, so it still returns inexact results.

This produces these new register classes:

ARM:
    QQPR_with_dsub_0_in_DPR_8
    QQQQPR_with_dsub_0_in_DPR_8
X86:
    GR64_with_sub_32bit_in_GR32_NOAX
    GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOSP
    GR64_with_sub_16bit_in_GR16_NOREX
    GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOREX
    GR64_TC_and_GR64_with_sub_32bit_in_GR32_NOAX
    GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOREX_NOSP
    GR64_TCW64_and_GR64_with_sub_32bit_in_GR32_NOAX
    GR64_TC_and_GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOREX
    GR64_with_sub_32bit_in_GR32_TC
    GR64_with_sub_32bit_in_GR32_ABCD_and_GR32_NOAX
    GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_TC
    GR64_with_sub_32bit_in_GR32_AD
    GR64_with_sub_32bit_in_GR32_AD_and_GR32_NOAX

The other targets in the tree are not weird enough to be affected.

llvm-svn: 146872
2011-12-19 16:53:28 +00:00
Manuel Klimek
6e33b2fd7d Allow for benchmarking more than 4GB of memory
llvm-svn: 146864
2011-12-19 09:56:35 +00:00
Manuel Klimek
99a78498c5 Adds a flag to allow specifying the memory limitations of the JSON benchmark.
llvm-svn: 146863
2011-12-19 09:32:05 +00:00
Manuel Klimek
2f7cf4e64b Adds a JSON parser and a benchmark (json-bench) to catch performance regressions.
llvm-svn: 146735
2011-12-16 13:09:10 +00:00
Jakob Stoklund Olesen
f51f7724cb Extract a method. No functional change.
llvm-svn: 146713
2011-12-16 00:12:05 +00:00
Daniel Dunbar
d2627d2855 build/unittests: Fix llvm-config names for gtest libraries, and bring Makefile
library names in line with those used by CMake.
 - Patch by Johannes Obermayr, with tweaks by me.

llvm-svn: 146706
2011-12-15 23:35:08 +00:00
Jakob Stoklund Olesen
bc821819f3 Use the proper comparator for set_intersection.
llvm-svn: 146674
2011-12-15 19:26:23 +00:00
Jakob Stoklund Olesen
9945c85b52 Synthesize missing register class intersections.
The function TRI::getCommonSubClass(A, B) returns the largest common
sub-class of the register classes A and B.  This patch teaches TableGen
to synthesize sub-classes such that the answer is always maximal.

In other words, every register that is in both A and B will also be
present in getCommonSubClass(A, B).

This introduces these synthetic register classes:

ARM:
    GPRnopc_and_hGPR
    GPRnopc_and_hGPR
    hGPR_and_rGPR
    GPRnopc_and_hGPR
    GPRnopc_and_hGPR
    hGPR_and_rGPR
    tGPR_and_tcGPR
    hGPR_and_tcGPR

X86:
    GR32_NOAX_and_GR32_NOSP
    GR32_NOAX_and_GR32_NOREX
    GR64_NOSP_and_GR64_TC
    GR64_NOSP_and_GR64_TC
    GR64_NOREX_and_GR64_TC
    GR32_NOAX_and_GR32_NOSP
    GR32_NOAX_and_GR32_NOREX
    GR32_NOAX_and_GR32_NOREX_NOSP
    GR64_NOSP_and_GR64_TC
    GR64_NOREX_and_GR64_TC
    GR64_NOREX_NOSP_and_GR64_TC
    GR32_NOAX_and_GR32_NOSP
    GR32_NOAX_and_GR32_NOREX
    GR32_NOAX_and_GR32_NOREX_NOSP
    GR32_ABCD_and_GR32_NOAX
    GR32_NOAX_and_GR32_NOSP
    GR32_NOAX_and_GR32_NOREX
    GR32_NOAX_and_GR32_NOREX_NOSP
    GR32_ABCD_and_GR32_NOAX
    GR32_NOAX_and_GR32_TC
    GR32_NOAX_and_GR32_NOSP
    GR64_NOSP_and_GR64_TC
    GR32_NOAX_and_GR32_NOREX
    GR32_NOAX_and_GR32_NOREX_NOSP
    GR64_NOREX_and_GR64_TC
    GR64_NOREX_NOSP_and_GR64_TC
    GR32_ABCD_and_GR32_NOAX
    GR64_ABCD_and_GR64_TC
    GR32_NOAX_and_GR32_TC
    GR32_AD_and_GR32_NOAX

Other targets are unaffected.

llvm-svn: 146657
2011-12-15 16:48:55 +00:00
Daniel Dunbar
a16a63f190 llvm-build: Switch to using the common subdirectory list instead of
autodiscovery.

llvm-svn: 146437
2011-12-12 22:45:59 +00:00
Daniel Dunbar
b72534060e LLVMBuild: Introduce a common section which currently has a list of the
subdirectories to traverse into.
 - Originally I wanted to avoid this and just autoscan, but this has one key
   flaw in that new subdirectories can not automatically trigger a rerun of the
   llvm-build tool. This is particularly a pain when switching back and forth
   between trees where one has added a subdirectory, as the dependencies will
   tend to be wrong. This will also eliminates FIXME implicitly.

llvm-svn: 146436
2011-12-12 22:45:54 +00:00
Daniel Dunbar
495f7b57f8 llvm-build: Don't write out the required_libraries list for "special" components, it is generated.
llvm-svn: 146435
2011-12-12 22:45:41 +00:00
Daniel Dunbar
ecff3756fa llvm-build: Add sketchy support for preserving comments when using
--write-llvmbuild.

llvm-svn: 146434
2011-12-12 22:45:35 +00:00
Daniel Dunbar
30d6a45140 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Jakob Stoklund Olesen
bc03793434 Extract a method.
llvm-svn: 146374
2011-12-12 16:16:24 +00:00
Jim Grosbach
57478f4961 ARM: NEON SHLL instruction immediate operand range checking.
llvm-svn: 146003
2011-12-07 01:07:24 +00:00
Jim Grosbach
14e284f16a Extend AsmMatcher token literal matching to allow aliasing.
For example, ARM allows:
    vmov.u32 s4, #0  -> vmov.i32, #0
'u32' is a more specific designator for the 32-bit integer type specifier
and is legal for any instruction which accepts 'i32' as a datatype suffix.

We want to say,
    def : TokenAlias<".u32", ".i32">;

This works by marking the match class of 'From' as a subclass of the
match class of 'To'.

rdar://10435076

llvm-svn: 145992
2011-12-06 23:43:54 +00:00
Daniel Dunbar
3e99464701 llvm-build: Don't generate duplicate dependencies when LLVMBuild files define
multiple components.

llvm-svn: 145989
2011-12-06 23:13:42 +00:00
Evan Cheng
5061553f9d First chunk of MachineInstr bundle support.
1. Added opcode BUNDLE
2. Taught MachineInstr class to deal with bundled MIs
3. Changed MachineBasicBlock iterator to skip over bundled MIs; added an iterator to walk all the MIs
4. Taught MachineBasicBlock methods about bundled MIs

llvm-svn: 145975
2011-12-06 22:12:01 +00:00
Jim Grosbach
f972c503d8 Tidy up. Fix naming convention stuff for some internal functions.
llvm-svn: 145974
2011-12-06 22:07:02 +00:00
Sebastian Pop
182ae6a6fa use space star instead of star space
llvm-svn: 145944
2011-12-06 17:34:16 +00:00
Sebastian Pop
cb55bb22ab add missing point at the end of sentences
llvm-svn: 145943
2011-12-06 17:34:11 +00:00
Jim Grosbach
fb734dff3c ARM NEON VEXT aliases for data type suffices.
llvm-svn: 145726
2011-12-02 23:34:39 +00:00
Dylan Noblesmith
afe4ff5324 TableGen: fix CMake build s'more
Oops, missed another missing file from r145629.

llvm-svn: 145636
2011-12-01 21:53:39 +00:00
Anshuman Dasgupta
f754c8bf8e Add a deterministic finite automaton based packetizer for VLIW architectures
llvm-svn: 145629
2011-12-01 21:10:21 +00:00
Jim Grosbach
5c613a4c40 Replace an assert() with an actual diagnostic.
llvm-svn: 145535
2011-11-30 23:16:25 +00:00
Jim Grosbach
fa9f6ccd62 ARM parsing for VLD1 two register all lanes, no writeback.
llvm-svn: 145504
2011-11-30 18:21:25 +00:00
Jim Grosbach
d97df5c06a llvm_unreachable() is not for user diagnostics....
llvm-svn: 145465
2011-11-30 01:15:55 +00:00
Jim Grosbach
693ce8291c ARM parsing aliases for VLD1 single register all lanes.
llvm-svn: 145464
2011-11-30 01:09:44 +00:00
Daniel Dunbar
4e00f5f8fd build/CMake: Finish removal of add_llvm_library_dependencies.
llvm-svn: 145420
2011-11-29 19:25:30 +00:00
NAKAMURA Takumi
9e88060bdd lit/TestRunner.py: Try to catch ERROR_FILE_NOT_FOUND, too.
Thanks to Francois, to let me know.

llvm-svn: 145381
2011-11-29 06:40:50 +00:00
Bob Wilson
d6042faeb9 Install llvmCore to /usr/local. <rdar://problem/10390708>
llvm-svn: 145378
2011-11-29 06:11:56 +00:00
Daniel Dunbar
36e9b032cd llvmbuild/CMake: Update CMake output fragment to include explicit library
dependency information.

llvm-svn: 145328
2011-11-29 00:06:50 +00:00
Bill Wendling
d576ee9a81 Support a 'final' release candidate tag.
llvm-svn: 145243
2011-11-28 11:45:10 +00:00
NAKAMURA Takumi
e33c002bee lit/TestRunner.py: Use RemoveForce().
llvm-svn: 145223
2011-11-28 01:55:08 +00:00
NAKAMURA Takumi
6393cd009c lit/TestRunner.py: [Win32] Introduce WinWaitReleased(f), to wait for file handles to be released by children.
When wait() has finished, opened handles (especially writing stdout to file) might not be released immediately.
To wait for released, poll to attempt renaming.

llvm-svn: 145222
2011-11-28 01:55:01 +00:00
Craig Topper
cfb4ed9cd4 Remove some unnecessary filtering checks from X86 disassembler table build.
llvm-svn: 144986
2011-11-19 05:48:20 +00:00
Daniel Dunbar
50227df250 llvm-build: Attempt to work around a CMake Makefile generator bug that doesn't
properly quote strings when writing the CMakeFiles/Makefile.cmake output file
(which lists the dependencies). This shows up when using CMake + MSYS Makefile
generator.

llvm-svn: 144873
2011-11-17 01:19:53 +00:00
Owen Anderson
48a129b50e Rename MVT::untyped to MVT::Untyped to match similar nomenclature.
llvm-svn: 144747
2011-11-16 01:02:57 +00:00
Evan Cheng
47d8f8af84 Add vmov.f32 to materialize f32 immediate splats which cannot be handled by
integer variants. rdar://10437054

llvm-svn: 144608
2011-11-15 02:12:34 +00:00
Jim Grosbach
2ac98a24aa ARM parsing datatype suffix variants for fixed-writeback VLD1/VST1 instructions.
rdar://10435076

llvm-svn: 144606
2011-11-15 01:46:57 +00:00
Jim Grosbach
97cb1f6146 Tidy up. Formatting.
llvm-svn: 144598
2011-11-15 01:05:12 +00:00
Daniel Dunbar
9763106c94 LLVMBuild: Add info for gtest.
llvm-svn: 144445
2011-11-12 02:11:04 +00:00
Daniel Dunbar
d6784c1269 LLVMBuild: Alphabetize required_libraries lists.
llvm-svn: 144416
2011-11-11 22:59:23 +00:00
Daniel Dunbar
fe59bd30be llvm-build: Add --configure-target-def-file option.
- Can be used to generate the substitution values we currently use for the various target related .def files.

llvm-svn: 144345
2011-11-11 00:24:00 +00:00
Daniel Dunbar
846fb32afc LLVMBuild: Add explicit information on whether targets define an assembly printer, assembly parser, or disassembler.
llvm-svn: 144344
2011-11-11 00:23:56 +00:00
Daniel Dunbar
138437ad27 build/Make & CMake: Pass the appropriate --native-target and --enable-targets
options to llvm-build, so the all-targets etc. components are defined properly.

llvm-svn: 144255
2011-11-10 01:16:48 +00:00
Daniel Dunbar
f0c4aed0ab llvm-build: Add --native-target and --enable-targets options, and add logic to
handle defining the "magic" target related components (like native,
nativecodegen, and engine).
 - We still require these components to be in the project (currently in
   lib/Target) so that we have a place to document them and hopefully make it
   more obvious that they are "magic".

llvm-svn: 144253
2011-11-10 00:50:07 +00:00
Daniel Dunbar
cd4a25f864 llvm-build: Split out the validation logic.
llvm-svn: 144252
2011-11-10 00:49:58 +00:00
Daniel Dunbar
c09b47db8f llvm-build: Add an explicit component type to represent targets.
- Gives us a place to hang target specific metadata (like whether the target has a JIT).

llvm-svn: 144250
2011-11-10 00:49:51 +00:00
Daniel Dunbar
44d7c5fbba llvm-build: Tidy up options.
llvm-svn: 144249
2011-11-10 00:49:42 +00:00