summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfo][Dexter] Unreachable line stepped onto after SimplifyCFG.Carlos Alberto Enciso2018-10-256-29/+296
| | | | | | | | When SimplifyCFG changes the PHI node into a select instruction, the debug line records becomes ambiguous. It causes the debugger to display unreachable source lines. Differential Revision: https://reviews.llvm.org/D53287 llvm-svn: 345250
* [LLDB] - Parse the DW_LLE_startx_length correctly for DWARF v5 case.George Rimar2018-10-252-5/+11
| | | | | | | | | | | | | | | | | | | | | Currently, we always parse the length field of DW_LLE_startx_length entry as U32. That is correct for pre-standard definition: https://gcc.gnu.org/wiki/DebugFission - "A start/length entry contains one unsigned LEB128 number and a 4-byte unsigned value (as would be represented by the form code DW_FORM_const4u). The first number is an index into the .debug_addr section that selects the beginning offset, and the second number is the length of the range. ") But DWARF v5 says: "This is a form of bounded location description that has two unsigned ULEB operands. The first value is an address index (into the .debug_addr section) that indicates the beginning of the address range over which the location is valid. The second value is the length of the range." Fortunately, we can easily handle the difference. No test case because it seems impossible to test until we will be ready to use DWARF v5 in tests that need to run the executables. Differential revision: https://reviews.llvm.org/D53646 llvm-svn: 345249
* Add -instcombine-code-sinking optionGabor Buella2018-10-252-1/+24
| | | | | | | | | | Reviewers: craig.topper, andrew.w.kaylor, efriedma Reviewed By: craig.topper, andrew.w.kaylor, efriedma Differential Revision: https://reviews.llvm.org/D52709 llvm-svn: 345248
* [API] Extend the `SBThreadPlan` interfaceAleksandr Urakov2018-10-257-0/+108
| | | | | | | | | | | | | | | | | | Summary: This patch extends the `SBThreadPlan` to allow retrieving of thread plans for scripted steps. Reviewers: labath, zturner, jingham Reviewed By: jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D53361 llvm-svn: 345247
* [llvm-exegesis] Add missing initializer.Clement Courbet2018-10-252-9/+9
| | | | | | This is a better fix than rL345245. llvm-svn: 345246
* [llvm-exegesis] Fix VC build of r345243.Clement Courbet2018-10-251-8/+8
| | | | | | | | "const members cannot be default initialized unless their type has a user defined default constructor" Make members non-const. llvm-svn: 345245
* [llvm-exegesis] Fix warning in r345243.Clement Courbet2018-10-251-1/+1
| | | | | | warning C4099: 'llvm::exegesis::PfmCountersInfo': type name first seen using 'class' now seen using 'struct' llvm-svn: 345244
* [MCSched] Bind PFM Counters to the CPUs instead of the SchedModel.Clement Courbet2018-10-2525-247/+477
| | | | | | | | | | | | | | | | Summary: The pfm counters are now in the ExegesisTarget rather than the MCSchedModel (PR39165). This also compresses the pfm counter tables (PR37068). Reviewers: RKSimon, gchatelet Subscribers: mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D52932 llvm-svn: 345243
* [clang-format] Break before next parameter after a formatted multiline raw ↵Krasimir Georgiev2018-10-252-9/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | string parameter Summary: Currently clang-format breaks before the next parameter after multiline parameters (also recursively for the parent expressions of multiline parameters). However, it fails to do so for formatted multiline raw string literals: ``` $ cat test.cc // Examples // Regular multiline tokens int x = f(R"(multi line)", 2); } int y = g(h(R"(multi line)"), 2); // Formatted multiline tokens int z = f(R"pb(multi: 1 # line: 2)pb", 2); int w = g(h(R"pb(multi: 1 # line: 2)pb"), 2); $ clang-format -style=google test.cc // Examples // Regular multiline tokens int x = f(R"(multi line)", 2); } int y = g(h(R"(multi line)"), 2); // Formatted multiline tokens int z = f(R"pb(multi: 1 # line: 2)pb", 2); int w = g(h(R"pb(multi: 1 # line: 2)pb"), 2); ``` This patch addresses this inconsistency by forcing breaking after multiline formatted raw string literals. This requires a little tweak to the indentation chosen for the contents of a formatted raw string literal: in case when that's a parameter and not the last one, the indentation is based off of the uniform indentation of all of the parameters. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52448 llvm-svn: 345242
* [X86] Don't use the OriginalDemandedBits to calculate the DemandedMask for ↵Craig Topper2018-10-251-1/+2
| | | | | | | | | | PMULUDQ/PMULDQ inputs. Multiply a is complex operation so just because some bit of the output isn't used doesn't mean that bit of the input isn't used. We might able to bound it, but it will require some more thought. llvm-svn: 345241
* Revert "Fix use of __libcpp_deallocate in dynarray"Eric Christopher2018-10-251-1/+1
| | | | | | This reverts commit r345234 as it depended on the sized deallocation commit. llvm-svn: 345240
* Temporarily Revert "Implement sized deallocation for std::allocator and ↵Eric Christopher2018-10-256-377/+55
| | | | | | | | | | friends." This is breaking the bots here (and related): http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-asan/builds/1428 This reverts commit r345214. llvm-svn: 345239
* [llvm-readobj] Print ELF header flags names in GNU outputSimon Atanasyan2018-10-252-48/+108
| | | | | | | | | | | | | | GNU readelf tool prints hex value of the ELF header flags field and the flags names. This change adds the same functionality to llvm-readobj. Now llvm-readobj can print MIPS and RISCV flags. New GNUStyle::printFlags() method is a copy of ScopedPrinter::printFlags() routine. Probably we can escape code duplication and / or simplify the printFlags() method. But it's a task for separate commit. Differential revision: https://reviews.llvm.org/D52027 llvm-svn: 345238
* [CodeGen] Always emit the 'min-legal-vector-width' attribute even when the ↵Craig Topper2018-10-253-5/+3
| | | | | | | | value is 0. The X86 backend will need to see the attribute to make decisions. If it isn't present the backend will have to assume large vectors may be present. llvm-svn: 345237
* [X86] Fix typo in comment. NFCCraig Topper2018-10-251-1/+1
| | | | llvm-svn: 345236
* [clangd] Clean up LSP structs around configuration. NFC, no protocol changes.Sam McCall2018-10-254-49/+45
| | | | | | | | | - align struct names/comments with LSP, remove redundant "clangd" prefixes. - don't map config structs as Optional<> when their presence/absence doesn't signal anything and all fields must have sensible "absent" values - be more lax around parsing of 'any'-typed messages llvm-svn: 345235
* Fix use of __libcpp_deallocate in dynarrayEric Fiselier2018-10-251-1/+1
| | | | llvm-svn: 345234
* [clangd] Remove unused CDB function. NFCSam McCall2018-10-252-9/+0
| | | | llvm-svn: 345233
* [clangd] Fix -compile-commands-dir flag, broken in r345031Sam McCall2018-10-252-2/+4
| | | | llvm-svn: 345232
* [clangd] Don't invalidate LSP-set compile commands when closing a file.Sam McCall2018-10-254-18/+0
| | | | | | | | | | | | | | | | Summary: It doesn't make much sense: setting them is not coupled to opening the file, it's an asynchronous notification. I don't think this is a breaking change - this behavior is hard to observe! Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53642 llvm-svn: 345231
* [WebAssembly] Set LoadExt and TruncStore actions for SIMD typesThomas Lively2018-10-252-0/+73
| | | | | | | | | | | | Summary: Fixes part of the problem reported in bug 39275. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits, alexcrichton Differential Revision: https://reviews.llvm.org/D53542 llvm-svn: 345230
* Fix test to work on Windows.Douglas Yung2018-10-251-1/+7
| | | | llvm-svn: 345229
* [Sema] Fix -Wcomma for C89Richard Trieu2018-10-253-119/+139
| | | | | | | | | | | | There is a small difference in the scope flags for C89 versus the other C/C++ dialects. This change ensures that the -Wcomma warning won't be duplicated or issued in the wrong location. Also, the test case is refactored into C and C++ parts, with the C++ parts guarded by a #ifdef to allow the test to run in both modes. https://bugs.llvm.org/show_bug.cgi?id=32370 llvm-svn: 345228
* [X86] Adjust MIR test case to pacify machine verifierReid Kleckner2018-10-241-1/+1
| | | | llvm-svn: 345227
* [X86] Fix pipeline tests when enabling MIR verification, NFCReid Kleckner2018-10-242-2/+8
| | | | llvm-svn: 345226
* Revert "[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03"Eric Fiselier2018-10-242-24/+2
| | | | | | This reverts commit 6f47cdd51341344c0e32630e19e72c94cd25f34e. llvm-svn: 345225
* DebugInfo: Reuse common addresses for rnglist base address selectionsDavid Blaikie2018-10-244-3/+18
| | | | | | | | | | | | | | | | | | This makes the offsets larger (since they are further from the base address) but those are in the .dwo - and allows removing addresses and relocations from the .o file. This could be built into the AddressPool more fundamentally, perhaps - when you ask for an AddressPool entry you could say "or give me some other entry and an offset I need to use" - though what to do about situations where the first use of an address in a section is not the earliest address in that section... is tricky. At least with range addresses we can be fairly sure we've seen the earliest address first because we see the start address for the function. llvm-svn: 345224
* [WebAssembly] Fix immediate of rethrow when throwing to callerHeejin Ahn2018-10-242-2/+2
| | | | | | | | | | | | | | | | | | Summary: Currently when assigning depths 'rethrow' does not take the whole control flow stack into accounts but only considers EH pad stacks. When assigning depth immmediates to rethrows, in normal cases it is done correctly but when a rethrow instruction throws up to a caller, i.e., we convert a pseudo RETHROW_TO_CALLER instruction to a rethrow, it mistakenly compute the whole stack depth. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D53619 llvm-svn: 345223
* Driver,CodeGen: introduce support for Swift CFString layoutSaleem Abdulrasool2018-10-249-24/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new driver level flag `-fcf-runtime-abi=` that allows one to specify the runtime ABI for CoreFoundation. This controls the language interoperability. In particular, this is relevant for generating the CFConstantString classes (primarily through the `__builtin___CFStringMakeConstantString` builtin) which construct a reference to the "CFObject"'s `isa` field. This type differs between swift 4.1 and 4.2+. Valid values for the new option include: - objc [default behaviour] - enable ObjectiveC interoperability - swift-4.1 - enable interoperability with swift 4.1 - swift-4.2 - enable interoperability with swift 4.2 - swift-5.0 - enable interoperability with swift 5.0 - swift [alias] - target the latest swift ABI Furthermore, swift 4.2+ changed the layout for the CFString when building CoreFoundation *without* ObjectiveC interoperability. In such a case, a field was added to the CFObject base type changing it from: <{ const int*, int }> to <{ uintptr_t, uintptr_t, uint64_t }>. In swift 5.0, the CFString type will be further adjusted to change the length from a uint32_t on everything but BE LP64 targets to uint64_t. Note that the default behaviour for clang remains unchanged and the new layout must be explicitly opted into via `-fcf-runtime-abi=swift*`. llvm-svn: 345222
* [WebAssembly] Retain shuffle types during custom loweringThomas Lively2018-10-243-4/+21
| | | | | | | | | | | | | | | Summary: Changing the node type in lowering was violating assumptions made in the DAG combiner, so don't change the node type any more. This fixes one of the issues reported in bug 39275. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits, alexcrichton Differential Revision: https://reviews.llvm.org/D53537 llvm-svn: 345221
* Make fminimum/fmaximum SDNodes commutative and associativeThomas Lively2018-10-241-2/+4
| | | | | | | | | | Reviewers: aheejin, dschuff Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53680 llvm-svn: 345220
* [ELF] Fix large code model MIR verifier errorsReid Kleckner2018-10-246-102/+78
| | | | | | | | | | | Instead of using the MOVGOT64r pseudo, use the existing MO_PIC_BASE_OFFSET support on symbol operands. Now I don't have to create a "scratch register operand" for the pseudo to use, and the register allocator can make better decisions. Fixes some X86 verifier errors tracked in PR27481. llvm-svn: 345219
* [NFC] Rename minnan and maxnan to minimum and maximumThomas Lively2018-10-2427-127/+124
| | | | | | | | | | | | | | | Summary: Changes all uses of minnan/maxnan to minimum/maximum globally. These names emphasize that the semantic difference between these operations is more than just NaN-propagation. Reviewers: arsenm, aheejin, dschuff, javed.absar Subscribers: jholewinski, sdardis, wdng, sbc100, jgravelle-google, jrtc27, atanasyan, llvm-commits Differential Revision: https://reviews.llvm.org/D53112 llvm-svn: 345218
* [llvm-objcopy] Introduce dispatch mechanism based on the inputAlexander Shaposhnikov2018-10-243-29/+77
| | | | | | | | | | | | | In this diff we introduce dispatch mechanism based on the type of the input (archive, object file, raw binary) and the format (coff, elf, macho). We also move the ELF-specific code into the namespace llvm::objcopy::elf. Test plan: make check-all Differential revision: https://reviews.llvm.org/D53311 llvm-svn: 345217
* Update MemorySSA in LoopRotate.Alina Sbirlea2018-10-2425-17/+293
| | | | | | | | | | | | Summary: Teach LoopRotate to preserve MemorySSA. Enable tests for correctness, dependency disabled by default. Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits Differential Revision: https://reviews.llvm.org/D51718 llvm-svn: 345216
* llvm-dwarfdump: Account for skeleton addr_base when dumping addresses in ↵David Blaikie2018-10-242-2/+12
| | | | | | split unit in the same file llvm-svn: 345215
* Implement sized deallocation for std::allocator and friends.Eric Fiselier2018-10-246-55/+377
| | | | | | | | | | | | | | | | | | | Summary: C++14 sized deallocation is disabled by default due to ABI concerns. However, when a user manually enables it then libc++ should take advantage of it since sized deallocation can provide a significant performance win depending on the underlying malloc implementation. (Note that libc++'s definitions of sized delete don't do anything special yet, but users are free to provide their own). This patch updates __libcpp_deallocate to selectively call sized operator delete when it's available. `__libcpp_deallocate_unsized` should be used when the size of the allocation is unknown. On Apple this patch makes no attempt to determine if the sized operator delete is unavailable, only that the language feature is enabled. This could cause a compile error when using `std::allocator`, but the same compile error would occur whenever the user calls `new`, so I don't think it's a problem. Reviewers: ldionne, mclow.lists Reviewed By: ldionne Subscribers: rsmith, ckennelly, libcxx-commits, christof Differential Revision: https://reviews.llvm.org/D53120 llvm-svn: 345214
* [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.Volodymyr Sapsai2018-10-242-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 'ignore-non-existent-contents' stopped working after r342232 in a way that the actual attribute value isn't used and it works as if it is always `true`. Common use case for VFS iteration is iterating through files in umbrella directories for modules. Ability to detect if some VFS entries point to non-existing files is nice but non-critical. Instead of adding back support for `'ignore-non-existent-contents': false` I am removing the attribute, because such scenario isn't used widely enough and stricter checks don't provide enough value to justify the maintenance. Change is done both in LLVM and Clang, corresponding Clang commit is r345212. rdar://problem/45176119 Reviewers: bruno Reviewed By: bruno Subscribers: hiraditya, dexonsmith, sammccall, cfe-commits Differential Revision: https://reviews.llvm.org/D53228 llvm-svn: 345213
* [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.Volodymyr Sapsai2018-10-2410-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 'ignore-non-existent-contents' stopped working after r342232 in a way that the actual attribute value isn't used and it works as if it is always `true`. Common use case for VFS iteration is iterating through files in umbrella directories for modules. Ability to detect if some VFS entries point to non-existing files is nice but non-critical. Instead of adding back support for `'ignore-non-existent-contents': false` I am removing the attribute, because such scenario isn't used widely enough and stricter checks don't provide enough value to justify the maintenance. rdar://problem/45176119 Reviewers: bruno Reviewed By: bruno Subscribers: hiraditya, dexonsmith, sammccall, cfe-commits Differential Revision: https://reviews.llvm.org/D53228 llvm-svn: 345212
* [SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03Eric Fiselier2018-10-242-2/+24
| | | | | | | | | | | | | | | | | | | | Summary: When -faligned-allocation is specified in C++03 libc++ defines std::align_val_t as an unscoped enumeration type (because Clang didn't provide scoped enumerations as an extension until 8.0). Unfortunately Clang confuses the `align_val_t` overloads of delete with the sized deallocation overloads which aren't enabled. This caused Clang to call the aligned deallocation function as if it were the sized deallocation overload. For example: https://godbolt.org/z/xXJELh This patch fixes the confusion. Reviewers: rsmith, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53508 llvm-svn: 345211
* [SelectionDAG] DAG combiner for fminnan and fmaxnanThomas Lively2018-10-242-24/+80
| | | | | | | | | | | | Summary: Depends on D52765. Reviewers: aheejin, dschuff Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52768 llvm-svn: 345210
* [HotColdSplitting] Identify larger cold regions using domtree queriesVedant Kumar2018-10-248-206/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current splitting algorithm works in three stages: 1) Identify cold blocks, then 2) Use forward/backward propagation to mark hot blocks, then 3) Grow a SESE region of blocks *outside* of the set of hot blocks and start outlining. While testing this pass on Apple internal frameworks I noticed that some kinds of control flow (e.g. loops) are never outlined, even though they unconditionally lead to / follow cold blocks. I noticed two other issues related to how cold regions are identified: - An inconsistency can arise in the internal state of the hotness propagation stage, as a block may end up in both the ColdBlocks set and the HotBlocks set. Further inconsistencies can arise as these sets do not match what's in ProfileSummaryInfo. - It isn't necessary to limit outlining to single-exit regions. This patch teaches the splitting algorithm to identify maximal cold regions and outline them. A maximal cold region is defined as the set of blocks post-dominated by a cold sink block, or dominated by that sink block. This approach can successfully outline loops in the cold path. As a side benefit, it maintains less internal state than the current approach. Due to a limitation in CodeExtractor, blocks within the maximal cold region which aren't dominated by a single entry point (a so-called "max ancestor") are filtered out. Results: - X86 (LNT + -Os + externals): 134KB of TEXT were outlined compared to 47KB pre-patch, or a ~3x improvement. Did not see a performance impact across two runs. - AArch64 (LNT + -Os + externals + Apple-internal benchmarks): 149KB of TEXT were outlined. Ditto re: performance impact. - Outlining results improve marginally in the internal frameworks I tested. Follow-ups: - Outline more than once per function, outline large single basic blocks, & try to remove unconditional branches in outlined functions. Differential Revision: https://reviews.llvm.org/D53627 llvm-svn: 345209
* Do not call computeIsPreemptible() if its result is discarded. NFC.Rui Ueyama2018-10-241-1/+3
| | | | llvm-svn: 345208
* [Settings] Add -force flag to "settings set"Jonas Devlieghere2018-10-242-3/+38
| | | | | | | | | | | | | | | | | | | The -force option allows you to pass an empty value to settings set to reset the value to its default. This means that the following operations are equivalent: settings set -f <setting> settings clear <setting> The motivation for this change is the ability to export and import settings from LLDB. Because of the way the dumpers work, we don't know whether a value is going to be the default or not. Hence we cannot use settings clear and use settings set -f, potentially providing an empty value. Differential revision: https://reviews.llvm.org/D52772 llvm-svn: 345207
* [InstCombine] add test for fptrunc with vector with undef elt; NFCSanjay Patel2018-10-241-2/+13
| | | | | | This should be fixed with D53650. llvm-svn: 345206
* Add more blank lines so that code doesn't look too dense. NFC.Rui Ueyama2018-10-241-13/+31
| | | | llvm-svn: 345205
* Add a comment for PPC64 .toc and GNU relro.Rui Ueyama2018-10-241-0/+5
| | | | llvm-svn: 345204
* Make llvm-dwarfdump -name work on type units.Paul Robinson2018-10-242-2/+102
| | | | | | Differential Revision: https://reviews.llvm.org/D53672 llvm-svn: 345203
* [SourceMgr][FileCheck] Obey -color by extending WithColorJoel E. Denny2018-10-246-86/+179
| | | | | | | | | | | | | | | | | | | | | | | | | (Relands r344930, reverted in r344935, and now hopefully fixed for Windows.) While this change specifically targets FileCheck, it affects any tool using the same SourceMgr facilities. Previously, -color was documented in FileCheck's -help output, but -color had no effect. Now, -color obeys its documentation: it forces colors to be used in FileCheck diagnostics even when stderr is not a terminal. -color is especially helpful when combined with FileCheck's -v, which can produce a long series of diagnostics that you might wish to pipe to a pager, such as less -R. The WithColor extensions here will also help to clean up color usage in FileCheck's annotated dump of input, which is proposed in D52999. Reviewed By: JDevlieghere, zturner Differential Revision: https://reviews.llvm.org/D53419 llvm-svn: 345202
* [AArch64] Refactor Exynos machine modelEvandro Menezes2018-10-244-70/+86
| | | | | | Effectively, NFC. llvm-svn: 345201
OpenPOWER on IntegriCloud