summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelMatcher.h
Commit message (Collapse)AuthorAgeFilesLines
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-3/+3
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* Use unique_ptr to remove explicit delete.Craig Topper2014-12-151-1/+2
| | | | llvm-svn: 224224
* Fix missing C++ mode commentMatt Arsenault2014-11-021-1/+1
| | | | llvm-svn: 221115
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-2/+2
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-161-1/+1
| | | | | | instead of comparing to nullptr. llvm-svn: 206356
* Replace ValueTypes.h with MachineValueType.h if possible.Patrik Hagglund2014-03-151-1/+1
| | | | | | | | | Utilize the previous move of MVT to a separate header for all trivial cases (that don't need any further restructuring). Reviewed By: Tim Northover llvm-svn: 204003
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-3/+2
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-1/+1
| | | | llvm-svn: 202957
* [C++11] Add 'override' keywords to tablegen code.Craig Topper2014-03-051-130/+130
| | | | llvm-svn: 202937
* Add CheckChildInteger to ISelMatcher operations. Removes nearly 2000 bytes ↵Craig Topper2014-02-051-0/+30
| | | | | | from X86 matcher table. llvm-svn: 200821
* Delete the Matchers stored in the SmallVectors in ↵Craig Topper2014-01-291-0/+2
| | | | | | SwitchOpcodeMatcher/SwitchTypeMatcher. llvm-svn: 200377
* Use ArrayRef to simplify some code.Craig Topper2014-01-211-23/+22
| | | | llvm-svn: 199712
* Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences ↵Craig Topper2013-10-051-0/+30
| | | | | | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon. llvm-svn: 192026
* Revert r191940 to see if it fixes the build bots.Craig Topper2013-10-041-30/+0
| | | | llvm-svn: 191941
* Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences ↵Craig Topper2013-10-041-0/+30
| | | | | | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon. llvm-svn: 191940
* Fix doxygen comments to use correct function name.Craig Topper2013-09-251-1/+1
| | | | llvm-svn: 191356
* Sort the #include lines for utils/...Chandler Carruth2012-12-041-2/+2
| | | | | | | I've tried to find main moudle headers where possible, but the TableGen stuff may warrant someone else looking at it. llvm-svn: 169251
* Remove unnecessary classof()'sSean Silva2012-10-111-2/+0
| | | | | | | isa<> et al. automatically infer when the cast is an upcast (including a self-cast), so these are no longer necessary. llvm-svn: 165767
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160621
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+3
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* Rework our internal representation of node predicates to expose moreChris Lattner2011-04-171-5/+6
| | | | | | | | 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. llvm-svn: 129670
* Teach TableGen to pre-calculate register enum values when creating theJim Grosbach2011-03-111-4/+5
| | | | | | | | | | | CodeGenRegister entries. Use this information to more intelligently build the literal register entires in the DAGISel matcher table. Specifically, use a single-byte OPC_EmitRegister entry for registers with a value of less than 256 and OPC_EmitRegister2 entry for registers with a larger value. rdar://9066491 llvm-svn: 127456
* Generalize the register matching code in DAGISel a bit.Jim Grosbach2011-03-011-1/+1
| | | | llvm-svn: 126731
* Flag -> Glue, the ongoing sagaChris Lattner2010-12-231-4/+4
| | | | llvm-svn: 122513
* continue renaming flag -> glue.Chris Lattner2010-12-231-21/+21
| | | | llvm-svn: 122506
* Tidy up a bit. Trailing whitespace, hard tabs and 80-columns.Jim Grosbach2010-12-211-160/+160
| | | | llvm-svn: 122337
* add plumbing for handling multiple result nodes Chris Lattner2010-03-241-3/+5
| | | | | | in some more places. llvm-svn: 99366
* add some helper functions and implement isContradictory Chris Lattner2010-03-071-0/+44
| | | | | | | | for CheckValueTypeMatcher. The isContradictory implementation helps us factor better, shrinking x86 table from 79144 -> 78896 bytes. llvm-svn: 97905
* change the new isel matcher to emit ComplexPattern matchesChris Lattner2010-03-041-4/+18
| | | | | | | | | | as the very last thing before node emission. This should dramatically reduce the number of times we do 'MatchAddress' on X86, speeding up compile time. This also improves comments in the tables and shrinks the table a bit, now down to 80506 bytes for x86. llvm-svn: 97703
* enhance comment output to specify what recorded slotChris Lattner2010-03-041-2/+6
| | | | | | numbers a ComplexPat will match into. llvm-svn: 97696
* introduce a new SwitchTypeMatcher node (which is analogous toChris Lattner2010-03-031-0/+29
| | | | | | | | SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it. This speeds up selection, particularly for X86 which has lots of variants of instructions with only type differences. llvm-svn: 97645
* Rewrite chain handling validation and input TokenFactor handlingChris Lattner2010-03-021-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | stuff now that we don't care about emulating the old broken behavior of the old isel. This eliminates the 'CheckChainCompatible' check (along with IsChainCompatible) which did an incorrect and inefficient scan *up* the chain nodes which happened as the pattern was being formed and does the validation at the end in HandleMergeInputChains when it forms a structural pattern. This scans "down" the graph, which means that it is quickly bounded by nodes already selected. This also handles token factors that get "trapped" in the dag. Removing the CheckChainCompatible nodes also shrinks the generated tables by about 6K for X86 (down to 83K). There are two pieces remaining before I can nuke PreprocessRMW: 1. I xfailed a test because we're now producing worse code in a case that has nothing to do with the change: it turns out that our use of MorphNodeTo will leave dead nodes in the graph which (depending on how the graph is walked) end up causing bogus uses of chains and blocking matches. This is really bad for other reasons, so I'll fix this in a follow-up patch. 2. CheckFoldableChainNode needs to be improved to handle the TF. llvm-svn: 97539
* Emit a redundant check for immediates at root context, e.g. (imm 0).Chris Lattner2010-03-011-1/+0
| | | | | | | | This allows formation of OpcodeSwitch for top level patterns, in particular on X86. This saves about 1K of data space in the x86 table and makes the dispatch much more efficient. llvm-svn: 97440
* eliminate the CheckMultiOpcodeMatcher code and have each Chris Lattner2010-03-011-28/+1
| | | | | | | | | ComplexPattern at the root be generated multiple times, once for each opcode they are part of. This encourages factoring because the opcode checks get treated just like everything else in the matcher. llvm-svn: 97439
* add a new OPC_SwitchOpcode which is semantically equivalentChris Lattner2010-03-011-3/+29
| | | | | | | | | | | | to a scope where every child starts with a CheckOpcode, but executes more efficiently. Enhance DAGISelMatcherOpt to form it. This also fixes a bug in CheckOpcode: apparently the SDNodeInfo objects are not pointer comparable, we have to compare the enum name. llvm-svn: 97438
* enhance RecordNode and RecordChild comments to indicate whatChris Lattner2010-03-011-5/+17
| | | | | | slot they're recording into, no functionality change. llvm-svn: 97433
* inline the node transforms and node predicates into the generatedChris Lattner2010-03-011-1/+2
| | | | | | | | dispatcher method. This eliminates the dependence of the new isel's generated code on the old isel's predicates, however some random hand written isel code still uses them. llvm-svn: 97431
* simplify some code now that chain/flag results are not stored in Chris Lattner2010-02-281-9/+0
| | | | | | the vtlist for emitnode. llvm-svn: 97429
* enhance the EmitNode/MorphNodeTo operands to take a bit thatChris Lattner2010-02-281-9/+15
| | | | | | | | specifies whether there is an output flag or not. Use this instead of redundantly encoding the chain/flag results in the output vtlist. llvm-svn: 97419
* use MorphNodeTo instead of SelectNodeTo. SelectNodeToChris Lattner2010-02-281-12/+12
| | | | | | is just a silly wrapper around MorphNodeTo. llvm-svn: 97416
* enhance the new isel to use SelectNodeTo for most patterns,Chris Lattner2010-02-281-3/+16
| | | | | | | | | even some the old isel didn't. There are several parts of this that make me feel dirty, but it's no worse than the old isel. I'll clean up the parts I can do without ripping out the old one next. llvm-svn: 97415
* enhance EmitNodeMatcher to keep track of the recorded slot numbersChris Lattner2010-02-281-5/+6
| | | | | | it will populate. llvm-svn: 97363
* add infrastructure to support forming selectnodeto. Not used yetChris Lattner2010-02-281-11/+53
| | | | | | because I have to go on another detour first. llvm-svn: 97362
* change CheckOpcodeMatcher to hold the SDNodeInfo instead ofChris Lattner2010-02-271-11/+12
| | | | | | the opcode name. This gives the optimizer more semantic info. llvm-svn: 97346
* teach the optimizer that opcode == ISD::STORE is contradictoryChris Lattner2010-02-271-0/+1
| | | | | | | | with getType() == MVT::i32 etc. Teach it that two different integer constants are contradictory. This cuts 1K off the X86 table, down to 98k llvm-svn: 97314
* Teach the grouper some simple tricks about looking contradictoryChris Lattner2010-02-271-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | predicates. For example if we have: Scope: CheckType i32 ABC CheckType f32 DEF CheckType i32 GHI Then we know that we can transform this into: Scope: CheckType i32 Scope ABC GHI CheckType f32 DEF This reorders the check for the 'GHI' predicate above the check for the 'DEF' predidate. However it is safe to do this in this situation because we know that a node cannot have both an i32 and f32 type. We're now doing more factoring that the old isel did. llvm-svn: 97312
* implement a new optimization to sink pattern predicates (like isSSE1) Chris Lattner2010-02-271-0/+49
| | | | | | | | | as deeply into the pattern as we can get away with. In pratice, this means "all the way to to the emitter code, but not across ComplexPatterns". This substantially increases the amount of factoring we get. llvm-svn: 97305
* fix same bug in CheckChainCompatibleMatcher::isEqualImplChris Lattner2010-02-261-1/+1
| | | | llvm-svn: 97217
* fix a nasty bug in CheckTypeMatcher::isEqualImplChris Lattner2010-02-261-1/+1
| | | | llvm-svn: 97216
* add a new setNumChildren method for resizing scopes. Tweak getHash() soChris Lattner2010-02-261-1/+11
| | | | | | | that we never return a tombstone value, which (thankfully) triggers an assert in densemap. llvm-svn: 97214
OpenPOWER on IntegriCloud