summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
Commit message (Collapse)AuthorAgeFilesLines
...
* remove some DOUTsChris Lattner2009-08-233-21/+21
| | | | llvm-svn: 79821
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-231-2/+2
| | | | | | | | | | | | | | | | instead of as two bools. Use this to add a F_Append flag which has the obvious behavior. Other unrelated changes conflated into this patch: 1. REmove EH stuff from llvm-dis and llvm-as, the try blocks are dead. 2. Simplify the filename inference code in llvm-as/llvm-dis, because raw_fd_ostream does the right thing with '-'. 3. Switch machine verifier to use raw_ostream instead of ostream (Which is the thing that needed append in the first place). llvm-svn: 79807
* Record variable debug info at ISel time directly.Devang Patel2009-08-222-21/+0
| | | | llvm-svn: 79742
* Extend the instruction itinerary model to include the ability to indicate ↵David Goodwin2009-08-172-42/+107
| | | | | | the def and use cycle for each operand. This additional information is optional, so existing itineraries do not need to be changed. llvm-svn: 79247
* the MinPad argument to PadToColumn only really makes sense to be 1,Chris Lattner2009-08-171-2/+2
| | | | | | just remove the argument and replace it with 1. llvm-svn: 79246
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-9/+9
| | | | llvm-svn: 78948
* Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.Bob Wilson2009-08-122-11/+30
| | | | | | | | 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. llvm-svn: 78849
* This void is implicit in C++.Dan Gohman2009-08-122-5/+5
| | | | llvm-svn: 78848
* Enhance the InstrStage object to enable the specification of an Itinerary ↵David Goodwin2009-08-121-4/+7
| | | | | | with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one. llvm-svn: 78827
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-122-21/+2
| | | | | | infrastructure work needed to get the contexts to where they need to be first. llvm-svn: 78759
* llvm-mc/AsmParser: Match hard coded registers (e.g. 'shldl %cl, %eax, %eax')Daniel Dunbar2009-08-111-25/+102
| | | | | | We now match all of 403.gcc (as emitted by clang). :) llvm-svn: 78750
* Add 'isCodeGenOnly' bit to Instruction .td records.Daniel Dunbar2009-08-111-20/+13
| | | | | | | | | | | | | | | - 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. llvm-svn: 78731
* llvm-mc/AsmParser: Allow target to specific a comment delimiter, which will beDaniel Dunbar2009-08-111-1/+26
| | | | | | used to strip hard coded comments out of .td assembly strings. llvm-svn: 78716
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-1110-207/+207
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* llvm-mc/AsmMatcher: Fix two thinkos in determining whether two classes areDaniel Dunbar2009-08-111-4/+23
| | | | | | related. llvm-svn: 78706
* Fix a few more places in TableGen that need to handle EVT::vAny types.Bob Wilson2009-08-111-2/+4
| | | | llvm-svn: 78643
* llvm-mc/AsmParser: Implement automatic classification of RegisterClass operands.Daniel Dunbar2009-08-111-71/+256
| | | | | | - This drops us to 123 ambiguous instructions (previously ~500) on X86. llvm-svn: 78636
* Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsicBob Wilson2009-08-113-7/+25
| | | | | | arguments that are vectors of any size and element type. llvm-svn: 78631
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-1012-286/+286
| | | | | | own struct type. llvm-svn: 78610
* llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to callDaniel Dunbar2009-08-101-2/+21
| | | | | | | on target specific operands for testing class membership and converting to MCInst operands. llvm-svn: 78597
* llvm-mc/AsmMatcher: Remove some code which has been obsoleted by move toDaniel Dunbar2009-08-101-24/+4
| | | | | | explicit parser match classes. llvm-svn: 78588
* llvm-mc/AsmMatcher: Change assembler parser match classes to their own recordDaniel Dunbar2009-08-101-61/+56
| | | | | | structure. llvm-svn: 78581
* llvm-mc/AsmParser: Check for matches with super classes when matchingDaniel Dunbar2009-08-101-1/+52
| | | | | | instruction operands. llvm-svn: 78565
* llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.Daniel Dunbar2009-08-091-2/+7
| | | | llvm-svn: 78533
* llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, toDaniel Dunbar2009-08-091-0/+11
| | | | | | | | | | 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. llvm-svn: 78532
* llvm-mc/AsmParser: Implement user defined super classes.Daniel Dunbar2009-08-091-10/+72
| | | | | | - We can now discriminate SUB32ri8 from SUB32ri, for example. llvm-svn: 78530
* llvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.Daniel Dunbar2009-08-091-36/+45
| | | | | | | | | | | - 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. llvm-svn: 78526
* llvm-mc/AsmParser: Define match classes in the .td file.Daniel Dunbar2009-08-091-27/+39
| | | | | | -2 FIXMEs. llvm-svn: 78523
* llvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detectingDaniel Dunbar2009-08-091-14/+106
| | | | | | | ambiguities. - Currently there are 483 ambiguities to resolve. :) llvm-svn: 78522
* fix editoChris Lattner2009-08-081-1/+0
| | | | llvm-svn: 78520
* llvm-mc/AsmMatcher: Tweak string matcher (missed a newline).Daniel Dunbar2009-08-081-1/+1
| | | | llvm-svn: 78518
* llvm-mc/AsmMatcher: Tweak string matcher.Daniel Dunbar2009-08-081-26/+28
| | | | | | | | | | | - 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%. :) llvm-svn: 78513
* llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.Daniel Dunbar2009-08-081-33/+31
| | | | | | | Also, redefined MatchRegisterName to just return the register value or a sentinel, to simplify the generated code. llvm-svn: 78504
* add a little function to do arbitrary string pattern matching in aChris Lattner2009-08-081-3/+138
| | | | | | | | 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 :) llvm-svn: 78492
* add another constChris Lattner2009-08-081-1/+1
| | | | llvm-svn: 78487
* remove a useless anon-ns, make table const.Chris Lattner2009-08-081-6/+1
| | | | llvm-svn: 78486
* MSVC doesn't like member variables with the same name as the class.Benjamin Kramer2009-08-081-13/+13
| | | | llvm-svn: 78462
* llvm-mc/AsmMatcher: Improve match code.Daniel Dunbar2009-08-081-102/+318
| | | | | | | | | | | | | | - 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. llvm-svn: 78461
* llvm-mc/AsmMatcher: Switch to a unified function to convert operands to MCInst,Daniel Dunbar2009-08-081-42/+73
| | | | | | | | | 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. llvm-svn: 78458
* make printInstruction return void since its result is omitted. Make the Chris Lattner2009-08-081-11/+11
| | | | | | error condition get trapped with an assert. llvm-svn: 78449
* don't check the result of printInstruction anymore.Chris Lattner2009-08-081-5/+6
| | | | llvm-svn: 78444
* Unbreak build.Benjamin Kramer2009-08-071-8/+8
| | | | llvm-svn: 78431
* fix the column output stuff in the asmwriter from being dynamic andChris Lattner2009-08-071-15/+36
| | | | | | | | 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. llvm-svn: 78427
* strength reduce anonymous namespace to static.Chris Lattner2009-08-071-5/+2
| | | | llvm-svn: 78417
* llvm-mc/AsmMatcher: Move emit for register -> enum matcher into a separate ↵Daniel Dunbar2009-08-071-11/+18
| | | | | | routine. llvm-svn: 78408
* llvm-mc/AsmMatcher: Tweaks in response to feedback.Daniel Dunbar2009-08-071-14/+2
| | | | llvm-svn: 78404
* llvm-mc/AsmMatcher: Move to a slightly more sane matching design.Daniel Dunbar2009-08-071-196/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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. llvm-svn: 78378
* Privatize the StructType table, which unfortunately involves routing ↵Owen Anderson2009-08-051-2/+2
| | | | | | contexts through a number of APIs. llvm-svn: 78258
* Suppress compiler warning.Daniel Dunbar2009-08-051-1/+3
| | | | llvm-svn: 78246
* Fix some column padding bugs, reorganize things as suggested by ChrisDavid Greene2009-08-051-26/+4
| | | | | | and eliminate complexity. Yay! llvm-svn: 78243
OpenPOWER on IntegriCloud