summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
Commit message (Collapse)AuthorAgeFilesLines
* Add a sanity-check to tablegen to catch the case where isSimpleLoadDan Gohman2008-12-032-1/+10
| | | | | | | | | is set but mayLoad is not set. Fix all the problems this turned up. Change code to not use isSimpleLoad instead of mayLoad unless it really wants isSimpleLoad. llvm-svn: 60459
* Support multiple compilation graph definitions. Not terribly useful, but ↵Mikhail Glushenkov2008-11-281-42/+51
| | | | | | makes the code more generic. llvm-svn: 60199
* Add 'hidden' and 'really_hidden' option properties.Mikhail Glushenkov2008-11-281-1/+43
| | | | llvm-svn: 60198
* On x86 favors folding short immediate into some arithmetic operations (e.g. ↵Evan Cheng2008-11-271-2/+2
| | | | | | | | | | | | | | | add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size. e.g. movl 4(%esp), %eax addl $4, %eax is 2 bytes shorter than movl $4, %eax addl 4(%esp), %eax llvm-svn: 60139
* Small fix: the error message was incorrect in some cases.Mikhail Glushenkov2008-11-261-3/+3
| | | | llvm-svn: 60099
* Support dependencies between plugins by priority-sorting.Mikhail Glushenkov2008-11-171-5/+19
| | | | llvm-svn: 59449
* Filter ToolPropertiesList to exclude all Tools not mentioned in the ↵Mikhail Glushenkov2008-11-171-49/+78
| | | | | | compilation graph. llvm-svn: 59448
* Add a layer of indirection to make plugins more flexible.Mikhail Glushenkov2008-11-171-55/+58
| | | | | | | Use strings instead of TableGen defs in the compilation graph definition. Makes it easier for the plugins to modify an existing graph. llvm-svn: 59447
* Fix to record comparator to make it work for return values > 1.Bill Wendling2008-11-131-1/+1
| | | | llvm-svn: 59242
* Put comma in correct place for call to StructType::getBill Wendling2008-11-131-2/+4
| | | | llvm-svn: 59241
* Modify the intrinsics pattern to separate out the "return" types from theBill Wendling2008-11-134-66/+170
| | | | | | | | | | "parameter" types. An intrinsic can now return a multiple return values like this: def add_with_overflow : Intrinsic<[llvm_i32_ty, llvm_i1_ty], [LLVMMatchType<0>, LLVMMatchType<0>]>; llvm-svn: 59237
* Check the return value of std::getenv.Mikhail Glushenkov2008-11-121-4/+8
| | | | | | | | | When constructing std::strings from C strings, we should check the input value to be not NULL so that the std::string constructor does not segfault. Fixes #3047. llvm-svn: 59131
* Add a bit of lazy evaluation to PopulateCompilationGraph().Mikhail Glushenkov2008-11-121-11/+18
| | | | | | | | Only the tools that are mentioned in the compilation graph definition are now inserted by PopulateCompilationGraph(). This should cut down plugin loading time a little. llvm-svn: 59097
* Some cosmetic changes.Mikhail Glushenkov2008-11-121-0/+2
| | | | llvm-svn: 59096
* Allow $CALL and $ENV in command names. Fixes #3025.Mikhail Glushenkov2008-11-081-1/+1
| | | | llvm-svn: 58922
* Properly escape dashes in TableGen's LLVMC2 emitter.Anton Korobeynikov2008-11-081-2/+2
| | | | | | Patch by Patrick Walton! llvm-svn: 58901
* Make tablegen print out a nice error message for a const char*Dan Gohman2008-11-071-0/+7
| | | | | | exception, like it does for a std::string exception. llvm-svn: 58865
* Use an assert to check that SelectCode isn't called onDan Gohman2008-11-051-5/+4
| | | | | | nodes that are already selected. llvm-svn: 58763
* Eliminate the ISel priority queue, which used the topological order for aDan Gohman2008-11-051-30/+5
| | | | | | | | | | | | | | | | | | | | | | | | priority function. Instead, just iterate over the AllNodes list, which is already in topological order. This eliminates a fair amount of bookkeeping, and speeds up the isel phase by about 15% on many testcases. The impact on most targets is that AddToISelQueue calls can be simply removed. In the x86 target, there are two additional notable changes. The rule-bending AND+SHIFT optimization in MatchAddress that creates new pre-isel nodes during isel is now a little more verbose, but more robust. Instead of either creating an invalid DAG or creating an invalid topological sort, as it has historically done, it can now just insert the new nodes into the node list at a position where they will be consistent with the topological ordering. Also, the address-matching code has logic that checked to see if a node was "already selected". However, when a node is selected, it has all its uses taken away via ReplaceAllUsesWith or equivalent, so it won't recieve any further visits from MatchAddress. This code is now removed. llvm-svn: 58748
* Give tablegen's Type a destructor, to suppress spuriousDan Gohman2008-11-041-0/+1
| | | | | | | "Type has virtual functions but non-virtual destructor" warnings. llvm-svn: 58710
* Add some asserts to verify MVT invariant assumptions.Dan Gohman2008-11-041-0/+2
| | | | llvm-svn: 58701
* Change how extended types are represented in MVTs. Instead of fiddlingDan Gohman2008-11-032-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | bits, use a union of a SimpleValueType enum and a regular Type*. This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits. In most cases, this doesn't add significant overhead. There are places in codegen that use arrays of MVTs, so these are now larger, but they're small in common cases. This eliminates restrictions on the size of integer types and vector types that can be represented in codegen. As the included testcase demonstrates, it's now possible to codegen very large add operations. There are still some complications with using very large types. PR2880 is still open so they can't be used as return values on normal targets, there are no libcalls defined for very large integers so operations like multiply and divide aren't supported. This also introduces a minimal tablgen Type library, capable of handling IntegerType and VectorType. This will allow parts of TableGen that don't depend on using SimpleValueType values to handle arbitrary integer and vector types. llvm-svn: 58623
* Have TableGen emit setSubgraphColor calls under control of a -gen-debugDavid Greene2008-10-271-5/+45
| | | | | | | | flag. Then in a debugger developers can set breakpoints at these calls to see waht is about to be selected and what the resulting subgraph looks like. This really helps when debugging instruction selection. llvm-svn: 58278
* Remove tabs from my previous commit.Cedric Venet2008-10-271-2/+2
| | | | llvm-svn: 58263
* Remove redundant word in tblgen error message.Matthijs Kooijman2008-10-271-1/+1
| | | | llvm-svn: 58250
* Add a default constructor to AsmWriterOperand to make VS2008sp1 happy. ↵Cedric Venet2008-10-261-0/+3
| | | | | | (AsmWriterOperand is used in a std::pair, and VS need to generate the default constructor of this pair). llvm-svn: 58185
* Unbreak LLVM on the MSVC compiler:Argyrios Kyrtzidis2008-10-222-0/+2
| | | | | | | -Bring in int64_t for TableGen/Record.h and TableGen/TGLexer.h -Define strtoull llvm-svn: 57970
* Add RCBarriers to TargetInstrDesc. It's a list of register classes the given ↵Evan Cheng2008-10-172-1/+60
| | | | | | | | instruction can "clobber". For example, on x86 the call instruction can modify all of the XMM and fp stack registers. TableGen has been taught to generate the lists from instruction definitions. llvm-svn: 57722
* Use INT64_C to emit constant values, to avoid problems withDan Gohman2008-10-171-2/+3
| | | | | | | | constants that don't fit in an int. This fixes "this decimal constant is unsigned only in ISO C90" warnings. llvm-svn: 57668
* Fun x86 encoding tricks: when adding an immediate value of 128,Dan Gohman2008-10-177-27/+40
| | | | | | | | | | | | | use a SUB instruction instead of an ADD, because -128 can be encoded in an 8-bit signed immediate field, while +128 can't be. This avoids the need for a 32-bit immediate field in this case. A similar optimization applies to 64-bit adds with 0x80000000, with the 32-bit signed immediate field. To support this, teach tablegen how to handle 64-bit constants. llvm-svn: 57663
* Add support for having multiple predicates on a TreePatternNode.Dan Gohman2008-10-154-70/+109
| | | | | | | | This will allow predicates to be composed, which will allow the predicate definitions to become less redundant, and eventually will allow DAGISelEmitter.cpp to emit less redundant code. llvm-svn: 57562
* Add <cstdio> include where needed by gcc-4.4.Duncan Sands2008-10-082-0/+2
| | | | | | Patch by Samuel Tardieu. llvm-svn: 57291
* Fix shift overflow bug that would occur when a field was a full 32-bits Chris Lattner2008-10-051-1/+1
| | | | | | | in tblgen. This is PR2827, thanks to Waldemar Knorr for tracking this down. llvm-svn: 57124
* Handle some 64-bit atomics on x86-32, some of the time.Dale Johannesen2008-10-021-1/+2
| | | | llvm-svn: 56963
* Move the primary fast-isel top-level comments to FastISel.cpp, whereDan Gohman2008-09-301-24/+6
| | | | | | they'll be a little more visible. Also, update and reword them a bit. llvm-svn: 56877
* Move the code that handles DAGISel error conditions intoDan Gohman2008-09-271-25/+27
| | | | | | | | helper functions instead of duplicating it inline each time it is needed. This eliminates a few hundred or so copies of this code in each target. llvm-svn: 56759
* Rename ConstantSDNode's getSignExtended to getSExtValue, forDan Gohman2008-09-261-2/+2
| | | | | | | consistancy with ConstantInt, and re-implement it in terms of ConstantInt's getSExtValue. llvm-svn: 56700
* Large mechanical patch.Devang Patel2008-09-251-2/+2
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* Move llvmc2 header files under include/llvm/CompilerDriverMikhail Glushenkov2008-09-221-3/+3
| | | | llvm-svn: 56466
* Plugin support for llvmc2 (a-la opt).Mikhail Glushenkov2008-09-221-4/+42
| | | | llvm-svn: 56465
* Make comments a little bit more clear.Mikhail Glushenkov2008-09-221-2/+4
| | | | llvm-svn: 56463
* Get rid of GlobalLanguageMap. Global state is evil.Mikhail Glushenkov2008-09-221-7/+9
| | | | llvm-svn: 56462
* Add a (forward_as) option propertyMikhail Glushenkov2008-09-221-11/+39
| | | | llvm-svn: 56459
* Delete the file llvmc2/doc/LLVMC-Enhancements.rst + some minor ↵Mikhail Glushenkov2008-09-221-3/+2
| | | | | | language/spelling fixes. llvm-svn: 56458
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+26
| | | | llvm-svn: 56419
* Add instruction names as comments to InstBits entries.Evan Cheng2008-09-171-5/+3
| | | | llvm-svn: 56275
* Reverting r56249. On further investigation, this functionality isn't needed.Bill Wendling2008-09-161-3/+3
| | | | | | Apologies for the thrashing. llvm-svn: 56251
* - Change "ExternalSymbolSDNode" to "SymbolSDNode".Bill Wendling2008-09-161-3/+3
| | | | | | | | | | - Add linkage to SymbolSDNode (default to external). - Change ISD::ExternalSymbol to ISD::Symbol. - Change ISD::TargetExternalSymbol to ISD::TargetSymbol These changes pave the way to allowing SymbolSDNodes with non-external linkage. llvm-svn: 56249
* Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* andDan Gohman2008-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | ConstantFP* instead of APInt and APFloat directly. This reduces the amount of time to create ConstantSDNode and ConstantFPSDNode nodes when ConstantInt* and ConstantFP* respectively are already available, as is the case in SelectionDAGBuild.cpp. Also, it reduces the amount of time to legalize constants into constant pools, and the amount of time to add ConstantFP operands to MachineInstrs, due to eliminating ConstantInt::get and ConstantFP::get calls. It increases the amount of work needed to create new constants in cases where the client doesn't already have a ConstantInt* or ConstantFP*, such as legalize expanding 64-bit integer constants to 32-bit constants. And it adds a layer of indirection for the accessor methods. But these appear to be outweight by the benefits in most cases. It will also make it easier to make ConstantSDNode and ConstantFPNode more consistent with ConstantInt and ConstantFP. llvm-svn: 56162
* Rename ConstantSDNode::getValue to getZExtValue, for consistencyDan Gohman2008-09-121-5/+6
| | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. llvm-svn: 56159
OpenPOWER on IntegriCloud