summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAge
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
* 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
* Add lowering of ARM 4-element shuffles to multiple instructios via ↵Anton Korobeynikov2009-08-21
| | | | | | perfectshuffle-generated table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79624 91177308-0d34-0410-b5e6-96231b3b80d8
* Add simple cost model to perfect shuffle. Currently we're doing just greedy ↵Anton Korobeynikov2009-08-21
| | | | | | search for cost instead of (proper) dynamic programming approach. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79623 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace cleanupAnton Korobeynikov2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79618 91177308-0d34-0410-b5e6-96231b3b80d8
* Even more Apple style build horribleness.Evan Cheng2009-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79299 91177308-0d34-0410-b5e6-96231b3b80d8
* The attached patches attempt to fix cross builds. For example, if youAnton Korobeynikov2009-08-18
| | | | | | | | | | | | | try to use i686-darwin to build for arm-eabi, you'll quickly run into several false assumptions that the target OS must be the same as the host OS. These patches split $(OS) into $(HOST_OS) and $(TARGET_OS) to help builds like "make check" and the test-suite able to cross compile. Along the way a target of *-unknown-eabi is defined as "Freestanding" so that TARGET_OS checks have something to work with. Patch by Sandeep Patel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79296 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
* when emitting errors about CHECK-NEXT directives, show the line that the Chris Lattner2009-08-16
| | | | | | | CHECK-NEXT is on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79164 91177308-0d34-0410-b5e6-96231b3b80d8
* implement support for CHECK-NEXT: in filecheck.Chris Lattner2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79123 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some code.Chris Lattner2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79121 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite FindStringInBuffer to use an explicit loop instead ofChris Lattner2009-08-15
| | | | | | | | | trying to wrap strstr which is just too inconvenient. Make it use a StringRef to avoid ".c_str()" calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79120 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of using an std::pair, use a custom struct.Chris Lattner2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79119 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