summaryrefslogtreecommitdiff
path: root/utils/TableGen
Commit message (Collapse)AuthorAge
* Record variable debug info at ISel time directly.Devang Patel2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79742 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the instruction itinerary model to include the ability to indicate ↵David Goodwin2009-08-17
| | | | | | the def and use cycle for each operand. This additional information is optional, so existing itineraries do not need to be changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79247 91177308-0d34-0410-b5e6-96231b3b80d8
* the MinPad argument to PadToColumn only really makes sense to be 1,Chris Lattner2009-08-17
| | | | | | | just remove the argument and replace it with 1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79246 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.Bob Wilson2009-08-12
| | | | | | | | | There have been a few times where I've wanted this but ended up leaving the operand type unconstrained. It is easy to add this now and should help catch errors in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78849 91177308-0d34-0410-b5e6-96231b3b80d8
* This void is implicit in C++.Dan Gohman2009-08-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance the InstrStage object to enable the specification of an Itinerary ↵David Goodwin2009-08-12
| | | | | | with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78827 91177308-0d34-0410-b5e6-96231b3b80d8
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-12
| | | | | | infrastructure work needed to get the contexts to where they need to be first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Match hard coded registers (e.g. 'shldl %cl, %eax, %eax')Daniel Dunbar2009-08-11
| | | | | | | We now match all of 403.gcc (as emitted by clang). :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78750 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'isCodeGenOnly' bit to Instruction .td records.Daniel Dunbar2009-08-11
| | | | | | | | | | | | | | | | - Used to mark fake instructions which don't correspond to an actual machine instruction (or are duplicates of a real instruction). This is to be used for "special cases" in the .td files, which should be ignored by things like the assembler and disassembler. We still need a good solution to handle pervasive duplication, like with the Int_ instructions. - Set the bit on fake "mov 0" style instructions, which allows turning an assembler matcher warning into a hard error. - -2 FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78731 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Allow target to specific a comment delimiter, which will beDaniel Dunbar2009-08-11
| | | | | | | used to strip hard coded comments out of .td assembly strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78716 91177308-0d34-0410-b5e6-96231b3b80d8
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-11
| | | | | | | | | while the latter is capable of representing either a primitive or an extended type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Fix two thinkos in determining whether two classes areDaniel Dunbar2009-08-11
| | | | | | | related. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78706 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few more places in TableGen that need to handle EVT::vAny types.Bob Wilson2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78643 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Implement automatic classification of RegisterClass operands.Daniel Dunbar2009-08-11
| | | | | | | - This drops us to 123 ambiguous instructions (previously ~500) on X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78636 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsicBob Wilson2009-08-11
| | | | | | | arguments that are vectors of any size and element type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78631 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-10
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to callDaniel Dunbar2009-08-10
| | | | | | | | on target specific operands for testing class membership and converting to MCInst operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78597 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Remove some code which has been obsoleted by move toDaniel Dunbar2009-08-10
| | | | | | | explicit parser match classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78588 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Change assembler parser match classes to their own recordDaniel Dunbar2009-08-10
| | | | | | | structure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78581 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Check for matches with super classes when matchingDaniel Dunbar2009-08-10
| | | | | | | instruction operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78565 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.Daniel Dunbar2009-08-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78533 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, toDaniel Dunbar2009-08-09
| | | | | | | | | | | make it easier to see interesting ambiguities. - Also, check that user doesn't try to redefine the super class. This is a wart in the current design, in that assembler match classes aren't explicitly declared somewhere (so there isn't a unique place to declare the super class). This should probably be fixed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78532 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Implement user defined super classes.Daniel Dunbar2009-08-09
| | | | | | | - We can now discriminate SUB32ri8 from SUB32ri, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78530 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.Daniel Dunbar2009-08-09
| | | | | | | | | | | | - We want the ordering operation to be simple, since we run it on every match. The old ordering is also not a strict weak ordering when there are ambiguities, which makes MSVC unhappy. - While we are at it, detect all ambiguities instead of just the adjacent ones. There are actually 655, for X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78526 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Define match classes in the .td file.Daniel Dunbar2009-08-09
| | | | | | | -2 FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78523 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detectingDaniel Dunbar2009-08-09
| | | | | | | | ambiguities. - Currently there are 483 ambiguities to resolve. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78522 91177308-0d34-0410-b5e6-96231b3b80d8
* fix editoChris Lattner2009-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78520 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Tweak string matcher (missed a newline).Daniel Dunbar2009-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78518 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Tweak string matcher.Daniel Dunbar2009-08-08
| | | | | | | | | | | | - Track whether we need to insert an explicit 'break'. - Invert conditional when matching a single prefix to reduce nesting/bracing/breaking. - wc -l of X86GenAsmMatcher.inc decreased by 10%. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78513 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.Daniel Dunbar2009-08-08
| | | | | | | | Also, redefined MatchRegisterName to just return the register value or a sentinel, to simplify the generated code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78504 91177308-0d34-0410-b5e6-96231b3b80d8
* add a little function to do arbitrary string pattern matching in aChris Lattner2009-08-08
| | | | | | | | | much more efficient way than a sequence of if's. Switch MatchRegisterName to use it. It would be nice if someone could factor this out to a shared place in tblgen :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78492 91177308-0d34-0410-b5e6-96231b3b80d8
* add another constChris Lattner2009-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78487 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a useless anon-ns, make table const.Chris Lattner2009-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78486 91177308-0d34-0410-b5e6-96231b3b80d8
* MSVC doesn't like member variables with the same name as the class.Benjamin Kramer2009-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78462 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Improve match code.Daniel Dunbar2009-08-08
| | | | | | | | | | | | | | | - This doesn't actually improve the algorithm (its still linear), but the generated (match) code is now fairly compact and table driven. Still need a generic string matcher. - The table still needs to be compressed, this is quite simple to do and should shrink it to under 16k. - This also simplifies and restructures the code to make the match classes more explicit, in anticipation of resolving ambiguities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78461 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Switch to a unified function to convert operands to MCInst,Daniel Dunbar2009-08-08
| | | | | | | | | | so that terminal states are as simple as possible. - If we were willing to assume that the order that operands get inserted in the MCInst is fixed we could actually dispose with this altogether, although it might be nice to have the flexibility to change it later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78458 91177308-0d34-0410-b5e6-96231b3b80d8
* make printInstruction return void since its result is omitted. Make the Chris Lattner2009-08-08
| | | | | | | error condition get trapped with an assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78449 91177308-0d34-0410-b5e6-96231b3b80d8
* don't check the result of printInstruction anymore.Chris Lattner2009-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78444 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak build.Benjamin Kramer2009-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78431 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the column output stuff in the asmwriter from being dynamic andChris Lattner2009-08-07
| | | | | | | | | driven by TAI to being static, driven by tblgen. This means that a target doesn't get impacted by this stuff at all if it doesn't opt into it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78427 91177308-0d34-0410-b5e6-96231b3b80d8
* strength reduce anonymous namespace to static.Chris Lattner2009-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78417 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Move emit for register -> enum matcher into a separate ↵Daniel Dunbar2009-08-07
| | | | | | routine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78408 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Tweaks in response to feedback.Daniel Dunbar2009-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78404 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc/AsmMatcher: Move to a slightly more sane matching design.Daniel Dunbar2009-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Still not very sane, but a least its not 60k lines on X86. :) - In terms of correctness, currently some things are hard wired for X86, and we still don't properly resolve ambiguities (this is ignoring the instructions we don't even match due to funny .td stuff or other corner cases). The high level changes: 1. Represent tokens which are significant for matching explicitly as separate operands. This uniformly handles not only the instruction mnemonic, but also 'signficiant' syntax like the '*' in "call * ...". 2. Separate the matching of operands to an instruction from the construction of the MCInst. In theory this can be done during matching, but since the number of variations is small I think it makes sense to decompose the problems. 3. Improved a few of the mechanisms to at least successfully flatten / tokenize the assembly strings for PowerPC and ARM. 4. The comment at the top of AsmMatcherEmitter.cpp explains the approach I'm moving towards for handling ambiguous instructions. The high-bit is to infer a partial ordering of the operand classes (and force the user to specify one if we can't) and use that to resolve ambiguities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78378 91177308-0d34-0410-b5e6-96231b3b80d8
* Privatize the StructType table, which unfortunately involves routing ↵Owen Anderson2009-08-05
| | | | | | contexts through a number of APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress compiler warning.Daniel Dunbar2009-08-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78246 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some column padding bugs, reorganize things as suggested by ChrisDavid Greene2009-08-05
| | | | | | | and eliminate complexity. Yay! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78243 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen / AsmMatcher: Tweaks to avoid generating completely bogus matchDaniel Dunbar2009-08-04
| | | | | | | | | | | functions. - Fix variant flattening when the variant embeds an operand reference. - Ignore instructions which reference an operand multiple times (e.g., "xorb $dst, $dst"), and operands which have extra flags (e.g., "$dst:subreg32"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78099 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'Indirect' LocInfo class and use to pass __m128 on win64. Also minore ↵Anton Korobeynikov2009-08-03
| | | | | | fixes here and there (mostly __m64). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77964 91177308-0d34-0410-b5e6-96231b3b80d8