summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [TableGen] Do not set ReadNone attribute on intrinsics with side effectsMomchil Velikov2019-07-173-2/+43
| | | | | | | | | | | If an intrinsic is defined without outputs, but having side effects, it still can be removed completely from the program. This patch makes TableGen not set Attribute::ReadNone for intrinsics which are declared with IntrHasSideEffects. Differential Revision: https://reviews.llvm.org/D64414 llvm-svn: 366312
* [clangd] Fix error message in tweaktests to be useful. NFCSam McCall2019-07-171-4/+4
| | | | llvm-svn: 366311
* [llvm-ar][test] Add coverage for replace and update key lettersOwen Reynolds2019-07-172-0/+367
| | | | | | | | Some more tests to increase llvm-ar test coverage, this time for replace 'r' and update 'u'. Differential Revision: https://reviews.llvm.org/D64803 llvm-svn: 366309
* [ARM GlobalISel] Cleanup CallLowering. NFCDiana Picus2019-07-172-71/+20
| | | | | | | | | | Migrate CallLowering::lowerReturnVal to use the same infrastructure as lowerCall/FormalArguments and remove the now obsolete code path from splitToValueTypes. Forgot to push this earlier. llvm-svn: 366308
* [ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892Fangrui Song2019-07-171-19/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: After D58892 split the RW PT_LOAD on the PT_GNU_RELRO boundary, the new layout is: PT_LOAD(PT_GNU_RELRO(.data.rel.ro .bss.rel.ro)) PT_LOAD(.data. .bss) The two pageAlign() calls at PT_GNU_RELRO boundaries are redundant due to the existence of PT_LOAD. Reviewers: grimar, peter.smith, ruiu, espindola Reviewed By: ruiu Subscribers: sfertile, atanasyan, emaste, arichardson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64854 llvm-svn: 366307
* [OpenCL][Sema] Minor refactoring and constraint checkingMarco Antognini2019-07-171-9/+4
| | | | | | | | | | | | | | Summary: Simplify code a bit and add assertion to address post-landing comments from D64083. Subscribers: yaxunl, Anastasia, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64804 llvm-svn: 366306
* [Driver] Enable __cxa_atexit on SolarisRainer Orth2019-07-173-3/+2
| | | | | | | | | | | | | | | | | | | Starting with Solaris 11.4 (which is now the required minimal version), Solaris does support __cxa_atexit. This patch reflects that. One might consider removing the affected tests altogether instead of inverting them, as is done on other targets. Besides, this lets two ASan tests PASS: AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D64491 llvm-svn: 366305
* Replace CRLF with LF.Rui Ueyama2019-07-171-94/+94
| | | | llvm-svn: 366304
* [mips] Remove redundant test case. NFCSimon Atanasyan2019-07-171-17/+0
| | | | | | The `inlineasm-constraint-reg64.ll` test checks the same functionality. llvm-svn: 366303
* [mips] Name inline asm constraint test cases in a uniform manner. NFCSimon Atanasyan2019-07-1718-0/+0
| | | | llvm-svn: 366302
* [mips] Use mult/mflo pattern on 64-bit targets prior to MIPS64Simon Atanasyan2019-07-172-1/+4
| | | | | | The `MUL` instruction is available starting from the MIPS32/MIPS64 targets. llvm-svn: 366301
* [mips] Implement .cplocal directiveSimon Atanasyan2019-07-175-33/+170
| | | | | | | | | | | | | | This directive forces to use the alternate register for context pointer. For example, this code: .cplocal $4 jal foo expands to: ld $25, %call16(foo)($4) jalr $25 Differential Revision: https://reviews.llvm.org/D64743 llvm-svn: 366300
* [mips] Support the "o" inline asm constraintSimon Atanasyan2019-07-173-0/+64
| | | | | | | | | | | | | As well as other LLVM targets we do not handle "offsettable" memory addresses in any special way. In other words, the "o" constraint is an exact equivalent of the "m" one. But some existing code require the "o" constraint support. This fixes PR42589. Differential Revision: https://reviews.llvm.org/D64792 llvm-svn: 366299
* [Target][NFCI] Remove commented out codeAlex Langford2019-07-171-2/+0
| | | | llvm-svn: 366295
* [LoopInfo] Fix getUniqueNonLatchExitBlocksSerguei Katkov2019-07-173-44/+50
| | | | | | | | | | | | | | | | | | | | | | | | It is possible that exit block has two predecessors and one of them is a latch block while another is not. Current algorithm is based on the assumption that all exits are dedicated and therefore we can check only first predecessor of loop exit to find all unique exits. However if we do not consider latch block and it is first predecessor of some exit then this exit will be found. Regression test is added. As a side effect of algorithm re-writing, the restriction that all exits are dedicated is eliminated. Reviewers: reames, fhahn, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D64787 llvm-svn: 366294
* [NativePDB] Make GetTranslationUnitDecl return an lldb CompilerDeclCtxNathan Lanza2019-07-172-10/+11
| | | | | | | | | | | Summary: We intend to make PdbAstBuilder abstract and implement PdbAstBuilderClang along with any other languages that wish to use PDBs. This is the first step. Differential Revision: https://reviews.llvm.org/D64852 llvm-svn: 366293
* [Target][NFCI] Rename variableAlex Langford2019-07-171-8/+8
| | | | | | This variable doesn't have anything to do with clang. llvm-svn: 366292
* Update email address.Qiu Chaofan2019-07-171-4/+4
| | | | llvm-svn: 366291
* gn build: Merge r366265Nico Weber2019-07-171-0/+1
| | | | llvm-svn: 366289
* gn build: Merge r366216Nico Weber2019-07-171-0/+1
| | | | llvm-svn: 366288
* AMDGPU: Add some missing builtinsMatt Arsenault2019-07-176-0/+144
| | | | llvm-svn: 366286
* Don't require python exe and lib versions to match while crosscompilingNathan Lanza2019-07-161-1/+2
| | | | | | | | | | | | | | Summary: While cross compiling, the python executable is used to run a handful of scripts while the libraries are linked and headers are included. Theoretically it's possible for the versions to match completely, but requiring the build to match 2.7.10 to 2.7.15 is unnecessary. Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D64822 llvm-svn: 366285
* Fix OpenCLCXX test on 32-bit Windows where thiscall is presentReid Kleckner2019-07-161-6/+6
| | | | llvm-svn: 366284
* [AMDGPU] Autogenerate register asm namesStanislav Mekhanoshin2019-07-165-721/+139
| | | | | | Differential Revision: https://reviews.llvm.org/D64839 llvm-svn: 366283
* Fix darwin-ld.c if dsymutil.exe exists on PATHReid Kleckner2019-07-161-2/+2
| | | | llvm-svn: 366282
* add a workaround in GetLine to account for ReadFile not reporintg errorNathan Lanza2019-07-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | Summary: ReadFile on Windows is supposed to set ERROR_OPERATION_ABORTED according to the docs on MSDN. However, this has evidently been a known bug since Windows 8. Therefore, we can't detect if a signal interrupted in the fgets. So pressing ctrl-c causes the repl to end and the process to exit. A temporary workaround is just to attempt to fgets twice until this bug is fixed. A possible alternative would be to set a flag in the `sigint_handler` and simply check that flag in the true part of the if statement. However, signal handlers on Windows are asynchronous and this would require sleeping on the repl loop thread while still not necessarily guarnateeing that you caught the sigint. Reviewers: jfb Differential Revision: https://reviews.llvm.org/D64660 llvm-svn: 366281
* ARM: Fix missing immarg for space intrinsicMatt Arsenault2019-07-162-1/+10
| | | | llvm-svn: 366280
* GlobalISel: Add overload of handleAssignments with CCStateMatt Arsenault2019-07-162-3/+16
| | | | | | | | | | | AMDGPU needs to allocate special argument registers separately from the user function argument list, so needs direct control over the CCState. The ArgLocs argument is only really necessary because CCState doesn't allow access to it. llvm-svn: 366279
* [TableGen] Generate offsets into a flat array for getOperandTypeJustin Bogner2019-07-162-27/+40
| | | | | | | | | | Rather than an array of std::initializer_list, generate a table of offsets and a flat array of the operands for getOperandType. This is a bit more efficient on platforms that don't manage to get the array of inintializer_lists initialized at link time (I'm looking at you macOS). It's also quite quite a bit faster to compile. llvm-svn: 366278
* Fix a typo in target featuresGeorge Burgess IV2019-07-162-2/+2
| | | | | | | | | There was a slight typo in r364352 that ended up causing our backend to complain on some x86 Android builds. This CL fixes that. Differential Revision: https://reviews.llvm.org/D64781 llvm-svn: 366276
* [WebAssembly] Compile all TLS on Emscripten as local-execGuanzhong Chen2019-07-163-2/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, on Emscripten, dynamic linking is not supported with threads. This means that if thread-local storage is used, it must be used in a statically-linked executable. Hence, local-exec is the only possible model. This diff compiles all TLS variables to use local-exec on Emscripten as a temporary measure until dynamic linking is supported with threads. The goal for this is to allow C++ types with constructors to be thread-local. Currently, when `clang` compiles a `thread_local` variable with a constructor, it generates `__tls_guard` variable: @__tls_guard = internal thread_local global i8 0, align 1 As no TLS model is specified, this is treated as general-dynamic, which we do not support (and cannot support without implementing dynamic linking support with threads in Emscripten). As a result, any C++ constructor in `thread_local` variables would not compile. By compiling all `thread_local` as local-exec, `__tls_guard` will compile and we can support C++ constructors with TLS without implementing dynamic linking with threads. Depends on D64537 Reviewers: tlively, aheejin, sbc100 Reviewed By: aheejin Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64776 llvm-svn: 366275
* [TableGen] Add "getOperandType" to get operand types from opcode/opidxJustin Bogner2019-07-162-4/+97
| | | | | | | | | | | | | The InstrInfoEmitter outputs an enum called "OperandType" which gives numerical IDs to each operand type. This patch makes use of this enum to define a function called "getOperandType", which allows looking up the type of an operand given its opcode and operand index. Patch by Nicolas Guillemot. Thanks! Differential Revision: https://reviews.llvm.org/D63320 llvm-svn: 366274
* Add REQUIRES: x86 to safeseh-no.s test for x86Reid Kleckner2019-07-161-0/+1
| | | | llvm-svn: 366273
* [WebAssembly] Implement thread-local storage (local-exec model)Guanzhong Chen2019-07-1618-47/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Thread local variables are placed inside a `.tdata` segment. Their symbols are offsets from the start of the segment. The address of a thread local variable is computed as `__tls_base` + the offset from the start of the segment. `.tdata` segment is a passive segment and `memory.init` is used once per thread to initialize the thread local storage. `__tls_base` is a wasm global. Since each thread has its own wasm instance, it is effectively thread local. Currently, `__tls_base` must be initialized at thread startup, and so cannot be used with dynamic libraries. `__tls_base` is to be initialized with a new linker-synthesized function, `__wasm_init_tls`, which takes as an argument a block of memory to use as the storage for thread locals. It then initializes the block of memory and sets `__tls_base`. As `__wasm_init_tls` will handle the memory initialization, the memory does not have to be zeroed. To help allocating memory for thread-local storage, a new compiler intrinsic is introduced: `__builtin_wasm_tls_size()`. This instrinsic function returns the size of the thread-local storage for the current function. The expected usage is to run something like the following upon thread startup: __wasm_init_tls(malloc(__builtin_wasm_tls_size())); Reviewers: tlively, aheejin, kripken, sbc100 Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, jfb, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64537 llvm-svn: 366272
* AMDGPU: Partially revert r366250Matt Arsenault2019-07-161-5/+2
| | | | | | | GCCBuiltin doesn't work for these, because they have a mangled type (although they arguably should not). llvm-svn: 366271
* [ORC][docs] Fix an RST error: the code-block directive needs a newline after it.Lang Hames2019-07-161-0/+1
| | | | llvm-svn: 366270
* [ORC][docs] Trim ORCv1 to ORCv2 transition section, add a how-to section.Lang Hames2019-07-161-121/+288
| | | | llvm-svn: 366269
* [x86] use more phadd for reductionsSanjay Patel2019-07-164-56/+86
| | | | | | | | | | | | | | | This is part of what is requested by PR42023: https://bugs.llvm.org/show_bug.cgi?id=42023 There's an extension needed for FP add, but exactly how we would specify that using flags is not clear to me, so I left that as a TODO. We're still missing patterns for partial reductions when the input vector is 256-bit or 512-bit, but I think that's a failure of vector narrowing. If we can reduce the widths, then this matching should work on those tests. Differential Revision: https://reviews.llvm.org/D64760 llvm-svn: 366268
* [clang-format] Don't detect call to ObjC class method as C++11 attribute ↵Ben Hamilton2019-07-162-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | specifier Summary: Previously, clang-format detected something like the following as a C++11 attribute specifier. @[[NSArray class]] instead of an array with an Objective-C method call inside. In general, when the attribute specifier checking runs, if it sees 2 identifiers in a row, it decides that the square brackets represent an Objective-C method call. However, here, `class` is tokenized as a keyword instead of an identifier, so this check fails. To fix this, the attribute specifier first checks whether the first square bracket has an "@" before it. If it does, then that square bracket is not the start of a attribute specifier because it is an Objective-C array literal. (The assumption is that @[[.*]] is not valid C/C++.) Contributed by rkgibson2. Reviewers: benhamilton Reviewed By: benhamilton Subscribers: aaron.ballman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64632 llvm-svn: 366267
* [NFC][ScopBuilder] Move addUserContext to ScopBuilderDominik Adamski2019-07-164-47/+48
| | | | | | | | | | Scope of changes: 1) Moved addUserContext to ScopBuilder. 2) Moved command line option UserContextStr to ScopBuilder. Differential Revision: https://reviews.llvm.org/D63740 llvm-svn: 366266
* [clang-tidy] initial version of readability-convert-member-functions-to-staticMatthias Gehre2019-07-168-0/+451
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Finds non-static member functions that can be made ``static``. I have run this check (repeatedly) over llvm-project. It made 1708 member functions ``static``. Out of those, I had to exclude 22 via ``NOLINT`` because their address was taken and stored in a variable of pointer-to-member type (e.g. passed to llvm::StringSwitch). It also made 243 member functions ``const``. (This is currently very conservative to have no false-positives and can hopefully be extended in the future.) You can find the results here: https://github.com/mgehre/llvm-project/commits/static_const_eval Reviewers: alexfh, aaron.ballman Subscribers: mgorny, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61749 llvm-svn: 366265
* DWARF: Skip zero column for inline call sitesDavid Blaikie2019-07-162-2/+7
| | | | | | | | | | | | | | D64033 <https://reviews.llvm.org/D64033> added DW_AT_call_column for inline sites. However, that change wasn't aware of "-gno-column-info". To avoid adding column info when "-gno-column-info" is used, now DW_AT_call_column is only added when we have non-zero column (when "-gno-column-info" is used, column will be zero). Patch by Wenlei He! Differential Revision: https://reviews.llvm.org/D64784 llvm-svn: 366264
* [libcxx] Rejigger test for destroying delete feature-test macrosLouis Dionne2019-07-161-4/+13
| | | | | | | | | In r361572, we introduced library support for C++20 destroying delete and decided to only define the library feature-test macro when the compiler supports the underlying language feature. This patch reworks the tests to mirror that. llvm-svn: 366263
* [NFC][ScopBuilder] Move buildAliasChecks and its implementing methods to ↵Dominik Adamski2019-07-164-402/+420
| | | | | | | | | | | | | | | | | | | | | | | | ScopBuilder Scope of changes: 1) Moved buildAliasChecks to ScopBuilder. 2) Moved buildAliasGroup to ScopBuilder. 3) Moved buildAliasGroups to ScopBuilder. 4) Moved buildAliasGroupsForAccesses to ScopBuilder. 5) Moved splitAliasGroupsByDomain to ScopBuilder. 6) Moved addNonEmptyDomainConstraints to ScopBuilder. 7) Moved buildMinMaxAccess to ScopBuilder. 8) Moved calculateMinMaxAccess to ScopBuilder. 9) Moved getAccessDomain to ScopBuilder. 10) Moved command line options used only by buildAliasChecks functions to ScopBuilder. 11) Refactored buildAliasGroup function. Added addAliasGroup function to Scop class for pushing back calculated min/max accesses. 12) Added function incrementNumberOfAliasingAssumptions which increments number of statistic variable AssumptionsAliasing. AssumptionsAliasing variable is defined by STATISTIC macro inside ScopInfo.cpp and it is also used by function trackAssumption from Scop class. 13) Added reference to OptimizationRemarkEmitter to ScopBuilder class. 14) Moved calculateMinMaxAccess function to ScopBuilder class. Differential Revision: https://reviews.llvm.org/D63693 llvm-svn: 366262
* [Symbol] Remove unused fields from ClangASTContextAlex Langford2019-07-161-2/+0
| | | | llvm-svn: 366261
* [NFC][ScopBuilder] Move addRecordedAssumption to ScopBuilderDominik Adamski2019-07-164-56/+67
| | | | | | | | | | | | | Scope of changes: 1) Moved addRecordedAssumptions to ScopBuilder. 2) Moved Assumption struct outside Scop class. 3) Refactored addRecordedAssumptions function. Replaced while loop by for range loop. 4) Added function to clear processed Assumptions. Differential Revision: https://reviews.llvm.org/D63572 llvm-svn: 366260
* [libc++] Add missing UNSUPPORTED for CTAD testsLouis Dionne2019-07-162-0/+2
| | | | | | | The tests for unordered_set and unordered_multiset were missing UNSUPPORTED markup for Apple Clang 9.1, which is still being used on some CI bots. llvm-svn: 366259
* [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6Julian Lettner2019-07-161-45/+44
| | | | | | | Cleanup ARM64 assembly after removing unnecessary computation of mangled stack pointer in previous commit. llvm-svn: 366258
* AMDGPU/GlobalISel: Select G_ASHRMatt Arsenault2019-07-167-72/+680
| | | | llvm-svn: 366257
* AMDGPU/GlobalISel: Select G_LSHRMatt Arsenault2019-07-166-4/+703
| | | | llvm-svn: 366256
OpenPOWER on IntegriCloud