summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Sema][ObjC] Allow silencing -Wobjc-designated-initializers warnings byAkira Hatanaka2019-03-012-0/+22
| | | | | | | | | | | | | declaring an unavailable method in the subclass's extension that overrides the designated initializer in the base class. r243676 made changes to allow declaring the unavailable method in the subclass interface to silence the warning. This commit additionally allows declaring the unavailable method in the class extension. rdar://problem/42731306 llvm-svn: 355175
* [ConstantHoisting] Call cleanup() in ConstantHoistingPass::runImpl to avoid ↵Fangrui Song2019-03-013-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | dangling elements in ConstIntInfoVec for new PM Summary: ConstIntInfoVec contains elements extracted from the previous function. In new PM, releaseMemory() is not called and the dangling elements can cause segfault in findConstantInsertionPoint. Rename releaseMemory() to cleanup() to deliver the idea that it is mandatory and call cleanup() in ConstantHoistingPass::runImpl to fix this. Reviewers: ormris, zzheng, dmgreen, wmi Reviewed By: ormris, wmi Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58589 llvm-svn: 355174
* [ELF] Explain some options in ld.lld.1Fangrui Song2019-03-011-3/+60
| | | | | | | | | | | | | | Reviewers: ruiu, grimar Reviewed By: ruiu Subscribers: srhines, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58669 llvm-svn: 355173
* [NFC][Sanitizer] Add new BufferedStackTrace::Unwind APIJulian Lettner2019-03-0112-78/+80
| | | | | | | | | | | | | | | | | | | | | Retrying without replacing call sites in sanitizer_common (which might not have a symbol definition). Add new Unwind API. This is the final envisioned API with the correct abstraction level. It hides/slow fast unwinder selection from the caller and doesn't take any arguments that would leak that abstraction (i.e., arguments like stack_top/stack_bottom). GetStackTrace will become an implementation detail (private method) of the BufferedStackTrace class. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58741 > llvm-svn: 355168 llvm-svn: 355172
* Revert "[NFC][Sanitizer] Add new BufferedStackTrace::Unwind API"Julian Lettner2019-03-0113-83/+88
| | | | | | This reverts commit 6112f37e758ebf2405955e091a745f5003c1f562. llvm-svn: 355171
* Update com.apple.diagnosticd.diagnostic entitlementJason Molenda2019-03-014-4/+4
| | | | | | | | name to the newer com.apple.private.logging.diagnostic. <rdar://problem/47183116> llvm-svn: 355170
* Increase timeout in Symbols::DownloadObjectAndSymbolFile Jason Molenda2019-03-011-1/+1
| | | | | | | | | | from 30 seconds to 120 seconds. We've seen cases where this symbol lookup can exceed 30 seconds for people working remotely. <rdar://problem/48460476> llvm-svn: 355169
* [NFC][Sanitizer] Add new BufferedStackTrace::Unwind APIJulian Lettner2019-03-0113-88/+83
| | | | | | | | | | | | | | | | Add new Unwind API. This is the final envisioned API with the correct abstraction level. It hides/slow fast unwinder selection from the caller and doesn't take any arguments that would leak that abstraction (i.e., arguments like stack_top/stack_bottom). GetStackTrace will become an implementation detail (private method) of the BufferedStackTrace class. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58741 llvm-svn: 355168
* [Subtarget] Remove static global constructor call from the tablegened ↵Craig Topper2019-03-013-41/+83
| | | | | | | | | | | | | | | | | | subtarget feature tables Subtarget features are stored in a std::bitset that has been subclassed. There is a special constructor to allow the tablegen files to provide a list of bits to initialize the std::bitset to. This constructor isn't constexpr and std::bitset doesn't support many constexpr operations either. This results in a static global constructor being used to initialize the feature bitsets in these files at startup. To fix this I've introduced a new FeatureBitArray class that holds three 64-bit values representing the initial bit values and taught tablegen to emit hex constants for them based on the feature enum values. This makes the tablegen files less readable than they were before. I can add the list of features back as a comment if we think that's important. I've added a method to convert from this class into the std::bitset subclass we had before. I considered making the new FeatureBitArray class just implement the std::bitset interface we need instead, but thought I'd see how others felts about that first. I've simplified the interfaces to SetImpliedBits and ClearImpliedBits a little minimize the number of times we need to convert to the bitset. This removes about 27K from my local release+asserts build of llc. Differential Revision: https://reviews.llvm.org/D58520 llvm-svn: 355167
* [CodeGen] Fix calling llvm.var.annotation outside of a basic block.Volodymyr Sapsai2019-03-013-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | When we have an annotated local variable after a function returns, we generate IR that fails verification with the error > Instruction referencing instruction not embedded in a basic block! And it means that bitcast referencing alloca doesn't have a parent basic block. Fix by checking if we are at an unreachable point and skip emitting annotations. This approach is similar to the way we emit variable initializer and debug info. rdar://problem/46200420 Reviewers: rjmccall Reviewed By: rjmccall Subscribers: aprantl, jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D58147 llvm-svn: 355166
* [hwasan] Disable vfork code when building w/o interceptors.Evgeniy Stepanov2019-03-011-1/+1
| | | | | | Don't define vfork when OMPILER_RT_HWASAN_WITH_INTERCEPTORS=OFF. llvm-svn: 355165
* [sanitizer] Build everything whereever possible with -z text.Evgeniy Stepanov2019-03-012-0/+3
| | | | | | | | | | | | Reviewers: pcc, phosek Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58755 llvm-svn: 355164
* [WebAssembly] Lower SIMD shifts since they are fixed in V8Thomas Lively2019-03-011-5/+0
| | | | | | | | | | | | Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, hiraditya, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58800 llvm-svn: 355163
* [libc++] Fix forgotten fclose() in unit testLouis Dionne2019-03-011-0/+1
| | | | | | | Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D58732 llvm-svn: 355162
* [pstl] Fix missing parallel policy guardsLouis Dionne2019-03-011-0/+4
| | | | | | | Thanks to @jerryct for the patch. Differential Revision: https://reviews.llvm.org/D57638 llvm-svn: 355161
* [libc++] Increase portability of xalloc testLouis Dionne2019-03-011-5/+3
| | | | | | | | | | Do not assume that xalloc() starts at 0, which is not specified by the Standard. Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D58299 llvm-svn: 355160
* AMDGPU/GlobalISel: Implement select for G_INSERTTom Stellard2019-03-013-0/+80
| | | | | | | | | | | | Re-commit r344310. Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D53116 llvm-svn: 355159
* [clang-format][TableGen] Don't add spaces around items in square braces.Jordan Rupprecht2019-03-012-0/+9
| | | | | | | | | | | | | | | | | | | Summary: clang-formatting wants to add spaces around items in square braces, e.g. [1, 2] -> [ 1, 2 ]. Based on a quick check [1], it seems like most cases are using the [1, 2] format, so make that the consistent one. [1] in llvm `.td` files, the regex `\[[^ ]` (bracket followed by not-a-space) shows up ~400 times, but `\[\s[^ ]` (bracket followed by one space and one not-a-space) shows up ~40 times => ~90% uses this format. Reviewers: djasper, krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D55964 llvm-svn: 355158
* [WebAssembly] Fix crash when @llvm.global_dtors is externalThomas Lively2019-03-012-1/+10
| | | | | | | | | | | | Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58799 llvm-svn: 355157
* AMDGPU/GlobalISel: Implement select for G_EXTRACTTom Stellard2019-02-284-0/+109
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D49714 llvm-svn: 355156
* Symbols.cpp in unittest moved too.Jason Molenda2019-02-281-4/+4
| | | | llvm-svn: 355155
* [PPC] Secure PLT only has meaning for PICJoerg Sonnenberger2019-02-281-2/+2
| | | | llvm-svn: 355154
* ELF: Write .eh_frame_hdr explicitly after writing .eh_frame.Peter Collingbourne2019-02-287-40/+57
| | | | | | | | | | | This lets us remove the special case from Writer::writeSections(), and also fixes a bug where .eh_frame_hdr isn't necessarily written in the correct order if a linker script moves .eh_frame and .eh_frame_hdr into the same output section. Differential Revision: https://reviews.llvm.org/D58795 llvm-svn: 355153
* [sancov] Instrument reachable blocks that end in unreachableReid Kleckner2019-02-282-3/+30
| | | | | | | | | | | | | | | | | | Summary: These sorts of blocks often contain calls to noreturn functions, like longjmp, throw, or trap. If they don't end the program, they are "interesting" from the perspective of sanitizer coverage, so we should instrument them. This was discussed in https://reviews.llvm.org/D57982. Reviewers: kcc, vitalybuka Subscribers: llvm-commits, craig.topper, efriedma, morehouse, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D58740 llvm-svn: 355152
* llvm-readobj: Try the DWARF CFI dumper on all machines.Peter Collingbourne2019-02-284-8/+60
| | | | | | | | | | | | There's no reason to limit the DWARF CFI dumper to EM_386 and EM_X86_64; ELF files could contain DWARF CFI on almost any platform (even 32-bit ARM; NetBSD uses DWARF CFI on that platform). So start using the DWARF CFI dumper unconditionally so that we can dump .eh_frame sections on the remaining ELF platforms as well as in NetBSD binaries. Differential Revision: https://reviews.llvm.org/D58761 llvm-svn: 355151
* Update testcase since llvm-dwarfdump got more accurate in r355148.Adrian Prantl2019-02-281-1/+1
| | | | llvm-svn: 355150
* [CMake] Make liblldb depend on clang-headersAlex Langford2019-02-281-0/+4
| | | | | | | | | | | Summary: The clang headers are useful when dealing with clang modules. There is also a way to get to the clang headers from the SB API so it would be nice if they were also available when we just build lldb. Differential Revision: https://reviews.llvm.org/D58793 llvm-svn: 355149
* dsymutil support for DW_OP_convertAdrian Prantl2019-02-289-51/+279
| | | | | | | | | | | Add support for cloning DWARF expressions that contain base type DIE references in dsymutil. <rdar://problem/48167812> Differential Revision: https://reviews.llvm.org/D58534 llvm-svn: 355148
* gn build: Merge r355133.Peter Collingbourne2019-02-281-0/+1
| | | | llvm-svn: 355147
* gn build: Merge r355035Nico Weber2019-02-281-0/+1
| | | | llvm-svn: 355146
* gn build: Merge r355024Nico Weber2019-02-281-0/+1
| | | | llvm-svn: 355145
* cfi: Rename source file from cc to cppNico Weber2019-02-282-2/+4
| | | | | | See discussion on https://reviews.llvm.org/D58620 for the review. llvm-svn: 355144
* [CMake][LibFuzzer] Match symbol visibility setting between LibFuzzer object ↵Dan Liew2019-02-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | files and unit tests. Summary: This fixes inconsistent symbol visibility. This shows up as a linker warning if r336238 (43f633564e338a6dde83d49a48e5bfcbfdce292c) is reverted. ``` ld: warning: direct access in function 'fuzzer::CleanseCrashInput(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, fuzzer::FuzzingOptions const&)' from file '/Volumes/data/dev/llvm/upstream/master/builds/projects/compiler-rt/lib/fuzzer/tests/libRTFuzzerTest.x86_64.a(FuzzerDriver.cpp.o)' to global weak symbol 'fuzzer::Command::ignoreRemainingArgs()::kIgnoreRemaining' from file 'FuzzerTestObjects.FuzzerUnittest.cpp.x86_64.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. ``` r336238 just hid the issue rather than fixing the real issue. On macOS and other platforms we usually compile with `-fvisibility=hidden` but the unit tests were compiled without this flag. Reviewers: george.karpenkov, kubamracek, kcc, yln Subscribers: mgorny, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D58055 llvm-svn: 355143
* [CMake][libunwind] Define add_target_flags which is missingPetr Hosek2019-02-281-5/+11
| | | | | | | | It's use was introduced in r353084 but its definition is missing. Differential Revision: https://reviews.llvm.org/D58745 llvm-svn: 355142
* [COFF] Add address-taken import thunks to the fid tableReid Kleckner2019-02-282-11/+82
| | | | | | | | | | | | | | Summary: Fixes PR39799 Reviewers: dmajor, hans Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58739 llvm-svn: 355141
* [OpenMP][OMPT] Distinguish different barrier kindsJonathan Peyton2019-02-286-21/+57
| | | | | | | | | | | | | This change makes the runtime decide the intended use of each barrier invocation, for the OMPT synchronization tool callbacks. The OpenMP 5.0 specification defines four possible barrier kinds -- implicit, explicit, implementation, and just normal barrier. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D58247 llvm-svn: 355140
* Trying to fix bot breakage due to symbols not defined for WINDOWS!Manman Ren2019-02-281-1/+2
| | | | | | Follow up to r355133 llvm-svn: 355139
* [OpenMP 5.0] Deprecate nest-var and associated featuresJonathan Peyton2019-02-287-37/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | Nest-var, OMP_NESTED, omp_set_nested()., and omp_get_nested() have been deprecated in the 5.0 spec. Initial nesting info is now derived from OMP_MAX_ACTIVE_LEVELS, OMP_NUM_THREADS, and OMP_PROC_BIND. This patch deprecates the internal ICV that corresponds to nest-var, and replaces it with the max-active-levels-var ICV to determine nesting. The change still allows for use of OMP_NESTED (according to 5.0 changes), omp_get_nested, and omp_set_nested, which have had deprecation messages added to them. The change allows certain settings of OMP_NUM_THREADS, OMP_PROC_BIND, and OMP_MAX_ACTIVE_LEVELS to turn on nesting, but OMP_NESTED=0 will still force nesting to be off. The runtime now prints informative messages about deprecation of OMP_NESTED, omp_set_nested(), and omp_get_nested(), when those environment variables or routines are used. It also prints deprecated message in output for KMP_SETTINGS and OMP_DISPLAY_ENV for OMP_NESTED. This patch also fixes OMP_DISPLAY_ENV output for OMP_TARGET_OFFLOAD. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D58408 llvm-svn: 355138
* [hwasan] Fix vfork handling with large stack limit.Evgeniy Stepanov2019-02-281-3/+1
| | | | | | | | | | | Remove the maximum stack cleanup size check. With ulimit -s unlimited main thread stack can be very large, but we don't really have a choice other than cleaning all of it. It should be reasonably fast - hwasan cleans large shadow ranges with a single madvise call. This change fixes check-hwasan after ulimit -s unlimited. llvm-svn: 355137
* [AArch64] [Windows] Don't skip constructing UnwindHelp.Eli Friedman2019-02-284-11/+50
| | | | | | | | | | | | | In certain cases, the first non-frame-setup instruction in a function is a branch. For example, it could be a cbz on an argument. Make sure we correctly allocate the UnwindHelp, and find an appropriate register to use to initialize it. Fixes https://bugs.llvm.org/show_bug.cgi?id=40184 Differential Revision: https://reviews.llvm.org/D58752 llvm-svn: 355136
* [AArch64] [Windows] Fix llvm-readobj -unwind output with many epilogs.Eli Friedman2019-02-282-1/+27
| | | | | | | | | | The number of epilog scopes may not fit into a uint8_t. Fixes https://bugs.llvm.org/show_bug.cgi?id=40855 Differential Revision: https://reviews.llvm.org/D58693 llvm-svn: 355135
* [AArch64] Improve FP16 vector convert from short instructions.Abderrazek Zaafrani2019-02-283-34/+48
| | | | | | https://reviews.llvm.org/D58563 llvm-svn: 355134
* Add a module pass for order file instrumentationManman Ren2019-02-2811-0/+301
| | | | | | | | | | | | | | | The basic idea of the pass is to use a circular buffer to log the execution ordering of the functions. We only log the function when it is first executed. We use a 8-byte hash to log the function symbol name. In this pass, we add three global variables: (1) an order file buffer: a circular buffer at its own llvm section. (2) a bitmap for each module: one byte for each function to say if the function is already executed. (3) a global index to the order file buffer. At the function prologue, if the function has not been executed (by checking the bitmap), log the function hash, then atomically increase the index. Differential Revision: https://reviews.llvm.org/D57463 llvm-svn: 355133
* [clang-tidy] add OverrideMacro to modernize-use-override checkPaul Hoad2019-02-286-22/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The usefulness of **modernize-use-override** can be reduced if you have to live in an environment where you support multiple compilers, some of which sadly are not yet fully C++11 compliant some codebases have to use override as a macro OVERRIDE e.g. ``` // GCC 4.7 supports explicit virtual overrides when C++11 support is enabled. ``` This allows code to be compiled with C++11 compliant compilers and get warnings and errors that clang, MSVC,gcc can give, while still allowing other legacy pre C++11 compilers to compile the code. This can be an important step towards modernizing C++ code whilst living in a legacy codebase. When it comes to clang tidy, the use of the **modernize-use-override** is one of the most useful checks, but the messages reported are inaccurate for that codebase if the standard approach is to use the macros OVERRIDE and/or FINAL. When combined with fix-its that introduce the C++11 override keyword, they become fatal, resulting in the modernize-use-override check being turned off to prevent the introduction of such errors. This revision, allows the possibility for the replacement **override **to be a macro instead, Allowing the clang-tidy check to be run on both pre and post C++11 code, and allowing fix-its to be applied. Reviewers: alexfh, JonasToth, hokein, Eugene.Zelenko, aaron.ballman Reviewed By: alexfh, JonasToth Subscribers: lewmpk, malcolm.parsons, jdoerfert, xazax.hun, cfe-commits, llvm-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D57087 llvm-svn: 355132
* [PGO] Context sensitive PGO (part 2)Rong Xu2019-02-2817-47/+182
| | | | | | | | | | | Part 2 of CSPGO changes (mostly related to ProfileSummary). Note that I use a default parameter in setProfileSummary() and getSummary(). This is to break the dependency in clang. I will make the parameter explicit after changing clang in a separated patch. Differential Revision: https://reviews.llvm.org/D54175 llvm-svn: 355131
* [x86] scalarize extract element 0 of FP mathSanjay Patel2019-02-2812-258/+306
| | | | | | | | | | | | | | | | This is another step towards ensuring that we produce the optimal code for reductions, but there are other potential benefits as seen in the tests diffs: 1. Memory loads may get scalarized resulting in more efficient code. 2. Memory stores may get scalarized resulting in more efficient code. 3. Complex ops like fdiv/sqrt get scalarized which may be faster instructions depending on uarch. 4. Even simple ops like addss/subss/mulss/roundss may result in faster operation/less frequency throttling when scalarized depending on uarch. The TODO comment suggests 1 or more follow-ups for opcodes that can currently result in regressions. Differential Revision: https://reviews.llvm.org/D58282 llvm-svn: 355130
* Revert "Revert "[sanitizers] Restore internal_readlink for x32""H.J. Lu2019-02-282-1/+9
| | | | | | | | | This reverts revision 354601 and disables ReadBinaryNameCached check on Windows since Windows has no working ReadBinaryName. Differential Revision: https://reviews.llvm.org/D58788 llvm-svn: 355129
* [Sanitizer] lit test config: Respect existing parallelism_groupJulian Lettner2019-02-284-4/+8
| | | | llvm-svn: 355128
* bpf: disassembler support for XADD under sub-register modeJiong Wang2019-02-283-2/+7
| | | | | | | | | | | | Like the other load/store instructions, "w" register is preferred when disassembling BPF_STX | BPF_W | BPF_XADD. v1 -> v2: - Updated testcase insn-unit.s (Yonghong) Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> llvm-svn: 355127
* bpf: enable sub-register code-gen for XADDJiong Wang2019-02-284-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support sub-register code-gen for XADD is like supporting any other Load and Store patterns. No new instruction is introduced. lock *(u32 *)(r1 + 0) += w2 has exactly the same underlying insn as: lock *(u32 *)(r1 + 0) += r2 BPF_W width modifier has guaranteed they behave the same at runtime. This patch merely teaches BPF back-end that BPF_W width modifier could work GPR32 register class and that's all needed for sub-register code-gen support for XADD. test/CodeGen/BPF/xadd.ll updated to include sub-register code-gen tests. A new testcase test/CodeGen/BPF/xadd_legal.ll is added to make sure the legal case could pass on all code-gen modes. It could also test dead Def check on GPR32. If there is no proper handling like what has been done inside BPFMIChecking.cpp:hasLivingDefs, then this testcase will fail. Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> llvm-svn: 355126
OpenPOWER on IntegriCloud