summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [TargetLowering] Merge ExpandChainLibCall with makeLibCallCraig Topper2019-11-254-58/+42
| | | | | | I need to be able to drop an operand for STRICT_FP_ROUND handling on X86. Merging these functions gives me the ArrayRef interface that passes the return type, operands, and debugloc instead of the Node. Differential Revision: https://reviews.llvm.org/D70503
* [InstCombine] remove shuffle mask canonicalization that creates undef elementsSanjay Patel2019-11-251-10/+10
| | | | | | This is NFC-intended because SimplifyDemandedVectorElts() does the same transform later. As discussed in D70641, we may want to change that behavior, so we need to isolate where it happens.
* [WebAssembly] Change the llvm-lto dir to use the LLVM VersionDan Gohman2019-11-251-11/+17
| | | | | | | | | Using the version instead of the VCS revision, which isn't available when LLVM_APPEND_VC_REV is set. The bitcode format should be backwards-compatible at least within a minor version, so the version string should be sufficient. Differential Revision: https://reviews.llvm.org/D70677
* [ARM] Generate CMSE instructions from CMSE intrinsicsMomchil Velikov2019-11-252-4/+57
| | | | | | | | | | | This patch adds instruction selection patterns for the TT, TTT, TTA, and TTAT instructions and tests for llvm.arm.cmse.tt, llvm.arm.cmse.ttt, llvm.arm.cmse.tta, and llvm.arm.cmse.ttat intrinsics (added in a previous patch). Patch by Javed Absar. Differential Revision: https://reviews.llvm.org/D70407
* [SystemZ] Return the right offsets from getCalleeSavedSpillSlots().Jonas Paulsson2019-11-252-25/+41
| | | | | | | | | | | | | | // Due to the SystemZ ABI, the DWARF CFA (Canonical Frame Address) is not // equal to the incoming stack pointer, but to incoming stack pointer plus // 160. The getOffsetOfLocalArea() returned value is interpreted as "the // offset of the local area from the CFA". The immediate offsets into the Register save area returned by getCalleeSavedSpillSlots() should take this offset into account, which this patch makes sure of. Patch and review by Ulrich Weigand. https://reviews.llvm.org/D70427
* [NFC][LoopFusion] Use isControlFlowEquivalent() from CodeMoverUtils.Whitney Tsang2019-11-253-14/+24
| | | | | | | | Reviewer: kbarton, jdoerfert, Meinersbur, bmahjour, etiotto Reviewed By: Meinersbur Subscribers: hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D70619
* [PowerPC] Fix VSX clobbers of CSR registersNemanja Ivanovic2019-11-253-7/+74
| | | | | | | | If an inline asm statement clobbers a VSX register that overlaps with a callee-saved Altivec register or FPR, we will not record the clobber and will therefore violate the ABI. This is clearly a bug so this patch fixes it. Differential revision: https://reviews.llvm.org/D68576
* [InstCombine] prevent infinite loop from conflicting shuffle mask transformsSanjay Patel2019-11-251-2/+4
| | | | | | | | | The pattern in question is currently not possible because we aggressively (wrongly) transform mask elements to undef values if they choose from an undef operand. That, however, would change if we tighten our semantics for shuffles as discussed in D70641. Adding this check gives us the flexibility to make that change with minimal overhead for current definitions.
* [scudo][standalone] Fix for releaseToOS prior to initKostya Kortchinsky2019-11-252-1/+19
| | | | | | | | | | | | | | | | | | | | Summary: cferris@ found an issue where calling `releaseToOS` prior to any other heap operation would lead to a crash, due to the allocator not being properly initialized (it was discovered via `mallopt`). The fix is to call `initThreadMaybe` prior to calling `releaseToOS` for the Primary. Add a test that crashes prior to fix. Reviewers: hctim, cferris, pcc, eugenis Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D70552
* [DDG] Data Dependence Graph - Topological Sortbmahjour2019-11-258-355/+394
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In this patch the DDG DAG is sorted topologically to put the nodes in the graph in the order that would satisfy all dependencies. This helps transformations that would like to generate code based on the DDG. Since the DDG is a DAG a reverse-post-order traversal would give us the topological ordering. This patch also sorts the basic blocks passed to the builder based on program order to ensure that the dependencies are computed in the correct direction. Authored By: bmahjour Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert Reviewed By: Meinersbur Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack Tags: #llvm Differential Revision: https://reviews.llvm.org/D70609
* [InstCombine] simplify code for shuffle mask canonicalization; NFCSanjay Patel2019-11-251-6/+4
| | | | We never use the local 'Mask' before returning, so that was dead code.
* [InstCombine] remove dead code from shuffle mask canonicalization; NFCSanjay Patel2019-11-251-2/+2
|
* [InstCombine] simplify loop for shuffle mask canonicalization; NFCSanjay Patel2019-11-251-4/+4
|
* Revert 3f91705ca54 "ARM-NEON: make type modifiers orthogonal and allow ↵Hans Wennborg2019-11-257-1170/+1139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multiple modifiers." This broke the vcreate_u64 intrinsic. Example: $ cat /tmp/a.cc #include <arm_neon.h> void g() { auto v = vcreate_u64(0); } $ bin/clang -c /tmp/a.cc --target=arm-linux-androideabi16 -march=armv7-a /tmp/a.cc:4:12: error: C-style cast from scalar 'int' to vector 'uint64x1_t' (vector of 1 'uint64_t' value) of different size auto v = vcreate_u64(0); ^~~~~~~~~~~~~~ /work/llvm.monorepo/build.release/lib/clang/10.0.0/include/arm_neon.h:4144:11: note: expanded from macro 'vcreate_u64' __ret = (uint64x1_t)(__p0); \ ^~~~~~~~~~~~~~~~~~ Reverting until this can be investigated. > The modifier system used to mutate types on NEON intrinsic definitions had a > separate letter for all kinds of transformations that might be needed, and we > were quite quickly running out of letters to use. This patch converts to a much > smaller set of orthogonal modifiers that can be applied together to achieve the > desired effect. > > When merging with downstream it is likely to cause a conflict with any local > modifications to the .td files. There is a new script in > utils/convert_arm_neon.py that was used to convert all .td definitions and I > would suggest running it on the last downstream version of those files before > this commit rather than resolving conflicts manually.
* [AMDGPU] Fix function name in debug outputJay Foad2019-11-251-3/+3
|
* [AIX][XCOFF] Generate undefined symbol in symbol table for external function ↵jasonliu2019-11-255-10/+79
| | | | | | | | | | | | | | | | call Summary: This patch sets up the infrastructure for 1. Associate MCSymbolXCOFF with an MCSectionXCOFF when it could not get implicitly associated. 2. Generate undefined symbols. The patch itself generates undefined symbol for external function call only. Generate undefined symbol for external global variable and external function descriptors will be handled in separate patch(s) after this is land. Differential Revision: https://reviews.llvm.org/D70443
* [lldb][NFC] Allow range-based for-loops on VariableListRaphael Isemann2019-11-2512-87/+66
| | | | | | | | | | | | | | | | Summary: Adds support for doing range-based for-loops on LLDB's VariableList and modernises all the index-based for-loops in LLDB where possible. Reviewers: labath, jdoerfert Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70668
* [DebugInfo] Avoid register coalesing unsoundly changing DBG_VALUE locationsJeremy Morse2019-11-252-2/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-land of D56151 / r364515 with a completely new implementation. Once MIR code leaves SSA form and the liveness of a vreg is considered, DBG_VALUE insts are able to refer to non-live vregs, because their debug-uses do not contribute to liveness. This non-liveness becomes problematic for optimizations like register coalescing, as they can't ``see'' the debug uses in the liveness analyses. As a result registers get coalesced regardless of debug uses, and that can lead to invalid variable locations containing unexpected values. In the added test case, the first vreg operand of ADD32rr is merged with various copies of the vreg (great for performance), but a DBG_VALUE of the unmodified operand is blindly updated to the modified operand. This changes what value the variable will appear to have in a debugger. Fix this by changing any DBG_VALUE whose operand will be resurrected by register coalescing to be a $noreg DBG_VALUE, i.e. give the variable no location. This is an overapproximation as some coalesced locations are safe (others are not) -- an extra domination analysis would be required to work out which, and it would be better if we just don't generate non-live DBG_VALUEs. Differential Revision: https://reviews.llvm.org/D64630
* [lldb] Remove lldb's own ASTDumperRaphael Isemann2019-11-258-316/+125
| | | | | | | | | | | | | | | | | | | | | Summary: LLDB's ASTDumper is just a clone of Clang's ASTDumper but with some scary code and some unrelated functionality (like dumping name/attributes of types). This removes LLDB's ASTDumper and replaces its uses with the `ClangUtils::DumpDecl` method that just calls Clang's ASTDumper and returns the result as a string. The few uses where we just want a textual representation of a type (which will print their name/attributes but not dump any AST) are now also in ClangUtil under a `ToString` name until we find a better home for them. Reviewers: labath Reviewed By: labath Subscribers: mgorny, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70663
* [ARM][MVE] Select vqnegAnna Welker2019-11-252-11/+63
| | | | | | | | Adds a pattern to ARMInstrMVE.td to use a VQNEG instruction if an equivalent multi-instruction construct is found. Differential Revision: https://reviews.llvm.org/D70491
* [DebugInfo@O2][Utils] Undef instead of delete dbg.values in helper funcOCHyams2019-11-253-17/+88
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Related bug: https://bugs.llvm.org/show_bug.cgi?id=40648 Static helper function rewriteDebugUsers in Local.cpp deletes dbg.value intrinsics when it cannot move or rewrite them, or salvage the deleted instruction's value. It should instead undef them in this case. This patch fixes that and I've added a test which covers the failing test case in bz40648. I've updated the unit test Local.ReplaceAllDbgUsesWith to check for this behaviour (and fixed a typo in the test which would cause the old test to always pass). Reviewers: aprantl, vsk, djtodoro, probinson Reviewed By: vsk Subscribers: hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D70604
* [AVR] Fix endianness handling in AVR MCserge_sans_paille2019-11-251-5/+3
| | | | Differential Revision: https://reviews.llvm.org/D67926
* [yaml2obj/obj2yaml] - Add support for SHT_LLVM_DEPENDENT_LIBRARIES sections.Georgii Rymar2019-11-256-0/+246
| | | | | | | | | | | | | | | | | | | | | | | | This section contains strings specifying libraries to be added to the link by the linker. The strings are encoded as standard null-terminated UTF-8 strings. This patch adds a way to describe and dump SHT_LLVM_DEPENDENT_LIBRARIES sections. I introduced a new YAMLFlowString type here. That used to teach obj2yaml to dump them like: ``` Libraries: [ foo, bar ] ``` instead of the following (if StringRef would be used): ``` Libraries: - foo - bar ``` Differential revision: https://reviews.llvm.org/D70598
* [clangd] Fix diagnostic location for macro expansionsKadir Cetinkaya2019-11-252-5/+42
| | | | | | | | | | | | | | | | | Summary: Diagnostic locations were broken when it was result of a macro expansion. This patch fixes it by using expansion location instead of location inside macro body. Fixes https://github.com/clangd/clangd/issues/201. Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70494
* [clangd] Improve symbol qualification in DefineInline code actionKadir Cetinkaya2019-11-253-7/+154
| | | | | | | | | | | | | | | | | | | | | | Summary: Currently define inline action fully qualifies any names in the function body, which is not optimal and definitely natural. This patch tries to improve the situation by dropping any name specifiers shared by function and names spelled in the body. For example if you are moving definition of a function in namespace clang::clangd, and body has any decl's coming from clang or clang::clangd namespace, those qualifications won't be added since they are redundant. It also drops any qualifiers that are visible in target context. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69033
* [clangd] Helper for getting nested namespace qualificationKadir Cetinkaya2019-11-253-9/+263
| | | | | | | | | | | | | | | | | Summary: Introduce a new helper for getting minimally required qualifiers necessary to spell a name at a point in a given DeclContext. Currently takes using directives and nested namespecifier of DeclContext itself into account. Initially will be used in define inline and outline actions. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69608
* [lldb-vscode] Fix a race in test_extra_launch_commandsPavel Labath2019-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test used a non-stopping "run" command to launch the process. This is different from the regular launch with no extra launch commands, which uses eLaunchFlagStopAtEntry to ensure that the process stops straight away. I'm not really sure what's supposed to happen in non-stop-at-entry mode, or if that's even supported, but what ended up happening was the launch packet got a reply while the process was running. Then the test case did a continue_to_next_stop(), which queued a *second* resume request (along with the internal "resumes" which were being issued as a part of normal process startup). These two resumes ended up chasing each other's tails inside lldb in a way which produced hilarious log traces. Surprisingly, the test ended up passing most of the time, but it did cause spurious failures when the test seemed to miss a breakpoint. This changes the test to use stop-at-entry mode in the manual launch sequence too, which seems to be enough to make the test pass reliably. Reviewers: clayborg, kusmour, jankratochvil Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70127
* [NFC][Test] Adding the test for bswap + logic op for PowerPCQingShan Zhang2019-11-251-0/+18
|
* [X86] Add 32-bit RUN line to fp128-libcalls.ll. Add nounwind to test ↵Craig Topper2019-11-241-41/+550
| | | | functions. NFC
* Revert "[PowerPC] combine rlwinm+rlwinm to rlwinm"czhengsz2019-11-243-215/+6
| | | | This reverts commit 29f6f9b2b2bfecccf903738e2f5a0cd0a70fce31.
* [llvm-objcopy][MachO] Implement --dump-sectionSeiya Nuta2019-11-253-14/+128
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht, jhenderson Subscribers: MaskRay, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66408
* [CMake] Use correct include path for InstrProfData.inc on DarwinPetr Hosek2019-11-241-1/+4
| | | | | | | | On Darwin, part of the profile runtime is included in the builtin library. f35032e changed the location of InstrProfData.inc but the builtin build for Darwin hasn't been updated to include the new path which causes a breakage when building for Darwin. This change addresses this breakage.
* Recommit f0c2a5a "[LV] Generalize conditions for sinking instrs for first ↵Florian Hahn2019-11-244-14/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order recurrences." This version contains 2 fixes for reported issues: 1. Make sure we do not try to sink terminator instructions. 2. Make sure we bail out, if we try to sink an instruction that needs to stay in place for another recurrence. Original message: If the recurrence PHI node has a single user, we can sink any instruction without side effects, given that all users are dominated by the instruction computing the incoming value of the next iteration ('Previous'). We can sink instructions that may cause traps, because that only causes the trap to occur later, but not on any new paths. With the relaxed check, we also have to make sure that we do not have a direct cycle (meaning PHI user == 'Previous), which indicates a reduction relation, which potentially gets missed by ReductionDescriptor. As follow-ups, we can also sink stores, iff they do not alias with other instructions we move them across and we could also support sinking chains of instructions and multiple users of the PHI. Fixes PR43398. Reviewers: hsaito, dcaballe, Ayal, rengolin Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D69228
* [mips] Split test into MIPS and microMIPS parts. NFCSimon Atanasyan2019-11-252-26/+34
|
* [LoopInterchange] Adjust assertions when updating successors.Florian Hahn2019-11-242-19/+180
| | | | | | | | | | | Currently the assertion in updateSuccessor is overly strict in some cases and overly relaxed in other cases. For branches to the inner and outer loop preheader it is too strict, because they can either be unconditional branches or conditional branches with duplicate targets. Both cases are fine and we can allow updating multiple successors. On the other hand, we have to at least update one successor. This patch adds such an assertion.
* [TableGen] Fixed 'unused but set variable' warning. NFCIDávid Bolvanský2019-11-241-2/+0
|
* [Diagnostics] Warn for comparison with string literals expanded from macro ↵Dávid Bolvanský2019-11-244-42/+76
| | | | | | | | | | | | | | | | | | (PR44064) Summary: As noted in PR, we have a poor test coverage for this warning. I think macro support was just overlooked. GCC warns in these cases. Clang missed a real bug in the code I am working with, GCC caught it. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70624
* [InstCombine] remove identity shuffle simplification for mask with undefsSanjay Patel2019-11-2412-52/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And simultaneously enhance SimplifyDemandedVectorElts() to rcognize that pattern. That preserves some of the old optimizations in IR. Given a shuffle that includes undef elements in an otherwise identity mask like: define <4 x float> @shuffle(<4 x float> %arg) { %shuf = shufflevector <4 x float> %arg, <4 x float> undef, <4 x i32> <i32 undef, i32 1, i32 2, i32 3> ret <4 x float> %shuf } We were simplifying that to the input operand. But as discussed in PR43958: https://bugs.llvm.org/show_bug.cgi?id=43958 ...that means that per-vector-element poison that would be stopped by the shuffle can now leak to the result. Also note that we still have (and there are tests for) the same transform with no undef elements in the mask (a fully-defined identity mask). I don't think there's any controversy about that case - it's a valid transform under any interpretation of shufflevector/undef/poison. Looking at a few of the diffs into codegen, I don't see any difference in final asm. So depending on your perspective, that's good (no real loss of optimization power) or bad (poison exists in the DAG, so we only partially fixed the bug). Differential Revision: https://reviews.llvm.org/D70246
* Fixed -Wdeprecated-copy warnings in gtest. NFCI.Dávid Bolvanský2019-11-243-80/+81
|
* [PowerPC] Spill CR LT bits on P9 using setbAmy Kwan2019-11-242-0/+71
| | | | | | | | | | | | | | | | This patch aims to spill CR[0-7]LT bits on POWER9 using the setb instruction. The sequence on P9 to spill these bits will be: setb %reg, %CRREG stw %reg, $FI Instead of the typical sequence: mfocrf %reg, %CRREG rlwinm %reg1, %reg, $SH, 0, 0 stw %reg1, $FI Differential Revision: https://reviews.llvm.org/D68443
* [ModuloSchedule] Fix a bug in experimental expanderThomas Raoux2019-11-234-15/+70
| | | | | | | | | Fix two problems that popped up after my last patch. One is that the stiching of prologue/epilogue can be wrong when reading a value from a previsou stage. Also changed how we duplicate phi instructions to avoid generating extra phi that we delete later. Differential Revision: https://reviews.llvm.org/D70213
* [Diagnostics] Make behaviour of Clang's -Wdeprecated-copy same as in GCCDávid Bolvanský2019-11-232-2/+9
| | | | Do not warn for functions that are explicitly marked delete or default, which follows the behavior of the GCC warning.
* [pdbutil] Fixed -Wdeprecated-copy in DbiModuleDescriptorDávid Bolvanský2019-11-232-7/+3
|
* Reland 'Fixed -Wdeprecated-copy warnings. NFCI.'Dávid Bolvanský2019-11-2311-4/+39
| | | | Fixed hashtable copy ctor.
* [lldb][NFC] Do an early exit in LookupLocalVarNamespace and LookUpLldbObjCClassRaphael Isemann2019-11-232-48/+56
|
* gn build: set HAVE_VCS_VERSION_INC while building Version.cppNico Weber2019-11-235-30/+101
| | | | | | | | | | And belatedly merge r353268 / r353269. test/Driver/wasm-toolchain-lto.c currently requires getLLVMRevision() to return something non-empty to pass. That's hopefully temporary, but making Version.cpp work is probalby a good idea regardless. (Note its contents will by default usually be out-of-date, because llvm_allow_tardy_revision defaults to false.)
* [ELF][test] Clean up some thunk testsFangrui Song2019-11-236-85/+85
| | | | | Use llvm-objdump --no-show-raw-insn --print-imm-hex Prefer generic aarch64 triple to linux/freebsd specific triples.
* Revert 'Fixed -Wdeprecated-copy warnings. NFCI.'Dávid Bolvanský2019-11-2311-39/+4
| | | | pdbutil's test is failing.
* Fixed typo introduced before commiting previous patch. NFCI.Dávid Bolvanský2019-11-231-1/+1
|
* Fixed -Wdeprecated-copy warnings. NFCI.Dávid Bolvanský2019-11-2311-4/+39
|
OpenPOWER on IntegriCloud