summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Try harder to find a plausible `clang` as argv0, particularly on Mac.Sam McCall2019-12-023-17/+142
| | | | | | | | | | | | | | | | | | | Summary: Fixes https://github.com/clangd/clangd/issues/211 Fixes https://github.com/clangd/clangd/issues/178 No tests - this is hard to test, and basically impossible to verify what we want (this produces compile commands that work on a real mac with recent toolchain) (Need someone on mac to verify it actually fixes these!) Reviewers: kbobyrev, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70863
* [llvm-exegesis] Fix 44b9942898c7.Clement Courbet2019-12-022-0/+14
| | | | | | | | | | | | | | Summary: Add missing stack release instructions in loadImplicitRegAndFinalize. Reviewers: pengfei, gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70903
* [InstCombine] Revert rL341831: relax one-use check in foldICmpAddConstant() ↵Roman Lebedev2019-12-025-52/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (PR44100) rL341831 moved one-use check higher up, restricting a few folds that produced a single instruction from two instructions to the case where the inner instruction would go away. Original commit message: > InstCombine: move hasOneUse check to the top of foldICmpAddConstant > > There were two combines not covered by the check before now, > neither of which actually differed from normal in the benefit analysis. > > The most recent seems to be because it was just added at the top of the > function (naturally). The older is from way back in 2008 (r46687) > when we just didn't put those checks in so routinely, and has been > diligently maintained since. From the commit message alone, there doesn't seem to be a deeper motivation, deeper problem that was trying to solve, other than 'fixing the wrong one-use check'. As i have briefly discusses in IRC with Tim, the original motivation can no longer be recovered, too much time has passed. However i believe that the original fold was doing the right thing, we should be performing such a transformation even if the inner `add` will not go away - that will still unchain the comparison from `add`, it will no longer need to wait for `add` to compute. Doing so doesn't seem to break any particular idioms, as least as far as i can see. References https://bugs.llvm.org/show_bug.cgi?id=44100
* [PowerPC] Fix crash in peephole optimizationNemanja Ivanovic2019-12-022-2/+60
| | | | | | | | | | | | When converting reg+reg shifts to reg+imm rotates, we neglect to consider the CodeGenOnly versions of the 32-bit shift mnemonics. This means we produce a rotate with missing operands which causes a crash. Committing this fix without review since it is non-controversial that the list of mnemonics to consider should include the 64-bit aliases for the exact mnemonics. Fixes PR44183.
* [ARM][AArch64] Complex addition Neon intrinsics for Armv8.3-AVictor Campos2019-12-0213-1/+328
| | | | | | | | | | | | | | | | | | | Summary: Add support for vcadd_* family of intrinsics. This set of intrinsics is available in Armv8.3-A. The fp16 versions require the FP16 extension, which has been available (opt-in) since Armv8.2-A. Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D70862
* [InstCombine] fold copysign with constant sign argument to (fneg+)fabsSanjay Patel2019-12-022-8/+25
| | | | | | | | | | | | | | | If the sign of the sign argument is known (this could be extended to use ValueTracking), then we can use fneg+fabs to clear/set the sign bit of the magnitude argument. http://llvm.org/docs/LangRef.html#llvm-copysign-intrinsic This transform is already done in DAGCombiner, but we can do it sooner in IR as suggested in PR44153: https://bugs.llvm.org/show_bug.cgi?id=44153 We have effectively no analysis for copysign in IR, so we are taking the unusual step of increasing the number of IR instructions for the negative constant case. Differential Revision: https://reviews.llvm.org/D70792
* [OpenCL] Fix address space for implicit conversion (PR43145)Sven van Haastregt2019-12-022-3/+31
| | | | | | | | | | Clang was creating a DerivedToBase ImplicitCastExpr that was also casting between address spaces as part of the second step in the standard conversion sequence. Defer the address space conversion to the third step in the sequence instead, such that we get a separate ImplicitCastExpr for the address space conversion. Differential Revision: https://reviews.llvm.org/D70605
* [lldb][NFC] Don't calculate member indices in ↵Raphael Isemann2019-12-021-2/+0
| | | | | | DWARFASTParserClang::ParseChildMembers We keep counting members and then don't do anything with the computed result.
* [lldb][NFC] Use raw_ostream instead of Stream in Baton::GetDescriptionRaphael Isemann2019-12-028-49/+56
| | | | | Removing raw_ostream here is getting us closer to removing LLDB's Stream class.
* [X86] Add initialization of FPCW in llvm-exegesisWang, Pengfei2019-12-022-5/+20
| | | | | | | | | | | | Summary: This is a following up to D70874. It adds the initialization of FPCW in llvm-exegesis. Reviewers: craig.topper, RKSimon, courbet, gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70891
* [llvm-readobj/llvm-readelf] - Simplify the code that dumps versions.Georgii Rymar2019-12-023-153/+166
| | | | | | | | | | | | After changes introduced in D70495 and D70826 its now possible to significantly simplify the code we have. This also fixes an issue: previous code assumed that version strings should always be read from the dynamic string table. While it is normally true, the string table should be taken from the corresponding sh_link field. Differential revision: https://reviews.llvm.org/D70855
* AMDGPU: Fixed indeterminate map iteration in SIPeepholeSDWATim Renouf2019-12-021-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D70783 Change-Id: Ic26f915a4acb4c00ecefa9d09d7c24cec370ed06
* [lldb][NFC] Make Stream's IndentLevel an unsigned integers.Raphael Isemann2019-12-023-11/+13
| | | | | We expect it to be always positive values and LLVM/Clang's IndentLevel values are already unsigned integers, so we should do the same.
* [ARM][MVE][Intrinsics] Add VMINQ/VMAXQ/VMINNMQ/VMAXNMQ intrinsics.Mark Murray2019-12-0212-38/+731
| | | | | | | | | | Summary: Add VMINQ/VMAXQ/VMINNMQ/VMAXNMQ intrinsics and their predicated versions. Add unit tests. Subscribers: kristof.beyls, hiraditya, dmgreen, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D70829
* [update_cc_test_checks.py] Handle extern "C" and namespacesAlex Richardson2019-12-021-9/+18
| | | | | | | | | | | | | | | | | | Summary: My change to use the clang AST JSON dump did not handle functions declared inside scopes other than the root TranslationUnitDecl. After this change update_cc_test_checks.py also works for C++ test cases that use extern "C" and namespaces. Reviewers: MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70389
* [UpdateTestChecks] Share the code to parse RUN: lines between all scriptsAlex Richardson2019-12-027-150/+62
| | | | | | | | | | | | | | | | Summary: This commit also introduces a common.debug() function to avoid many `if args.verbose:` statements. Depends on D70428. Reviewers: xbolva00, MaskRay, jdoerfert Reviewed By: MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70432
* [lldb][NFC] Add 'breakpoint command list' testRaphael Isemann2019-12-022-0/+62
| | | | | | The command has zero test coverage and I'll have to touch the code formatting the output commands, so let's start by adding a test for it.
* [ARM] Remove VHADD patternsDavid Green2019-12-022-78/+48
| | | | | | | | | | | | | | | These instructions do not work quite like I expected them to. They perform the addition and then shift in a higher precision integer, so do not match up with the patterns that we added. For example with s8s, adding 100 and 100 should wrap leaving the shift to work on a negative number. VHADD will instead do the arithmetic in higher precision, giving 100 overall. The vhadd gives a "better" result, but not one that matches up with the input. I am just removing the patterns here. We might be able to re-add them in the future by checking for wrap flags or changing bitwidths. But for the moment just remove them to remove the problem cases.
* [X86] Add initialization of MXCSR in llvm-exegesisWang, Pengfei2019-12-022-0/+20
| | | | | | | | | | | | Summary: This patch is used to initialize the new added register MXCSR. Reviewers: craig.topper, RKSimon Subscribers: tschuett, courbet, llvm-commits, LiuChen3 Tags: #llvm Differential Revision: https://reviews.llvm.org/D70874
* [InstCombine] Fix big-endian miscompile of (bitcast (zext/trunc (bitcast)))Bjorn Pettersson2019-12-022-32/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: optimizeVectorResize is rewriting patterns like: %1 = bitcast vector %src to integer %2 = trunc/zext %1 %dst = bitcast %2 to vector Since bitcasting between integer an vector types gives different integer values depending on endianness, we need to take endianness into account. As it happens the old implementation only produced the correct result for little endian targets. Fixes: https://bugs.llvm.org/show_bug.cgi?id=44178 Reviewers: spatel, lattner, lebedev.ri Reviewed By: spatel, lebedev.ri Subscribers: lebedev.ri, hiraditya, uabelho, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70844
* [llvm-readelf/llvm-readobj] - Check the version of SHT_GNU_verneed section ↵Georgii Rymar2019-12-022-0/+37
| | | | | | | | | | | | | | | entries. It is a follow-up for D70826 and it is similar to D70810. SHT_GNU_verneed contains the following fields: `vn_version`: Version of structure. This value is currently set to 1, and will be reset if the versioning implementation is incompatibly altered. (https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html) We should check it for correctness. Differential revision: https://reviews.llvm.org/D70842
* [ORC] Add a runAsMain utility function to ExecutionUtils.Lang Hames2019-12-025-42/+48
| | | | | | | | | | | The runAsMain function takes a pointer to a function with a standard C main signature, int(*)(int, char*[]), and invokes it using the given arguments and program name. The arguments are copied into writable temporary storage as required by the C and C++ specifications, so runAsMain safe to use when calling main functions that modify their arguments in-place. This patch also uses the new runAsMain function to replace hand-rolled versions in lli, llvm-jitlink, and the SpeculativeJIT example.
* [ExecutionEngine] Add a jitTargetAddressToFunction utility function.Lang Hames2019-12-021-0/+18
| | | | | | | | | | | | jitTargetAddressToFunction takes a JITTargetAddress and returns a pointer of the given function pointer type suitable for calling to invoke the function at the target address. jitTargetAddressToFunction currently behaves the same as jitTargetAddressToPointer, but in the near future will be updated to perform pointer signing on architectures that require it (e.g. arm64e). For this reason it should always be preferred when generating callable pointers for JIT'd functions.
* [Orc] Add setters for target options and features to JITTargetMachineBuilder.Lang Hames2019-12-022-3/+18
| | | | Also remove redundant feature initialization steps from the detectHost method.
* [clangd] Fix a regression issue in local rename.Haojian Wu2019-12-022-7/+20
| | | | | | | | | | | | | | Summary: The regression is that we can't rename symbols in annonymous namespaces. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70853
* [llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verneed ↵Georgii Rymar2019-12-022-98/+390
| | | | | | | | | | section. This is similar to D70495, but for SHT_GNU_verneed section. It solves the same problems: different implementations, lack of error reporting and no test coverage. DIfferential revision: https://reviews.llvm.org/D70826
* [NFC] Precommit test showing SROA loses `!tbaa.struct` metadataAnton Afanasyev2019-12-021-0/+32
| | | | This issue impacts llvm.org/pr42022
* [Clang-Tidy] Quick fix for bug in bugprone-macro-parentheses 43804Adam Balogh2019-12-022-1/+2
| | | | | | | | | Applying parentheses for statement leads to compilation error. Bug [[ 43804 | https://bugs.llvm.org/show_bug.cgi?id=43804 ]] is a compilation error suggested by a wrong fix of this checker. This patch is a quick fix for this issue. Differential Revision: https://reviews.llvm.org/D70850
* Fix broken comment phrasing and indentationMatt Arsenault2019-12-021-7/+6
|
* AMDGPU/GlobalISel: Add AGPR bank and RegBankSelect mfma intrinsicsAustin Kerbow2019-12-016-14/+1077
| | | | Differential Revision: https://reviews.llvm.org/D70871
* [SCEV] Make SCEV verification available from command line with new PMDaniil Suchkov2019-12-023-0/+14
| | | | | | | | | | | | | | | | New pass manager doesn't use verifyAnalysis, so currently there is no way to call SCEV verification from command line when new PM is used. This patch adds a pass that allows you to do that. Reviewers: reames, fhahn, sanjoy.google, nikic Reviewed By: fhahn Subscribers: hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70423
* Revert "[Examples] Add IRTransformations directory to examples."Florian Hahn2019-12-0116-992/+0
| | | | | | | | | This breaks LLVMExports.cmake in some build configurations. PR44197 This reverts commits ceb72d07b004af9c428c4a3c73a98ea97d49a713 7d0b1d77b3d4d47df477519fd1bf099b3df6f899.
* Revert "[clang][modules] Add support for merging lifetime-extended temporaries"Tyker2019-12-0110-84/+1
| | | | This reverts commit a3cbe1a202df6ec8e23bd55e14db254e4bc33021.
* [clang][modules] Add support for merging lifetime-extended temporariesTyker2019-12-0110-1/+84
| | | | | | | | | | | | | | Summary: Add support for merging lifetime-extended temporaries Reviewers: rsmith Reviewed By: rsmith Subscribers: xbolva00, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70190
* [X86][InstCombine] Move non-X86 specific instcombine test from ↵Craig Topper2019-12-011-0/+0
| | | | test/CodeGen/X86/ to test/Transforms/InstCombine/
* [X86][InstCombine] Move instcombine test from test/CodeGen/X86 to ↵Craig Topper2019-12-011-2/+8
| | | | test/Transforms/InstCombine/ and replace grep with FileCheck
* [libunwind] Emit dependent libraries only when detected by CMakeMichał Górny2019-12-013-3/+8
| | | | | | | | | | | | | | | | | | | 996e62eef75 added Linux-specific dependent libraries to libunwind sources. As a result, building libunwind with modern LLD on *BSD started failing due to trying to link libdl. Instead, add those libraries only if they were detected by CMake. While technically we could create a long list of systems that need -ldl and -lpthread, maintaining a duplicate list makes little sense when CMake needs to detect it for non-LLD systems anyway. Remove existing system exceptions since they should be covered by the CMake check anyway. Remove -D_LIBUNWIND_HAS_COMMENT_LIB_PRAGMA since it is no longer explicitly needed, if we make the library-specific defines dependent on presence of this pragma support. Differential Revision: https://reviews.llvm.org/D70868
* remove UB from test by making GV alignment explicitNuno Lopes2019-12-011-4/+4
|
* Revert "[clang][modules] Add support for merging lifetime-extended temporaries"Tyker2019-12-0110-84/+1
| | | | This reverts commit 85c74384778909789389b9012a75cfcca7964a28.
* [clang][modules] Add support for merging lifetime-extended temporariesTyker2019-11-3010-1/+84
| | | | | | | | | | | | | | Summary: Add support for merging lifetime-extended temporaries Reviewers: rsmith Reviewed By: rsmith Subscribers: xbolva00, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70190
* [Format] Add format check for coroutine keywords with negative numbersBrian Gesiak2019-11-302-1/+5
| | | | | | | | | | | | | | | | | | Summary: As a followup to D69144, this diff fixes the coroutine keyword spacing for co_yield / co_returning negative numbers. Reviewers: modocache, sammccall, Quuxplusone Reviewed By: modocache Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69180 Patch by Jonathan Thomas (jonathoma)!
* [X86] Add floating point execution domain to ↵Craig Topper2019-11-3010-145/+170
| | | | comi/ucomi/cvtss2si/cvtsd2si/cvttss2si/cvttsd2si/cvtsi2ss/cvtsi2sd instructions.
* [InstCombine] Expand usub_sat patterns to handle constantsDavid Green2019-11-303-26/+27
| | | | | | | | The constants come through as add %x, -C, not a sub as would be expected. They need some extra matchers to canonicalise them towards usub_sat. Differential Revision: https://reviews.llvm.org/D69514
* [InstCombine] Adjust usub_sat fold one use checksDavid Green2019-11-302-13/+12
| | | | | | This adjusts the one use checks in the the usub_sat fold code to not increase instruction count, but otherwise do the fold. Reviewed as a part of D69514.
* [InstCombine] More usub_sat tests. NFC.David Green2019-11-302-1/+300
|
* Revert "[clang][modules] Add support for merging lifetime-extended temporaries"Tyker2019-11-3010-88/+1
| | | | This reverts commit 3c7f6b439699a9cbbc0ac8d288cc70aff357446b.
* [clang][modules] Add support for merging lifetime-extended temporariesTyker2019-11-3010-1/+88
| | | | | | | | | | | | | | Summary: Add support for merging lifetime-extended temporaries Reviewers: rsmith Reviewed By: rsmith Subscribers: xbolva00, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70190
* Revert 651f07908a1 "[AArch64] Don't combine callee-save and local stack ↵Hans Wennborg2019-11-302-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adjustment when optimizing for size" This caused asserts (and perhaps also miscompiles) while building for Windows on AArch64. See the discussion on D68530 for details and reproducer. Reverting until this can be investigated and fixed. > For arm64, D18619 introduced the ability to combine bumping the stack pointer > upfront in case it needs to be bumped for both the callee-save area as well as > the local stack area. > > That diff already remarks that "This change can cause an increase in > instructions", but argues that even when that happens, it should be still be a > performance benefit because the number of micro-ops is reduced. > > We have observed that this code-size increase can be significant in practice. > This diff disables combining stack bumping for methods that are marked as > optimize-for-size. > > Example of a prologue with the behavior before this diff (combining stack bumping when possible): > sub sp, sp, #0x40 > stp d9, d8, [sp, #0x10] > stp x20, x19, [sp, #0x20] > stp x29, x30, [sp, #0x30] > add x29, sp, #0x30 > [... compute x8 somehow ...] > stp x0, x8, [sp] > > And after this diff, if the method is marked as optimize-for-size: > stp d9, d8, [sp, #-0x30]! > stp x20, x19, [sp, #0x10] > stp x29, x30, [sp, #0x20] > add x29, sp, #0x20 > [... compute x8 somehow ...] > stp x0, x8, [sp, #-0x10]! > > Note that without combining the stack bump there are two auto-decrements, > nicely folded into the stp instructions, whereas otherwise there is a single > sub sp, ... instruction, but not folded. > > Patch by Nikolai Tillmann! > > Differential Revision: https://reviews.llvm.org/D68530
* Updated the OCaml/bitwriter.ml test for OCaml 4.06+Dmitri Gribenko2019-11-301-2/+2
| | | | | | | | | | | | | | | Since OCaml 4.02 (released in 2014), strings and bytes are different types, but up until OCaml 4.06, the compiler defaulted to a compatibility mode "unsafe-string". OCaml 4.06 flips the default to "safe-string", breaking the test. This change should be compatible with OCaml 4.02+, but is only truly necessary for OCaml 4.06+. For more information, see: https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html https://ocaml.org/releases/4.02.html
* Fix a typo.Hans Wennborg2019-11-301-1/+1
|
OpenPOWER on IntegriCloud