| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 305537
|
|
|
|
|
|
|
|
| |
Record::setName(StringRef). Leave just the versions that take an Init.
They weren't used often enough to justify having two different interfaces. Push the responsiblity of creating a StringInit up to the caller.
llvm-svn: 304388
|
|
|
|
|
|
|
|
|
|
|
|
| |
StringRefs instead of std::string
Internally both these methods just return the result of getValue on either a StringInit or a CodeInit object. In both cases this returns a StringRef pointing to a string allocated in the BumpPtrAllocator so its not going anywhere. So we can just pass that StringRef along.
This is a fairly naive patch that targets just the build failures caused by this change. There's additional work that can be done to avoid creating std::string at call sites that still think getValueAsString returns a std::string. I'll try to clean those up in future patches.
Differential Revision: https://reviews.llvm.org/D33710
llvm-svn: 304325
|
|
|
|
|
|
| |
reduce duplicate code.
llvm-svn: 304280
|
|
|
|
|
|
|
|
| |
and StringInit objects. Override the allocator to keep using the BumpPtrAllocator. NFCI
StringMap is better suited to mapping strings than a DenseMap.
llvm-svn: 304178
|
|
|
|
|
|
| |
fix 80 column violations in arg_begin/arg_end. Remove DagInit::args and use getArgs instead. NFC
llvm-svn: 304177
|
|
|
|
|
|
|
|
|
|
| |
exceed the size of the SmallVector.
DagInits are allocated in a BumpPtrAllocator so they are never destructed. This means the destructor for the SmallVector never runs.
To fix this we now allocate the vectors in the BumpPtrAllocator too using TrailingObjects.
llvm-svn: 304077
|
|
|
|
|
|
| |
These used to hold std::unique_ptrs that managed the allocation for the various *Init object so that they would be deleted on exit. Everything is allocated in a BumpPtrAllocator name so there is no reason for these to still exist.
llvm-svn: 304066
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 288653
|
|
|
|
| |
llvm-svn: 288651
|
|
|
|
| |
llvm-svn: 288650
|
|
|
|
| |
llvm-svn: 288648
|
|
|
|
| |
llvm-svn: 288647
|
|
|
|
| |
llvm-svn: 288644
|
|
|
|
| |
llvm-svn: 288643
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 288638
|
|
|
|
|
|
|
| |
All these records are internalized and will live until exit. This makes
them perfect candidates for a fast BumpPtrAllocator.
llvm-svn: 288613
|
|
|
|
|
|
|
| |
This will allow to switch to a different string storage in an upcoming
commit.
llvm-svn: 288612
|
|
|
|
| |
llvm-svn: 288611
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 286936
|
|
|
|
|
|
|
|
| |
other minor fixes.
Differential revision: https://reviews.llvm.org/D23789
llvm-svn: 279535
|
|
|
|
| |
llvm-svn: 275425
|
|
|
|
|
|
|
| |
LLVM doesn't use exceptions anymore.
Also remove the implementation comments. Some of them diverged.
llvm-svn: 275424
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
r259192 post commit comment.
clang part in r259232, this is the LLVM part of the patch.
llvm-svn: 259240
|
|
|
|
|
|
| |
BinOpInit and TernOpInit. This remove the memory needed to store the key for the DenseMap. NFC
llvm-svn: 258071
|
|
|
|
| |
llvm-svn: 258068
|
|
|
|
|
|
| |
vector. This removes the state needed to manage the extra vector thus reducing the size of the Record class. NFC
llvm-svn: 258065
|
|
|
|
|
|
| |
BitsInit/ListInit object itself. Saves a bit of memory. NFC
llvm-svn: 258063
|
|
|
|
|
|
| |
UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC
llvm-svn: 256733
|
|
|
|
| |
llvm-svn: 251186
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
std::vector reference. NFC
llvm-svn: 241430
|
|
|
|
|
|
| |
Record's DefInit. I broke this when I fixed memory leaks recently. Remove the DenseMap that mapped Record's to DefInit.
llvm-svn: 240524
|
|
|
|
|
|
| |
integers. NFC
llvm-svn: 239210
|
|
|
|
|
|
| |
other formatting fixes. NFC
llvm-svn: 239209
|
|
|
|
| |
llvm-svn: 239208
|
|
|
|
|
|
| |
couple short lived variables. NFC
llvm-svn: 239207
|
|
|
|
|
|
| |
inner 'if's. NFC
llvm-svn: 239206
|
|
|
|
| |
llvm-svn: 239205
|
|
|
|
| |
llvm-svn: 239022
|
|
|
|
|
|
| |
Name to reduce memory usage.
llvm-svn: 239021
|
|
|
|
| |
llvm-svn: 238806
|
|
|
|
| |
llvm-svn: 238805
|
|
|
|
|
|
| |
be removed. NFC
llvm-svn: 238727
|