summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAge
* Drop a RecordKeeper reference that wasn't necessary.Jakob Stoklund Olesen2011-06-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132636 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence compiler warnings.Jakob Stoklund Olesen2011-06-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132624 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach TableGen to evaluate DAG expressions as set operations.Jakob Stoklund Olesen2011-06-04
| | | | | | | | | | | | | | | | | A TableGen backend can define how certain classes can be expanded into ordered sets of defs, typically by evaluating a specific field in the record. The SetTheory class can then evaluate DAG expressions that refer to these named sets. A number of standard set and list operations are predefined, and the backend can add more specialized operators if needed. The -print-sets backend is used by SetTheory.td to provide examples. This is intended to simplify how register classes are defined: def GR32_NOSP : RegisterClass<"X86", [i32], 32, (sub GR32, ESP)>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132621 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework the logic to not rely on undefined behaviour (1LL << 64). Also simplify.Nick Lewycky2011-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132537 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to have unallocatable register classes.Jakob Stoklund Olesen2011-06-02
| | | | | | | | | | | | | | | Some register classes are only used for instruction operand constraints. They should never be used for virtual registers. Previously, those register classes were given an empty allocation order, but now you can say 'let isAllocatable=0' in the register class definition. TableGen calculates if a register is part of any allocatable register class, and makes that information available in TargetRegisterDesc::inAllocatableClass. The goal here is to eliminate use cases for overriding allocation_order_* methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132508 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new -d option to tblgen. It writes a make(1)-style dependency file.Joerg Sonnenberger2011-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132395 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ssat and ssat16 encodings for ARM and Thumb. The bit position valueBruno Cardoso Lopes2011-05-31
| | | | | | | must be encoded decremented by one. Only add encoding tests for ssat16 because ssat can't be parsed yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132324 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the dwarf->llvm mapping to print register names in the cfiRafael Espindola2011-05-30
| | | | | | | | directives. Fixes PR9826. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132317 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce the DwarfRegAlias class for declaring that two registers have theRafael Espindola2011-05-30
| | | | | | | | | | same dwarf number. This will be used for creating a dwarf number to register mapping. The only case that needs this so far is the XMM/YMM registers that unfortunately do have the same numbers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132314 91177308-0d34-0410-b5e6-96231b3b80d8
* Change how tblgen generates attributes for intrinsics to use a singleJohn McCall2011-05-28
| | | | | | | | | | | switch. With this newfound organization, teach tblgen how not to give all intrinsics the 'nounwind' attribute. Introduce a new intrinsic, llvm.eh.resume, which does not have this attribute. Documentation and uses to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132252 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the root cause of the bootstrap failure:Rafael Espindola2011-05-28
| | | | | | | | There was no way to check if a given register/mode pair was valid. We now return an error code (-2) instead of asserting. If anyone thinks that an assert at this point is really needed, we can autogen a hasValidDwarfRegNum instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132236 91177308-0d34-0410-b5e6-96231b3b80d8
* [tablegen] A couple of changes to ClangDiagnosticEmmitter.Argyrios Kyrtzidis2011-05-25
| | | | | | | | -Emit an empty warning option as string ("") instead of 0. -For diagnostic names also emit the size of the string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132046 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a more efficient data structure for the "operand map". The number ofBill Wendling2011-05-23
| | | | | | | | operands to an instruction aren't great, so an iterative search is fairly quick and doesn't have the overhead of std::map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131886 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR9947 by placing OPFL_MemRefs on the node using memory operands rather thanCameron Zwarich2011-05-19
| | | | | | | the root if there is only one such node. This leaves only 2 verifier failures in the entire test suite when running "make check". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131677 91177308-0d34-0410-b5e6-96231b3b80d8
* In r131488 I misunderstood how VREV works. It splits the vector in half and ↵Tanya Lattner2011-05-18
| | | | | | | | | splits each half. Therefore, the real problem was that we were using a VREV64 for a 4xi16, when we should have been using a VREV32. Updated test case and reverted change to the PerfectShuffle Table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131529 91177308-0d34-0410-b5e6-96231b3b80d8
* vrev is incorrectly defined in the perfect shuffle table. The ordering is ↵Tanya Lattner2011-05-17
| | | | | | backwards (should be 0x3210 versus 0x1032) which exposed a bug when doing a shuffle on a 4xi16. I've attached a test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131488 91177308-0d34-0410-b5e6-96231b3b80d8
* Downgrade a tablegen warning to an error.Jakob Stoklund Olesen2011-05-10
| | | | | | | Ambiguous sub-register index compositions are OK as long as the backend writer knows what he is doing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131134 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed MC encoding for index_align for VLD1/VST1 (single element from one ↵Mon P Wang2011-05-09
| | | | | | lane) for size 32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131085 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach TableGen to automatically generate missing SubRegIndex instances.Jakob Stoklund Olesen2011-05-07
| | | | | | | The RegisterInfo.td file should only specify the indexes that sources need to refer to. The rest is inferred. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131058 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve diagnostics for some parse errors. Not asserting when a user inputJim Grosbach2011-05-06
| | | | | | error is detected is a good thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131005 91177308-0d34-0410-b5e6-96231b3b80d8
* ParseFile() may throw, so extend the try/catch to handle that.Jim Grosbach2011-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131004 91177308-0d34-0410-b5e6-96231b3b80d8
* llvmc: Make it possible to provide an argument to (join).Mikhail Glushenkov2011-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130914 91177308-0d34-0410-b5e6-96231b3b80d8
* The system suppression file should catch these, but since they *once again* areNick Lewycky2011-05-04
| | | | | | | not, I'll just add them here and be done with it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130819 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Add missing newline to generated file.Jim Grosbach2011-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130779 91177308-0d34-0410-b5e6-96231b3b80d8
* Filter out pattterns from the FastISel emitter which it doesn't actually ↵Eli Friedman2011-04-29
| | | | | | know how to handle. No significant functionality change at the moment, but it's necessary for some changes I'm planning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130547 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename profile_rt.so to libprofile_rt.so under configure+make (it already wasNick Lewycky2011-04-29
| | | | | | | | | | | | | under cmake). Add libprofile_rt.a so that we can tell clang to link against it in --coverage mode. Also turn it on by default in cmake builds. Oscar, this touches a change you made for EXCLUDE_FROM_ALL support -- I think I've done the right thing, but please let me know (or fix and commit) if not! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130470 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in tblgen that caused incorrect encodings on instructions that ↵Owen Anderson2011-04-28
| | | | | | | | | | specified operands with "bit" instead of "bits<1>". Unfortunately, my only testcase for this is fragile, and the ARM AsmParser can't round trip the instruction in question. <rdar://problem/9345702> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130410 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a TODO.Mikhail Glushenkov2011-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130092 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused STL header includes.Jay Foad2011-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
* Disassembly of A8.6.59 LDR (literal) Encoding T1 (16-bit thumb instruction) ↵Johnny Chen2011-04-22
| | | | | | | | | | | should print out ldr, not ldr.n. rdar://problem/9267772 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130008 91177308-0d34-0410-b5e6-96231b3b80d8
* Define Neon load/store intrinsics for Clang as macros instead of functions.Bob Wilson2011-04-22
| | | | | | | This is needed so the front-end can see "aligned" attributes on the type for the pointer arguments. Radar 9311427. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129964 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow per-register spill size and alignment.Jakob Stoklund Olesen2011-04-21
| | | | | | | These values were not used for anything. Spill size and alignment is a property of the register class, not the register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129906 91177308-0d34-0410-b5e6-96231b3b80d8
* Prefer cheap registers for busy live ranges.Jakob Stoklund Olesen2011-04-20
| | | | | | | | | | | | | | On the x86-64 and thumb2 targets, some registers are more expensive to encode than others in the same register class. Add a CostPerUse field to the TableGen register description, and make it available from TRI->getCostPerUse. This represents the cost of a REX prefix or a 32-bit instruction encoding required by choosing a high register. Teach the greedy register allocator to prefer cheap registers for busy live ranges (as indicated by spill weight). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129864 91177308-0d34-0410-b5e6-96231b3b80d8
* Invert the meaning of printAliasInstr's return value. It now returnsEric Christopher2011-04-18
| | | | | | | true on success and false on failure. Update callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129722 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance the fixed-length disassembler to support the callbacks necessary for ↵Owen Anderson2011-04-18
| | | | | | symbolic disassembly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129708 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new bit that ImmLeaf's can opt into, which allows them to duck out ofChris Lattner2011-04-18
| | | | | | | | | the generated FastISel. X86 doesn't need to generate code to match ADD16ri8 since ADD16ri will do just fine. This is a small codesize win in the generated instruction selector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129692 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement major new fastisel functionality: the matcher can now handle ↵Chris Lattner2011-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | immediates with value constraints on them (when defined as ImmLeaf's). This is particularly important for X86-64, where almost all reg/imm instructions take a i64immSExt32 immediate operand, which has a value constraint. Before this patch we ended up iseling the examples into such amazing code as: movabsq $7, %rax imulq %rax, %rdi movq %rdi, %rax ret now we produce: imulq $7, %rdi, %rax ret This dramatically shrinks the generated code at -O0 on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129691 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce a new OpKind abstraction which wraps up operand flavors in a tidy ↵Chris Lattner2011-04-17
| | | | | | | | | little wrapper. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129680 91177308-0d34-0410-b5e6-96231b3b80d8
* change OperandsSignature to use SmallVector<char> instead of std::vector<string>Chris Lattner2011-04-17
| | | | | | | | since the strings are always exactly one character, and there are usually only 2-3 operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129678 91177308-0d34-0410-b5e6-96231b3b80d8
* since the VT is fixed for a ImmLeaf, there is no reason to expose it to the ↵Chris Lattner2011-04-17
| | | | | | matching code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129677 91177308-0d34-0410-b5e6-96231b3b80d8
* now that predicates have a decent abstraction layer on them, introduce a new Chris Lattner2011-04-17
| | | | | | | | | | kind of predicate: one that is specific to imm nodes. The predicate function specified here just checks an int64_t directly instead of messing around with SDNode's. The virtue of this is that it means that fastisel and other things can reason about these predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129675 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework our internal representation of node predicates to expose moreChris Lattner2011-04-17
| | | | | | | | | structure and fix some fixmes. We now have a TreePredicateFn class that handles all of the decoding of these things. This is an internal cleanup that has no impact on the code generated by tblgen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129670 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some debugging code I added.Chris Lattner2011-04-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129668 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. merge fast-isel-shift-imm.ll into fast-isel-x86-64.llChris Lattner2011-04-17
| | | | | | | | | | | | 2. implement rdar://9289501 - fast isel should fold trivial multiplies to shifts 3. teach tblgen to handle shift immediates that are different sizes than the shifted operands, eliminating some code from the X86 fast isel backend. 4. Have FastISel::SelectBinaryOp use (the poorly named) FastEmit_ri_ function instead of FastEmit_ri to simplify code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129666 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-15
| | | | | | Monrocq git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129613 91177308-0d34-0410-b5e6-96231b3b80d8
* Increase SubtargetFeatureKV Value and Implies fields to 64 bits since some ↵Evan Cheng2011-04-15
| | | | | | targets are getting very close to 32 subtarget features. Also teach tablegen to error when there are more than 64 features to guard against undefined behavior. rdar://9282332 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129590 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-15
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to not print the alias of an instruction. It defaults to "printBill Wendling2011-04-13
| | | | | | | the alias". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129485 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb disassembler was erroneously rejecting "blx sp" instruction.Johnny Chen2011-04-11
| | | | | | | rdar://problem/9267838 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129320 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen: Keep the order of DECL_CONTEXT() for DeclNodes.td. RecordVector ↵NAKAMURA Takumi2011-04-11
| | | | | | | | may be used instead of RecordSet. The result of DeclNodes.inc was unstable on msys, Windows 7 x64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129317 91177308-0d34-0410-b5e6-96231b3b80d8