summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Use deque<T> rather than vector<T*> since it provides the same invalidation ↵David Blaikie2014-11-293-47/+38
| | | | | | | | | | | | | | | semantics (at least when removal is not needed) without the extra indirection/ownership complexity Order matters for this container, it seems (using a forward_list and replacing the original push_backs with emplace_fronts caused test failures). I didn't look too deeply into why. (& in retrospect, I might go back & change some of the forward_lists I introduced to deques anyway - since most don't require removal, deque is a more memory-friendly data structure (moderate locality while not invalidating pointers)) llvm-svn: 222950
* Constify some things in preparation for CodeGenSubRegIndex to be stored by ↵David Blaikie2014-11-293-86/+87
| | | | | | value in their container, removing the indirection llvm-svn: 222949
* Revert "Simplify some more ownership using forward_list<T> rather than ↵Duncan P. N. Exon Smith2014-11-281-66/+82
| | | | | | | | | | | | vector<unique_ptr<T>>" This reverts commit r222935 and its follow-up r222938 ("Push unique_ptr a bit further through some APIs and simplify some cleanup"), since it causes bot failures (at least on Darwin): http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1391/ llvm-svn: 222943
* Reapply "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>""David Blaikie2014-11-281-16/+14
| | | | | | | | | Just avoid using std::map::emplace since it's not implemented in libstdc++ 4.7. Reapplies r222937, reverted in r222939. llvm-svn: 222940
* Revert "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>"David Blaikie2014-11-281-15/+16
| | | | | | | | | Seems libstdc++ on some buildbots is lacking std::map::emplace, which is weird... reverting while I look into it. This reverts commit r222937. llvm-svn: 222939
* Push unique_ptr a bit further through some APIs and simplify some cleanupDavid Blaikie2014-11-281-18/+13
| | | | llvm-svn: 222938
* Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>David Blaikie2014-11-281-16/+15
| | | | | | | | | | | Pointers and references to map elements are never invalidated (except on removal, which isn't used here) so there's no need for the indirection unless there's polymorphism at work. A little const correctness had to be fixed, since the indirection allowed some benign const violations. llvm-svn: 222937
* Revert "Masked Vector Load and Store Intrinsics."Duncan P. N. Exon Smith2014-11-282-11/+2
| | | | | | | | | | | This reverts commit r222632 (and follow-up r222636), which caused a host of LNT failures on an internal bot. I'll respond to the commit on the list with a reproduction of one of the failures. Conflicts: lib/Target/X86/X86TargetTransformInfo.cpp llvm-svn: 222936
* Simplify some more ownership using forward_list<T> rather than ↵David Blaikie2014-11-281-65/+54
| | | | | | vector<unique_ptr<T>> llvm-svn: 222935
* Forgotten formatting from previous commitDavid Blaikie2014-11-281-2/+2
| | | | llvm-svn: 222934
* Simplify ownership by using forward_list<T> rather than vector<unique_ptr<T>>David Blaikie2014-11-281-42/+42
| | | | | | | | Since the elements were not polymorphic, the unique_ptr was only used to avoid pointer invalidation on container resizes - might as well skip the indirection and use a container with suitable invalidation semantics. llvm-svn: 222931
* Fix a few memory leaks in CodeGenRegBank.Craig Topper2014-11-282-0/+7
| | | | llvm-svn: 222930
* Use unique_ptr to simplify deletion.Craig Topper2014-11-282-7/+5
| | | | llvm-svn: 222929
* Fix another memory leak in TableGen AsmMatcher by deleting CodeGenInstAliases.Craig Topper2014-11-281-0/+5
| | | | llvm-svn: 222912
* Use unique_ptr to fix some memory leaks in Tablegen AsmMatcherEmitter.Craig Topper2014-11-281-37/+44
| | | | llvm-svn: 222909
* Use range-based for loops and const-correct a few things.Craig Topper2014-11-281-59/+40
| | | | llvm-svn: 222908
* Add a small "usage:" comment at the top of not.cppSean Silva2014-11-261-0/+5
| | | | | | Mostly pulled from Rafael's r185678 commit message. llvm-svn: 222855
* Remove neverHasSideEffects support from TableGen CodeGenInstruction. ↵Craig Topper2014-11-263-12/+0
| | | | | | Everyone should use hasSideEffects now. llvm-svn: 222809
* Remove unncessary check for Int_* and *_Int in AsmMatcherEmitter. These are ↵Craig Topper2014-11-251-7/+0
| | | | | | all marked isCodeGenOnly these days. llvm-svn: 222783
* Use range-based for loops.Craig Topper2014-11-252-131/+90
| | | | llvm-svn: 222782
* Remove dead code.Craig Topper2014-11-253-7/+3
| | | | llvm-svn: 222781
* Remove unused MaxSize variable.Craig Topper2014-11-251-7/+0
| | | | llvm-svn: 222780
* Move a vector instead of copying it.Craig Topper2014-11-251-2/+2
| | | | llvm-svn: 222779
* Replace a comment that says 'unreachable' with llvm_unreachable in TableGen ↵Craig Topper2014-11-241-1/+1
| | | | | | AsmWriter output. llvm-svn: 222650
* Detect best type for some static index tables instead of just using uint32_t ↵Craig Topper2014-11-241-15/+24
| | | | | | to reduce total data size. llvm-svn: 222643
* Tablegen output formatting fixes.Craig Topper2014-11-231-2/+4
| | | | llvm-svn: 222633
* Masked Vector Load and Store Intrinsics.Elena Demikhovsky2014-11-232-2/+11
| | | | | | | | | | | | | | Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer asks the target about availability of masked vector loads and stores. Added SDNodes for masked operations and lowering patterns for X86 code generator. Examples: <16 x i32> @llvm.masked.load.v16i32(i8* %addr, <16 x i32> %passthru, i32 4 /* align */, <16 x i1> %mask) declare void @llvm.masked.store.v8f64(i8* %addr, <8 x double> %value, i32 4, <8 x i1> %mask) Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch. http://reviews.llvm.org/D6191 llvm-svn: 222632
* Reduce size of some tables in tablegen register info output.Craig Topper2014-11-222-50/+54
| | | | | | Primarily done by using SequenceToOffsetTable to reduce the register pressure set tables and then sizing the indices into the tables appropriately. Size a few other table entries based on content as well. Reduces X86RegisterInfo.o by ~9k. llvm-svn: 222621
* Add extra new line and remove some trailing whitespace from tablegen ↵Craig Topper2014-11-211-5/+5
| | | | | | RegisterInfo output file. llvm-svn: 222508
* Remove unnecessary extra spaces from tablegen register info output.Craig Topper2014-11-201-1/+1
| | | | llvm-svn: 222411
* Use array_lengthof instead of sizeof(array)/sizeof(element) in a tablegen ↵Craig Topper2014-11-201-5/+4
| | | | | | output. llvm-svn: 222410
* Update SetVector to rely on the underlying set's insert to return a ↵David Blaikie2014-11-192-4/+4
| | | | | | | | | | | | | pair<iterator, bool> This is to be consistent with StringSet and ultimately with the standard library's associative container insert function. This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions... llvm-svn: 222334
* Remove StringMap::GetOrCreateValue in favor of StringMap::insertDavid Blaikie2014-11-191-3/+6
| | | | | | | | | | | | | | Having two ways to do this doesn't seem terribly helpful and consistently using the insert version (which we already has) seems like it'll make the code easier to understand to anyone working with standard data structures. (I also updated many references to the Entry's key and value to use first() and second instead of getKey{Data,Length,} and get/setValue - for similar consistency) Also removes the GetOrCreateValue functions so there's less surface area to StringMap to fix/improve/change/accommodate move semantics, etc. llvm-svn: 222319
* Teach llvm-build to avoid touching LibraryDependencies.inc unless the contentsPeter Collingbourne2014-11-191-1/+10
| | | | | | change. This saves us from rebuilding llvm-config each time we reconfigure. llvm-svn: 222308
* Make StringSet::insert return pair<iterator, bool> like other ↵David Blaikie2014-11-192-2/+2
| | | | | | | | | | | | self-associative containers StringSet is still a bit dodgy in that it exposes the raw iterator of the StringMap parent, which exposes the weird detail that StringSet actually has a 'value'... but anyway, this is useful for a handful of clients that want to reference the newly inserted/persistent string data in the StringSet/Map/Entry/thing. llvm-svn: 222302
* Revert "Improve memory ownership/management in TableGen by unique_ptrifying ↵David Blaikie2014-11-172-55/+47
| | | | | | | | | | | | TreePattern's Tree member." This reverts commit r222183. Broke on the MSVC buildbots due to MSVC not producing default move operations - I'd fix it immediately but just broke my build system a bit, so backing out until I have a chance to get everything going again. llvm-svn: 222187
* Improve memory ownership/management in TableGen by unique_ptrifying ↵David Blaikie2014-11-172-47/+55
| | | | | | | | | | | | TreePattern's Tree member. The next step is to actually use unique_ptr in TreePatternNode's Children vector. That will be more intrusive, and may not work, depending on exactly how these things are handled (I have a bad suspicion things are shared more than they should be, making this more DAG than tree - but if it's really a tree, unique_ptr should suffice) llvm-svn: 222183
* Move register class name strings to a single array in MCRegisterInfo to ↵Craig Topper2014-11-171-2/+14
| | | | | | | | reduce static table size and number of relocation entries. Indices into the table are stored in each MCRegisterClass instead of a pointer. A new method, getRegClassName, is added to MCRegisterInfo and TargetRegisterInfo to lookup the string in the table. llvm-svn: 222118
* Turn a leaked object into a stack variable instead.David Blaikie2014-11-141-19/+19
| | | | llvm-svn: 222046
* Change order of tablegen generated fast-isel instruction code to beBill Schmidt2014-11-141-105/+101
| | | | | | | | | | | | | | | | | | | | | based on instruction complexity The order that tablegen fast-isel instruction code is generated is currently based on the text of the predicate (using string less-than). This patch changes this to instead use the instruction complexity. Because the complexities are not unique a C++ multimap is used instead of a map. This fixes the problem where code with no predicate always comes out first (the empty string always compares as less than all other strings) thus making the code with predicates dead code. See the FMUL code in PPCFastISel.cpp for an example. It also more closely matches the normal codegen ordering. Some error checking in the tablegen fast-isel code is fixed as well. Patch by Bill Seurer. llvm-svn: 222038
* Fix nested namespace with decltype to hopefully work with MSVCDavid Blaikie2014-11-131-1/+2
| | | | | | | | | | Build failed here: http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/14629/steps/build_Lld/logs/stdio So I'm taking a shot in the dark that MSVC (whatever version that is) can't cope with nested name specifiers with a decltype prefix. llvm-svn: 221931
* Use unique_ptr to handle ownership of TreePatterns in ↵David Blaikie2014-11-133-23/+16
| | | | | | | | | CodeGenDAGPatterns::PatternFragments We might be able to use unique_ptr to handle ownership of the TreePatternNodes too - looking into that next. llvm-svn: 221928
* Make TreePattern::error use TwineMatt Arsenault2014-11-112-2/+2
| | | | | | | The underlying error function already uses a Twine, and most of the uses build up strings. llvm-svn: 221740
* MCAsmParserExtension has a copy of the MCAsmParser. Use it.Rafael Espindola2014-11-111-1/+1
| | | | | | Base classes were storing a second copy. llvm-svn: 221667
* Use findProgramByName.Michael J. Spencer2014-11-041-2/+7
| | | | llvm-svn: 221221
* Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.pyRafael Espindola2014-11-031-1/+1
| | | | | | | | Currently they are passed to tests of llvm itself, but not, for example, lld. With this patch the options are visible in every test. llvm-svn: 221198
* refactor duplicated code. NFC.Rafael Espindola2014-11-031-5/+5
| | | | llvm-svn: 221191
* [lit] Forward LD_PRELOAD to tests.Rafael Espindola2014-11-031-0/+1
| | | | | | | With this patch I can use asan to test the gold plugin without having to build gold itself with asan. llvm-svn: 221183
* Support REG_SEQUENCE in tablegen.Matt Arsenault2014-11-022-11/+63
| | | | | | | | | The problem is mostly that variadic output instruction aren't handled, so it is rejected for having an inconsistent number of operands, and then the right number of operands isn't emitted. llvm-svn: 221117
* Fix typoMatt Arsenault2014-11-021-1/+1
| | | | llvm-svn: 221116
OpenPOWER on IntegriCloud