summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ARM] Remove redundant vcvt patterns.Benjamin Kramer2017-09-072-14/+19
| | | | | | | | These don't add any value as they're just compositions of existing patterns. However, they can confuse the cost logic in ISel, leading to duplicated vcvt instructions like in PR33199. llvm-svn: 312724
* [clang-format] Add support for C++17 structured bindings.Marek Kurdej2017-09-073-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before: ``` auto[a, b] = f(); ``` After: ``` auto [a, b] = f(); ``` or, if SpacesInSquareBrackets is true: ``` auto [ a, b ] = f(); ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D37132 llvm-svn: 312723
* [X86][LLVM]Expanding Supports lowerInterleavedLoad() in X86InterleavedAccess ↵Michael Zuckerman2017-09-073-263/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (VF{8|16|32} stride 3). This patch expands the support of lowerInterleavedload to {8|16|32}x8i stride 3. LLVM creates suboptimal shuffle code-gen for AVX2. In overall, this patch is a specific fix for the pattern (Strid=3 VF={8|16|32}) and we plan to include the store (deinterleved side). The patch goal is to optimize the following sequence: a0 b0 c0 a1 b1 c1 a2 b2 c2 a3 b3 c3 a4 b4 c4 a5 b5 c5 a6 b6 c6 a7 b7 c7 into a0 a1 a2 a3 a4 a5 a6 a7 b0 b1 b2 b3 b4 b5 b6 b7 c0 c1 c2 c3 c4 c5 c6 c7 Reviewers 1. zvi 2. igor 3. guyblank 4. dorit 5. Ayal llvm-svn: 312722
* [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLineDaniel Jasper2017-09-072-10/+24
| | | | | | | | | | | | The current description of AllowAllParametersOfDeclarationOnNextLine in the Clang-Format Style Options guide suggests that it is possible to format function declaration, which fits in a single line (what is not supported in current clang-format version). Also the example was not reproducible and mades no sense. Patch by Lucja Mazur, thank you! llvm-svn: 312721
* [mips] Use RegisterMCAsmBackend to register all MIPS asm backends. NFCSimon Atanasyan2017-09-075-81/+28
| | | | | | | | | | | | | This change converts the `MipsAsmBackend` constructor to the "standard" form. It makes possible to use `RegisterMCAsmBackend` for the backends registrations. Now we pass `Triple` instance to the `MipsAsmBackend` ctor and deduce all required options like endianness and bitness from the triple. We still need to implement explicit ABI checking for providing correct options to backends. Differential revision: https://reviews.llvm.org/D37519 llvm-svn: 312720
* [MachineCombiner] Update instruction depths incrementally for large BBs.Florian Hahn2017-09-076-24/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For large basic blocks with lots of combinable instructions, the MachineTraceMetrics computations in MachineCombiner can dominate the compile time, as computing the trace information is quadratic in the number of instructions in a BB and it's relevant successors/predecessors. In most cases, knowing the instruction depth should be enough to make combination decisions. As we already iterate over all instructions in a basic block, the instruction depth can be computed incrementally. This reduces the cost of machine-combine drastically in cases where lots of instructions are combined. The major drawback is that AFAIK, computing the critical path length cannot be done incrementally. Therefore we only compute instruction depths incrementally, for basic blocks with more instructions than inc_threshold. The -machine-combiner-inc-threshold option can be used to set the threshold and allows for easier experimenting and checking if using incremental updates for all basic blocks has any impact on the performance. Reviewers: sanjoy, Gerolf, MatzeB, efriedma, fhahn Reviewed By: fhahn Subscribers: kiranchandramohan, javed.absar, efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D36619 llvm-svn: 312719
* [CodeGen] Bitcast scalar writes to actual value.Michael Kruse2017-09-072-0/+44
| | | | | | | | The type of NewValue might change due to ScalarEvolution looking though bitcasts. The synthesized NewValue therefore becomes the type before the bitcast. llvm-svn: 312718
* Add an usage example of BreakBeforeBracesSylvestre Ledru2017-09-072-0/+17
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D37531 llvm-svn: 312717
* Refresh the clang format options doc with the recent changesSylvestre Ledru2017-09-071-13/+41
| | | | | | | | | | | | | | | | Summary: Looks like we are out of sync between the doc and the code. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37558 llvm-svn: 312716
* [PPCGCodeGen] Document pre-composition with Zero in getExtent. [NFC]Siddharth Bhat2017-09-071-0/+26
| | | | | | | It's weird at first glance that we do this, so I wrote up some documentation on why we need to perform this process. llvm-svn: 312715
* [MachineTraceMetrics] Add computeDepth function (NFCI).Florian Hahn2017-09-072-54/+69
| | | | | | | | | | | | | | | | Summary: This function is used in D36619 to update the instruction depths incrementally. Reviewers: efriedma, Gerolf, MatzeB, fhahn Reviewed By: fhahn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36696 llvm-svn: 312714
* [Sparc][NFC] Clean up SelectCC loweringAlex Bradbury2017-09-071-44/+40
| | | | | | | | | | | | | | The ARM, BPF, MSP430, Sparc and Mips backends all use a similar code sequence for lowering SelectCC. As pointed out by @reames in D29937, this code isn't particularly clear and in most of these backends doesn't actually match the comments. This patch makes the code sequence clearer for the Sparc backend through better variable naming and more accurate comments (e.g. we are inserting triangle control flow, _not_ diamond). There is no functional change. Differential Revision: https://reviews.llvm.org/D37194 llvm-svn: 312713
* [ELF] - Rename PhdrEntry::First/Last to FirstSec/LastSec. NFC.George Rimar2017-09-074-24/+24
| | | | | | As was suggested in D34956 thread. llvm-svn: 312712
* [ELF] - Store pointer to PT_LOAD instead of pointer to first section in ↵George Rimar2017-09-074-27/+23
| | | | | | | | | | | OutputSection It is a bit more convinent and helps to simplify logic of program headers allocation a little. Differential revision: https://reviews.llvm.org/D34956 llvm-svn: 312711
* Fixing incorrectly capitalised regexps.Benjamin Kramer2017-09-074-107/+107
| | | | | | Patch by Sam Allen! llvm-svn: 312710
* Fixing incorrectly capitalised regexps.Benjamin Kramer2017-09-072-2/+2
| | | | | | Patch by Sam Allen! llvm-svn: 312709
* Revert "[RegAlloc] Make sure live-ranges reflect the state of the IR when ↵Jonas Paulsson2017-09-072-8/+2
| | | | | | | | | | removing them" This temporarily reverts commit 463fa38 (r311401). See https://bugs.llvm.org/show_bug.cgi?id=34502 llvm-svn: 312708
* [x86] Update to cmov promotion tests for D36711; NFCAlexander Ivchenko2017-09-071-8/+226
| | | | | | | Adding i8 -> [i16, i32, i64] and i32 -> i64 cases. This way we can see what the current codegen looks like. llvm-svn: 312707
* [LLD] Fix padding of .eh_frame when in executable segmentAndrew Ng2017-09-072-1/+70
| | | | | | | | | | | | | | | | | The default padding for an executable segment is the target trap instruction which for x86_64 is 0xCC. However, the .eh_frame section requires the padding to be zero. The code that writes the .eh_frame section assumes that its segment is zero initialized and does not explicitly write the zero padding. This does not work when the .eh_frame section is in the executable segment (for example when using -no-rosegment). This patch changes the .eh_frame writing code to explicitly write the zero padding. Differential Revision: https://reviews.llvm.org/D37462 llvm-svn: 312706
* [ELF] Prevent crash with binary inputs with non-ascii file namesJames Henderson2017-09-074-2/+20
| | | | | | | | | | | | | | If using --format=binary with an input file name that has one or more non-ascii characters in, LLD has undefined behaviour (it crashes on my Windows Debug build) when calling isalnum with these non-ascii characters. Instead, of calling std::isalnum, this patch uses an internal version that ignores the locale and checks a specific subset of characters. Reviewers: ruiu Differential Revision: https://reviews.llvm.org/D37331 llvm-svn: 312705
* X86: Improve AVX512 fptoui loweringZvi Rackover2017-09-075-146/+21
| | | | | | | | | | | | | | | | | Summary: Add patterns for fptoui <16 x float> to <16 x i8> fptoui <16 x float> to <16 x i16> Reviewers: igorb, delena, craig.topper Reviewed By: craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37505 llvm-svn: 312704
* P0702R1: in class template argument deduction from a list of one element, ifRichard Smith2017-09-074-1/+70
| | | | | | | that element's type is (or is derived from) a specialization of the deduced template, skip the std::initializer_list special case. llvm-svn: 312703
* [X86] Force shuffle lowering to only create X86ISD::VPERM2X128 with 64-bit ↵Craig Topper2017-09-072-22/+5
| | | | | | | | | | element types so we can remove some patterns from isel. Intrinsic handling is still creating these nodes with 32-bit elements as well. But at least this gets rid of 8 and 16. Ideally, someday we'll convert the intrinsics to generic vector shuffles and remove the intrinsics. llvm-svn: 312702
* [mips] Replace Triple::Environment check by the isGNUEnvironment() call. NFCSimon Atanasyan2017-09-072-3/+3
| | | | llvm-svn: 312701
* Fix off-by-one error in block mangling.Richard Smith2017-09-072-3/+11
| | | | | | This restores the ABI prior to r214699. llvm-svn: 312700
* AMDGPU: Don't legalize i16 extloads to i32 with legal i16Matt Arsenault2017-09-074-3/+10
| | | | | | | Keeping non-i16 extloads makes it easier to match some new gfx9 load instructions. llvm-svn: 312699
* ModuleSummaryAnalysis: Correctly handle all function operand references.Peter Collingbourne2017-09-073-7/+52
| | | | | | | | | | | | | | | | | | | The current code that handles personality functions when creating a module summary does not correctly handle the case where a function's personality function operand refers to the function indirectly (e.g. via a bitcast). This patch handles such cases by treating personality function references like any other reference, i.e. by adding them to the function's reference list. This has the minor side benefit of allowing personality functions to participate in early dead stripping. We do this by calling findRefEdges on the function itself. This way we also end up handling other function operands (specifically prefix data and prologue data) for free. Differential Revision: https://reviews.llvm.org/D37553 llvm-svn: 312698
* [libFuzzer] simplify CustomCrossOverTest even moreKostya Serebryany2017-09-072-7/+10
| | | | llvm-svn: 312697
* [modules ts] Add test for [basic.link]p3.Richard Smith2017-09-071-0/+11
| | | | llvm-svn: 312696
* [libFuzzer] simplify CustomCrossOverTest a bit moreKostya Serebryany2017-09-071-2/+2
| | | | llvm-svn: 312695
* [X86] Remove patterns for selecting a v8f32 X86ISD::MOVSS or v4f64 ↵Craig Topper2017-09-072-48/+0
| | | | | | | | X86ISD::MOVSD. I don't think we ever generate these. If we did, I would expect we would also be able to generate v16f32 and v8f64, but we don't have those patterns. llvm-svn: 312694
* Add even more string_view tests. These found some bugs in the default ↵Marshall Clow2017-09-079-6/+1422
| | | | | | parameter value for rfind/find_last_of/find_last_not_of llvm-svn: 312693
* ARM: track globals promoted to coalesced const pool entriesSaleem Abdulrasool2017-09-074-13/+48
| | | | | | | | | | | | | Globals that are promoted to an ARM constant pool may alias with another existing constant pool entry. We need to keep a reference to all globals that were promoted to each constant pool value so that we can emit a distinct label for each promoted global. These labels are necessary so that debug info can refer to the promoted global without an undefined reference during linking. Patch by Stephen Crane! llvm-svn: 312692
* Another missing string_view testMarshall Clow2017-09-071-0/+74
| | | | llvm-svn: 312691
* Add more string_view testsMarshall Clow2017-09-073-0/+909
| | | | llvm-svn: 312690
* [libFuzzer] simplify and re-enable CustomCrossOverTestKostya Serebryany2017-09-072-36/+25
| | | | llvm-svn: 312689
* [cmake] Work around more -Wunused-driver-argument warningsVedant Kumar2017-09-071-1/+8
| | | | | | | add_compiler_rt_object_libraries should strip out the -msse3 option on non-macOS Apple platforms. llvm-svn: 312688
* [asan] Add a note to shadow memory setup error.Evgeniy Stepanov2017-09-071-0/+10
| | | | | | Point to https://github.com/google/sanitizers/issues/856 as a possible cause of the failed mapping. llvm-svn: 312687
* Object: Downgrade invalid weak externals from an assert fail to an ↵Peter Collingbourne2017-09-072-3/+17
| | | | | | | | llvm::Error when creating an irsymtab. This fixes bitcode emission for modules containing invalid weak externals. llvm-svn: 312686
* InstSimplify: canonicalize is idempotentMatt Arsenault2017-09-072-2/+10
| | | | llvm-svn: 312685
* [modules ts] Ensure that module linkage variables are always emitted and ↵Richard Smith2017-09-074-16/+28
| | | | | | always have their name mangled. llvm-svn: 312684
* LTO: Remove unnecessary Windows support code.Peter Collingbourne2017-09-071-15/+0
| | | | | | | I empirically verified that open files can in fact be renamed on Windows with sys::fs::rename, so remove the incorrect code and comment. llvm-svn: 312683
* [CUDA] Add device overloads for non-placement new/delete.Justin Lebar2017-09-071-1/+50
| | | | | | | | | | | | | | | | Summary: Tests have to live in the test-suite, and so will come in a separate patch. Fixes PR34360. Reviewers: tra Subscribers: llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D37539 llvm-svn: 312681
* Reland "[llvm-objcopy] Add support for relocations"Petr Hosek2017-09-064-0/+236
| | | | | | | | | | | This change adds support for SHT_REL and SHT_RELA sections in llvm-objcopy. Patch by Jake Ehrlich Differential Revision: https://reviews.llvm.org/D36554 llvm-svn: 312680
* [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-09-068-146/+122
| | | | | | other minor fixes (NFC). llvm-svn: 312679
* Util: Improve update_llc_test_checks to scrub macosx-style assembly annotationsZvi Rackover2017-09-061-1/+1
| | | | | | | | | | | | | | | | | | | Summary: In D37523 Sanjay pointed out that the tool does not scrub macosx-style 'End of Function' annotations, where the comments begin with a double-#. I tested this patch by verifying all existing occurences of 'End function' are scrubbed: find ./test/CodeGen/X86 -name '*.ll' | xargs grep -l "End function" | xargs utils/update_llc_test_checks.py --llc-binary build/bin/llc Reviewers: spatel, chandlerc, craig.topper Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37532 llvm-svn: 312678
* [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNodeMandeep Singh Grang2017-09-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: This fixes failures seen in the reverse iteration builder: http://lab.llvm.org:8011/builders/reverse-iteration/builds/26 Failing Tests (4): Clang :: Analysis/MisusedMovedObject.cpp Clang :: Analysis/keychainAPI.m Clang :: Analysis/loop-unrolling.cpp Clang :: Analysis/malloc.c Reviewers: zaks.anna, bkramer, chandlerc, krememek, nikhgupt Reviewed By: zaks.anna Subscribers: dcoughlin, NoQ, cfe-commits Differential Revision: https://reviews.llvm.org/D37400 llvm-svn: 312677
* [AMDGPU] Use v_pk_max_f16 for fcanonicalizeStanislav Mekhanoshin2017-09-063-10/+55
| | | | | | Differential Revision: https://reviews.llvm.org/D37325 llvm-svn: 312676
* Simplify type. NFC.Rafael Espindola2017-09-062-4/+4
| | | | llvm-svn: 312675
* [WebAssembly] Only treat imports/exports as symbols when reading relocatable ↵Sam Clegg2017-09-069-48/+93
| | | | | | | | | | | | | | | | | | | object files This change only treats imported and exports functions and globals as symbol table entries the object has a "linking" section (i.e. it is relocatable object file). In this case all globals must be of type I32 and initialized with i32.const. This was previously being assumed but not checked for and was causing a failure on big endian machines due to using the wrong value of then union. See: https://bugs.llvm.org/show_bug.cgi?id=34487 Differential Revision: https://reviews.llvm.org/D37497 llvm-svn: 312674
OpenPOWER on IntegriCloud