8c209aa877 
								
							 
						 
						
							
							
								
								Cleanup dump() functions.  
							
							... 
							
							
							
							We had various variants of defining dump() functions in LLVM. Normalize
them (this should just consistently implement the things discussed in
http://lists.llvm.org/pipermail/cfe-dev/2014-January/034323.html 
For reference:
- Public headers should just declare the dump() method but not use
  LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
- The definition of a dump method should look like this:
  #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
  LLVM_DUMP_METHOD void MyClass::dump() {
    // print stuff to dbgs()...
  }
  #endif
llvm-svn: 293359 
							
						 
						
							2017-01-28 02:02:38 +00:00  
				
					
						
							
							
								 
						
							
								215ff84b40 
								
							 
						 
						
							
							
								
								TableGen: Some more std::string->StringInit* replacements  
							
							... 
							
							
							
							llvm-svn: 288653 
							
						 
						
							2016-12-05 07:35:13 +00:00  
				
					
						
							
							
								 
						
							
								99f8937029 
								
							 
						 
						
							
							
								
								TableGen: TableGenStringKey is no longer necessary as of r288642  
							
							... 
							
							
							
							llvm-svn: 288651 
							
						 
						
							2016-12-05 07:04:19 +00:00  
				
					
						
							
							
								 
						
							
								ca151317e8 
								
							 
						 
						
							
							
								
								TableGen: Use range based for; reserve vectors where possible  
							
							... 
							
							
							
							llvm-svn: 288650 
							
						 
						
							2016-12-05 07:00:44 +00:00  
				
					
						
							
							
								 
						
							
								1ddb78cd5f 
								
							 
						 
						
							
							
								
								TableGen/Record: Replace std::vector with SmallVector/ArrayRef  
							
							... 
							
							
							
							llvm-svn: 288648 
							
						 
						
							2016-12-05 06:41:51 +00:00  
				
					
						
							
							
								 
						
							
								dbe6e7de9e 
								
							 
						 
						
							
							
								
								ListInit::convertInitializerTo: avoid foldingset lookup if nothing changed  
							
							... 
							
							
							
							llvm-svn: 288647 
							
						 
						
							2016-12-05 06:41:47 +00:00  
				
					
						
							
							
								 
						
							
								bb05316441 
								
							 
						 
						
							
							
								
								TableGen: Use StringInit instead of std::string for DagInit arg names  
							
							... 
							
							
							
							llvm-svn: 288644 
							
						 
						
							2016-12-05 06:00:46 +00:00  
				
					
						
							
							
								 
						
							
								7cf3b11224 
								
							 
						 
						
							
							
								
								TableGen: Use StringInit instead of std::string for DagInit name  
							
							... 
							
							
							
							llvm-svn: 288643 
							
						 
						
							2016-12-05 06:00:41 +00:00  
				
					
						
							
							
								 
						
							
								6a441839a6 
								
							 
						 
						
							
							
								
								TableGen: Use more StringInit instead of StringRef  
							
							... 
							
							
							
							This forces the code to call StringInit::get on the string early and
avoids storing duplicates in std::string and sometimes allows pointer
comparisons instead of string comparisons.
llvm-svn: 288642 
							
						 
						
							2016-12-05 06:00:36 +00:00  
				
					
						
							
							
								 
						
							
								6e074de48e 
								
							 
						 
						
							
							
								
								TableGen: Factor out STRCONCAT constructor, add shortcut.  
							
							... 
							
							
							
							Introduce new constructor for STRCONCAT binop with a shortcut that
immediately concatenates if the two arguments are StringInits.
Makes the QualifyName code more readable and tablegen 2-3% faster.
llvm-svn: 288639 
							
						 
						
							2016-12-05 05:21:18 +00:00  
				
					
						
							
							
								 
						
							
								b1627ff0c8 
								
							 
						 
						
							
							
								
								TableGen/Record: Move PointerIntPair to less used field of RecordVal  
							
							... 
							
							
							
							llvm-svn: 288638 
							
						 
						
							2016-12-05 05:21:13 +00:00  
				
					
						
							
							
								 
						
							
								d0edb0dfa7 
								
							 
						 
						
							
							
								
								TableGen: Store Records on a BumpPtrAllocator  
							
							... 
							
							
							
							All these records are internalized and will live until exit.  This makes
them perfect candidates for a fast BumpPtrAllocator.
llvm-svn: 288613 
							
						 
						
							2016-12-04 05:48:20 +00:00  
				
					
						
							
							
								 
						
							
								4a86d456d3 
								
							 
						 
						
							
							
								
								TableGen: Use StringRef instead of const std::string& in return vals.  
							
							... 
							
							
							
							This will allow to switch to a different string storage in an upcoming
commit.
llvm-svn: 288612 
							
						 
						
							2016-12-04 05:48:16 +00:00  
				
					
						
							
							
								 
						
							
								84bac184ea 
								
							 
						 
						
							
							
								
								TableGen: Optimize common string concatenation with SmallString  
							
							... 
							
							
							
							llvm-svn: 288611 
							
						 
						
							2016-12-04 05:48:06 +00:00  
				
					
						
							
							
								 
						
							
								5ce9057666 
								
							 
						 
						
							
							
								
								TableGen: Use StringRef instead of const std::string& for parameters  
							
							... 
							
							
							
							This avoid an extra construction of a std::string (and a heap
allocation) when the caller only has a StringRef but no std::string at
hand.
llvm-svn: 288610 
							
						 
						
							2016-12-04 05:48:03 +00:00  
				
					
						
							
							
								 
						
							
								1c8d933881 
								
							 
						 
						
							
							
								
								TableGen: Add operator !or  
							
							... 
							
							
							
							llvm-svn: 286936 
							
						 
						
							2016-11-15 06:49:28 +00:00  
				
					
						
							
							
								 
						
							
								33d7b762d0 
								
							 
						 
						
							
							
								
								Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes.  
							
							... 
							
							
							
							Differential revision: https://reviews.llvm.org/D23789 
llvm-svn: 279535 
							
						 
						
							2016-08-23 17:14:32 +00:00  
				
					
						
							
							
								 
						
							
								6b943e33e6 
								
							 
						 
						
							
							
								
								[TableGen] Autobrief-ize Record. NFC.  
							
							... 
							
							
							
							llvm-svn: 275425 
							
						 
						
							2016-07-14 14:53:14 +00:00  
				
					
						
							
							
								 
						
							
								e8405ad5d0 
								
							 
						 
						
							
							
								
								[TableGen] Cleanup Record comments. NFC.  
							
							... 
							
							
							
							LLVM doesn't use exceptions anymore.
Also remove the implementation comments. Some of them diverged.
llvm-svn: 275424 
							
						 
						
							2016-07-14 14:53:11 +00:00  
				
					
						
							
							
								 
						
							
								88403d7a84 
								
							 
						 
						
							
							
								
								TableGen: promote "code" type from syntactic sugar.  
							
							... 
							
							
							
							It's being immediately converted to a "string", but being able to tell what
type the field was originally can be useful in backends.
llvm-svn: 274575 
							
						 
						
							2016-07-05 21:22:55 +00:00  
				
					
						
							
							
								 
						
							
								46e38f3678 
								
							 
						 
						
							
							
								
								Avoid copies of std::strings and APInt/APFloats where we only read from it  
							
							... 
							
							
							
							As suggested by clang-tidy's performance-unnecessary-copy-initialization.
This can easily hit lifetime issues, so I audited every change and ran the
tests under asan, which came back clean.
llvm-svn: 272126 
							
						 
						
							2016-06-08 10:01:20 +00:00  
				
					
						
							
							
								 
						
							
								eb2a25467e 
								
							 
						 
						
							
							
								
								Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.  
							
							... 
							
							
							
							clang part in r259232, this is the LLVM part of the patch.
llvm-svn: 259240 
							
						 
						
							2016-01-29 20:50:44 +00:00  
				
					
						
							
							
								 
						
							
								5e46adb09a 
								
							 
						 
						
							
							
								
								[TableGen] Use FoldingSets instead of DenseMaps to unique UnOpInit, BinOpInit and TernOpInit. This remove the memory needed to store the key for the DenseMap. NFC  
							
							... 
							
							
							
							llvm-svn: 258071 
							
						 
						
							2016-01-18 20:36:06 +00:00  
				
					
						
							
							
								 
						
							
								7dcb1a5c89 
								
							 
						 
						
							
							
								
								[TableGen] Fix an assert I missed in r258063.  
							
							... 
							
							
							
							llvm-svn: 258068 
							
						 
						
							2016-01-18 19:59:05 +00:00  
				
					
						
							
							
								 
						
							
								0e41d0b963 
								
							 
						 
						
							
							
								
								[TableGen] Merge the SuperClass Record and SMRange vector into a single vector. This removes the state needed to manage the extra vector thus reducing the size of the Record class. NFC  
							
							... 
							
							
							
							llvm-svn: 258065 
							
						 
						
							2016-01-18 19:52:37 +00:00  
				
					
						
							
							
								 
						
							
								fbfd578056 
								
							 
						 
						
							
							
								
								[TableGen] Allocate the Init pointer array for BitsInit/ListInit after the BitsInit/ListInit object itself. Saves a bit of memory. NFC  
							
							... 
							
							
							
							llvm-svn: 258063 
							
						 
						
							2016-01-18 19:52:24 +00:00  
				
					
						
							
							
								 
						
							
								5a6dda5376 
								
							 
						 
						
							
							
								
								[TableGen] Use some free space in Init to store the opcode for UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC  
							
							... 
							
							
							
							llvm-svn: 256733 
							
						 
						
							2016-01-04 06:28:49 +00:00  
				
					
						
							
							
								 
						
							
								7ecf8c22cf 
								
							 
						 
						
							
							
								
								[TblGen] ArrayRefize TGParser. No functional change intended.  
							
							... 
							
							
							
							llvm-svn: 251186 
							
						 
						
							2015-10-24 12:46:45 +00:00  
				
					
						
							
							
								 
						
							
								a7bc7db53c 
								
							 
						 
						
							
							
								
								TableGen: Support folding casts from bits to int  
							
							... 
							
							
							
							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 
							
						 
						
							2015-07-31 01:12:06 +00:00  
				
					
						
							
							
								 
						
							
								d26d2d9a50 
								
							 
						 
						
							
							
								
								[TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC  
							
							... 
							
							
							
							llvm-svn: 241430 
							
						 
						
							2015-07-06 06:23:01 +00:00  
				
					
						
							
							
								 
						
							
								a60ee86f60 
								
							 
						 
						
							
							
								
								[TableGen] Restore the use of the TheInit field in Record to cache the Record's DefInit. I broke this when I fixed memory leaks recently. Remove the DenseMap that mapped Record's to DefInit.  
							
							... 
							
							
							
							llvm-svn: 240524 
							
						 
						
							2015-06-24 06:19:19 +00:00  
				
					
						
							
							
								 
						
							
								f4b449cec2 
								
							 
						 
						
							
							
								
								[TableGen] Change OpInit::getNumOperands and getOperand to use unsigned integers. NFC  
							
							... 
							
							
							
							llvm-svn: 239210 
							
						 
						
							2015-06-06 01:34:04 +00:00  
				
					
						
							
							
								 
						
							
								1af1566ce6 
								
							 
						 
						
							
							
								
								[TableGen] Remove trailing whitespace, add space between 'if' and paren, other formatting fixes. NFC  
							
							... 
							
							
							
							llvm-svn: 239209 
							
						 
						
							2015-06-06 01:34:01 +00:00  
				
					
						
							
							
								 
						
							
								5a2dfdcd20 
								
							 
						 
						
							
							
								
								[TableGen] Remove unnecessary temporary. NFC  
							
							... 
							
							
							
							llvm-svn: 239208 
							
						 
						
							2015-06-06 01:34:00 +00:00  
				
					
						
							
							
								 
						
							
								5904beb666 
								
							 
						 
						
							
							
								
								[TableGen] Fold variable declaration/initialization into if condition for a couple short lived variables. NFC  
							
							... 
							
							
							
							llvm-svn: 239207 
							
						 
						
							2015-06-06 01:33:58 +00:00  
				
					
						
							
							
								 
						
							
								daf263de84 
								
							 
						 
						
							
							
								
								[TableGen] Remove unnecessary outer 'if' and merge it's conditions into the inner 'if's. NFC  
							
							... 
							
							
							
							llvm-svn: 239206 
							
						 
						
							2015-06-06 01:33:55 +00:00  
				
					
						
							
							
								 
						
							
								25a849ca02 
								
							 
						 
						
							
							
								
								[TableGen] Fold variable declarations with their assignments. NFC  
							
							... 
							
							
							
							llvm-svn: 239205 
							
						 
						
							2015-06-06 00:44:45 +00:00  
				
					
						
							
							
								 
						
							
								5ec17246a2 
								
							 
						 
						
							
							
								
								[TableGen] Use range-based for loops. NFC  
							
							... 
							
							
							
							llvm-svn: 239022 
							
						 
						
							2015-06-04 07:40:14 +00:00  
				
					
						
							
							
								 
						
							
								b849203c94 
								
							 
						 
						
							
							
								
								[TableGen] Merge single prefix bit in RecordVal into PointerIntPair with Name to reduce memory usage.  
							
							... 
							
							
							
							llvm-svn: 239021 
							
						 
						
							2015-06-04 07:40:12 +00:00  
				
					
						
							
							
								 
						
							
								664f6a0405 
								
							 
						 
						
							
							
								
								[TableGen] Rename ListInit::getSize to just 'size' to be more consistent.  
							
							... 
							
							
							
							llvm-svn: 238806 
							
						 
						
							2015-06-02 04:15:57 +00:00  
				
					
						
							
							
								 
						
							
								ef0578a8cb 
								
							 
						 
						
							
							
								
								[TableGen] Use range-based for loops. NFC.  
							
							... 
							
							
							
							llvm-svn: 238805 
							
						 
						
							2015-06-02 04:15:51 +00:00  
				
					
						
							
							
								 
						
							
								6548196c6f 
								
							 
						 
						
							
							
								
								[TableGen] Move a couple virtual methods out of line so vtable anchors can be removed. NFC  
							
							... 
							
							
							
							llvm-svn: 238727 
							
						 
						
							2015-06-01 06:44:18 +00:00  
				
					
						
							
							
								 
						
							
								15864f1518 
								
							 
						 
						
							
							
								
								[TableGen] Merge RecTy::typeIsConvertibleTo and RecTy::baseClassOf. NFC  
							
							... 
							
							
							
							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 
							
						 
						
							2015-05-30 07:36:01 +00:00  
				
					
						
							
							
								 
						
							
								9581906983 
								
							 
						 
						
							
							
								
								[TableGen] Remove all the variations of RecTy::convertValue and just handle the conversions in convertInitializerTo directly. This saves a bunch of vtable entries. NFC  
							
							... 
							
							
							
							llvm-svn: 238646 
							
						 
						
							2015-05-30 07:34:51 +00:00  
				
					
						
							
							
								 
						
							
								2af5e6fbf9 
								
							 
						 
						
							
							
								
								[TableGen] Remove convertValue functions for UnOpInit, BinOpInit, and 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 
							
						 
						
							2015-05-29 05:51:32 +00:00  
				
					
						
							
							
								 
						
							
								85693aeb43 
								
							 
						 
						
							
							
								
								[TableGen] Use DefInit::getAsString instead of getDef()->getName(). NFC  
							
							... 
							
							
							
							llvm-svn: 238399 
							
						 
						
							2015-05-28 06:38:32 +00:00  
				
					
						
							
							
								 
						
							
								2a8d4b294c 
								
							 
						 
						
							
							
								
								[TableGen] Don't convert types to strings to query what they are. Just use 'isa'  
							
							... 
							
							
							
							llvm-svn: 238398 
							
						 
						
							2015-05-28 06:38:28 +00:00  
				
					
						
							
							
								 
						
							
								259d0c1605 
								
							 
						 
						
							
							
								
								[TableGen] Make some variable names consistent with their type names and just generally consistent across all of the overloads.  
							
							... 
							
							
							
							llvm-svn: 237775 
							
						 
						
							2015-05-20 05:40:13 +00:00  
				
					
						
							
							
								 
						
							
								a74f986aa3 
								
							 
						 
						
							
							
								
								[TableGen] Fix a memory leak.  
							
							... 
							
							
							
							llvm-svn: 237774 
							
						 
						
							2015-05-20 05:40:09 +00:00  
				
					
						
							
							
								 
						
							
								41ce4de0b4 
								
							 
						 
						
							
							
								
								[TableGen] Change 'car' to 'head' and 'cdr' to 'tail' in assert comments. These were the old names for these operations long ago. NFC  
							
							... 
							
							
							
							llvm-svn: 237514 
							
						 
						
							2015-05-16 05:42:13 +00:00