summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
|
* [analyzer][docs] NFC: Extend documentation for MallocOverflow checkerBorsik Gabor2019-11-231-0/+6
| | | | | | Patch by Benics Balázs Differential Revision: https://reviews.llvm.org/D70596
* [lldb][NFC] NFC refactoring for ↵Raphael Isemann2019-11-231-55/+30
| | | | | | ClangExpressionDeclMap::LookupInModulesDeclVendor Early exiting and deduplicating copy-pasted code.
* [analyzer] Add custom filter functions for GenericTaintCheckerBorsik Gabor2019-11-235-58/+124
| | | | | | | | | | | This patch is the last of the series of patches which allow the user to annotate their functions with taint propagation rules. I implemented the use of the configured filtering functions. These functions can remove taintedness from the symbols which are passed at the specified arguments to the filters. Differential Revision: https://reviews.llvm.org/D59516
* [FileCheck] Fixed -Wdeprecated-copy warning. NFCI.Dávid Bolvanský2019-11-231-0/+1
|
* Revert "[InlineCost] Fix infinite loop in indirect call evaluation"Ehud Katz2019-11-232-146/+84
| | | | | | | This reverts commit 854e956219e78cb8d7ef3b021d7be6b5d6b6af04. It broke tests: Transforms/Inline/redundant-loads.ll Transforms/SampleProfile/inline-callee-update.ll
* [NFC] [AArch64] Fix wrong documentation for IsStoreRegOffsetOpDavid Tellenbach2019-11-231-1/+1
|
* Fix llvm-namespace-comment for macro expansionsMarcin Twardak2019-11-234-16/+179
| | | | | If a namespace is a macro name, it should be allowed to close the namespace with the same name.
* [lldb][NFC] NFC refactoring ClangExpressionDeclMap::LookupLocalVariableRaphael Isemann2019-11-231-36/+33
| | | | | Adding an early exits and moving variable declarations closer to their actual use.
* AMDGPU: Handle waitcnt overflowAustin Kerbow2019-11-232-1/+176
| | | | | | | | | | | | | | | | | | | | | | Summary: The waitcnt pass can overflow the counters when the number of outstanding events for a type exceed the capacity of the counter. This can lead to inefficient insertion of waitcnts, or to waitcnt instructions with max values for each type. The last situation can cause an instruction which when disassembled appears to be an illegal waitcnt without an operand. In these cases we should add a wait for the 'counter maximum' - 1, and update the waitcnt brackets accordingly. Reviewers: rampitec, arsenm Reviewed By: rampitec Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70418
* [InlineCost] Fix infinite loop in indirect call evaluationEhud Katz2019-11-232-84/+146
| | | | | | | | | | | | | | | Currently every time we encounter an indirect call of a known function, we try to evaluate the inline cost of that function. In case of a recursion, that evaluation never stops. The solution presented is to evaluate only the indirect call of the function, while any further indirect calls (of a known function) will be treated just as direct function calls, which, actually, never tries to evaluate the call. Fixes PR35469. Differential Revision: https://reviews.llvm.org/D69349
OpenPOWER on IntegriCloud