Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [TblGen] ArrayRefize TGParser. No functional change intended. | Benjamin Kramer | 2015-10-24 | 1 | -1/+1 |
| | | | | llvm-svn: 251186 | ||||
* | TableGen: Support folding casts from bits to int | Matt Arsenault | 2015-07-31 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | This is to fix an incorrect error when trying to initialize DwarfNumbers with a !cast<int> of a bits initializer. getValuesAsListOfInts("DwarfNumbers") would not see an IntInit and instead the cast, so would give up. It seems likely that this could be generalized to attempt the convertInitializerTo for any type. I'm not really sure why the existing code seems to special case the string cast cases when convertInitializerTo seems like it should generally handle this sort of thing. llvm-svn: 243722 | ||||
* | [TableGen] Change a couple methods to return an ArrayRef instead of a const ↵ | Craig Topper | 2015-07-06 | 1 | -1/+1 |
| | | | | | | std::vector reference. NFC llvm-svn: 241430 | ||||
* | [TableGen] Restore the use of the TheInit field in Record to cache the ↵ | Craig Topper | 2015-06-24 | 1 | -7/+3 |
| | | | | | | Record's DefInit. I broke this when I fixed memory leaks recently. Remove the DenseMap that mapped Record's to DefInit. llvm-svn: 240524 | ||||
* | [TableGen] Change OpInit::getNumOperands and getOperand to use unsigned ↵ | Craig Topper | 2015-06-06 | 1 | -2/+2 |
| | | | | | | integers. NFC llvm-svn: 239210 | ||||
* | [TableGen] Remove trailing whitespace, add space between 'if' and paren, ↵ | Craig Topper | 2015-06-06 | 1 | -16/+16 |
| | | | | | | other formatting fixes. NFC llvm-svn: 239209 | ||||
* | [TableGen] Remove unnecessary temporary. NFC | Craig Topper | 2015-06-06 | 1 | -2/+1 |
| | | | | llvm-svn: 239208 | ||||
* | [TableGen] Fold variable declaration/initialization into if condition for a ↵ | Craig Topper | 2015-06-06 | 1 | -8/+6 |
| | | | | | | couple short lived variables. NFC llvm-svn: 239207 | ||||
* | [TableGen] Remove unnecessary outer 'if' and merge it's conditions into the ↵ | Craig Topper | 2015-06-06 | 1 | -42/+41 |
| | | | | | | inner 'if's. NFC llvm-svn: 239206 | ||||
* | [TableGen] Fold variable declarations with their assignments. NFC | Craig Topper | 2015-06-06 | 1 | -4/+2 |
| | | | | llvm-svn: 239205 | ||||
* | [TableGen] Use range-based for loops. NFC | Craig Topper | 2015-06-04 | 1 | -12/+13 |
| | | | | llvm-svn: 239022 | ||||
* | [TableGen] Merge single prefix bit in RecordVal into PointerIntPair with ↵ | Craig Topper | 2015-06-04 | 1 | -5/+5 |
| | | | | | | Name to reduce memory usage. llvm-svn: 239021 | ||||
* | [TableGen] Rename ListInit::getSize to just 'size' to be more consistent. | Craig Topper | 2015-06-02 | 1 | -5/+5 |
| | | | | llvm-svn: 238806 | ||||
* | [TableGen] Use range-based for loops. NFC. | Craig Topper | 2015-06-02 | 1 | -11/+10 |
| | | | | llvm-svn: 238805 | ||||
* | [TableGen] Move a couple virtual methods out of line so vtable anchors can ↵ | Craig Topper | 2015-06-01 | 1 | -3/+7 |
| | | | | | | be removed. NFC llvm-svn: 238727 | ||||
* | [TableGen] Merge RecTy::typeIsConvertibleTo and RecTy::baseClassOf. NFC | Craig Topper | 2015-05-30 | 1 | -16/+14 |
| | | | | | | typeIsConvertibleTo was just calling baseClassOf(this) on the argument passed to it, but there weren't different signatures for baseClassOf so passing 'this' didn't really do anything interesting. typeIsConvertibleTo could have just been a non-virtual method in RecTy. But since that would be kind of a silly method, I instead re-distributed the logic from baseClassOf into typeIsConvertibleTo. llvm-svn: 238648 | ||||
* | [TableGen] Remove all the variations of RecTy::convertValue and just handle ↵ | Craig Topper | 2015-05-30 | 1 | -173/+217 |
| | | | | | | the conversions in convertInitializerTo directly. This saves a bunch of vtable entries. NFC llvm-svn: 238646 | ||||
* | [TableGen] Remove convertValue functions for UnOpInit, BinOpInit, and ↵ | Craig Topper | 2015-05-29 | 1 | -48/+0 |
| | | | | | | | | TernOpInit as they weren't able to be called. I don't think converting the inputs to the Ops was the right behavior anyway. llvm-svn: 238543 | ||||
* | [TableGen] Use DefInit::getAsString instead of getDef()->getName(). NFC | Craig Topper | 2015-05-28 | 1 | -1/+1 |
| | | | | llvm-svn: 238399 | ||||
* | [TableGen] Don't convert types to strings to query what they are. Just use 'isa' | Craig Topper | 2015-05-28 | 1 | -2/+2 |
| | | | | llvm-svn: 238398 | ||||
* | [TableGen] Make some variable names consistent with their type names and ↵ | Craig Topper | 2015-05-20 | 1 | -23/+23 |
| | | | | | | just generally consistent across all of the overloads. llvm-svn: 237775 | ||||
* | [TableGen] Fix a memory leak. | Craig Topper | 2015-05-20 | 1 | -2/+2 |
| | | | | llvm-svn: 237774 | ||||
* | [TableGen] Change 'car' to 'head' and 'cdr' to 'tail' in assert comments. ↵ | Craig Topper | 2015-05-16 | 1 | -2/+2 |
| | | | | | | These were the old names for these operations long ago. NFC llvm-svn: 237514 | ||||
* | [TableGen] Remove !! that I can't really explain why I wrote. Also remove ↵ | Craig Topper | 2015-05-16 | 1 | -6/+4 |
| | | | | | | some unnecessary curly braces from the same area. llvm-svn: 237513 | ||||
* | [TableGen] Restructure a loop to make it exit early instead of skipping a ↵ | Craig Topper | 2015-05-16 | 1 | -5/+6 |
| | | | | | | portion of the body based on what will also be the terminating condition. NFC llvm-svn: 237511 | ||||
* | TableGen: Avoid undefined behaviour by doing this shift in int64 | Justin Bogner | 2015-05-14 | 1 | -1/+1 |
| | | | | | | | | Found by ubsan. This was taking a bool and left shifting by 32 - the result is 64 bit, so we should really do the math in a type it fits in. llvm-svn: 237345 | ||||
* | [TableGen] Remove an unnecessary outer 'if' around 3 separate inner ifs. No ↵ | Craig Topper | 2015-05-14 | 1 | -29/+25 |
| | | | | | | | | functional change intended. The outer if had 3 separate conditions ORed together and then the inner ifs detected which of the three conditions it was by using only a portion of the specific condition. Just put the whole condition in each inner if and remove the outer if. llvm-svn: 237343 | ||||
* | [TableGen] Simplify some code. NFC | Craig Topper | 2015-05-14 | 1 | -9/+4 |
| | | | | llvm-svn: 237342 | ||||
* | [TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() ↵ | Craig Topper | 2015-05-14 | 1 | -3/+3 |
| | | | | | | if it was just comparing to 0. NFC. llvm-svn: 237340 | ||||
* | Use ArrayRef::slice instead of manually constructing an ArrayRef from ↵ | Craig Topper | 2015-05-13 | 1 | -6/+1 |
| | | | | | | ArrayRef iterators. NFC llvm-svn: 237231 | ||||
* | Remove unnecessary variables by folding calls into for loop header. NFC. | Craig Topper | 2015-05-12 | 1 | -4/+2 |
| | | | | llvm-svn: 237090 | ||||
* | [TableGen] Replace 'static_cast' with 'cast'. | Craig Topper | 2015-05-04 | 1 | -1/+1 |
| | | | | llvm-svn: 236398 | ||||
* | [TableGen] Formatting cleanup. Mostly removing trailing whitespace and ↵ | Craig Topper | 2015-05-04 | 1 | -68/+41 |
| | | | | | | unnecessary curly braces. NFC llvm-svn: 236397 | ||||
* | [TableGen] Cleanup formatting by moving operators from beginning of line to ↵ | Craig Topper | 2015-04-30 | 1 | -14/+13 |
| | | | | | | end of previous line. NFC llvm-svn: 236206 | ||||
* | [TableGen] Used range-based for loop. NFC. | Craig Topper | 2015-04-30 | 1 | -6/+2 |
| | | | | llvm-svn: 236205 | ||||
* | [TableGen] Merge a variable assignment and a return to drop curly braces. ↵ | Craig Topper | 2015-04-30 | 1 | -13/+7 |
| | | | | | | Fold an assignment into an if. Use auto on the result of a couple dyn_casts. NFC llvm-svn: 236204 | ||||
* | [TableGen] Use range-based for loops. NFC. | Craig Topper | 2015-04-29 | 1 | -23/+9 |
| | | | | llvm-svn: 236089 | ||||
* | [TableGen] Fold a couple dyn_casts into the ifs that check their results. NFC | Craig Topper | 2015-04-29 | 1 | -11/+8 |
| | | | | llvm-svn: 236088 | ||||
* | [TableGen] Replace some dyn_casts followed by an assert with just a regular ↵ | Craig Topper | 2015-04-29 | 1 | -23/+10 |
| | | | | | | cast which asserts internally. NFC llvm-svn: 236087 | ||||
* | [TableGen] Fix all remaining memory leaks of Init and RecTy objects. | Craig Topper | 2015-04-24 | 1 | -34/+33 |
| | | | | llvm-svn: 235696 | ||||
* | [TableGen] Use range based for loops. | Craig Topper | 2015-04-22 | 1 | -14/+4 |
| | | | | llvm-svn: 235482 | ||||
* | [TableGen] Remove some deletes that violate ownership semantics. These don't ↵ | Craig Topper | 2015-04-22 | 1 | -10/+2 |
| | | | | | | seem to execute in our codebase today and date back to a time when there was an allocation in this function. llvm-svn: 235481 | ||||
* | [TableGen] Make BitRecTy::baseClassOf return true when RHS is an IntRecTy. | Craig Topper | 2015-04-22 | 1 | -1/+1 |
| | | | | | | Previously the code was accidentally checking if 'this' was an IntRecTy which it can't be since 'this' is a BitRecTy. Looking back at the history it appears it was intended to check RHS. llvm-svn: 235477 | ||||
* | Don't use 'nullptr' in comment. Just use 'null'. | Craig Topper | 2015-04-22 | 1 | -1/+1 |
| | | | | llvm-svn: 235476 | ||||
* | Revert "[TableGen] Use cast instead of dyn_cast where result isn't checked ↵ | Craig Topper | 2015-04-22 | 1 | -1/+1 |
| | | | | | | | | before being dereferenced." Turns out I misread the parentheses. Though I'm pretty sure its always a RecordRecTy and non of the callers really seem to expect null. But until I'm completely sure I'm going to revert this. llvm-svn: 235469 | ||||
* | Fix stale comment that mentioned 0 instead of nullptr. NFC. | Craig Topper | 2015-04-22 | 1 | -1/+1 |
| | | | | llvm-svn: 235468 | ||||
* | [TableGen] Remove Pool helper class and just use unique_ptr in the maps. | Craig Topper | 2015-04-22 | 1 | -41/+24 |
| | | | | llvm-svn: 235467 | ||||
* | [TableGen] Use StringRecTy::get() instead of allocating (and leaking) a ↵ | Craig Topper | 2015-04-22 | 1 | -2/+2 |
| | | | | | | StringRecTy object. llvm-svn: 235466 | ||||
* | [TableGen] Use 'isa' to identify UnsetInits rather than comparing with the ↵ | Craig Topper | 2015-04-22 | 1 | -2/+2 |
| | | | | | | singleton object created by UnsetInit::get(). Makes it more consistent with the other types. llvm-svn: 235465 | ||||
* | [TableGen] Use cast instead of dyn_cast where result isn't checked before ↵ | Craig Topper | 2015-04-22 | 1 | -1/+1 |
| | | | | | | being dereferenced. llvm-svn: 235463 |