summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [NFC][CodeGen][X86] lwp-intrinsics.ll: fix check prefixesRoman Lebedev2018-10-021-8/+8
| | | | llvm-svn: 343585
* [NFC][CodeGen][X86] fma.ll: fix check prefixes for -mcpu=bdver2Roman Lebedev2018-10-021-2/+2
| | | | llvm-svn: 343584
* [OpenCL] Add block argument CodeGen testSven van Haastregt2018-10-021-0/+20
| | | | | | | | | | | | r326937 ("[OpenCL] Remove block invoke function from emitted block literal struct", 2018-03-07) broke block argument handling. In particular the commit was causing a crash during code generation, see the discussion in https://reviews.llvm.org/D43783 . The offending commit has just been reverted; add a test to avoid breaking this again in the future. llvm-svn: 343583
* Revert r326937 "[OpenCL] Remove block invoke function from emitted block ↵Sven van Haastregt2018-10-027-136/+180
| | | | | | | | | | | literal struct" This reverts r326937 as it broke block argument handling in OpenCL. See the discussion on https://reviews.llvm.org/D43783 . The next commit will add a test case that revealed the issue. llvm-svn: 343582
* [analyzer] Improvements to the SMT APIMikhail R. Gadelha2018-10-025-77/+42
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several improvements in preparation for the new backends. Refactoring: - Removed duplicated methods `fromBoolean`, `fromAPSInt`, `fromInt` and `fromAPFloat`. The methods `mkBoolean`, `mkBitvector` and `mkFloat` are now used instead. - The names of the functions that convert BVs to FPs were swapped (`mkSBVtoFP`, `mkUBVtoFP`, `mkFPtoSBV`, `mkFPtoUBV`). - Added a couple of comments in function calls. Crosscheck encoding: - Changed how constraints are encoded in the refutation manager so it doesn't start with (false OR ...). This change introduces one duplicated line (see file `BugReporterVisitors.cpp`, the `SMTConv::getRangeExpr is called twice, so I can remove this change if the duplication is a problem. Reviewers: george.karpenkov, NoQ Reviewed By: george.karpenkov Subscribers: xazax.hun, szepet, a.sidorin, Szelethus Differential Revision: https://reviews.llvm.org/D52365 llvm-svn: 343581
* [clangd] Dex iterator printer shows query structure, not iterator state.Sam McCall2018-10-026-42/+62
| | | | | | | | | | | | | | Summary: This makes it suitable for logging (which immediately found a bug, to be fixed in the next patch...) Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52715 llvm-svn: 343580
* [AST] Pack the bit-fields of FunctionProtoType into Type.Bruno Ricci2018-10-023-241/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the bit-fields of FunctionProtoType into FunctionTypeBitfields. This cuts the size of FunctionProtoType by a pointer. Additionally use llvm::TrailingObjects instead of manually doing the casts + arithmetic. This patch is bigger then what could be expected for the following reasons: 1. As discussed before in D50631 it would be nice if there was some space left in FunctionTypeBitfields for future additions. This patch introduces an extra structure FunctionTypeExtraBitfields which is supposed to hold uncommon bits and is stored in a trailing object. The number of exception types NumExceptions is moved to this struct. As of this patch this trailing struct will only be allocated if we have > 0 types in a dynamic exception specification. 2. TrailingObjects cannot handle repeated types. Therefore the QualType representing an exception type is wrapped in a struct ExceptionType. The ExceptionType * is then reinterpret_cast'd to QualType *. 3. TrailingObjects needs the definition of the various trailing classes. Therefore ExtParameterInfo, ExceptionType and FunctionTypeExtraBitfields are put in FunctionType. Differential Revision: https://reviews.llvm.org/D52738 Reviewed By: rjmccall llvm-svn: 343579
* [clang-tidy] Ignore singe bit bitfield -> bool conversion in ↵Alexander Kornienko2018-10-023-1/+25
| | | | | | readability-implicit-bool-conversion llvm-svn: 343578
* [X86] Add APInt constant assembly printer helperSimon Pilgrim2018-10-021-15/+18
| | | | llvm-svn: 343577
* [clangd] Cache FS stat() calls when building preamble.Eric Liu2018-10-0212-33/+319
| | | | | | | | | | | | | | | | | | | | Summary: The file stats can be reused when preamble is reused (e.g. code completion). It's safe to assume that cached status is not outdated as we assume preamble files to remain unchanged. On real file system, this made code completion ~20% faster on a measured file (with big preamble). The preamble build time doesn't change much. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52419 llvm-svn: 343576
* [CodeComplete] Re-fix accessibilty of protected members from base class.Eric Liu2018-10-023-9/+23
| | | | | | | | | | | | | | | Summary: The initial fix (r337453) had bug and was partially reverted (r338255). This simplies the original fix by explicitly passing the naming class to the completion consumer. Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52647 llvm-svn: 343575
* Revert untintentionally commited changesEric Liu2018-10-021-3/+3
| | | | llvm-svn: 343574
* [Lex] TokenConcatenation now takes const PreprocessorEric Liu2018-10-021-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D52502 llvm-svn: 343573
* [AArch64][v8.5A] Add Memory Tagging instructionsOliver Stannard2018-10-029-25/+1805
| | | | | | | | | | | This adds new instructions to manipluate tagged pointers, and to load and store the tags associated with memory. Patch by Pablo Barrio, David Spickett and Oliver Stannard! Differential revision: https://reviews.llvm.org/D52490 llvm-svn: 343572
* [AArch64][v8.5A] Add Memory Tagging system registersOliver Stannard2018-10-024-2/+268
| | | | | | | | | | | This adds new system registers introduced by the Memory Tagging extension. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52488 llvm-svn: 343571
* [AArch64][v8.5A] Add MTE system instructionsOliver Stannard2018-10-024-0/+142
| | | | | | | | | | | The Memory Tagging Extension adds system instructions for data cache maintenance, implemented as new operands to the DC instruction. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52487 llvm-svn: 343570
* [InstCombine] Fold ~A - Min/Max(~A, O) -> Max/Min(A, ~O) - ADavid Green2018-10-023-32/+68
| | | | | | | | | | | | | | | This is an attempt to get out of a local-minimum that instcombine currently gets stuck in. We essentially combine two optimisations at once, ~a - ~b = b-a and min(~a, ~b) = ~max(a, b), only doing the transform if the result is at least neutral. This involves using IsFreeToInvert, which has been expanded a little to include selects that can be easily inverted. This is trying to fix PR35875, using the ideas from Sanjay. It is a large improvement to one of our rgb to cmy kernels. Differential Revision: https://reviews.llvm.org/D52177 llvm-svn: 343569
* [clang] Implement Override Suggestions in Sema.Kadir Cetinkaya2018-10-023-2/+142
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: In clangd we had a new type of completion suggestions for cpp class/struct/unions that will show override signatures for virtual methods in base classes. This patch implements it in sema because it is hard to deduce more info about completion token outside of Sema and handle itchy cases. See the patch D50898 for more info on the functionality. In addition to above patch this one also converts the suggestion into a CK_Pattern with whole insertion text as the name of the suggestion and factors out CodeCompletionString generation for declerations so that it can be re-used by others. Reviewers: ioeric, ilya-biryukov Reviewed By: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52225 llvm-svn: 343568
* [clangd] Remove override result handling logic from clangdKadir Cetinkaya2018-10-021-90/+9
| | | | | | | | | | | | | | | | | Summary: Since we plan to move handling of override suggestions to Sema with D52225 this patch just makes sure clangd-side has no logic related to that anymore and updates tests. Reviewers: ioeric, ilya-biryukov Reviewed By: ioeric Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D52226 llvm-svn: 343567
* [AArch64][v8.5A] Test clang option for the Memory Tagging ExtensionOliver Stannard2018-10-021-0/+13
| | | | | | | | | | | The implementation of this is in TargetParser, so we only need to add a test for it in clang. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52493 llvm-svn: 343566
* [clang-tidy] NFC use CHECK-NOTES in test for cppgoreguidelines-avoid-gotoJonas Toth2018-10-021-8/+8
| | | | | | | | | | | | Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D52686 llvm-svn: 343565
* [clang-tidy] NFC use CHECK-NOTES in tests for cppcoreguidelines-owning-memoryJonas Toth2018-10-022-49/+50
| | | | | | | | | | | | Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D52687 llvm-svn: 343564
* [AArch64][v8.5A] Add MTE as an optional AArch64 extensionOliver Stannard2018-10-025-1/+9
| | | | | | | | | | | | This adds the memory tagging extension, which is an optional extension introduced in v8.5A. The new instructions and registers will be added by subsequent patches. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52486 llvm-svn: 343563
* [X86] Standardize floating point assembly commentsSimon Pilgrim2018-10-0242-369/+372
| | | | | | | | Consistently try to use APFloat::toString for floating point constant comments to get rid of differences between Constant / ConstantDataSequential values - it should help stop some of the linux-windows buildbot failures matching NaN/INF etc. as well. Differential Revision: https://reviews.llvm.org/D52702 llvm-svn: 343562
* [InstCombine] Tests for ~A - Min/Max(~A, O) -> Max/Min(A, ~O) - A. NFCDavid Green2018-10-022-35/+359
| | | | llvm-svn: 343561
* Added warning for unary minus used with unsigned typeDavid Bolvansky2018-10-023-0/+39
| | | | | | | | | | | | | | | | | Summary: Inspired by MSVC, which found some occurrences of this expression on our code base. Fixes PR38950 Reviewers: rsmith, craig.topper, spatel, RKSimon, aaron.ballman, thakis Reviewed By: rsmith Subscribers: joerg, Quuxplusone, lebedev.ri, craig.topper, RKSimon, cfe-commits Differential Revision: https://reviews.llvm.org/D52137 llvm-svn: 343560
* AMDGPU: Expand atomicrmw nand in IRMatt Arsenault2018-10-026-0/+157
| | | | llvm-svn: 343559
* [WebAssembly] Restore slashes in SIMD conversion namesThomas Lively2018-10-023-44/+44
| | | | | | | | | | | | Summary: Depends on D52372 and D52442. Reviewers: aheejin, dschuff, aardappel Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D52512 llvm-svn: 343558
* [CodeGen] Before entering the loop that copies a non-trivial array fieldAkira Hatanaka2018-10-022-0/+33
| | | | | | | | | | | | of a non-trivial C struct, copy the preceding trivial fields that haven't been copied. This commit fixes a bug where the instructions used to copy the preceding trivial fields were emitted inside the loop body. rdar://problem/44185064 llvm-svn: 343556
* [MCA] Remove SM.hasNext() call in FetchStage::execute.Owen Rodley2018-10-021-1/+1
| | | | | | | | | | | | | | | | Summary: This is redundant, as FetchStage::getNextInstruction already checks this and returns llvm::ErrorSuccess() as appropriate. NFC. Reviewers: andreadb Subscribers: gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D52642 llvm-svn: 343555
* [sanitizer] Include inlined frames into __sanitizer_symbolize_pc outputVitaly Buka2018-10-023-5/+55
| | | | | | | | | | | | | | | | Summary: Behavior for existing used is not changing as the first line is going to be the same, and it was invalid to try to read more lines. New clients can read until they get empty string. Reviewers: eugenis, morehouse Subscribers: kubamracek, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D52743 llvm-svn: 343554
* [AArch64][DAGCombiner]: change -stop-after=isel to instruction-selectFangrui Song2018-10-021-1/+1
| | | | | | | "isel" is registered by AMDGPU. The test will break if the AMDGPU target is not built. llvm-svn: 343553
* [ELF] Read the call graph profile from object files.Michael J. Spencer2018-10-025-0/+109
| | | | | | | | | | This uses the call graph profile embedded in the object files to construct the call graph. This is read from a SHT_LLVM_CALL_GRAPH_PROFILE (0x6fff4c02) section as (uint32_t, uint32_t, uint64_t) tuples as (from symbol index, to symbol index, weight). Differential Revision: https://reviews.llvm.org/D45850 llvm-svn: 343552
* [SimplifyCFG] Use Value::hasNUses instead of 'getNumUses() =='. NFCICraig Topper2018-10-011-1/+1
| | | | | | getNumUses is linear in the number of uses. Since we're looking for a specific use count, we can use hasNUses which will stop as soon as it determines there are more than N uses instead of walking all of them. llvm-svn: 343550
* [llvm-mca] Rename the 'Subtract' method to 'subtract'Matt Davis2018-10-012-2/+2
| | | | llvm-svn: 343549
* [SimplifyCFG] Update comments that refer to CondBB to say ThenBB instead. NFCCraig Topper2018-10-011-4/+4
| | | | | | There is no variable in this function named CondBB, but there is one named ThenBB and I believe the comments are all refering to it. llvm-svn: 343548
* [PDB] Add support for more kinds of PDB Sym Tags.Zachary Turner2018-10-012-1/+25
| | | | | | | DIA SDK is returning several new sym tag types, so we update the enumeration and printing code to support these. llvm-svn: 343547
* Revert: r343521 and r343541: [globalisel] Add a combiner helpers for ↵Daniel Sanders2018-10-0114-843/+12
| | | | | | | | | | extending loads and use them in a pre-legalize combiner for AArch64 There's a strange assertion on two of the Green Dragon bots that goes away when this is reverted. The assertion is in RegBankAlloc and if it is this commit then -verify-machine-instrs should have caught it earlier in the pipeline. llvm-svn: 343546
* Enable C++ tests to run in the -gmodules configuration on Darwin.Adrian Prantl2018-10-012-4/+4
| | | | | | | | This addresses PR36048 (http://llvm.org/bugs/show_bug.cgi?id=36048) rdar://problem/36776281 llvm-svn: 343545
* [codeview] Simplify S_DEFRANGE emission code, NFCReid Kleckner2018-10-011-30/+22
| | | | | | | These assembler directives are still pretty unreadable and it would be nice to clean them up at some point. llvm-svn: 343544
* [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_RELReid Kleckner2018-10-0123-162/+1099
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change, LLVM would always describe locals on the stack as being relative to some specific register, RSP, ESP, EBP, ESI, etc. Variables in stack memory are pretty common, so there is a special S_DEFRANGE_FRAMEPOINTER_REL symbol for them. This change uses it to reduce the size of our debug info. On top of the size savings, there are cases on 32-bit x86 where local variables are addressed from ESP, but ESP changes across the function. Unlike in DWARF, there is no FPO data to describe the stack adjustments made to push arguments onto the stack and pop them off after the call, which makes it hard for the debugger to find the local variables in frames further up the stack. To handle this, CodeView has a special VFRAME register, which corresponds to the $T0 variable set by our FPO data in 32-bit. Offsets to local variables are instead relative to this value. This is part of PR38857. Reviewers: hans, zturner, javed.absar Subscribers: aprantl, hiraditya, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D52217 llvm-svn: 343543
* Distinguish `__block` variables that are captured by escaping blocksAkira Hatanaka2018-10-0130-89/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | from those that aren't. This patch changes the way __block variables that aren't captured by escaping blocks are handled: - Since non-escaping blocks on the stack never get copied to the heap (see https://reviews.llvm.org/D49303), Sema shouldn't error out when the type of a non-escaping __block variable doesn't have an accessible copy constructor. - IRGen doesn't have to use the specialized byref structure (see https://clang.llvm.org/docs/Block-ABI-Apple.html#id8) for a non-escaping __block variable anymore. Instead IRGen can emit the variable as a normal variable and copy the reference to the block literal. Byref copy/dispose helpers aren't needed either. This reapplies r343518 after fixing a use-after-free bug in function Sema::ActOnBlockStmtExpr where the BlockScopeInfo was dereferenced after it was popped and deleted. rdar://problem/39352313 Differential Revision: https://reviews.llvm.org/D51564 llvm-svn: 343542
* Fix the Windows build in GlobalISelReid Kleckner2018-10-011-7/+6
| | | | | | | | | | | | | | Clang-cl was complaining about some sort of constexpr narrowing bug: C:\src\llvm-project\llvm\lib\CodeGen\GlobalISel\CombinerHelper.cpp(136,31): error: non-constant-expression cannot be narrowed from type 'llvm::TargetOpcode::(anonymous enum at C:\src\llvm-project\llvm\include\llvm/CodeGen/TargetOpcodes.h:22:1)' to 'unsigned int' in initializer list [-Wc++11-narrowing] unsigned(MI.getOpcode()) == unsigned(TargetOpcode::G_LOAD) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\src\llvm-project\llvm\lib\CodeGen\GlobalISel\CombinerHelper.cpp(136,31): note: insert an explicit cast to silence this issue unsigned(MI.getOpcode()) == unsigned(TargetOpcode::G_LOAD) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<unsigned int>( llvm-svn: 343541
* Recommit r343499 "[X86] Enable load folding in the test shrinking code"Craig Topper2018-10-012-17/+29
| | | | | | | Original message: This patch adds load folding support to the test shrinking code. This was noticed missing in the review for D52669 llvm-svn: 343540
* Recommit r343498 "[X86] Improve test instruction shrinking when the sign ↵Craig Topper2018-10-013-41/+41
| | | | | | | | | | | | | | | flag is used and the output of the and is truncated." This includes a fix to prevent i16 compares with i32/i64 ands from being shrunk if bit 15 of the and is set and the sign bit is used. Original commit message: Currently we skip looking through truncates if the sign flag is used. But that's overly restrictive. It's safe to look through the truncate as long as we ensure one of the 3 things when we shrink. Either the MSB of the mask at the shrunken size isn't set. If the mask bit is set then either the shrunk size needs to be equal to the compare size or the sign There are still missed opportunities to shrink a load and fold it in here. This will be fixed in a future patch. llvm-svn: 343539
* Sort expected test output after previous commitStephen Kelly2018-10-011-6/+6
| | | | llvm-svn: 343538
* [MinGW] Allow using ASanMartin Storsjo2018-10-014-4/+42
| | | | | | | | | | | | | | | | | | Linking to ASan for MinGW is similar to MSVC, but MinGW always links the MSVCRT dynamically, so there is only one of the MSVC cases to consider. When linking to a shared compiler runtime library on MinGW, the suffix of the import library is .dll.a. The existing case of .dll as suffix for windows in general doesn't seem correct (since this is used for linking). As long as callers never actually set the Shared flag, the default static suffix of .lib also worked fine for import libraries as well. Differential Revision: https://reviews.llvm.org/D52538 llvm-svn: 343537
* [clang-query] Test non-code-completion on single letter shortcutsStephen Kelly2018-10-011-0/+10
| | | | llvm-svn: 343536
* [clang-query] Add missing quit testStephen Kelly2018-10-011-0/+9
| | | | llvm-svn: 343535
* [sanitizer] Small buffer tests for __sanitizer_symbolize_pcVitaly Buka2018-10-011-3/+20
| | | | llvm-svn: 343534
OpenPOWER on IntegriCloud