summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[MachineCopyPropagation] Extend pass to do COPY source forwarding" ↵Geoff Berry2017-08-1877-885/+343
| | | | | | | | | | | round 2 This reverts commit r311135. sanitizer-x86_64-linux-android buildbot is timing out with just this patch applied. llvm-svn: 311142
* AMDGPU: add missing amdgcn processors and testsKonstantin Zhuravlyov2017-08-182-28/+69
| | | | | | | | | | | | - gfx600 - gfx601 - gfx703 - gfx902 - gfx903 Differential Revision: https://reviews.llvm.org/D36771 llvm-svn: 311141
* Revert r311137 (GlobalISel ABI commit).Tim Northover2017-08-181-1/+1
| | | | | | | It was committed by mistake since it was in the same monorepo as the LLVM change I was working on. llvm-svn: 311140
* Increase tail dup threshold for -O3 from 3 to 4.Richard Smith2017-08-174-4/+4
| | | | | | | | We see a modest performance improvement from this slightly higher tail dup threshold. Differential Revision: https://reviews.llvm.org/D36775 llvm-svn: 311139
* [X86] Remove SSE/AVX patterns for AND/XOR/OR/ANDN that checked for the ↵Craig Topper2017-08-172-27/+10
| | | | | | | | | | inputs being bitcasted from floating point types. There's really no reason to do this we should just let isel pick the integer version and let the execution dependency fixing pass take care of moving to FP if necessary. It's not very reliable to look for bitcasts at the edges of patterns. If for some reason one input was bitcasted and the other wasn't, or if one was a v4f32 bitcast and one was a v2f64 bitcast, we would have fallen back to the integer pattern anyway. llvm-svn: 311138
* GlobalISel (AArch64): fix ABI at border between GPRs and SP.Tim Northover2017-08-173-2/+45
| | | | | | | | If a struct would end up half in GPRs and half on SP the ABI says it should actually go entirely on the stack. We were getting this wrong in GlobalISel before, causing compatibility issues. llvm-svn: 311137
* [clang-tidy] Add modernize-use-equals-default.IgnoreMacros optionAlexander Kornienko2017-08-175-35/+64
| | | | llvm-svn: 311136
* Re-enable "[MachineCopyPropagation] Extend pass to do COPY source ↵Geoff Berry2017-08-1777-343/+885
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | forwarding" Two issues identified by buildbots were addressed: - The pass no longer forwards COPYs to physical register uses, since doing so can break code that implicitly relies on the physical register number of the use. - The pass no longer forwards COPYs to undef uses, since doing so can break the machine verifier by creating LiveRanges that don't end on a use (since the undef operand is not considered a use). [MachineCopyPropagation] Extend pass to do COPY source forwarding This change extends MachineCopyPropagation to do COPY source forwarding. This change also extends the MachineCopyPropagation pass to be able to be run during register allocation, after physical registers have been assigned, but before the virtual registers have been re-written, which allows it to remove virtual register COPY LiveIntervals that become dead through the forwarding of all of their uses. Reviewers: qcolombet, javed.absar, MatzeB, jonpa Subscribers: jyknight, nemanjai, llvm-commits, nhaehnle, mcrosier, mgorny Differential Revision: https://reviews.llvm.org/D30751 llvm-svn: 311135
* [ScpInliner] Move DEBUG-TYPE to below all includes to prevent cross-module ↵Siddharth Bhat2017-08-171-2/+2
| | | | | | | | interaction. [NFC] This fixes compile errors. llvm-svn: 311130
* Fix warning about covered switch default.Zachary Turner2017-08-171-1/+1
| | | | llvm-svn: 311129
* AMDGPU: Add R600InstPrinter classTom Stellard2017-08-173-109/+252
| | | | | | | | | | | | | | | | | | Summary: This is step towards separating the GCN and R600 tablegen'd code. This is a little awkward for now, because the R600 functions won't have the MCSubtargetInfo parameter, so we need to have AMDMGPUInstPrinter delegate to R600InstPrinter, but once the tablegen'd code is split, we will be able to drop the delegation and use R600InstPrinter directly. Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D36444 llvm-svn: 311128
* [GPGPU] Only collect the access that belong to an array [NFC]Tobias Grosser2017-08-173-6/+15
| | | | | | | | This avoid the construction of very large sets and in many cases also keeps the number of parameters low. As a result, we see a compile time reduction from 5 minutes to only slightly above 1 minute for one of our larger test cases. llvm-svn: 311127
* [ScopInliner] Add a simple Scop-based inliner to polly.Siddharth Bhat2017-08-179-7/+278
| | | | | | | | | | | | | We add a ScopInliner pass which inlines functions based on a simple heuristic: Let `g` call `f`. If we can model all of `f` as a Scop, we inline `f` into `g`. This requires `-polly-detect-full-function` to be enabled. So, the pass asserts that `-polly-detect-full-function` is enabled. Differential Revision: https://reviews.llvm.org/D36832 llvm-svn: 311126
* [LoopRotate][Dominators] Use the incremental API to update DomTreeJakub Kuderski2017-08-171-66/+13
| | | | | | | | | | | | | | Summary: This patch teaches LoopRotate to use the new incremental API to update the DominatorTree. Reviewers: dberlin, davide, grosser, sanjoy Reviewed By: dberlin, davide Subscribers: hiraditya, llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D35581 llvm-svn: 311125
* [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-08-1716-220/+360
| | | | | | other minor fixes (NFC). llvm-svn: 311124
* [GPGPU] Move getExtend to C++ [NFC]Tobias Grosser2017-08-171-54/+35
| | | | llvm-svn: 311123
* [cmake] Add explicit linkage from Core to cursesMichal Gorny2017-08-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | The Core library calls functions provided by the curses library. Add an appropriate explicit LINK_LIBS to ${CURSES_LIBRARIES} to propagate the dependency correctly within the build system. It seems that so far the linkage was handled by some kind of implicit magic LLDB_SYSTEM_LIBS variable. However, it stopped working for unittests as the curses libraries are passed before the LLDBCore library, resulting in `-Wl,--as-needed` stripping the yet-unused library before it is required by LLDBCore, and effectively breaking the build. I think it's better to focus on listing all the dependencies explicitly and let CMake propagate them rather than trying to figure out why this hack stopped working. This is also more consistent with LLVM where the curses linkage in LLVMSupport is expressed directly in the library rather than deferred to the final programs. Differential Revision: https://reviews.llvm.org/D36358 llvm-svn: 311122
* [ManagedMemoryRewrite] Rewrite malloc, free correctly inside `Constant`s.Siddharth Bhat2017-08-172-2/+128
| | | | | | | | | | | | | | | | | Reuse the machinery built for replacing global arrays to replace malloc/free as well. Example replacement that was missed earlier: ``` call void \ bitcast (void (i8*)* @free to void (%custom_type*)*) (%custom_type* %13) ``` - Since the `bitcast` is a `ConstantExpr`, `replaceAllUsesWith` would miss this. We don't miss this anymore. Differential Revision: https://reviews.llvm.org/D36825 llvm-svn: 311121
* Remove unused variable.Zachary Turner2017-08-171-1/+0
| | | | llvm-svn: 311119
* [GPGPU] Make test case independent of LLVM namesTobias Grosser2017-08-171-2/+2
| | | | | | | | In release builds LLVM may not pass along LLVM names consistently. We make the test cases independent of the LLVM-IR names to avoid spurious test case failures. llvm-svn: 311118
* [llvm-pdbutil] Fix some dumping issues.Zachary Turner2017-08-172-7/+10
| | | | | | | | | | | | | | | | | When dumping, we were treating the S_INLINESITESYM as referring to a type record, when it actually refers to an id record. We had this correct in TypeIndexDiscovery, so our merging algorithm should be fine, but we had it wrong in the dumper, which means it would appear to work most of the time, unless the index was out of bounds in the type stream, when it would fail. Fixed this, and audited a few other cases to make them match the behavior in TypeIndexDiscovery. Also, I've now observed a new symbol record with kind 0x1168 which I have no clue what it is, so to avoid crashing we have to just print "Unknown Symbol Kind". llvm-svn: 311117
* Fix a few minor issues when dumping symbols.Zachary Turner2017-08-173-1/+9
| | | | | | | | | | | | 1) We weren't handling symbol types that weren't able to parse, even if we knew what the leaf type was. This was triggering when trying to dump /DEBUG:FASTLINK PDBs, where we expect a certain symbol to show up, but we just don't know how to parse it. 2) We lost the code for dumping record bytes, so this was added back. llvm-svn: 311116
* PR34161: support evaluation of 'void()' expressions in C++14 onwards.Richard Smith2017-08-172-0/+8
| | | | llvm-svn: 311115
* Remove BUILD_TVJonathan Peyton2017-08-175-81/+0
| | | | | | | | | | Cleanup code to remove BUILD_TV and unused code bracketed by it. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D36011 llvm-svn: 311114
* [docs] Tweak phrasing of the varargs explanation in the command section of theLang Hames2017-08-171-6/+8
| | | | | | | | | | CMake primer. This moves the introduction of the ARGV/ARGN variables up to immmediately follow the introduction of the concept of variable argument functions, and explicitly connects this concept to C varargs functions. llvm-svn: 311113
* [docs] Fix typo and tweak wording of special variable handling in CMake primer.Lang Hames2017-08-171-5/+4
| | | | llvm-svn: 311112
* Revert "[Debug info] Transfer DI to fragment expressions for split integer ↵Jonas Devlieghere2017-08-177-218/+25
| | | | | | | | values." This reverts commit r311102. llvm-svn: 311111
* [SimplifyCFG] Add a test for preserve store alignment, NFC.Alexey Bataev2017-08-171-0/+59
| | | | llvm-svn: 311106
* [x86] add tests for vector select-of-constants; NFCSanjay Patel2017-08-171-0/+273
| | | | | | | | We've discussed canonicalizing to this form in IR, so the backend should be prepared to lower these in ways better than what we see here in most cases. llvm-svn: 311103
* [Debug info] Transfer DI to fragment expressions for split integer values.Jonas Devlieghere2017-08-177-25/+218
| | | | | | | | | This patch teaches the SDag type legalizer how to split up debug info for integer values that are split into a hi and lo part. Differential Revision: https://reviews.llvm.org/D36805 llvm-svn: 311102
* [PowerPC] add tests for vector select-of-constants; NFCSanjay Patel2017-08-171-0/+236
| | | | | | | | We've discussed canonicalizing to this form in IR, so the backend should be prepared to lower these in ways better than what we see here. llvm-svn: 311099
* Improve line debug info when translating a CaseBlock to SDNodes.Adrian Prantl2017-08-173-9/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SelectionDAGBuilder translates various conditional branches into CaseBlocks which are then translated into SDNodes. If a conditional branch results in multiple CaseBlocks only the first CaseBlock is translated into SDNodes immediately, the rest of the CaseBlocks are put in a queue and processed when all LLVM IR instructions in the basic block have been processed. When a CaseBlock is transformed into SDNodes the SelectionDAGBuilder is queried for the current LLVM IR instruction and the resulting SDNodes are annotated with the debug info of the current instruction (if it exists and has debug metadata). When the deferred CaseBlocks are processed, the SelectionDAGBuilder does not have a current LLVM IR instruction, and the resulting SDNodes will not have any debuginfo. As DwarfDebug::beginInstruction() outputs a .loc directive for the first instruction in a labeled block (typically the case for something coming from a CaseBlock) this tends to produce a line-0 directive. This patch changes the handling of CaseBlocks to store the current instruction's debug info into the CaseBlock when it is created (and the SelectionDAGBuilder knows the current instruction) and to always use the stored debug info when translating a CaseBlock to SDNodes. Patch by Frej Drejhammar! Differential Revision: https://reviews.llvm.org/D36671 llvm-svn: 311097
* [Dominators] Teach LoopUnswitch to use the incremental APIJakub Kuderski2017-08-172-64/+60
| | | | | | | | | | | | | | | | | | Summary: This patch makes LoopUnswitch use new incremental API for updating dominators. It also updates SplitCriticalEdge, as it is called in LoopUnswitch. There doesn't seem to be any noticeable performance difference when bootstrapping clang with this patch. Reviewers: dberlin, davide, sanjoy, grosser, chandlerc Reviewed By: davide, grosser Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D35528 llvm-svn: 311093
* [AVX512] Don't switch unmasked subvector insert/extract instructions when ↵Craig Topper2017-08-1715-1483/+638
| | | | | | | | | | | | | | AVX512DQI is enabled. There's no reason to switch instructions with and without DQI. It just creates extra isel patterns and test divergences. There is however value in enabling the masked version of the instructions with DQI. This required introducing some new multiclasses to enabling this splitting. Differential Revision: https://reviews.llvm.org/D36661 llvm-svn: 311091
* [X86] Remove memopmmx pattern fragmentCraig Topper2017-08-172-11/+2
| | | | | | | | | | | | | | Summary: Just like the FIXME says, there is no alignment requirement for MMX. Reviewers: RKSimon, zvi, igorb Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36815 llvm-svn: 311090
* Mark Verifier/invalid-eh.ll as unsupported on windowsVictor Leschuk2017-08-171-0/+2
| | | | | | | Mark this unsupported for now as it causes tests hangs on buildbot. Will place it back when the problem is debugged. llvm-svn: 311089
* Unguarded availability diagnoser should use TraverseStmt instead ofAlex Lorenz2017-08-172-2/+9
| | | | | | | | | Base::TraverseStmt when visiting the then/else branches of if statements This ensures that the statement stack is correctly tracked and correct multi-statement fixit is generated inside of an if (@available) llvm-svn: 311088
* [dfsan] Add explicit zero extensions for shadow parameters in function wrappers.Simon Dardis2017-08-174-5/+77
| | | | | | | | | | | | | | | | | In the case where dfsan provides a custom wrapper for a function, shadow parameters are added for each parameter of the function. These parameters are i16s. For targets which do not consider this a legal type, the lack of sign extension information would cause LLVM to generate anyexts around their usage with phi variables and calling convention logic. Address this by introducing zero exts for each shadow parameter. Reviewers: pcc, slthakur Differential Revision: https://reviews.llvm.org/D33349 llvm-svn: 311087
* [clang-tidy] Ignore statements inside a template instantiation.Haojian Wu2017-08-172-2/+16
| | | | | | | | | | | | Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36822 llvm-svn: 311086
* Print enum constant values using the original source formattingAlex Lorenz2017-08-176-21/+93
| | | | | | | | if possible when creating "Declaration" nodes in XML comments rdar://14765746 llvm-svn: 311085
* [globalisel][tablegen] Generate TypeObject table. NFCDaniel Sanders2017-08-172-33/+36
| | | | | | | | | | | | | | | | | | Summary: Generate the type table from the types used by a target rather than hard-coding the union of types used by all targets. Depends on D36084 Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36085 llvm-svn: 311084
* [DAGCombiner] Add support for non-uniform constant vectors to (mul x, (1 << ↵Simon Pilgrim2017-08-172-26/+19
| | | | | | c)) -> x << c llvm-svn: 311083
* [X86] Refactoring of X86TargetLowering::EmitLoweredSelect. NFC.Amjad Aboud2017-08-172-163/+238
| | | | | | | Authored by aivchenk Differential Revision: https://reviews.llvm.org/D35685 llvm-svn: 311082
* [Verifier] Avoid visiting DIGlobalVariables twice.Davide Italiano2017-08-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | We currently visit them twice. Once, through `visitMDNode()` -> (the code generated by) `../include/llvm/IR/Metadata.def:109` -> `visitDIGlobalVariable()` Then, through `visitMDNode()` -> `visitDIGlobalVariableExpression()` -> `visitDIGlobalVariable()` This results in verification failures printed twice, e.g.: $ ./opt -verify ../../test/DebugInfo/pr34186.ll missing global variable type !4 = distinct !DIGlobalVariable(name: "pat", scope: !0, file: !1, line: 27, isLocal: true, isDefinition: true) missing global variable type !4 = distinct !DIGlobalVariable(name: "pat", scope: !0, file: !1, line: 27, isLocal: true, isDefinition: true) ./opt: ../../test/DebugInfo/pr34186.ll: error: input module is broken! The patch removes one call so we ensure each GV is visited exactly once. Differential Revision: https://reviews.llvm.org/D36797 llvm-svn: 311081
* [ManagedMemoryRewrite] Learn how to rewrite global arrays, allocas.Siddharth Bhat2017-08-173-16/+397
| | | | | | | | | | | | | | | - If we have global arrays, we would like to rewrite them to global pointers which are allocated using `cudaMallocManaged`. - If we have allocas in a function, we would like to rewrite them to heap-allocations with `cudaMallocManaged` and `cudaFree`. - With these rewrite mechanisms, we can offload _any_ function to the GPU with no code rewrite whatsover. Differential Revision: https://reviews.llvm.org/D36516 llvm-svn: 311080
* [clang-tidy] Don't generate fixes for initializer_list constructor in ↵Haojian Wu2017-08-173-24/+68
| | | | | | | | | | | | | | | | | | | | | make_unique check. Summary: The current fix will break the compilation -- because braced list is not deducible in std::make_unique (with the use of forwarding) without specifying the type explicitly. We could support it in the future. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36786 llvm-svn: 311078
* [LV] Using VPlan to model the vectorized code and drive its transformationAyal Zaks2017-08-179-556/+2277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VPlan is an ongoing effort to refactor and extend the Loop Vectorizer. This patch introduces the VPlan model into LV and uses it to represent the vectorized code and drive the generation of vectorized IR. In this patch VPlan models the vectorized loop body: the vectorized control-flow is represented using VPlan's Hierarchical CFG, with predication refactored from being a post-vectorization-step into a vectorization planning step modeling if-then VPRegionBlocks, and generating code inline with non-predicated code. The vectorized code within each VPBasicBlock is represented as a sequence of Recipes, each responsible for modelling and generating a sequence of IR instructions. To keep the size of this commit manageable the Recipes in this patch are coarse-grained and capture large chunks of LV's code-generation logic. The constructed VPlans are dumped in dot format under -debug. This commit retains current vectorizer output, except for minor instruction reorderings; see associated modifications to lit tests. For further details on the VPlan model see docs/Proposals/VectorizationPlan.rst and its references. Authors: Gil Rapaport and Ayal Zaks Differential Revision: https://reviews.llvm.org/D32871 llvm-svn: 311077
* Re-commit: [globalisel][tablegen] Support zero-instruction emission.Daniel Sanders2017-08-173-41/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Support the case where an operand of a pattern is also the whole of the result pattern. In this case the original result and all its uses must be replaced by the operand. However, register class restrictions can require a COPY. This patch handles both cases by always emitting the copy and leaving it for the register allocator to optimize. The previous commit failed on Windows machines due to a flaw in the sort predicate which allowed both A < B < C and B == C to be satisfied simultaneously. The cause of this was some sloppiness in the priority order of G_CONSTANT instructions compared to other instructions. These had equal priority because it makes no difference, however there were operands had higher priority than G_CONSTANT but lower priority than any other instruction. As a result, a priority order between G_CONSTANT and other instructions must be enforced to ensure the predicate defines a strict weak order. Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Subscribers: javed.absar, kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36084 llvm-svn: 311076
* [SystemZ] Also wrap TII with #ifndef NDEBUG in constructor initilizer list.Jonas Paulsson2017-08-171-2/+8
| | | | | | TII needs to be wrapped with #ifndef NDEBUG to silece compiler warnings. llvm-svn: 311075
* [SystemZ] Add a wrapping with #ifndef NDEBUG to silence warning.Jonas Paulsson2017-08-171-0/+2
| | | | | | | SystemZHazardRecognizer::TII is only used for debug output, so it needs also to be wrapped with #ifndef NDEBUG. llvm-svn: 311074
OpenPOWER on IntegriCloud