summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] NonNullParamChecker and CStringChecker parameter number in ↵Kristof Umann2019-09-036-34/+45
| | | | | | | | | | | | | | | | | | | | checker message There are some functions which can't be given a null pointer as parameter either because it has a nonnull attribute or it is declared to have undefined behavior (e.g. strcmp()). Sometimes it is hard to determine from the checker message which parameter is null at the invocation, so now this information is included in the message. This commit fixes https://bugs.llvm.org/show_bug.cgi?id=39358 Reviewed By: NoQ, Szelethus, whisperity Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D66333 llvm-svn: 370798
* [libc++] Mark usage of _Atomic with __extension__Louis Dionne2019-09-031-1/+1
| | | | | | | | | An upcoming change in Clang will flag _Atomic as being a C11 extension. To avoid generating this warning in libc++, this commit marks the only use of _Atomic with the __extension__ extension, which suppresses such warnings. llvm-svn: 370796
* [www] Mark items complete in Clang 9 as 'Clang 9' rather than 'SVN'.Richard Smith2019-09-033-30/+33
| | | | | | Don't turn the boxes green yet, since Clang 9 hasn't been released. llvm-svn: 370795
* [CUDA] Use activemask.b32 instruction to implement __activemask w/ CUDA-9.2+Artem Belevich2019-09-031-1/+9
| | | | | | | | | | | vote.ballot instruction is gone in recent CUDA versions and vote.sync.ballot can not be used because it needs a thread mask parameter. Fortunately PTX 6.2 (introduced with CUDA-9.2) provides activemask.b32 instruction for this. Differential Revision: https://reviews.llvm.org/D66665 llvm-svn: 370792
* [GVN] Propagate simple equalities from assumes within the tail of the blockPhilip Reames2019-09-033-31/+100
| | | | | | | | | | | | This extends the existing logic for propagating constant expressions in an analogous manner for what we do across basic blocks. The core point is that we chose some order of operands, and canonicalize uses towards that one. The heuristic used is inspired by the one used across blocks; in a follow up change, I'd plan to common them so that the cross block version uses the slightly stronger ordering herein. As noted by the TODOs in the code, there's a good amount of room for improving the existing code and making it more powerful. Some follow up work planned. Differential Revision: https://reviews.llvm.org/D66977 llvm-svn: 370791
* [AArch64][GlobalISel] Don't import i64imm_32bit pattern at -O0Jessica Paquette2019-09-032-0/+43
| | | | | | | | | | | | | This pattern, when imported at -O0 adds an extra copy via the SUBREG_TO_REG. This is because the SUBREG_TO_REG is not eliminated. At all other opt levels, it is eliminated. This is a 1% geomean code size savings at -O0 on CTMark. Differential Revision: https://reviews.llvm.org/D67027 llvm-svn: 370789
* Revert r370454 "[LoopIdiomRecognize] BCmp loop idiom recognition"Roman Lebedev2019-09-036-1271/+588
| | | | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=43206 was filed, claiming that there is a miscompilation. Reverting until i investigate. This reverts commit r370454 llvm-svn: 370788
* [test] Addres TestConcurrentMany*.py flakiness on macOSJonas Devlieghere2019-09-031-16/+11
| | | | | | | | | | On "fast" macOS machines, the TestConcurrentMany*.py tests would fail randomly with different numbers of breakpoints, watchpoints, etc. This seems to be avoidable by giving the threads a little time to breath after the passing the synchronization barrier. This is far from a structural fix but it reduces the flakiness. llvm-svn: 370785
* [Tests/GVN] Precommit requested test additions from D66977Philip Reames2019-09-031-0/+88
| | | | llvm-svn: 370784
* [libomptarget] Refactor activemask macro to inline functionJon Chesterfield2019-09-038-30/+29
| | | | | | | | | | | | | | | | | | Summary: [libomptarget] Refactor activemask macro to inline function See also abandoned D66846, split into this diff and others. Reviewers: jdoerfert, ABataev, grokos, ronlieb, gregrodgers Reviewed By: jdoerfert, ABataev Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D66851 llvm-svn: 370781
* clang: default to DWARF 4 for FreeBSD 12.0 and laterEd Maste2019-09-033-3/+13
| | | | | | | | | | | | Older FreeBSD versions included GDB 6.1 and had other tools that were unable to handle debug information newer than DWARF 2. Those tools have since been updated. (An old version of GDB is still kept for kernel crash handling, but the kernel is compiled with an explicit -gdwarf2.) Reviewed by: dim Differential Revision: https://reviews.llvm.org/D66760 llvm-svn: 370779
* [test] Remove print statements and verify that the symbol existsJonas Devlieghere2019-09-031-10/+1
| | | | | | | This removes some (commented out) print statements and adds a line that verifies that uses image list to check the symbol. llvm-svn: 370777
* [lldb][NFC] Disable added frame select and all log option test on windowsRaphael Isemann2019-09-032-0/+2
| | | | llvm-svn: 370776
* [LifetimeAnalysis] Fix some false positivesGabor Horvath2019-09-032-5/+163
| | | | | | Differential Revision: https://reviews.llvm.org/D66806 llvm-svn: 370773
* [cmake] Improve comment describing the C4245 warning. NFCI.Simon Pilgrim2019-09-031-1/+1
| | | | llvm-svn: 370772
* [SVE][Inline-Asm] Fix -Wimplicit-fallthrough in AArch64ISelLowering.cppKerry McLaughlin2019-09-031-0/+1
| | | | | | | | | | | | | | | | Summary: Adds break to 'x' case in getRegForInlineAsmConstraint added by D66302, fixing the unintentional fallthrough. Reviewers: sdesmalen, rovka, cameron.mcinally, greened, gribozavr, ruiu Reviewed By: sdesmalen Subscribers: bjope, javed.absar, tschuett, kristof.beyls, rkruppe, psnobl, llvm-commits, cfe-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67095 llvm-svn: 370769
* [clangd] Move getBeginningOfIdentifier from ClangdUnit to SourceCode. Drop ↵Sam McCall2019-09-0315-99/+105
| | | | | | dependencies on ClangdUnit from some headers. NFC llvm-svn: 370768
* [analyzer] Add a checker option to detect nested dead storesKristof Umann2019-09-037-165/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables the users to specify an optional flag which would warn for more dead stores. Previously it ignored if the dead store happened e.g. in an if condition. if ((X = generate())) { // dead store to X } This patch introduces the `WarnForDeadNestedAssignments` option to the checker, which is `false` by default - so this change would not affect any previous users. I have updated the code, tests and the docs as well. If I missed something, tell me. I also ran the analysis on Clang which generated 14 more reports compared to the unmodified version. All of them seemed reasonable for me. Related previous patches: rGf224820b45c6847b91071da8d7ade59f373b96f3 Reviewers: NoQ, krememek, Szelethus, baloghadamsoftware Reviewed By: Szelethus Patch by Balázs Benics! Differential Revision: https://reviews.llvm.org/D66733 llvm-svn: 370767
* [clangd] Remove redundant semi-colon.Michael Liao2019-09-031-1/+1
| | | | llvm-svn: 370763
* [X86] Merge 2 consecutive HasInt256 branches. NFCI.Simon Pilgrim2019-09-031-3/+2
| | | | llvm-svn: 370761
* [clang-tidy] Fix a false positive in unused-using-decl checkHaojian Wu2019-09-032-30/+56
| | | | | | | | | | The previous matcher "hasAnyTemplateArgument(templateArgument())" only matches the first template argument, but the check wants to iterate all template arguments. This patch fixes this. Also some refactorings in this patch (to make the code reusable). llvm-svn: 370760
* [clangd] Decouple macro/decl-under-cursor finding. Don't pretend there can ↵Sam McCall2019-09-031-73/+41
| | | | | | be multiple macros. NFC. llvm-svn: 370759
* [clangd] Fix a data race in test codeIlya Biryukov2019-09-031-1/+3
| | | | | | Found by TSan, thanks bkramer for pointing this out. llvm-svn: 370758
* [clangd] Wrong attribute on debug function in r370746Sam McCall2019-09-031-1/+1
| | | | llvm-svn: 370757
* compiler-rt: use 64-bit time_t for all FreeBSD archs except i386Ed Maste2019-09-031-1/+1
| | | | | | | | | At present only i386 has 32-bit time_t on FreeBSD. Reviewed by: dim Differential Revision: https://reviews.llvm.org/D66758 llvm-svn: 370756
* compiler-rt: use more __sanitizer_time_t on FreeBSDEd Maste2019-09-031-11/+11
| | | | | | | | | A few structs were using long for time_t members. NFC. Reviewed by: devnexen Differential Revision: https://reviews.llvm.org/D66756 llvm-svn: 370755
* [SystemZ] Recognize INLINEASM_BR in backend.Jonas Paulsson2019-09-032-2/+17
| | | | | | | | SystemZInstrInfo::analyzeBranch() needs to check for INLINEASM_BR instructions, or it will crash. Review: Ulrich Weigand llvm-svn: 370753
* gn build: (manually) merge r370499Nico Weber2019-09-032-0/+12
| | | | llvm-svn: 370752
* Fix MSVC "not all control paths return a value" warning. NFCI.Simon Pilgrim2019-09-031-0/+1
| | | | llvm-svn: 370750
* gn build: Merge r370746Nico Weber2019-09-032-0/+2
| | | | llvm-svn: 370749
* [lldb] Replace std::call_once() with llvm::call_once()Michal Gorny2019-09-031-2/+2
| | | | | | | | | | Remove the single instance of std::call_once() in lldbTarget library with llvm::call_once(). The former fails to build on NetBSD when combined with llvm::once_flag (which replaced std::once_flag in r369618), and combining the two is probably generally incorrect anyway. llvm-svn: 370748
* [clangd] Add targetDecl(), which determines what declaration an AST node ↵Sam McCall2019-09-036-1/+996
| | | | | | | | | | | | | | | | | | | | | | | | | | | | refers to. Summary: This is the first part of an effort to "unbundle" our libIndex use into separate concerns (AST traversal, token<->node mapping, node<->decl mapping, decl<->decl relationshipes). Currently, clangd relies on libIndex to associate tokens, AST nodes, and decls. This leads to rather convoluted implementations of e.g. hover and extract-function, which are not naturally thought of as indexing applications. The idea is that by decoupling different concerns, we make them easier to use, test, and combine, and more efficient when only one part is needed. There are some synergies between e.g. traversal and finding relationships between decls, hopefully the benefits outweight these. Reviewers: kadircet, ilya-biryukov Subscribers: mgorny, MaskRay, jkorous, arphaman, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66751 llvm-svn: 370746
* [ARM] Ignore Implicit CPSR regs when lowering from Machine to MC operandsDavid Green2019-09-0320-670/+682
| | | | | | | | | | | | | | The code here seems to date back to r134705, when tablegen lowering was first being added. I don't believe that we need to include CPSR implicit operands on the MCInst. This now works more like other backends (like AArch64), where all implicit registers are skipped. This allows the AliasInst for CSEL's to match correctly, as can be seen in the test changes. Differential revision: https://reviews.llvm.org/D66703 llvm-svn: 370745
* [OpenCL] Drop spurious semicolon in generated file; NFCSven van Haastregt2019-09-031-1/+1
| | | | llvm-svn: 370744
* [SystemZ] Add support for fentry.Jonas Paulsson2019-09-033-0/+44
| | | | | | | SystemZAsmPrinter now properly emits function calls to __fentry__. Review: Ulrich Weigand llvm-svn: 370743
* [ARM] Invert CSEL predicates if the opposite is a simpler constant to ↵David Green2019-09-035-34/+79
| | | | | | | | | | | | | | | | | | | | materialise This moves ConstantMaterializationCost into ARMBaseInstrInfo so that it can also be used in ISel Lowering, adding codesize values to the computed costs, to be able to compare either approximate instruction counts or codesize costs. It also adds a HasLowerConstantMaterializationCost, which compares the ConstantMaterializationCost of two values, returning true if the first is smaller either in instruction count/codesize, or falling back to the other in the case that they are equal. This is used in constant CSEL lowering to invert the predicate if the opposite is easier to materialise. Differential revision: https://reviews.llvm.org/D66701 llvm-svn: 370741
* Fixit for -Wfinal-dtor-non-final-classDavid Bolvansky2019-09-032-2/+0
| | | | llvm-svn: 370740
* [ARM] Generate 8.1-m CSINC, CSNEG and CSINV instructions.David Green2019-09-0324-2650/+2081
| | | | | | | | | | | | Arm 8.1-M adds a number of related CSEL instructions, including CSINC, CSNEG and CSINV. These choose between two values given the content in CPSR and a condition, performing an increment, negation or inverse of the false value. This adds some selection for them, either from constant values or patterns. It does not include CSEL directly, which is currently not always making code better. It is still useful, but we will have to check more carefully where it should and shouldn't be used. Code by Ranjeet Singh and Simon Tatham, with some modifications from me. Differential revision: https://reviews.llvm.org/D66483 llvm-svn: 370739
* [ARM] Add csel tests. NFCDavid Green2019-09-031-0/+390
| | | | llvm-svn: 370738
* Added fixit notes for -Wfinal-dtor-non-final-classDavid Bolvansky2019-09-032-4/+11
| | | | llvm-svn: 370737
* [mips] Switch to the `.text` section after emitting asm file preambleSimon Atanasyan2019-09-032-0/+5
| | | | | | | | | | | | | | | | | | | | Now the last `.section` directive in the MIPS asm file preamble is the `.section .mdebug.abi`. If assembler code injected for example by the LLVM `module asm` or the C ` __asm` directives do not contain explicit switching to the `.text` section it goes to the `.mdebug.abi` section. It might be unexpected to the user and in fact for example breaks building some existing code like FreeBSD libc [1]. The patch forces switching to the `.text` section after emitting MIPS assembler file preamble. [1] https://bugs.llvm.org/show_bug.cgi?id=43119 Fix PR43119. Differential Revision: https://reviews.llvm.org/D67014 llvm-svn: 370735
* [lldb] Test 'frame select -r' and fix that INT32_MIN breaks the option parserRaphael Isemann2019-09-034-16/+72
| | | | llvm-svn: 370734
* [lldb][NFC] Test 'command delete'Raphael Isemann2019-09-031-0/+17
| | | | llvm-svn: 370733
* [ARM] Fix MVE ldst offset rangesDavid Green2019-09-033-83/+50
| | | | | | | | | | | | | | | We were using isShiftedInt<7, Shift>(RHSC) to detect the ranges of offsets to fold into MVE loads/stores. The instructions actually take a 7 bit unsigned integer which is either added or subtracted. So something more like isShiftedUInt<7, Shift>(abs(RHSC)). Instead I've changes this to use the isScaledConstantInRange method, same as in SelectT2AddrModeImm7Offset used by pre/post inc, which seemed to already be getting this correct. Differential revision: https://reviews.llvm.org/D66997 llvm-svn: 370731
* [ARM][MVE] Decoding of VMSR doesn't diagnose some unpredictable encodingsOliver Stannard2019-09-032-25/+207
| | | | | | | | | | | | | | | | Decoding of VMSR doesn't diagnose some unpredictable encodings, as the unpredictable bits are not correctly set. Diff-reduce this instruction's internals WRT VMRS so I can see the differences better. Mostly this is s/src/Rt/g. Fill in the "should-be-(0)" bits. Designate the Unpredictable{} bits for both VMRS and VMSR. Patch by Mark Murray! Differential revision: https://reviews.llvm.org/D66938 llvm-svn: 370729
* Bug fix on function epilog optimization (ARM backend)Oliver Stannard2019-09-032-2/+16
| | | | | | | | | | | | | | | To save a 'add sp,#val' instruction by adding registers to the final pop instruction, the first register transferred by this pop instruction need to be found. If the function to be optimized has a non-void return value, the operand list contains r0 (implicit) which prevents the optimization to take place. Therefore implicit register references should be skipped in the search loop, because this registers are never popped from the stack. Patch by Rainer Herbertz (rOptimizer)! Differential revision: https://reviews.llvm.org/D66730 llvm-svn: 370728
* [ARM] More MVE load/store tests for offsets around the negative limit. NFCDavid Green2019-09-033-0/+1264
| | | | llvm-svn: 370726
* [lldb][NFC] Test that enabling all log options doesn't crash anythingRaphael Isemann2019-09-031-0/+11
| | | | llvm-svn: 370724
* [LV] Fix miscompiles by adding non-header PHI nodes to AllowedExitBjorn Pettersson2019-09-033-93/+24
| | | | | | | | | | | | | | | | | | | | | | | Summary: Fold-tail currently supports reduction last-vector-value live-out's, but has yet to support last-scalar-value live-outs, including non-header phi's. As it relies on AllowedExit in order to detect them and bail out we need to add the non-header PHI nodes to AllowedExit, otherwise we end up with miscompiles. Solves https://bugs.llvm.org/show_bug.cgi?id=43166 Reviewers: fhahn, Ayal Reviewed By: fhahn, Ayal Subscribers: anna, hiraditya, rkruppe, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67074 llvm-svn: 370721
* [LV] Precommit test case showing miscompile from PR43166. NFCBjorn Pettersson2019-09-031-0/+235
| | | | | | | | | | | | | | | | Summary: Precommit test case showing miscompile from PR43166. Reviewers: fhahn, Ayal Reviewed By: fhahn Subscribers: rkruppe, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67072 llvm-svn: 370720
OpenPOWER on IntegriCloud