summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Header cleanupMehdi Amini2016-04-18360-546/+197
| | | | | | | | | | | | | | Removed some unused headers, replaced some headers with forward class declarations. Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap' Patch by Eugene Kosov <claprix@yandex.ru> Differential Revision: http://reviews.llvm.org/D19219 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
* [Orc] Tweak some of the new RPC code to silence a warning (extraneous ';') andLang Hames2016-04-181-4/+4
| | | | | | MSVC errors related to constexpr. llvm-svn: 266588
* BitcodeWriter: WorkList => Worklist, NFCDuncan P. N. Exon Smith2016-04-181-5/+5
| | | | | | | | I have no idea how I chose two different spellings in the space of a couple of weeks, but now I can't remember what to use where. Choose "Worklist". llvm-svn: 266582
* [ORC] Generalize the ORC RPC utils to support RPC function return values andLang Hames2016-04-1812-460/+877
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asynchronous call/handle. Also updates the ORC remote JIT API to use the new scheme. The previous version of the RPC tools only supported void functions, and required the user to manually call a paired function to return results. This patch replaces the Procedure typedef (which only supported void functions) with the Function typedef which supports return values, e.g.: Function<FooId, int32_t(std::string)> Foo; The RPC primitives and channel operations are also expanded. RPC channels must support four new operations: startSendMessage, endSendMessage, startRecieveMessage and endRecieveMessage, to handle channel locking. In addition, serialization support for tuples to RPCChannels is added to enable multiple return values. The RPC primitives are expanded from callAppend, call, expect and handle, to: appendCallAsync - Make an asynchronous call to the given function. callAsync - The same as appendCallAsync, but calls send on the channel when done. callSTHandling - Blocking call for single-threaded code. Wraps a call to callAsync then waits on the result, using a user-supplied handler to handle any callbacks from the remote. callST - The same as callSTHandling, except that it doesn't handle callbacks - it expects the result to be the first return. expect and handle - as before. handleResponse - Handle a response from the remote. waitForResult - Wait for the response with the given sequence number to arrive. llvm-svn: 266581
* Linker: Share a single Metadata map for the lifetime of IRMoverDuncan P. N. Exon Smith2016-04-172-5/+20
| | | | | | | | | | Cache the result of mapping metadata nodes between instances of IRLinker (i.e., for the lifetime of IRMover). There shouldn't be any real functional change here, but this should give a major speedup. I had loaned this to Mehdi when he tested performance of r266446, and the two patches together gave a 10x speedup in metadata mapping. llvm-svn: 266579
* [X86] Be explicit about calls to setOperationAction for AVX2 and AVX512 ↵Craig Topper2016-04-171-45/+42
| | | | | | rather than just looping over all vector types and conditinally matching them. NFC llvm-svn: 266577
* Revert "NFC: unify clang / LLVM atomic ordering"JF Bastien2016-04-173-159/+118
| | | | | | | | | | | | | | | | This reverts commit 537951f2f16d6a8542571c7722fcbae07d4e62c2. Causes an assert in: test/Transforms/AtomicExpand/SPARC/libcalls.ll (Ordering2 != AtomicOrdering::NotAtomic && "expect atomic MO") Bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/21724/testReport/junit/LLVM/Transforms_AtomicExpand_SPARC/libcalls_ll/ I'm not getting this assert on my local debug build, but I'll revert just to be sure. llvm-svn: 266576
* NFC: unify clang / LLVM atomic orderingJF Bastien2016-04-173-118/+159
| | | | | | | | | | | | Summary: This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433 Reviewers: jyknight, reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18875 llvm-svn: 266573
* When building with LLVM_ENABLE_MODULES, put the module cache into the buildRichard Smith2016-04-171-19/+18
| | | | | | directory. This is important for build bots to avoid filling up /tmp. llvm-svn: 266571
* Transforms: Try harder to fix bootstrap after r266565Duncan P. N. Exon Smith2016-04-171-2/+2
| | | | | | | | | This catches two nullptr insertions into the ValueMap I missed in r266567. I missed CloneFunction becuase it never calls RemapInstruction directly. Here's one of the still-failing bots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11496 llvm-svn: 266570
* Linker: Don't double-schedule appending variablesDuncan P. N. Exon Smith2016-04-172-1/+10
| | | | | | | | | | | | | Add an assertion to ValueMapper that prevents double-scheduling of GlobalValues to remap, and fix the one place it happened. There are tons of tests that fail with this assertion in place and without the code change, so I'm not adding another. Although it looks related, r266563 was, indeed, removing dead code. AFAICT, this cross-file double-scheduling started in r266510 when the cross-file recursion was removed. llvm-svn: 266569
* [ParallelCG] SmallVector<char> -> SmallString.Davide Italiano2016-04-171-2/+2
| | | | llvm-svn: 266568
* Transforms: Fix bootstrap after r266565Duncan P. N. Exon Smith2016-04-172-5/+5
| | | | | | | | | | | | Apparently there isn't test coverage for all of these. I'd appreciate if someone with could reproduce and send me something to reduce, but for now I've just looked for users of RemapInstruction and MapValue and ensured they don't accidentally insert nullptr. Here is one of the bootstraps that caught: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11494 llvm-svn: 266567
* Fix a use after move.Rafael Espindola2016-04-171-2/+2
| | | | llvm-svn: 266566
* ValueMapper: Don't allow explicit null mappings of Values, NFCDuncan P. N. Exon Smith2016-04-172-3/+5
| | | | | | | | | As a follow-up to r123058, assert that there are no null mappings in the ValueMap instead of just ignoring them when they are there. There were a couple of accidental insertions in CloneFunction so I cleaned those up (caught by testcases). llvm-svn: 266565
* Keep only the splitCodegen version that takes a factory.Rafael Espindola2016-04-175-61/+40
| | | | | | | This makes it much easier to see that all created TargetMachines are equivalent. llvm-svn: 266564
* IRMover: Remove dead code, NFCDuncan P. N. Exon Smith2016-04-171-3/+0
| | | | llvm-svn: 266563
* Declare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes ↵Craig Topper2016-04-177-24/+26
| | | | | | | | | | from TargetLoweringBase and probably other places. This required changing several places to print VT enums as strings instead of raw ints since the proper method to use to print became ambiguous. This is probably an improvement anyway. This also appears to save ~8K from an x86 self host build of llc. llvm-svn: 266562
* [X86][SSE] Added 16i8 -> 8i64 sext testSimon Pilgrim2016-04-171-1/+125
| | | | | | Shows poor codegen for AVX2 llvm-svn: 266560
* [X86] Added TODO comment for target shuffle mask decoding of bitcasted masksSimon Pilgrim2016-04-171-0/+1
| | | | llvm-svn: 266559
* [X86] Remove unneeded variablesAsaf Badouh2016-04-171-12/+8
| | | | | | | | | no functional change. ExtraLoad and WrapperKind are been used only if (OpFlags == X86II::MO_GOTPCREL). Differential Revision: http://reviews.llvm.org/D18942 llvm-svn: 266557
* [AVX512] ISD::MUL v2i64/v4i64 should only be legal if DQI and VLX features ↵Craig Topper2016-04-172-2/+126
| | | | | | are enabled. llvm-svn: 266554
* IR: Fix type-refs in testcase from r266548Duncan P. N. Exon Smith2016-04-171-11/+11
| | | | | | | | | | | | | | | | | There's a hole in the verifier right now: if a module has no compile units, it never checks that all the string-based DITypeRefs get resolved. As a result, this testcase didn't fail the verifier, even there were references to `!"has-uuid"` instead of `!"uuid"` (the former was a composite type's 'name:' field, the latter its 'identifier:' field). I'm currently working on removing string-based type refs entirely, and this testcase started failing (because the upgrade script can't resolve the type refs). Rather than fixing the (about-to-be-removed) hole in the verifier, I'm just going to fix the test so that my upgrade script handles it. llvm-svn: 266553
* IR: Use getRawScope() when verifyingDuncan P. N. Exon Smith2016-04-171-2/+2
| | | | | | | | | | | Fix a couple of places in the Verifier that call `getScope()` instead of `getRawScope()`. Both DIDerivedType::getScope and DICompositeType::getScope return a DITypeRef right now (which wraps a Metadata*) so I don't think there's currently an observable bug. I found this because a future commit that will change them to cast to DIScope*. llvm-svn: 266552
* Fix a typo in rL265762Sanjoy Das2016-04-172-1/+13
| | | | | | | | | I accidentally replaced `mayBeOverridden` with `!isInterposable`. Remove the negation and add a test case that would've caught this. Many thanks to Håkan Hjort for spotting this! llvm-svn: 266551
* Revert "use range loop, try to make comments more meaningful; NFCI"Duncan P. N. Exon Smith2016-04-171-7/+10
| | | | | | | This reverts commit r266541 since it introduces a use-after-free: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/11471 llvm-svn: 266550
* IR: Use an explicit map for debug info type uniquingDuncan P. N. Exon Smith2016-04-1715-10/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than relying on the structural equivalence of DICompositeType to merge type definitions, use an explicit map on the LLVMContext that LLParser and BitcodeReader consult when constructing new nodes. Each non-forward-declaration DICompositeType with a non-empty 'identifier:' field is stored/loaded from the type map, and the first definiton will "win". This map is opt-in: clients that expect ODR types from different modules to be merged must call LLVMContext::ensureDITypeMap. - Clients that just happen to load more than one Module in the same LLVMContext won't magically merge types. - Clients (like LTO) that want to continue to merge types based on ODR identifiers should opt-in immediately. I have updated LTOCodeGenerator.cpp, the two "linking" spots in gold-plugin.cpp, and llvm-link (unless -disable-debug-info-type-map) to set this. With this in place, it will be straightforward to remove the DITypeRef concept (i.e., referencing types by their 'identifier:' string rather than pointing at them directly). llvm-svn: 266549
* IR: Use ODR to unique DICompositeType membersDuncan P. N. Exon Smith2016-04-174-2/+133
| | | | | | | | | | | | | | Merge members that are describing the same member of the same ODR type, even if other bits differ. If the file or line differ, we don't care; if anything else differs, it's an ODR violation (and we still don't really care). For DISubprogram declarations, this looks at the LinkageName and Scope. For DW_TAG_member instances of DIDerivedType, this looks at the Name and Scope. In both cases, we know that the Scope follows ODR rules if it has a non-empty identifier. llvm-svn: 266548
* [Target] Reduce size of the LoadExtActions array in TargetLoweringBase by ↵Craig Topper2016-04-171-7/+11
| | | | | | half. Saving ~18K bytes from the array. llvm-svn: 266547
* [Target] Remove checks for Simple VTs before calling routines that can ↵Craig Topper2016-04-171-10/+7
| | | | | | handle Extended VTs too. NFC llvm-svn: 266546
* [Target] Fix an assertion that should have been updated when the code below ↵Craig Topper2016-04-171-1/+1
| | | | | | it was changed in r251033. llvm-svn: 266545
* LangRef: Removed some outdated text about DIDerivedTypeDuncan P. N. Exon Smith2016-04-171-5/+2
| | | | | | | This text is also incorrect (much like r266540). It looks like I missed updating some of what I moved from SourceLevelDebugging.rst in r232566. llvm-svn: 266544
* Linker: Clarify test/Linker/type-unique-odr-a.ll, NFCDuncan P. N. Exon Smith2016-04-171-17/+23
| | | | | | | | | | | | | | Split up the long RUN and clarify the CHECK lines: - Explicitly confirm there are no other subprograms inside of "A". - Remove checks for "bar" and "baz", which were just implicitly checking that there were no other subprograms inside of "A". This prepares for adding a RUN line which links the two files in the opposite direction. llvm-svn: 266543
* IR: Add a configuration point for MDNodeInfo::isEqual, NFCDuncan P. N. Exon Smith2016-04-161-2/+18
| | | | | | | | This commit has no functionality change, but it adds a configuration point for MDNodeInfo::isEqual to allow custom uniquing of subclasses of MDNode, minimizing the diff of a follow-up. llvm-svn: 266542
* use range loop, try to make comments more meaningful; NFCISanjay Patel2016-04-161-10/+7
| | | | llvm-svn: 266541
* LangRef: Fix some bugs in debug info descriptionsDuncan P. N. Exon Smith2016-04-161-4/+9
| | | | | | Fix descriptions of DICompositeType and DIDerivedType. llvm-svn: 266540
* IR: Remove extra blank line, NFCDuncan P. N. Exon Smith2016-04-161-1/+0
| | | | llvm-svn: 266539
* LTO: Use a common LibLTOCodeGenerator::init, NFCDuncan P. N. Exon Smith2016-04-161-3/+5
| | | | llvm-svn: 266538
* ValueMapper: Separate mapping of distinct and uniqued nodes (again)Duncan P. N. Exon Smith2016-04-161-220/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the result of a mapped distinct node is known up front, it's more efficient to map them separately from uniqued nodes. This commit pulls them out of the post-order traversal and stores them in a worklist to be remapped at the top-level. This is essentially reapplying r244181 ("ValueMapper: Rotate distinct node remapping algorithm") to the new iterative algorithm from r265456 ("ValueMapper: Rewrite Mapper::mapMetadata without recursion"). Now that the traversal logic only handles uniqued MDNodes, it's much simpler to inline it all into MDNodeMapper::createPOT (I've killed the MDNodeMapper::push and MDNodeMapper::tryToPop helpers and localized the traversal worklist). The resulting high-level algorithm for MDNodeMapper::map now looks like this: - Distinct nodes are immediately mapped and added to MDNodeMapper::DistinctWorklist using MDNodeMapper::mapDistinctNode. - Uniqued nodes are mapped via MDNodeMapper::mapTopLevelUniquedNode, which traverses the transitive uniqued subgraph of a node to calculate uniqued node mappings in bulk. - This is a simplified version of MDNodeMapper::map from before this commit (originally r265456) that doesn't traverse through any distinct nodes. - Distinct nodes are added to MDNodeMapper::DistinctWorklist via MDNodeMapper::mapDistinctNode. - This uses MDNodeMapper::createPOT to fill a MDNodeMapper::UniquedGraph (a post-order traversal and side table), UniquedGraph::propagateChanges to track which uniqued nodes need to change, and MDNodeMapper::mapNodesInPOT to create the uniqued nodes. - Placeholders for forward references are now only needed when there's a uniquing cycle (a cycle of uniqued nodes unbroken by distinct nodes). This is the key functionality change that we're reintroducing (from r244181). As of r265456, a temporary forward reference might be needed for any cycle that involved uniqued nodes. - After mapping the first node appropriately, MDNodeMapper::map works through MDNodeMapper::DistinctWorklist. For each distinct node, its operands are remapped with MDNodeMapper::mapDistinctNode and MDNodeMapper::mapTopLevelUniquedNode until all nodes have been mapped. Sadly there's nothing observable I can test here; no real functionality change, just a compile-time speedup from reduced malloc traffic. llvm-svn: 266537
* ValueMapper: Only put cyclic nodes into CyclicNodes, NFCIDuncan P. N. Exon Smith2016-04-161-2/+11
| | | | | | | | | | | As a minor fixup to r266258, only track nodes that needed a placeholder in CyclicNodes in MDNodeMapper::mapUniquedNodes. There should be no observable functionality change, just some local memory savings because CyclicNodes only needs to grow to accommodate nodes that are actually involved in cycles. (This was the original intent of r266258, or else the vector would have been called "ChangedNodes".) llvm-svn: 266536
* [X86][AVX] Add shuffle combine tests for MOVDDUP/MOVSHDUP/MOVSLDUPSimon Pilgrim2016-04-162-0/+121
| | | | | | 128, 256 and 512 bit implementations (some not yet supported by combineX86ShuffleChain) llvm-svn: 266535
* [X86] Use ternary operator to reduce code slightly. NFCCraig Topper2016-04-161-8/+3
| | | | llvm-svn: 266534
* [X86][XOP] Added VPPERM constant mask decoding and target shuffle combining ↵Simon Pilgrim2016-04-164-5/+80
| | | | | | | | support Added additional test that peeks through bitcast to v16i8 mask llvm-svn: 266533
* Add missing #include to fix buildVedant Kumar2016-04-161-0/+1
| | | | | | | Failing bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/23112/ llvm-svn: 266532
* [X86][XOP] More VPPERM shuffle mask decode testsSimon Pilgrim2016-04-161-0/+104
| | | | | | As requested by D18441 llvm-svn: 266531
* ValueMapper: Fix unused var warning. NFCSimon Atanasyan2016-04-161-0/+2
| | | | llvm-svn: 266529
* Remove some unneeded headers and replace some headers with forward class ↵Mehdi Amini2016-04-1640-61/+43
| | | | | | | | | | | declarations (NFC) Differential Revision: http://reviews.llvm.org/D19154 Patch by Eugene Kosov <claprix@yandex.ru> From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266524
* Add SVN version to libLLVMLTOMehdi Amini2016-04-163-9/+104
| | | | | | | | | | | | | | | | | | | | Summary: For Incremental LTO, we need to make sure that an old cache entry is not used when incrementally re-linking with a new libLTO. Adding a global LLVM_REVISION in llvm-config.h would for to rebuild/relink the world for every "git pull"/"svn update". So instead only libLTO is made dependent on the VCS and will be rebuilt (and the dependent binaries relinked, i.e. as of today: libLTO.dylib and llvm-lto). Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18987 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266523
* ThinLTO: Move the ODR resolution to be based purely on the summary.Mehdi Amini2016-04-165-85/+135
| | | | | | | | | This is a requirement for the cache handling in D18494 Differential Revision: http://reviews.llvm.org/D18908 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266519
* ThinLTO: Make aliases explicit in the summaryMehdi Amini2016-04-1611-41/+271
| | | | | | | | | | | To be able to work accurately on the reference graph when taking decision about internalizing, promoting, renaming, etc. We need to have the alias information explicit. Differential Revision: http://reviews.llvm.org/D18836 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266517
OpenPOWER on IntegriCloud