Craig Topper
3a36444366
Make custom operand parsing mnemonic indices use the same mnemonic table as the match table. Reorder fields in OperandMatchEntry to provide the least amount of padding for in tree targets.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164109 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 07:02:21 +00:00
Craig Topper
fee7f01d1e
Use variable type for index into mnemonic table. Shrinks size of index field on in tree targets. Saving static data space.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 06:10:45 +00:00
Andrew Trick
34aadd6334
Replaced ReInitMCSubtargetInfo with InitMCProcessor.
...
Now where we used to call ReInitMCSubtargetInfo, we actually recompute
the same information as InitMCSubtargetInfo instead of only setting
the feature bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164105 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 05:33:15 +00:00
Andrew Trick
e076bb1e93
comment typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164097 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 04:03:30 +00:00
Andrew Trick
e3dbc98a4f
TableGen subtarget emitter. Use getSchedClassIdx.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164096 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 03:55:55 +00:00
Andrew Trick
4d2d1c49d7
TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164095 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 03:41:43 +00:00
Andrew Trick
ee290ba35a
TableGen subtarget emitter. Remove unnecessary header dependence.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164094 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 03:32:57 +00:00
Andrew Trick
e127dfd0b1
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164092 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 03:18:56 +00:00
Craig Topper
b198f5c897
Mark asm matcher conversion table as const.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164088 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 01:41:49 +00:00
Craig Topper
be480ff607
Fix typo in comment. No functional change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164086 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18 01:13:36 +00:00
Andrew Trick
e4095f95ac
Backout the wrong subtarget emitter fix
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164078 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 23:14:15 +00:00
Andrew Trick
f23ddf54ea
Fix release build after reverting
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164075 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 23:05:04 +00:00
Andrew Trick
e1b5328717
Revert r164061-r164067. Most of the new subtarget emitter.
...
I have to work out the Target/CodeGen header dependencies
before putting this back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164072 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 23:00:42 +00:00
Andrew Trick
a2a47d1c50
InitMCProcessor
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164066 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:19:12 +00:00
Andrew Trick
5d94082143
comment typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164064 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:19:04 +00:00
Andrew Trick
41be51b72c
TableGen subtarget emitter. Use getSchedClassIdx.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164063 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:19:01 +00:00
Andrew Trick
021ba269b2
TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164062 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:18:58 +00:00
Andrew Trick
db7afac457
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164061 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:18:55 +00:00
Andrew Trick
544c88039f
TableGen subtarget emitter. Format and emit data tables for the new machine model.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164060 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:18:50 +00:00
Andrew Trick
52c3a1d654
TableGen subtarget emitter. Generate data tables for the new machine model.
...
Map the CodeGenSchedule object model onto data tables. The structure
of the data tables is defined in MC, so for convenience we include
MCSchedule.h. The alternative is maintaining a redundant copy of the
table structure definitions. Mapping the object model onto data tables
is sufficiently complicated that it should not be interleaved with
emitting source code. This avoids major problem with the backend for
itinerary generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164059 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:18:48 +00:00
Andrew Trick
40096d2693
TableGen subtarget emitter. Emit processor resources for the new machine model.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164058 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:18:45 +00:00
Andrew Trick
bc4ff6e3cf
TableGen subtarget parser: Add getProcResourcesIdx().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164057 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 22:18:43 +00:00
Jim Grosbach
9bb938c540
TableGen: Add initializer.
...
Keep GCC's warnings happy. It can't reason out that the state machine won't
ever hit the potentially uninitialized use in OPC_FilterValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164041 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 18:00:53 +00:00
Axel Naumann
3780ad8b99
Fix a few vars that can end up being used without initialization.
...
The cases where no initialization happens should still be checked for logic flaws.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164032 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 14:20:57 +00:00
Michael Liao
efd841cdc5
Fix typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164012 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 04:43:39 +00:00
Craig Topper
af8d66ce9a
Add 'virtual' keywoards to output file for overridden functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-16 18:25:36 +00:00
Craig Topper
ef2340ef48
Add 'virtual' keywoards to output file for overridden functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163999 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-16 16:35:22 +00:00
Dmitri Gribenko
4e0ae44b3a
Fix Doxygen issues: wrap code examples in \code and use \p to refer to
...
parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163984 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15 20:22:05 +00:00
Craig Topper
5974c31acb
Revert r163878 as it breaks on targets with alternate register names. Such targets do not exist in the main tree so this was not noticed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163959 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15 01:22:42 +00:00
Andrew Trick
3cbd1786ac
TableGen subtarget parser. Handle new machine model.
...
Collect processor resources from the subtarget defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163953 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15 00:20:02 +00:00
Andrew Trick
5e613c260b
TableGen subtarget parser. Handle new machine model.
...
Infer SchedClasses from variants defined by the target or subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163952 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15 00:19:59 +00:00
Andrew Trick
48605c3406
TableGen subtarget parser. Handle new machine model.
...
Collect SchedClasses and SchedRW types from the subtarget defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163951 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15 00:19:57 +00:00
Craig Topper
f4d78241ea
Allow the second opcode info table to be 8, 16, or 32-bits as needed to represent additional fragments. This recovers some space on ATT X86 syntax and PowerPC which only need 40-bits instead of 48-bits. This also increases ARM to 64-bits to fully encode all of its operands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163880 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14 08:33:11 +00:00
Craig Topper
4e5babe4f3
Reduce size of register name index tables by using uint16_t for all in tree targets. If more than 16-bits are needed for any out of tree targets, code will detect and use uint32_t instead.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163878 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14 06:37:49 +00:00
Manman Ren
785a41d138
AsmWriterEmitter: OpInfo2 should be unsigned 16-bit.
...
Fix an issue in r163814.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163837 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13 20:47:48 +00:00
Manman Ren
6579cf8df6
AsmWriterEmitter: increase the number of bits for OpcodeInfo from 32-bit to
...
48-bit if necessary, in order to reduce the generated code size.
We have 900 cases not covered by OpcodeInfo in ATT AsmWriter and more in Intel
AsmWriter and ARM AsmWriter.
This patch reduced the clang Release build size by 50k, running on a Mac Pro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163814 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13 17:43:46 +00:00
Dmitri Gribenko
2d9eb72178
Fix Doxygen issues:
...
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
people want -- it starts a new paragraph).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163790 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13 12:34:29 +00:00
Craig Topper
76b29b518d
Add a new compression type to ModRM table that detects when the memory modRM byte represent 8 instructions and the reg modRM byte represents up to 64 instructions. Reduces modRM table from 43k entreis to 25k entries. Based on a patch from Manman Ren.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163774 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13 05:45:42 +00:00
Jim Grosbach
a562dc7228
TableGen: Convert an assert() to a proper diagnostic.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163726 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12 17:40:25 +00:00
Dmitri Gribenko
67c8978617
Fix a couple of Doxygen comment issues pointed out by -Wdocumentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163721 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12 16:59:47 +00:00
Owen Anderson
83c0eefa3b
Improve tblgen code cleanliness: create an unknown_class, from which the unknown def inherits. Make tblgen check for that class, rather than checking for the def itself.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163664 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 23:47:08 +00:00
Owen Anderson
d2c699706c
Compute a map from register names to registers, rather than scanning the list of registers every time we want to look up a register by name.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163659 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 23:32:17 +00:00
Jakob Stoklund Olesen
a6035773d8
Add TRI::getSubRegIndexLaneMask().
...
Sub-register lane masks are bitmasks that can be used to determine if
two sub-registers of a virtual register will overlap. For example, ARM's
ssub0 and ssub1 sub-register indices don't overlap each other, but both
overlap dsub0 and qsub0.
The lane masks will be accurate on most targets, but on targets that use
sub-register indexes in an irregular way, the masks may conservatively
report that two sub-register indices overlap when the eventually
allocated physregs don't.
Irregular register banks also mean that the bits in a lane mask can't be
mapped onto register units, but the concept is similar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163630 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 16:34:08 +00:00
Jakob Stoklund Olesen
de0250728b
Clean the sub-reg index composition maps at emission.
...
Preserve the Composites map in the CodeGenSubRegIndex class so it can be
used to determine which sub-register indices can actually be composed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163629 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 16:34:05 +00:00
Jakob Stoklund Olesen
59f45e4610
Add MCRI::getNumSubRegIndices() and start checking SubRegIndex ranges.
...
Apparently, NumSubRegIndices was completely unused before. Adjust it by
one to include the null subreg index, just like getNumRegs() includes
the null register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163628 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 16:34:02 +00:00
Craig Topper
9e6dc8b9e7
Change unsigned to a uint16_t in static disassembler tables to reduce the table size.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163594 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 04:19:21 +00:00
Evgeniy Stepanov
4fbaa509eb
GTest on Android needs a custom tmpdir path.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163501 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 10:32:29 +00:00
NAKAMURA Takumi
46b4b112d2
lit: Util.which(): Use os.path.isfile() instead of os.path.exists(), or it hits to the directory.
...
For example, which('loop-convert') returns 'loop-convert' when the directory 'loop-convert' exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163469 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 12:07:24 +00:00
Ted Kremenek
4f50517577
Revert "Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions."
...
Turns out I did not need it after all. If we find a use for it in the future, we
can resurrect it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163457 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 04:32:13 +00:00
Anshuman Dasgupta
3adf3b0ac0
Refactored DFA generator. Merged transition class into state class.
...
Patch by Ivan Llopard!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163424 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 21:35:43 +00:00