summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [lldb] Fix a -Wreturn-type warning on gccPavel Labath2019-12-201-0/+1
|
* [lldb/pexpect] Force-set the TERM environment variablePavel Labath2019-12-201-1/+7
| | | | | | | | | In some environments (typically, buildbots), this variable may not be available. This can cause tests to behave differently. Explicitly set the variable to "vt100" to ensure consistent test behavior. It should not matter that we do not inherit the process TERM variable, as the child process runs in a new virtual terminal anyway.
* [OPT-DBG] Teach DbgEntityHistoryCalculator about meta-instructions.Tom Weaver2019-12-205-5/+165
| | | | | | | | | | | | | | The calculator was considering instructions such as KILLs as clobbers of a physical address. This is wrong as meta instructions such as KILLs produce no output in the final program and thus don't clobber or change any physical location's value. As a result they're safe to ignore whilst calculating location list ranges. reviewers: aprantl, vsk diff revision: https://reviews.llvm.org/D70497 fixes: https://bugs.llvm.org/show_bug.cgi?id=38753
* [AArch64] add more tests for extract-bitcast-splat; NFCSanjay Patel2019-12-201-2/+44
| | | | | Goes with D71672 - we should be able to handle casting to a wider type as well as casting to a narrower type.
* [lldb] Add tests for ClangASTImporter's DeportType and DeportDecl methodsRaphael Isemann2019-12-201-11/+82
|
* Parenthesized a logical expression.Dmitri Gribenko2019-12-201-1/+1
| | | | This change fixes a warning on the ppc64be buildbot.
* Use isa instead of dyn_castDmitri Gribenko2019-12-201-1/+1
|
* [LV] Strip wrap flags from vectorized reductionsAyal Zaks2019-12-209-22/+118
| | | | | | | | | | | | A sequence of additions or multiplications that is known not to wrap, may wrap if it's order is changed (i.e., reassociated). Therefore when vectorizing integer sum or product reductions, their no-wrap flags need to be removed. Fixes PR43828 Patch by Denis Antrushin Differential Revision: https://reviews.llvm.org/D69563
* [lldb] Fix test using lld on non-linux systemsJohannes Altmanninger2019-12-202-4/+4
|
* [AArch64][SVE] Fold constant multiply of element countCullen Rhodes2019-12-204-1/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: E.g. %0 = tail call i64 @llvm.aarch64.sve.cntw(i32 31) %mul = mul i64 %0, <const> Should emit: cntw x0, all, mul #<const> For <const> in the range 1-16. Patch by Kerry McLaughlin Reviewers: sdesmalen, huntergr, dancgr, rengolin, efriedma Reviewed By: sdesmalen Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71014
* [lldb] Make that we can call HostInfo::Initialize and HostInfo::Terminate ↵Raphael Isemann2019-12-201-44/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | multiple times Summary: HostInfo's state isn't actually fully rested after calling ::Terminate. Currently we only reset the values of all the `HostInfoBaseFields` but not all the variables with static storage that keep track of whether the fields need to be initialised. This breaks random unit tests as running them twice (or running multiple test instances in one run) will cause that the second time we ask HostInfo for any information we get the default value back for any field. This patch moves all the once_flag's into the `HostInfoBaseFields` so that they also get reseted by ::Terminate and removes all the `success` bools. We should also rewrite half this code but I would prefer if my tests aren't broken over the holidays so let's just put some duct tape on it for now. Reviewers: labath Reviewed By: labath Subscribers: abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71748
* [AArch64][SVE] Add intrnisics for saturating scalar arithmeticAndrzej Warzynski2019-12-207-69/+1416
| | | | | | | | | | | | | | | | | | | | | | Summary: The following intrnisics are added: * @llvm.aarch64.sve.sqdec{b|h|w|d|p} * @llvm.aarch64.sve.sqinc{b|h|w|d|p} * @llvm.aarch64.sve.uqdec{b|h|w|d|p} * @llvm.aarch64.sve.uqinc{b|h|w|d|p} For every intrnisic there a scalar variants (with n32 or n64 suffix) and vector variants (no suffix). Reviewers: sdesmalen, rengolin, efriedma Reviewed By: sdesmalen, efriedma Subscribers: eli.friedman, tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71252
* Recommit "[AArch64][SVE] Add permutation and selection intrinsics"Cullen Rhodes2019-12-207-58/+1945
| | | | | | | | Recommit 23c28c40436143006be740533375c036d11c92cd (reverted in dcb48f50bdfa0fa47b62d089b6ed999d857fc9f8) with a fix for an assert "Request for a fixed size on a scalable object" being triggered in `LowerSVEIntrinsicEXT`. The fix is to call `getKnownMinSize` on the TypeSize object.
* [AArch64][SVE] Add intrinsics for binary narrowing operationsAndrzej Warzynski2019-12-205-22/+610
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following intrinsics for binary narrowing shift righ operations are added: * @llvm.aarch64.sve.shrnb * @llvm.aarch64.sve.uqshrnb * @llvm.aarch64.sve.sqshrnb * @llvm.aarch64.sve.sqshrunb * @llvm.aarch64.sve.uqrshrnb * @llvm.aarch64.sve.sqrshrnb * @llvm.aarch64.sve.sqrshrunb * @llvm.aarch64.sve.shrnt * @llvm.aarch64.sve.uqshrnt * @llvm.aarch64.sve.sqshrnt * @llvm.aarch64.sve.sqshrunt * @llvm.aarch64.sve.uqrshrnt * @llvm.aarch64.sve.sqrshrnt * @llvm.aarch64.sve.sqrshrunt Reviewers: sdesmalen, rengolin, efriedma Reviewed By: efriedma Subscribers: tschuett, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71552
* [clang][Tooling] Prefer -x over -std when interpolatingKadir Cetinkaya2019-12-202-1/+6
| | | | | | | | | | | | | | | | | | | Summary: Currently interpolation logic prefers -std over -x. But the latter is a more strong signal, so this patch inverts the order and only makes use of -std if -x didn't exist. Fixes https://github.com/clangd/clangd/issues/185 Thanks @sammccall for tracking this down! Reviewers: sammccall Subscribers: ilya-biryukov, usaxena95, cfe-commits, sammccall Tags: #clang Differential Revision: https://reviews.llvm.org/D71727
* [lldb] Added test for objc_direct calls with categoriesRaphael Isemann2019-12-201-0/+13
| | | | As pointed out in D71694 this wasn't tested before in LLDB.
* [ARM][MVE] Fixes for tail predication.Sam Parker2019-12-209-17/+651
| | | | | | | | | | | | | | | | | | 1) Fix an issue with the incorrect value being used for the number of elements being passed to [d|w]lstp. We were trying to check that the value was available at LoopStart, but this doesn't consider that the last instruction in the block could also define the register. Two helpers have been added to RDA for this. 2) Insert some code to now try to move the element count def or the insertion point so that we can perform more tail predication. 3) Related to (1), the same off-by-one could prevent us from generating a low-overhead loop when a mov lr could have been the last instruction in the block. 4) Fix up some instruction attributes so that not all the low-overhead loop instructions are labelled as branches and terminators - as this is not true for dls/dlstp. Differential Revision: https://reviews.llvm.org/D71609
* Re-land "[cmake] Add dependency on llvm-dwarfdump to llvm-locstats"David Spickett2019-12-201-0/+4
| | | | This reverts commit f8e2ab3cd347cb7fb959ea0ece795f4eb347094c.
* [lldb] Remove XFAIL from TestDeadStrip.pyPavel Labath2019-12-201-2/+0
| | | | Fixed by 92211b.
* [ARM][MVE] Tail predicate in the presence of vcmpSam Parker2019-12-207-158/+1251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Record the discovered VPT blocks while checking for validity and, for now, only handle blocks that begin with VPST and not VPT. We're now allowing more than one instruction to define vpr, but each block must somehow be predicated using the vctp. This leaves us with several scenarios which need fixing up: 1) A VPT block with is only predicated by the vctp and has no internal vpr defs. 2) A VPT block which is only predicated by the vctp but has an internal vpr def. 3) A VPT block which is predicated upon the vctp as well as another vpr def. 4) A VPT block which is not predicated upon a vctp, but contains it and all instructions within the block are predicated upon in. The changes needed are, for: 1) The easy one, just remove the vpst and unpredicate the instructions in the block. 2) Remove the vpst and unpredicate the instructions up to the internal vpr def. Need insert a new vpst to predicate the remaining instructions. 3) No nothing. 4) The vctp will be inside a vpt and the instruction will be removed, so adjust the size of the mask on the vpst. Differential Revision: https://reviews.llvm.org/D71107
* [ARM][MVE] Tail predicate bottom/top muls.Sam Parker2019-12-202-1/+27
| | | | | | Add VMULL and VQDMULL variants to our tail predication white list. Differential Revision: https://reviews.llvm.org/D71465
* [clang] Fix the canonicalization of paths in -fdiagnostics-absolute-pathsKarl-Johan Karlsson2019-12-204-19/+55
| | | | | | | | | | | | | | | | In the current implementation of clang the canonicalization of paths in diagnostic messages (when using -fdiagnostics-absolute-paths) only works if the symbolic link is in the directory part of the filename, not if the file itself is a symbolic link to another file. This patch adds support to canonicalize the complete path including the file. Reviewers: rsmith, hans, rnk, ikudrin Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D70527
* [LLDB] Fix address computation for inline functionJohannes Altmanninger2019-12-203-3/+40
| | | | | | | | | | | | | | | | | | | | Summary: Fixes PR41237 - SIGSEGV on call expression evaluation when debugging clang When linking multiple compilation units that define the same functions, the functions is merged but their debug info is not. This ignores debug info entries for functions in a non-executable sections; those are functions that were definitely dropped by the linker. Reviewers: spyffe, clayborg, jasonmolenda Reviewed By: clayborg Subscribers: labath, aprantl, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71487
* [X86] Make EmitCmp into a static function and explicitly return chain result ↵Craig Topper2019-12-192-18/+19
| | | | | | | | | | | | for STRICT_FCMP. NFCI The only thing its getting from the X86TargetLowering class is the subtarget which we can easily pass. This function only has one call site now since this might help the compiler inline it. Explicitly return both the flag result and the chain result for STRICT_FCMP nodes. This removes an assumption in the caller that getValue(1) is the right way to get the chain.
* [X86] Directly call EmitTest in two places instead of creating a null ↵Craig Topper2019-12-191-4/+2
| | | | | | | | | constant and calling EmitCmp. NFCI EmitCmp will just immediately call EmitTest and discard the null constant only to have EmitTest create it again if it doesn't fold. So just skip all that and go directly to EmitTest.
* [Orc][LLJIT] Re-apply 298e183e813 (use JITLink for LLJIT where supported).Lang Hames2019-12-192-3/+13
| | | | Patch d9220b580b3 fixed the underlying issue that casued 298e183e813 to fail.
* [JITLink][MachO] Fix common symbol size plumbing.Lang Hames2019-12-193-2/+7
| | | | This fixes the underlying bug that was exposed by 298e183e813.
* CWG2352: Allow qualification conversions during reference binding.Richard Smith2019-12-1910-153/+250
| | | | | | | | | | | | | | | The language wording change forgot to update overload resolution to rank implicit conversion sequences based on qualification conversions in reference bindings. The anticipated resolution for that oversight is implemented here -- we order candidates based on qualification conversion, not only on top-level cv-qualifiers. For OpenCL/C++, this allows reference binding between pointers with differing (nested) address spaces. This makes the behavior of reference binding consistent with that of implicit pointer conversions, as is the purpose of this change, but that pre-existing behavior for pointer conversions is itself probably not correct. In any case, it's now consistently the same behavior and implemented in only one place.
* [CommandLine] Add template instantiations of cl::parser for long and long long.River Riddle2019-12-192-0/+68
| | | | | | | | This allows cl::opt<int64_t>. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D71729
* [X86] Add test case for miscompilation of a vector setcc on KNL target. NFCCraig Topper2019-12-191-0/+43
|
* [lit] Add "from .main import main" back into lit/__init__.pyJessica Paquette2019-12-191-0/+1
| | | | | | | | | | | | | | | A refactoring commit (cf252240) removed this line. Removing it broke installing lit with pip and setup.py. This adds the line back in so that we can install lit again. For an example of how this appeared, see: http://green.lab.llvm.org/green/job/LNT_Tests/5853/ File "/Users/buildslave/jenkins/...s/__init__.py", line 2453, in resolve raise ImportError(str(exc)) ImportError: 'module' object has no attribute 'main'
* [NFC][InlineCost] Simplify internal inlining cost interfaceMircea Trofin2019-12-191-11/+11
| | | | | | | | | | | | | | | | | Summary: All the use cases of CallAnalyzer use the same call site parameter to both construct the CallAnalyzer, and then pass to the analysis member. This change removes this duplication. Reviewers: davidxl, eraman, Jim Reviewed By: davidxl Subscribers: Jim, hiraditya, haicheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71645
* Fix crash on init-capture packs where the type of the initializer is ↵Richard Smith2019-12-194-3/+15
| | | | non-dependent.
* [analyzer] Add a syntactic security check for ObjC NSCoder API.Artem Dergachev2019-12-195-1/+129
| | | | | | | Method '-[NSCoder decodeValueOfObjCType:at:]' is not only deprecated but also a security hazard, hence a loud check. Differential Revision: https://reviews.llvm.org/D71728
* [ValueTracking] isKnownNonZero() should take non-null-ness assumptions into ↵Roman Lebedev2019-12-203-25/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | consideration (PR43267) Summary: It is pretty common to assume that something is not zero. Even optimizer itself sometimes emits such assumptions (e.g. `addAssumeNonNull()` in `PromoteMemoryToRegister.cpp`). But we currently don't deal with such assumptions :) The only way `isKnownNonZero()` handles assumptions is by calling `computeKnownBits()` which calls `computeKnownBitsFromAssume()`. But `x != 0` does not tell us anything about set bits, it only says that there are *some* set bits. So naturally, `KnownBits` does not get populated, and we fail to make use of this assumption. I propose to deal with this special case by special-casing it via adding a `isKnownNonZeroFromAssume()` that returns boolean when there is an applicable assumption. While there, we also deal with other predicates, mainly if the comparison is with constant. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=43267 | PR43267 ]]. Differential Revision: https://reviews.llvm.org/D71660
* [ValueTracking] isValidAssumeForContext(): CxtI itself also must transfer ↵Roman Lebedev2019-12-202-6/+5
| | | | | | | | | | | | | execution to successor This is a pretty rare case, when CxtI and assume are in the same basic block, with assume being located later. We were already checking that assumption was guaranteed to be executed, but we omitted CxtI itself from consideration, and as the test (miscompile) shows, that is incorrect. As noted in D71660 review by @nikic.
* [NFC][InstCombine] Add a test for assume-induced miscompileRoman Lebedev2019-12-201-0/+17
| | | | | | | | @escape() may throw here, we don't know that assumption, which is located afterwards in the same block, is executed, therefore %load arg of call to @escape() can not be marked as non-null. As noted in D71660 review by @nikic.
* HotColdSplitting: Do not outline within noreturn functionsVedant Kumar2019-12-192-0/+25
| | | | | | | A function marked `noreturn` may contain unreachable terminators: these should not be considered cold, as the function may be a trampoline. rdar://58068594
* [StackMaps] Be explicit about label formation [NFC] (try 2)Philip Reames2019-12-196-29/+69
| | | | | | Recommit after making the same API change in non-x86 targets. This has been build for all targets, and tested for effected ones. Why the difference? Because my disk filled up when I tried make check for all. For auto-padding assembler support, we'll need to bundle the label with the instructions (nops or call sequences) so that they don't get separated. This just rearranges the code to make the upcoming change more obvious.
* ConstrainedFP: use API compatible with opaque pointers.Tim Northover2019-12-192-13/+9
| | | | | | This just updates an IRBuilder interface to take Functions instead of Values so the type can be derived, and fixes some callsites in Clang to call the updated API.
* [gn build] Port 3075cd5c9fcLLVM GN Syncbot2019-12-192-3/+2
|
* Fix the links to clang analyzers checkersSylvestre Ledru2019-12-191-64/+64
|
* Temporarily Revert "[Dsymutil][Debuginfo][NFC] Refactor dsymutil to separate ↵Eric Christopher2019-12-1913-204/+99
| | | | | | | | | | | DWARF optimizing part 2." as it causes a layering violation/dependency cycle: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp -> llvm/DebugInfo/DWARF/DWARFExpression.h llvm/include/llvm/DebugInfo/DWARF/DWARFOptimizer.h -> llvm/CodeGen/NonRelocatableStringpool.h This reverts commit abc7f6800df8a1f40e1e2c9ccce826abb0208284.
* Fix some typos in the clang-tools-extra docSylvestre Ledru2019-12-1918-24/+24
|
* [XCOFF][AIX] Fix for missing of undefined symbols from symbol tablejasonliu2019-12-192-29/+107
| | | | | | | | | Summary: When we use undefined symbol with its qualname, we are not able to generate that symbol because of the logic of early "continue" that skip the qualname symbol. This patch fixes it. Differential revision: https://reviews.llvm.org/D71667
* Implement latest C++ feature test macro recommendations.Richard Smith2019-12-193-15/+34
| | | | | | | | We don't yet advertise init capture packs, because I found some bugs while testing it. We reject-valid and then crash on both of these: template<int ...a> auto x = [...y = a] {}; template<int ...a> auto x = [y = a...] {};
* Temporarily Revert "[StackMaps] Be explicit about label formation [NFC]"Eric Christopher2019-12-193-40/+23
| | | | | | as it broke the aarch64 build. This reverts commit bc7595d934b958ab481288d7b8e768fe5310be8f.
* [clangd] Fix write past end pointerKadir Cetinkaya2019-12-191-5/+4
|
* [StackMaps] Be explicit about label formation [NFC]Philip Reames2019-12-193-23/+40
| | | | For auto-padding assembler support, we'll need to bundle the label with the instructions (nops or call sequences) so that they don't get separated. This just rearranges the code to make the upcoming change more obvious.
* [FaultMaps] Make label formation a bit more explicit [NFC]Philip Reames2019-12-193-5/+8
| | | | This is in advance of assembler padding directives support where we'll need to bundle the label w/the corresponding faulting instruction to avoid padding being inserted between.
OpenPOWER on IntegriCloud