summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ObjC][ARC] Delete ObjC runtime calls on global variables annotatedAkira Hatanaka2019-06-144-0/+117
| | | | | | | | | | | | with 'objc_arc_inert' Those calls are no-ops, so they can be safely deleted. rdar://problem/49839633 Differential Revision: https://reviews.llvm.org/D62433 llvm-svn: 363468
* [CodeGen][ObjC] Annotate retain-agnostic ObjC globals with attributeAkira Hatanaka2019-06-144-2/+21
| | | | | | | | | | | | | | | 'objc_arc_inert' The attribute enables the ARC optimizer to delete ObjC ARC runtime calls on the annotated globals (see https://reviews.llvm.org/D62433). We currently only annotate global variables for string literals and global blocks with the attribute. rdar://problem/49839633 Differential Revision: https://reviews.llvm.org/D62831 llvm-svn: 363467
* Include the file in the new unknown codeview subsection warningReid Kleckner2019-06-141-1/+1
| | | | llvm-svn: 363466
* AMDGPU: Avoid most waitcnts before callsMatt Arsenault2019-06-143-96/+115
| | | | | | | | | | | Currently you get extra waits, because waits are inserted for the register dependencies of the call, and the function prolog waits on everything. Currently waits are still inserted on returns. It may make sense to not do this, and wait in the caller instead. llvm-svn: 363465
* Add --print-supported-cpus flag for clang.Ziang Wan2019-06-149-2/+106
| | | | | | | | | | | | This patch allows clang users to print out a list of supported CPU models using clang [--target=<target triple>] --print-supported-cpus Then, users can select the CPU model to compile to using clang --target=<triple> -mcpu=<model> a.c It is a handy feature to help cross compilation. llvm-svn: 363464
* [Remarks][NFC] Improve testing and documentation of -foptimization-record-passesFrancis Visoiu Mistrih2019-06-144-1/+18
| | | | | | | | | | | This adds: * documentation to the user manual * nicer error message * test for the error case * test for the gold plugin llvm-svn: 363463
* SROA: Allow eliminating addrspacecasted allocasMatt Arsenault2019-06-146-64/+219
| | | | | | | | | | | | | | | | | | | There is a circular dependency between SROA and InferAddressSpaces today that requires running both multiple times in order to be able to eliminate all simple allocas and addrspacecasts. InferAddressSpaces can't remove addrspacecasts when written to memory, and SROA helps move pointers out of memory. This should avoid inserting new commuting addrspacecasts with GEPs, since there are unresolved questions about pointer wrapping between different address spaces. For now, don't replace volatile operations that don't match the alloca addrspace, as it would change the address space of the access. It may be still OK to insert an addrspacecast from the new alloca, but be more conservative for now. llvm-svn: 363462
* [PowerPC][NFC] Comments update and remove some unused defJinsong Ji2019-06-142-20/+2
| | | | llvm-svn: 363461
* SROA: Add baseline test for addrspacecast changesMatt Arsenault2019-06-141-0/+348
| | | | llvm-svn: 363460
* AMDGPU: Fix capitalized register names in asm constraintsMatt Arsenault2019-06-1412-20/+20
| | | | | | | This was a workaround a long time ago, but the canonical lower case names work now. llvm-svn: 363459
* Implement GetSharedLibraryInfoAddressAntonio Afonso2019-06-1410-167/+487
| | | | | | | | | | | | | | | | | | | | | Summary: This is the third patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499 Add functions to read the r_debug location to know where the linked list of loaded libraries are so I can generate the `xfer:libraries-svr4` packet. I'm also using this function to implement `GetSharedLibraryInfoAddress` that was "not implemented" for linux. Most of this code was inspired by the current ds2 implementation here: https://github.com/facebook/ds2/blob/master/Sources/Target/POSIX/ELFProcess.cpp. Reviewers: clayborg, xiaobai, labath Reviewed By: clayborg, labath Subscribers: emaste, krytarowski, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62501 llvm-svn: 363458
* [COFF] Strip section name suffix from mingw comdatsMartin Storsjo2019-06-142-1/+46
| | | | | | | | This is the second part of the fix for PR42217. Differential Revision: https://reviews.llvm.org/D63352 llvm-svn: 363457
* [COFF] Handle .eh_frame$symbol as associative comdat for MinGWMartin Storsjo2019-06-142-3/+43
| | | | | | | | | | | | | This matches how it is done for .xdata and .pdata already. On i386, the symbol name in the section name suffix does not contain the extra underscore prefix. This is one part of a fix for PR42217. Differential Revision: https://reviews.llvm.org/D63350 llvm-svn: 363456
* AMDGPU: Fix dropping memref for ds append/consumeMatt Arsenault2019-06-144-2/+24
| | | | | | | | | The way SelectionDAG treats memory operands is very frustrating, and by default drops them unless a property is set on the pattern. There is no pattern for manually selected instructions, so this requires manually setting them. llvm-svn: 363455
* AMDGPU: Set isTrap on S_TRAPMatt Arsenault2019-06-141-1/+4
| | | | | | | This seems to only be used for generating some kind of documentation, but might as well set it. llvm-svn: 363454
* AMDGPU: Add baseline test for call waitcnt insertionMatt Arsenault2019-06-141-0/+161
| | | | llvm-svn: 363453
* UpdateTestChecks: Consider .section as end of function for AMDGPUMatt Arsenault2019-06-141-1/+1
| | | | | | | | Kernels seem to go directly to a section switch instead of emitting .Lfunc_end. This fixes including all of the kernel metadata in the check lines, which is undesirable most of the time. llvm-svn: 363452
* [OpenMP] Add target task alloc function with device IDGheorghe-Teodor Bercea2019-06-1414-35/+72
| | | | | | | | | | | | | | | | Summary: Add a new call to Clang to perform task allocation for the target. Reviewers: ABataev, AlexEichenberger, caomhin Reviewed By: ABataev, AlexEichenberger Subscribers: openmp-commits, Hahnfeld, guansong, jdoerfert, cfe-commits Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D63009 llvm-svn: 363451
* Use unsigned for bitfields to avoid sign extensionReid Kleckner2019-06-142-5/+8
| | | | llvm-svn: 363450
* [OpenMP] Add task alloc functionGheorghe-Teodor Bercea2019-06-142-0/+16
| | | | | | | | | | | | | | | | Summary: Add the target task allocation function to the interface. Reviewers: ABataev, AlexEichenberger, caomhin, jlpeyton, AndreyChurbanov, RaviNarayanaswamy, hbae Reviewed By: AlexEichenberger, hbae Subscribers: hbae, RaviNarayanaswamy, cfe-commits, Hahnfeld, guansong, jdoerfert, openmp-commits Tags: #openmp, #clang Differential Revision: https://reviews.llvm.org/D63010 llvm-svn: 363449
* [x86] add test for 256-bit blendv with AVX targets; NFCSanjay Patel2019-06-141-0/+40
| | | | | | This is a reduction of the pattern seen in D63233. llvm-svn: 363448
* PR42071: Reject weird names for non-type template parameters.Richard Smith2019-06-145-25/+57
| | | | | | Also reject default arguments appearing in invalid locations. llvm-svn: 363447
* Use getOperatorSpelling to get the spelling of an overloaded operatorRichard Smith2019-06-144-27/+9
| | | | | | rather than duplicating operator name tables in multiple places. llvm-svn: 363446
* [libFuzzer] simplify the DFT trace collection using the new faster DFSan ↵Kostya Serebryany2019-06-146-184/+172
| | | | | | mode that traces up to 16 labels at a time and never runs out of labels. Second attempt. This time with a fix for windows (putenv instead of setenv)) llvm-svn: 363445
* [JITLink] Move JITLinkMemoryManager into its own header.Lang Hames2019-06-145-162/+206
| | | | llvm-svn: 363444
* [libFuzzer] Disable len_control by default if LLVMFuzzerCustomMutator is used.Max Moroz2019-06-143-3/+15
| | | | | | | | | | | | | | | | | | | | | | Summary: Some custom mutators may not peform well when size restriction is enforced by len_control. Because of that, it's safer to disable len_control by default in such cases, but still allow users to enable it manually. Bug example: https://bugs.chromium.org/p/chromium/issues/detail?id=919530. Tested manually with LPM-based and regular fuzz targets. Reviewers: kcc, vitalybuka, metzman Reviewed By: kcc, metzman Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D63334 llvm-svn: 363443
* attempt to unbreak buildbotsEric Fiselier2019-06-142-2/+9
| | | | llvm-svn: 363442
* Don't try to parse ObjC method if CU isn't ObjCGreg Clayton2019-06-141-20/+24
| | | | | | | | Improve manual indexing performance when indexing non objective C code. Differential Revision: https://reviews.llvm.org/D63171 llvm-svn: 363441
* build: extract LLVM distribution target handlingSaleem Abdulrasool2019-06-142-30/+38
| | | | | | | | | This extracts the LLVM distribution target handling into a support module. Extraction will enable us to restructure the builds to support multiple distribution configurations (e.g. developer and user) to permit us to build the development package and the user package at once. llvm-svn: 363440
* [Remarks] Use the RemarkSetup error in setupOptimizationRemarksFrancis Visoiu Mistrih2019-06-141-2/+2
| | | | | | | Added the errors in r363415 but they were not used in the RemarkStreamer. llvm-svn: 363439
* Remove stale comment and disabled code (NFC)Jonas Devlieghere2019-06-141-19/+0
| | | | llvm-svn: 363438
* gn build: Add NVPTX targetNico Weber2019-06-149-4/+167
| | | | | | | | | | | | | | | | | | | The NVPTX target is a bit unusual in that it's the only target without a disassembler, and one of three targets without an asm parser (and the first one of those three in the gn build). NVPTX doesn't have those because it's not a binary format. The CMake build checks for the existence of {AsmParser,Disassembler}/CMakeLists.txt when setting LLVM_ENUM_ASM_PARSERS / LLVM_ENUM_DISASSEBLERS (http://llvm-cs.pcc.me.uk/CMakeLists.txt#744). The GN build doesn't want to hit the disk for things like this, so instead I'm adding explicit `targets_with_asm_parsers` and `targets_with_disassemblers` lists. Since both are needed rarely, they are defined in their own gni files. Differential Revision: https://reviews.llvm.org/D63210 llvm-svn: 363437
* gn build: Simplify Target build filesNico Weber2019-06-1421-159/+73
| | | | | | | | | | | | | | | | Now that the cycle between MCTargetDesc and TargetInfo is gone (see revisions 360709 360718 360722 360724 360726 360731 360733 360735 360736), remove the dependency from TargetInfo on MCTargetDesc:tablegen. In most targets, this makes MCTargetDesc:tablegen have just a single use, so inline it there. For AArch64, ARM, and RISCV there's still a similar cycle between MCTargetDesc and Utils, so the MCTargetDesc:tablegen indirection is still needed there. Differential Revision: https://reviews.llvm.org/D63200 llvm-svn: 363436
* [OpenMP] Avoid emitting maps for target link variables when unified memory ↵Gheorghe-Teodor Bercea2019-06-144-20/+22
| | | | | | | | | | | | | | | | | | is used Summary: This patch avoids the emission of maps for target link variables when unified memory is present. Reviewers: ABataev, caomhin Reviewed By: ABataev Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60883 llvm-svn: 363435
* [GlobalISel] Add a G_BRJT opcode.Amara Emerson2019-06-147-0/+82
| | | | | | | | | | | | | This is a branch opcode that takes a jump table pointer, jump table index and an index into the table to do an indirect branch. We pass both the table pointer and JTI to allow targets like ARM64 to more easily use the existing jump table compression optimization without having to walk up the block to find a paired G_JUMP_TABLE. Differential Revision: https://reviews.llvm.org/D63159 llvm-svn: 363434
* [MinGW] Support the --subsystem=val option in joined formMartin Storsjo2019-06-142-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D63250 llvm-svn: 363433
* [MinGW] Support the --{major,minor}-{os,subsystem}-version optionsMartin Storsjo2019-06-143-1/+54
| | | | | | | | This fixes PR42218. Differential Revision: https://reviews.llvm.org/D63249 llvm-svn: 363432
* [COFF] Allow setting subsystem versions while inferring the subsystem type ↵Martin Storsjo2019-06-143-2/+17
| | | | | | | | implicitly Differential Revision: https://reviews.llvm.org/D63248 llvm-svn: 363431
* Remove unused SK_LValueToRValue initialization step.Richard Smith2019-06-142-36/+0
| | | | | | | | | In addition to being unused and duplicating code, this was also wrong (it didn't properly mark the operand as being potentially not odr-used). This reinstates r363340, reverted in r363352. llvm-svn: 363430
* PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of typeRichard Smith2019-06-1410-20/+86
| | | | | | | | | | | nullptr_t does not access memory. We now reuse CK_NullToPointer to represent a conversion from a glvalue of type nullptr_t to a prvalue of nullptr_t where necessary. This reinstates r363337, reverted in r363352. llvm-svn: 363429
* C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue ↵Richard Smith2019-06-1412-91/+714
| | | | | | | | | | | | | | | | | | | | | | | | | | | conversion applied to a member access or similar not-quite-trivial lvalue expression. Summary: When a variable is named in a context where we can't directly emit a reference to it (because we don't know for sure that it's going to be defined, or it's from an enclosing function and not captured, or the reference might not "work" for some reason), we emit a copy of the variable as a global and use that for the known-to-be-read-only access. This reinstates r363295, reverted in r363352, with a fix for PR42276: we now produce a proper name for a non-odr-use reference to a static constexpr data member. The name <mangled-name>.const is used in that case; such names are reserved to the implementation for cases such as this and should demangle nicely. Reviewers: rjmccall Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63157 llvm-svn: 363428
* Revert Fix a bug w/inbounds invalidation in LFTRFlorian Hahn2019-06-145-96/+22
| | | | | | | | | Reverting because it breaks a green dragon build: http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208 This reverts r363289 (git commit eb88badff96dacef8fce3f003dec34c2ef6900bf) llvm-svn: 363427
* Revert [LFTR] Stylistic cleanup as suggested in last review comment of ↵Florian Hahn2019-06-141-9/+9
| | | | | | | | | | | D62939 [NFC] Reverting because it depends on r363289, which breaks a green dragon build: http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208 This reverts r363292 (git commit 42a3fc133d3544b5c0c032fe99c6e8a469a836c2) llvm-svn: 363426
* Revert [LFTR] Rename variable to minimize confusion [NFC]Florian Hahn2019-06-141-15/+18
| | | | | | | | | | Reverting because it depends on r363289, which breaks a green dragon build: http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208 This reverts r363293 (git commit c37be29634214fb1cb4c823840bffc31e5ebfe40) llvm-svn: 363425
* [GISel]: Fix pattern matcher for m_OneUseAditya Nandakumar2019-06-142-2/+26
| | | | | | https://reviews.llvm.org/D63302 llvm-svn: 363424
* [PowerPC][NFC] Format comments in P9InstrResrouce.tdJinsong Ji2019-06-141-80/+77
| | | | llvm-svn: 363423
* [SimpligyCFG] NFC intended, remove GCD that was only used for powers of twoShawn Landden2019-06-141-13/+11
| | | | | | | | | | | | and replace with an equilivent countTrailingZeros. GCD is much more expensive than this, with repeated division. This depends on D60823 Differential Revision: https://reviews.llvm.org/D61151 llvm-svn: 363422
* Wrap a test to 80 columnsNico Weber2019-06-141-2/+2
| | | | llvm-svn: 363421
* build: don't attempt to run config.guess on WindowsSaleem Abdulrasool2019-06-141-10/+14
| | | | | | | | | | | When cross-compiling LLVM to android from Windows (for LLVMSupport), we would attempt to execute `config.guess` to determine the host triple since `CMAKE_SYSTEM_NAME` is not Windows and `CMAKE_C_COMPILER` will be set to GNU or Clang. This will fail as `config.guess` is a shell script which cannot be executed on Windows. Simply log a warning instead. The user can specify the value for this instead in those cases. llvm-svn: 363420
* Remove two unused parametersNico Weber2019-06-141-4/+2
| | | | llvm-svn: 363419
OpenPOWER on IntegriCloud