summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [test] - Remove precomiled openbsd-phdrs.elf-x86-64 objects.George Rimar2019-08-175-207/+186
| | | | | | | | | | | There are 2 similar openbsd-phdrs.elf-x86-64 objects committed and used in test/Object and test/tools/llvm-objdump test cases. There is no reason to have them, we can use YAML instead. Patch does that. Differential revision: https://reviews.llvm.org/D66342 llvm-svn: 369189
* [circular_raw_ostream] Delegate is_displayed to contained streamTroy A. Johnson2019-08-171-0/+4
| | | | | | | | | | | | raw_ostream has an is_displayed() member function that determines if the stream is connected to a console for display or is connected to a file/pipe. By default, is_displayed() returns false, and derived classes like raw_fd_ostream override it. Because circular_raw_ostream wraps another stream, its result for is_displayed() should be the same as that stream. Differential Revision: https://reviews.llvm.org/D66026 llvm-svn: 369188
* [ELF] Replace local variable hasExportDynamic with config->exportDynamic. NFCFangrui Song2019-08-171-5/+2
| | | | llvm-svn: 369187
* Revert Revert [AArch64InstrInfo] Stop getInstSizeInBytes returning non-zero ↵Paul Walker2019-08-172-6/+84
| | | | | | | | for meta instructions. This reverts r369132 (git commit 19301d75f086caae1a495d267f5d0264b225942d) llvm-svn: 369186
* Revert [AArch64InstrInfo] Stop getInstSizeInBytes returning non-zero for ↵Paul Walker2019-08-172-84/+6
| | | | | | | | meta instructions. This reverts r369133 (git commit 2632c677f85cba1ac2aef5d68aaf8af0f5b3c944) llvm-svn: 369185
* [ELF][PPC] Fix getRelExpr for R_PPC64_REL16_HIFangrui Song2019-08-173-72/+68
| | | | | | | | | | | | Fixes https://github.com/ClangBuiltLinux/linux/issues/640 R_PPC64_REL16_HI was incorrectly computed as an R_ABS relocation. rLLD368964 made it a linker failure. Change it to use R_PC to fix the failures. Add ppc64-reloc-rel.s for these R_PPC64_REL* tests. llvm-svn: 369184
* [X86] Support -mlong-double-80Troy A. Johnson2019-08-173-7/+17
| | | | | | | | | | | | | Add an option group for all of the -mlong-double-* options and make -mlong-double-80 restore the default long double behavior for X86. The motivations are that GNU accepts the -mlong-double-80 option and that complex Makefiles often need a way of undoing earlier options. Prior to this commit, if one chooses 64-bit or 128-bit long double for X86, there is no way to undo that choice and restore the 80-bit behavior. Differential Revision: https://reviews.llvm.org/D66055 llvm-svn: 369183
* [clang-doc] Fix casting not working in gcc 5.4.0Diego Astiazaran2019-08-171-4/+4
| | | | | | | | | An implicit cast of std::string to llvm::SmallString<> was breaking GCC 5.4.0 builder. A pair using llvm::SmallString<> now uses std::string. Differential Revision: https://reviews.llvm.org/D66378 llvm-svn: 369182
* [MemorySSA] Loop passes should mark MSSA preserved when available.Alina Sbirlea2019-08-175-6/+6
| | | | | | | | This patch applies only to the new pass manager. Currently, when MSSA Analysis is available, and pass to each loop pass, it will be preserved by that loop pass. Hence, mark the analysis preserved based on that condition, vs the current `EnableMSSALoopDependency`. This leaves the global flag to affect only the entry point in the loop pass manager (in FunctionToLoopPassAdaptor). llvm-svn: 369181
* [Fuchsia] Create the VMO during initialization, not during exitPetr Hosek2019-08-171-40/+53
| | | | | | | | | | | We want to avoid doing expensive work during atexit since the process might be terminated before we can publish the VMO and write out the symbolizer markup, so move the VMO creation to the initialization phase and only write data during the atexit phase. Differential Revision: https://reviews.llvm.org/D66323 llvm-svn: 369180
* Simplify code (NFC).Adrian Prantl2019-08-171-22/+19
| | | | llvm-svn: 369179
* [llvm-readobj] Unwrap the value first to avoid the errorPetr Hosek2019-08-172-26/+27
| | | | | | | | | This addresses the issue introduced in r369169, we need to unwrap the value first before we can check whether it's empty. This also swaps the two branches to put the common path first which should be NFC. llvm-svn: 369177
* Add LLDB dataformatters for llvm::StringRef and lldb_private::ConstStringAdrian Prantl2019-08-161-0/+23
| | | | | | | | | | These data formatters make the string value appear in Xcode's variables view (and on the command line) without having to expand the data structure. Differential Revision: https://reviews.llvm.org/D66354 llvm-svn: 369175
* Revert r367891 - "[InstCombine] combine mul+shl separated by zext"Sanjay Patel2019-08-162-19/+10
| | | | | | | | | | | | | This reverts commit 5dbb90bfe14ace30224239cac7c61a1422fa5144. As noted in the post-commit thread for r367891, this can create a multiply that is lowered to a libcall that may not exist. We need to improve the backend decomposition for integer multiply before trying to re-land this (if it's still worthwhile after doing the backend work). llvm-svn: 369174
* Reland "[ARM] push LR before __gnu_mcount_nc"Jian Cai2019-08-1611-5/+141
| | | | | | | | This relands r369147 with fixes to unit tests. https://reviews.llvm.org/D65019 llvm-svn: 369173
* [AArch64][GlobalISel] Fix an assertion during G_UNMERGE selection for s128 ↵Amara Emerson2019-08-162-1/+20
| | | | | | types. llvm-svn: 369172
* [ORC] Re-introduce self-dependence accidentally dropped from a unit test.Lang Hames2019-08-161-0/+1
| | | | llvm-svn: 369171
* Revert "[X86] Support -mlong-double-80"Troy A. Johnson2019-08-163-18/+7
| | | | | | | This reverts commit 250aafa2c4a1bc2395edfe8d4365545bbe56fffe. Caused buildbot failures -- still investigating. llvm-svn: 369170
* [llvm-readobj] Fallback to PT_NOTE if file doesn't have sectionsPetr Hosek2019-08-162-5/+31
| | | | | | | | | This is useful when trying to read notes from stripped files and matches the behavior of GNU readelf and eu-readelf. Differential Revision: https://reviews.llvm.org/D66358 llvm-svn: 369169
* [CodeGenPrepare] Fix use-after-freeSanjay Patel2019-08-162-1/+19
| | | | | | | | | | | | | | | | | | | If OptimizeExtractBits() encountered a shift instruction with no operands at all, it would erase the instruction, but still return false. This previously didn’t matter because its caller would always return after processing the instruction, but https://reviews.llvm.org/D63233 changed the function’s caller to fall through if it returned false, which would then cause a use-after-free detectable by ASAN. This change makes OptimizeExtractBits return true if it removes a shift instruction with no users, terminating processing of the instruction. Patch by: @brentdax (Brent Royal-Gordon) Differential Revision: https://reviews.llvm.org/D66330 llvm-svn: 369168
* Revert [X86] SimplifyDemandedVectorElts - attempt to recombine target ↵Jordan Rupprecht2019-08-165-273/+254
| | | | | | | | | | shuffle using DemandedElts mask (reapplied) This reverts r368662 (git commit 1a8d790cf5f89c1df718844f13e934e39bef6ef5) The compile-time regression repro is in https://bugs.llvm.org/show_bug.cgi?id=43024 llvm-svn: 369167
* [InstCombine][NFC] reuse-constant-from-select-in-icmp.ll - check ↵Roman Lebedev2019-08-161-2/+8
| | | | | | branch_weights too llvm-svn: 369166
* Revert "[TSan] Don't guard #include <xpc/xpc.h>"Julian Lettner2019-08-161-0/+7
| | | | | | This reverts commit 8191585b36eb4963002cce43fb2e79e7fb05c3d6. llvm-svn: 369165
* [TSan] Add interceptors for os_unfair_lockJulian Lettner2019-08-162-0/+83
| | | | llvm-svn: 369164
* [InstCombine][NFC] Revisit tests in reuse-constant-from-select-in-icmp.llRoman Lebedev2019-08-161-8/+30
| | | | llvm-svn: 369163
* [ARM] Preserve liveness in ARMConstantIslands.Eli Friedman2019-08-162-3/+26
| | | | | | | | | | We currently don't use liveness information after this point, but it can be useful to catch bugs using -verify-machineinstrs, and optimizations could potentially use this information in the future. Differential Revision: https://reviews.llvm.org/D66319 llvm-svn: 369162
* [doc] Fix some minor formatting issues.Richard Smith2019-08-161-7/+7
| | | | llvm-svn: 369161
* [Attributor] Fix: Do not partially resolve returned calls.Johannes Doerfert2019-08-161-11/+28
| | | | | | | | | | By partially resolving returned calls we did not record that they were not fully resolved which caused odd behavior down the line. We could also end up with some, but not all, returned values of the callee in the returned values map of the caller, another odd behavior we want to avoid. llvm-svn: 369160
* [Attributor] Fix: Make sure we set the changed flagJohannes Doerfert2019-08-161-4/+4
| | | | | | | The flag was updated *before* we actually run the visitor callback so we might miss updates. llvm-svn: 369159
* [CaptureTracking] Allow null to be in either icmp operandJohannes Doerfert2019-08-162-5/+21
| | | | | | | | | | | | | | | | | Summary: Before we required the comparison against null to be "canonical", hence null to be operand #1. This patch allows null to be in either operand, similar to the handling of loaded globals that follows. Reviewers: sanjoy, hfinkel, aykevl, sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66321 llvm-svn: 369158
* [clang-format] Fix the bug that joins template closer and > or >>Owen Pan2019-08-162-1/+6
| | | | | | | | | | Also fixes a buggy test case. See PR42404 Differential Revision: https://reviews.llvm.org/D66332 llvm-svn: 369157
* [CodeGenPrepare] fix RUN line settingsSanjay Patel2019-08-161-1/+1
| | | | | | I'm not sure if this was running as expected with a broken triple. llvm-svn: 369156
* [Attributor] Add all missing attribute definitions/symbolsJohannes Doerfert2019-08-161-35/+117
| | | | | | | | | | | | | | | | As a preparation to "on-demand" abstract attribute generation we need implementations for all attributes (as they can be queried and then created on-demand where we now fail to find one). Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66129 llvm-svn: 369155
* [RWMutex] Simplify availability checkJonas Devlieghere2019-08-162-9/+9
| | | | | | | Check for the actual version number for the scenarios where the macOS version isn't available (__MAC_10_12). llvm-svn: 369154
* [Utility] Reimplement RegularExpression on top of llvm::RegexJonas Devlieghere2019-08-1628-468/+275
| | | | | | | | | | | | | | | Originally I wanted to remove the RegularExpression class in Utility and replace it with llvm::Regex. However, during that transition I noticed that there are several places where need the regular expression string. So instead I propose to keep the RegularExpression class and make it a thin wrapper around llvm::Regex. This patch also removes the workaround for empty regular expressions. The result is that we are now (more or less) POSIX conformant. Differential revision: https://reviews.llvm.org/D66174 llvm-svn: 369153
* [X86] Support -mlong-double-80Troy A. Johnson2019-08-163-7/+18
| | | | | | | | | | | | | Add an option group for all of the -mlong-double-* options and make -mlong-double-80 restore the default long double behavior for X86. The motivations are that GNU accepts the -mlong-double-80 option and that complex Makefiles often need a way of undoing earlier options. Prior to this commit, if one chooses 64-bit or 128-bit long double for X86, there is no way to undo that choice and restore the 80-bit behavior. Differential Revision: https://reviews.llvm.org/D66055 llvm-svn: 369152
* [X86] Use Register/MCRegister in more places in X86Craig Topper2019-08-169-43/+45
| | | | | | | | | | This was a quick pass through some obvious places. I haven't tried the clang-tidy check. I also replaced the zeroes in getX86SubSuperRegister with X86::NoRegister which is the real sentinel name. Differential Revision: https://reviews.llvm.org/D66363 llvm-svn: 369151
* [TSan] Don't guard #include <xpc/xpc.h>Julian Lettner2019-08-161-7/+0
| | | | | | | | The xpc_connection_* APIs that we are intercepting are available starting at macOS 10.7. This is old enough so that we don't need to guard them. llvm-svn: 369150
* Revert "[ARM] push LR before __gnu_mcount_nc"Jian Cai2019-08-169-138/+2
| | | | | | This reverts commit f4cf3b959333f62b7a7b2d7771f7010c9d8da388. llvm-svn: 369149
* [Test Commit] Fix typo in diagtool.rstTroy A. Johnson2019-08-161-1/+1
| | | | | | Test commit after obtaining commit access. llvm-svn: 369148
* [ARM] push LR before __gnu_mcount_ncJian Cai2019-08-169-2/+138
| | | | | | | | | Push LR register before calling __gnu_mcount_nc as it expects the value of LR register to be the top value of the stack on ARM32. Differential Revision: https://reviews.llvm.org/D65019 llvm-svn: 369147
* [OPENMP5.0]Diagnose global variables in lambda not marked as declareAlexey Bataev2019-08-163-9/+36
| | | | | | | | target. According to OpenMP 5.0, if a lambda declaration and definition appears between a declare target directive and the matching end declare target directive, all variables that are captured by the lambda expression must also appear in a to clause. llvm-svn: 369146
* Stop abusing SuppressAllDiagnostics when speculatively determiningRichard Smith2019-08-163-17/+15
| | | | | | whether an expression would be valid during error recovery. llvm-svn: 369145
* [Attributor] Towards a more structured deduction patternJohannes Doerfert2019-08-163-118/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first commit aiming to structure the attribute deduction. The base idea is that we have default propagation patterns as listed below on top of which we can add specific, e.g., context sensitive, logic. Deduction patterns used in this patch: - argument states are determined from call site argument states, see AAAlignArgument and AAArgumentFromCallSiteArguments. - call site argument states are determined as if they were floating values, see AAAlignCallSiteArgument and AAAlignFloating. - floating value states are determined by traversing the def-use chain and combining the states determined for the leaves, see AAAlignFloating and genericValueTraversal. - call site return states are determined from function return states, see AAAlignCallSiteReturned and AACallSiteReturnedFromReturned. - function return states are determined from returned value states, see AAAlignReturned and AAReturnedFromReturnedValues. Through this strategy all logic for alignment is concentrated in the AAAlignFloating::updateImpl method. Note: This commit works on its own but is part of a larger change that involves "on-demand" creation of abstract attributes that will participate in the fixpoint iteration. Without this part, we sometimes do not have an AAAlign abstract attribute to query, loosing information we determined before. All tests have appropriate FIXMEs and the information will be recovered once we added all parts. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66126 llvm-svn: 369144
* [Attributor][NFC] Introduce aliases for call site attributesJohannes Doerfert2019-08-161-7/+40
| | | | | | | | | Until we have call site specific liveness and/or value information there is no need to do call site specific deduction. Though, we need the symbols in follow up patches that make Attributor::getAAFor return a reference. llvm-svn: 369143
* [Attributor] Introduce initialize calls and move code to keep attributes conciseJohannes Doerfert2019-08-161-179/+180
| | | | | | | | | | | | | | | | | | Summary: This patch should not change the behavior except that the added initialize methods might indicate an optimistic fixpoint earlier. The code movement is done to keep the attribute definitions in a single block where it makes sense. No functional changes intended there. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66258 llvm-svn: 369142
* [ORC] Remove some stray debugging output accidentally left in r368707Lang Hames2019-08-161-2/+0
| | | | llvm-svn: 369141
* [InstCombine] canonicalize a scalar-select-of-vectors to vector selectSanjay Patel2019-08-162-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pattern may arise more frequently with an enhancement to SLP vectorization suggested in PR42755: https://bugs.llvm.org/show_bug.cgi?id=42755 ...but we should handle this pattern to make things easier for the backend either way. For all in-tree targets that I looked at, codegen for typical vector sizes looks better when we change to a vector select, so this is safe to do without a cost model (in other words, as a target-independent canonicalization). For example, if the condition of the select is a scalar, we end up with something like this on x86: vpcmpgtd %xmm0, %xmm1, %xmm0 vpextrb $12, %xmm0, %eax testb $1, %al jne LBB0_2 ## %bb.1: vmovaps %xmm3, %xmm2 LBB0_2: vmovaps %xmm2, %xmm0 Rather than the splat-condition variant: vpcmpgtd %xmm0, %xmm1, %xmm0 vpshufd $255, %xmm0, %xmm0 ## xmm0 = xmm0[3,3,3,3] vblendvps %xmm0, %xmm2, %xmm3, %xmm0 Differential Revision: https://reviews.llvm.org/D66095 llvm-svn: 369140
* [clang-doc] Redesign of generated HTML filesDiego Astiazaran2019-08-168-339/+1272
| | | | | | | | | | | | | The new design includes a header (contains the project name), a main section, and a footer. The main section is divided into three subsections. Left, middle, right. The left section contains the general index, the middle contains the info's data, and the right contains the index for the info's content. The CSS has been updated. A flag --project-name is added. The Attributes attribute of the TagNode struct is now a vector of pairs because these attributes should be rendered in the insertion order. The functions (cpp and js) that converts an Index tree structure into HTML were slightly modified; the first ul tag created is now a ol tag. The inner lists are still ul. Differential Revision: https://reviews.llvm.org/D66353 llvm-svn: 369139
* Escape % in printf format string.Evgeniy Stepanov2019-08-161-1/+1
| | | | | | Fixes branch-relax-block-size.mir on the ASan builder. llvm-svn: 369138
OpenPOWER on IntegriCloud