summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Mark string_view literals as 'noexcept'. Fixes PR#25054. Thanks to Pavel K ↵Marshall Clow2017-10-242-8/+14
| | | | | | for the bug report. llvm-svn: 316439
* Add Forgotten test for: Fix template parameter default args missed if redecledErich Keane2017-10-241-0/+33
| | | | | | Addendum to differential revision: https://reviews.llvm.org/D39127 llvm-svn: 316437
* Do not add a colon chunk to the code completion of class inheritance access ↵Erik Verbruggen2017-10-244-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | modifiers With enabled CINDEXTEST_CODE_COMPLETE_PATTERNS env option (which enables IncludeCodePatterns in completion options) code completion after colon currently suggests access modifiers with 2 completion chunks which is incorrect. Example: class A : <Cursor>B { } Currently we get 'NotImplemented:{TypedText public}{Colon :} (40)' but the correct line is just 'NotImplemented:{TypedText public} (40)' The fix introduces more specific scope that occurs between ':' and '{' It allows us to determine when we don't need to add ':' as a second chunk to the public/protected/private access modifiers. Patch by Ivan Donchevskii! Differential Revision: https://reviews.llvm.org/D38618 llvm-svn: 316436
* Update f16c instruction scheduling on btver2.Andrew V. Tischenko2017-10-242-33/+83
| | | | | | Differential Revision: https://reviews.llvm.org/D39051 llvm-svn: 316435
* X86CallFrameOptimization: Update comments and variable names. NFCI.Zvi Rackover2017-10-241-15/+15
| | | | | | Following up on D38738. llvm-svn: 316434
* [Tooling] Add a factory method for CommonOptionsParserEric Liu2017-10-242-8/+54
| | | | | | | | | | | | | | Summary: This returns error instead of exiting the program in case of error. Reviewers: klimek, hokein Reviewed By: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39042 llvm-svn: 316433
* [DeLICM] Do not try to map to multiple array elements.Michael Kruse2017-10-243-129/+96
| | | | | | | | | | | | | | | | | Add check and skip when the store used to determine the target accesses multiple array elements. Only a single array location should for mapping the scalar. Having multiple creates problems when deciding which element to load from. While MemoryAccess::getAddressFunction() should select just one of them, other problems arise in code that assumes that there is just one target element per statement instance. This fixes llvm.org/PR34989 This also reverts r313902 which fixed llvm.org/PR34485 also caused by a non-functional target array element. This patch avoids the situation to occur in the first place. llvm-svn: 316432
* X86CallFrameOptimization: Recognize 'store 0/-1 using and/or' idiomsZvi Rackover2017-10-244-184/+288
| | | | | | | | | | | | | | | | | | | | | | | | Summary: r264440 added or/and patterns for storing -1 or 0 with the intention of decreasing code size. However, X86CallFrameOptimization does not recognize these memory accesses so it will not replace them with push's when profitable. This patch fixes this problem by teaching X86CallFrameOptimization these store 0/-1 idioms. An alternative fix would be to prevent the 'store 0/1 idioms' patterns from firing when accessing the stack. This would save the need to teach the pass about these idioms. However, because X86CallFrameOptimization does not always fire we may result in cases where neither X86CallFrameOptimization not the patterns for 'store 0/1 idioms' fire. Fixes pr34863 Reviewers: DavidKreitzer, guyblank, aymanmus Reviewed By: aymanmus Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38738 llvm-svn: 316431
* [ConstantFolding] Avoid assert when folding ptrtoint of vectorized GEPBjorn Pettersson2017-10-242-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Got asserts in llvm::CastInst::getCastOpcode saying: `DestBits == SrcBits && "Illegal cast to vector (wrong type or size)"' failed. Problem seemed to be that llvm::ConstantFoldCastInstruction did not handle ptrtoint cast of a getelementptr returning a vector correctly. I assume such situations are quite rare, since the GEP needs to be considered as a constant value (base pointer being null). The solution used here is to simply avoid the constant fold of ptrtoint when the value is a vector. It is not supported, and by bailing out we do not fail on assertions later on. Reviewers: craig.topper, majnemer, davide, filcab, efriedma Reviewed By: efriedma Subscribers: efriedma, filcab, llvm-commits Differential Revision: https://reviews.llvm.org/D38546 llvm-svn: 316430
* [LangRef] Update description of Constant ExpressionsBjorn Pettersson2017-10-241-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When describing trunc/zext/sext/ptrtoint/inttoptr in the chapter about Constant Expressions we now simply refer to the Instruction Reference. As far as I know there are no difference when it comes to the semantics and the argument constraints. The only difference is that the syntax is slighly different for the constant expressions, regarding the use of parenthesis in constant expressions. Referring to the Instruction Reference is the same solution as already used for several other operations, such as bitcast. The main goal was to add information that vector types are allowed also in trunc/zext/sext/ptrtoint/inttoptr constant expressions. That was not explicitly mentioned earlier, and resulted in some questions in the review of https://reviews.llvm.org/D38546 Reviewers: efriedma, majnemer Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39165 llvm-svn: 316429
* [llvm-dwarfdump] - Cleanup of gnu_call_site.s. NFC.George Rimar2017-10-241-31/+34
| | | | | | | | | | | This change fixes values of test so that it passes -verify without errors and also adds comments. Test was introduced in D39119 and intention was to check that tool is able to dump few DW_*GNU_call_site* tags and attributes, so that change is NFC cleanup. llvm-svn: 316428
* AMDGPU: Add new intrinsic llvm.amdgcn.kill(i1)Marek Olsak2017-10-2413-37/+440
| | | | | | | | | | | | | | | | Summary: Kill the thread if operand 0 == false. llvm.amdgcn.wqm.vote can be applied to the operand. Also allow kill in all shader stages. Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D38544 llvm-svn: 316427
* AMDGPU: Add llvm.amdgcn.wqm.vote intrinsicMarek Olsak2017-10-245-1/+101
| | | | | | | | | | Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye Differential Revision: https://reviews.llvm.org/D38543 llvm-svn: 316426
* [docs] Code example fixJan Korous2017-10-241-1/+1
| | | | llvm-svn: 316425
* [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpuPeter Smith2017-10-242-108/+152
| | | | | | | | | | | | | | | | | | | | When -mtune is used on AArch64 the -target-cpu is passed the value of the cpu given to -mtune. As well as setting micro-architectural features of the -mtune cpu, this will also add the architectural features such as support for instructions. This can result in the backend using instructions that are supported in the -mtune cpu but not supported in the target architecture. For example use of the v8.1-a LSE extensions with -march=v8. This change removes the setting of -target-cpu for -mtune, the -mcpu must be used to set -target-cpu. This has the effect of removing all non-hard coded benefits of mtune but it does produce correct output when -mtune cpu with a later architecture than v8 is used. Fixes PR34625 Differential Revision: https://reviews.llvm.org/D39179 llvm-svn: 316424
* [ARM] Replace development diagnostics with normal DEBUG macroOliver Stannard2017-10-241-14/+9
| | | | | | | | | | * Remove the -arm-asm-parser-dev-diags option. * Use normal DEBUG(dbgs()) printing for the extra development information about missing diagnostics. Differential Revision: https://reviews.llvm.org/D39194 llvm-svn: 316423
* Restore the fix rL316059 eliminated by rL316372Serguei Katkov2017-10-241-0/+1
| | | | | | | | | rL316059 fixed the potential build failure when compiling with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON. rL316372 just reverted the part of the fix, so restore it. llvm-svn: 316422
* [ARM] tSETEND needs IsThumbOliver Stannard2017-10-241-1/+1
| | | | | | | | | | This is the Thumb encoding, so the Requires list must include IsThumb. No test because we happen to select the ARM one first, but that's just luck. Differential Revision: https://reviews.llvm.org/D39190 llvm-svn: 316421
* [ARM] Remove tCPS alias which just crashedOliver Stannard2017-10-242-7/+14
| | | | | | | | | | | | This alias caused a crash when trying to print the "cps #0" instruction in a diagnostic for thumbv6 (which doesn't have that instruction). The comment was incorrect, this instruction is UNPREDICTABLE if no flag bits are set, so I don't think it's worth keeping. Differential Revision: https://reviews.llvm.org/D39191 llvm-svn: 316420
* Support formatv of TimePoint with strftime-style formats.Sam McCall2017-10-243-25/+81
| | | | | | | | | | | | | | | | Summary: Support formatv of TimePoint with strftime-style formats. Extensions for millis/micros/nanos are added. Inital use case is HH:MM:SS.MMM timestamps in clangd logs. Reviewers: bkramer, ilya-biryukov Subscribers: labath, llvm-commits Differential Revision: https://reviews.llvm.org/D38992 llvm-svn: 316419
* [ELF] - Do not collect SHT_REL[A] sections unconditionally when ↵George Rimar2017-10-243-13/+19
| | | | | | | | | | | | | --gc-sections and --emit-relocs used together. This is "Bug 34836 - --gc-sections remove relocations from --emit-relocs", When --emit-relocs is used, LLD currently always drops SHT_REL[A] sections from output if --gc-sections is present. Patch fixes the issue. Differential revision: https://reviews.llvm.org/D38724 llvm-svn: 316418
* [CodeGen][ExpandMemcmp][NFC] Allow memcmp to expand to vector loads (1)Clement Courbet2017-10-241-196/+201
| | | | | | | | | | | | | | | | | | | | | | Refactor ExpandMemcmp: - Stop duplicating the logic for computation of the sequence of loads to generate (thsi was done in three different places), this is now done only once in MemCmpExpansion::MemCmpExpansion(). - Add a FIXME to expose a bug with the computation of the number of loads when not all sizes are loadable. For example, on X86-32 + SSE, possible loads are {16,4,2,1} bytes. The current code considers that all loads starting at MaxLoadSize are possible. This is not an issue right now as vector loads are not enabled, so I'm not fixing the issue here to keep the change as small as possible. I'm going to address this in a subsequent revision, where I enable vector loads. See https://bugs.llvm.org/show_bug.cgi?id=34887 Differential Revision: https://reviews.llvm.org/D38498 llvm-svn: 316417
* X86: Fix X86CallFrameOptimization to search for the COPY StackPointerZvi Rackover2017-10-244-57/+95
| | | | | | | | | | | | | | | | | | | SelectionDAG inserts a copy of ESP into a virtual register. X86CallFrameOptimization assumed that the COPY, if present, is always right after the call-frame setup instruction (ADJCALLSTACKDOWN). This was a wrong assumption as the COPY can be located anywhere between the call-frame setup instruction and its first use. If the COPY happened to be located in a different location than what X86CallFrameOptimization assumed, visiting it while processing the call chain would lead to a conservative bail-out. The fix is quite straightfoward, scan ahead for the stack-pointer copy and make note of it so it can be ignored while processing the call chain. Fixes pr34903 Differential Revision: https://reviews.llvm.org/D38730 llvm-svn: 316416
* Add missing checks for register numberMartin Storsjo2017-10-241-0/+19
| | | | | | | | | Most other cases that touch savedRegisters[reg] have got this check, but these three seemed to lack it. Differential Revision: https://reviews.llvm.org/D39206 llvm-svn: 316415
* [Modules] Add module for Config/llvm-config.hBruno Cardoso Lopes2017-10-241-0/+4
| | | | | | | | | | Besides all the goodness from modularizing a header, this is necessary to compile ToT with modules with the clang host compiler from Xcode 9 in macOS 10.13, which our bots don't use yet. rdar://problem/35038151 llvm-svn: 316414
* [MC] Adding code padding for performance stability - infrastructure. NFC.Omer Paparo Bivas2017-10-2417-7/+906
| | | | | | | | | | | | | | | | | Infrastructure designed for padding code with nop instructions in key places such that preformance improvement will be achieved. The infrastructure is implemented such that the padding is done in the Assembler after the layout is done and all IPs and alignments are known. This patch by itself in a NFC. Future patches will make use of this infrastructure to implement required policies for code padding. Reviewers: aaboud zvi craig.topper gadi.haber Differential revision: https://reviews.llvm.org/D34393 Change-Id: I92110d0c0a757080a8405636914a93ef6f8ad00e llvm-svn: 316413
* X86: Register the X86CallFrameOptimization passZvi Rackover2017-10-243-4/+140
| | | | | | | | | | | | | | | | | Summary: The motivation of this change is to enable .mir testing for this pass. Added one test case to cover the functionality, this same case will be improved by a future patch. Reviewers: igorb, guyblank, DavidKreitzer Reviewed By: guyblank, DavidKreitzer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38729 llvm-svn: 316412
* [test] Fix clang-test for FreeBSD and NetBSDTim Shen2017-10-241-14/+20
| | | | | | | | | | | | | | | | Lit tries to inject the shared library paths, but no action is taken when platform.system() is not recognized, results in an environment variable with an empty name, which is illegal. The patch fixes this mechanism for FreeBSD and NetBSD, and gives an warning on other platforms, so that the latecomers don't have to spend time on debugging lit. Thanks Zhihao Yuan for the patch! Differential Revision: https://reviews.llvm.org/D39162 llvm-svn: 316411
* [XRay][compiler-rt] More fixups.Dean Michael Berris2017-10-242-4/+4
| | | | | | Follow-up to D39175. llvm-svn: 316410
* [XRay][compiler-rt] Fixup shadowingDean Michael Berris2017-10-242-4/+4
| | | | | | Follow-up to D39175. llvm-svn: 316409
* Unnamed bitfields don't block constant evaluation of constexpr ctorsJordan Rose2017-10-243-0/+38
| | | | | | | | | | | | | | | | | | | | | | | C++14 [dcl.constexpr]p4 states that in the body of a constexpr constructor, > every non-variant non-static data member and base class sub-object shall be initialized However, [class.bit]p2 notes that > Unnamed bit-fields are not members and cannot be initialized. Therefore, we should make sure to filter them out of the check that all fields are initialized. Fixing this makes the constant evaluator a bit smarter, and specifically allows constexpr constructors to avoid tripping -Wglobal-constructors when the type contains unnamed bitfields. Reviewed at https://reviews.llvm.org/D39035. llvm-svn: 316408
* [globalisel][tablegen] Remove unused InstructionMatcher's. NFCDaniel Sanders2017-10-241-25/+12
| | | | llvm-svn: 316407
* [XRay][compiler-rt] Remove C++ STL from the buffer queue implementationDean Michael Berris2017-10-242-55/+66
| | | | | | | | | | | | | | | Summary: This change removes the dependency on C++ standard library types/functions in the implementation of the buffer queue. This is an incremental step in resolving llvm.org/PR32274. Reviewers: dblaikie, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39175 llvm-svn: 316406
* Fix template parameter default args missed if redecledErich Keane2017-10-241-1/+6
| | | | | | | | | | | | | | | | | This bug was found via self-build on lld, and worked around here: https://reviews.llvm.org/rL316180 The issue is that the 'using' causes the lookup to pick up the first decl. However, when setting inherited default parameters, we only update 'forward', not 'backward'. SO, only the newest param list has all the information about the default arguments. This patch ensures that the list of parameters we look through checks the newest decl's template parameter list so it doesn't miss a default. Differential Revision: https://reviews.llvm.org/D39127 llvm-svn: 316405
* [raw_fd_ostream] report actual error in error messagesBob Haarman2017-10-246-27/+27
| | | | | | | | | | | | | | | | | Summary: Previously, we would emit error messages like "IO failure on output stream". This change causes use to include information about what actually went wrong, e.g. "No space left on device". Reviewers: sunfish, rnk Reviewed By: rnk Subscribers: mehdi_amini, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39203 llvm-svn: 316404
* [Analyzer] Fix for the memory leak: fix typo in if-statement.George Karpenkov2017-10-241-1/+1
| | | | llvm-svn: 316403
* [Analyzer] Handle implicit function reference in bodyfarming std::call_onceGeorge Karpenkov2017-10-242-8/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D39201 llvm-svn: 316402
* ObjCARC: do not increment past the end of the BBSaleem Abdulrasool2017-10-242-4/+65
| | | | | | | | | | The `BasicBlock::getFirstInsertionPt` call may return `std::end` for the BB. Dereferencing the end iterator results in an assertion failure "(!NodePtr->isKnownSentinel()), function operator*". Ensure that the returned iterator is valid before dereferencing it. If the end is returned, move one position backward to get a valid insertion point. llvm-svn: 316401
* [Analyzer] Do not use static storage to for implementations created in ↵George Karpenkov2017-10-235-60/+56
| | | | | | | | BodyFarm.cpp Differential Revision: https://reviews.llvm.org/D39208 llvm-svn: 316400
* [analyzer] Fix handling of labels in getLValueElementAlexander Shaposhnikov2017-10-232-1/+9
| | | | | | | | | | | In getLValueElement Base may represent the address of a label (as in the newly-added test case), in this case it's not a loc::MemRegionVal and Base.castAs<loc::MemRegionVal>() triggers an assert, this diff makes getLValueElement return UnknownVal instead. Differential revision: https://reviews.llvm.org/D39174 llvm-svn: 316399
* [codeview] Add support for inlinee listsReid Kleckner2017-10-235-3/+48
| | | | | | | | | | | This adds type index discovery and dumper support for symbol record kind 0x1168, which is a list of inlined function ids. This symbol kind is undocumented, but S_INLINEES is consistent with the existing nomenclature. Fixes PR34222 llvm-svn: 316398
* [PM] Fix TypoJustin Lebar2017-10-231-1/+1
| | | | | | Patch by Nick Sarnie. llvm-svn: 316397
* [MachineOutliner] Add optimisation remarks for successful outliningJessica Paquette2017-10-232-45/+134
| | | | | | | | | | | | | | | | | | | This commit adds optimisation remarks for outlining which fire when a function is successfully outlined. To do this, OutlinedFunctions must now contain references to their Candidates. Since the Candidates must still be sorted and worked on separately, this is done by working on everything in terms of shared_ptrs to Candidates. This is good; it means that we can easily move everything to outlining in terms of the OutlinedFunctions rather than the individual Candidates. This is far more intuitive than what's currently there! (Remarks are output when a function is created for some group of Candidates. In a later commit, all of the outlining logic should be rewritten so that we loop over OutlinedFunctions rather than over Candidates.) llvm-svn: 316396
* [Sanitizers-libFuzzer] Addressing coding style issues.Alex Shlyapnikov2017-10-231-37/+44
| | | | | | | | | | | | Summary: The result of clang-format and few manual changes (as prompted on D39155). Reviewers: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39211 llvm-svn: 316395
* More fuzzing interfacesMarshall Clow2017-10-233-20/+145
| | | | llvm-svn: 316394
* [lldbtests] Handle errors instead of crashing.Davide Italiano2017-10-231-1/+5
| | | | | | | | | | | | | | | | | | If you pass an invalid compiler/debugger path on the cmdline to `dotest.py` this is what you get. Traceback (most recent call last): [...] File "dotest.py", line 7, in <module> lldbsuite.test.run_suite() [...] And with the patch applied: /home/davide/work/build-lldb/bin/clandasfasg is not a valid path, exiting Differential Revision: https://reviews.llvm.org/D39199 llvm-svn: 316393
* [PDB] Add test for S_THUNK32 recordsReid Kleckner2017-10-231-0/+2747
| | | | | | | | | I locally reverted r316385 and confirmed that this test fails without it. Really fixes the cause of PR35014. llvm-svn: 316392
* Use ipv4 localhost address in lldb-server testsPavel Labath2017-10-231-1/+1
| | | | | | | | | | | | Since the ipv6 patch, we've experienced occasional flakyness in lldb-server tests. This was due to the fact that lldb-server was trying to listen on both v4 and v6 localhost sockets (and consider it a success if at least one of them succeeded), while the test framework was only trying to connect to the v4 one. This change makes sure lldb-server only listens on the v4 socket. llvm-svn: 316391
* [Symbol] Remove dead code. NFCI.Davide Italiano2017-10-231-23/+0
| | | | llvm-svn: 316390
* AMDGPU: Initialize WavefrontSize from TD filesKonstantin Zhuravlyov2017-10-232-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D39205 llvm-svn: 316389
OpenPOWER on IntegriCloud