summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [DAGCombine][X86][AArch64] Masked merge unfolding: vector edition.Roman Lebedev2018-05-218-337/+314
| | | | | | | | | | | | | | | Summary: This **appears** to be the last missing piece for the masked merge pattern handling in the backend. This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]]. [[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly. Previously, `andps`+`andnps` / `bsl` would be generated. (see `@out`) Now, they would no longer be generated (see `@in`), and we need to make sure that they are generated. Differential Revision: https://reviews.llvm.org/D46528 llvm-svn: 332904
* [X86][AArch64][NFC] Add tests for vector masked merge unfoldingRoman Lebedev2018-05-215-1/+6010
| | | | | | | | | | | | | Summary: This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]]. [[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly. Previously, `andps`+`andnps` / `bsl` would be generated. (see `@out`) Now, they would no longer be generated (see `@in`). Differential Revision: https://reviews.llvm.org/D46008 llvm-svn: 332903
* Implement deduction guides for vectorMarshall Clow2018-05-213-7/+184
| | | | llvm-svn: 332901
* [ORC] Preserve Materializing symbol flag during resolution.Lang Hames2018-05-211-3/+4
| | | | llvm-svn: 332899
* [ORC] Lookup now returns an error if any symbols are not found.Lang Hames2018-05-212-2/+49
| | | | | | | | | | | Also tightens the behavior of ExecutionSession::failQuery. Queries can usually only be failed by marking a symbol as failed-to-materialize, but ExecutionSession::failQuery provides a second route, and both routes may be executed from different threads. In the case that a query has already been failed due to a materialization error, ExecutionSession::failQuery will direct the error to ExecutionSession::reportError instead. llvm-svn: 332898
* [ORC] Remove the optional MaterializationResponsibility argument from lookup.Lang Hames2018-05-213-28/+14
| | | | | | | | The lookup function provides blocking symbol resolution for JIT clients (not layers themselves) so it does not need to track symbol dependencies via a MaterializationResponsibility. llvm-svn: 332897
* [ORC] Add IRLayer and ObjectLayer interfaces and related MaterializationUnits.Lang Hames2018-05-213-0/+210
| | | | llvm-svn: 332896
* [DAGCombiner] Use computeKnownBits to match rotate patterns that have had ↵Craig Topper2018-05-213-57/+30
| | | | | | | | | | | | | | | | their amount masking modified by simplifyDemandedBits SimplifyDemandedBits can remove bits from the masks for the shift amounts we need to see to detect rotates. This patch uses zeroes from computeKnownBits to fill in some of these mask bits to make the match work. As currently written this calls computeKnownBits even when the mask hasn't been simplified because it made the code simpler. If we're worried about compile time performance we can improve this. I know we're talking about making a rotate intrinsic, but hopefully we can go ahead and do this change and just make sure the rotate intrinsic also handles it. Differential Revision: https://reviews.llvm.org/D47116 llvm-svn: 332895
* [InstCombine] regenerate checks; NFCSanjay Patel2018-05-211-35/+54
| | | | llvm-svn: 332894
* [X86] Simplify some X86 address mode folding code, NFCIReid Kleckner2018-05-211-83/+52
| | | | | | | | This code should really do exactly the same thing for 32-bit x86 and 64-bit small code models, with the exception that RIP-relative addressing can't use base and index registers. llvm-svn: 332893
* [X86] Remove some unneeded check lines that I copy and pasted when I made ↵Craig Topper2018-05-211-22/+0
| | | | | | vector tests from some scalar test cases. llvm-svn: 332892
* [X86] Remove masking from pternlog llvm intrinsics and use a select ↵Craig Topper2018-05-213-18/+77
| | | | | | | | | | | | instruction instead. Because the intrinsics in the headers are implemented as macros, we can't just use a select builtin and pternlog builtin. This would require one of the macro arguments to be used twice. Depending on what was passed to the macro we could expand an expression twice leading to weird behavior. We could maybe declare our local variable in the macro, but that would need to worry about name collisions. To avoid that just generate IR directly in CGBuiltin.cpp. Differential Revision: https://reviews.llvm.org/D47125 llvm-svn: 332891
* [X86] Remove masking from vpternlog intrinsics. Use a select in IR instead.Craig Topper2018-05-2112-356/+1030
| | | | | | | | This removes 6 intrinsics since we no longer need separate mask and maskz intrinsics. Differential Revision: https://reviews.llvm.org/D47124 llvm-svn: 332890
* Fix a make_unique ambiguity.Peter Collingbourne2018-05-211-1/+1
| | | | llvm-svn: 332889
* [asan] Make GetCurrentThread RTEMS-friendlyWalter Lee2018-05-212-0/+6
| | | | | | | | | | | | | | | | | On RTEMS, system and user code all live in a single binary and address space. There is no clean separation, and instrumented code may execute before the ASan run-time is initialized (or after it has been destroyed). Currently, GetCurrentThread() may crash if it's called before ASan run-time is initialized. Make it return nullptr instead. Similarly, fix __asan_handle_no_return so that it gives up rather than try something that may crash. Differential Revision: https://reviews.llvm.org/D46459 llvm-svn: 332888
* [InstCombine] remove fptrunc (select) code; NFCISanjay Patel2018-05-211-17/+0
| | | | | | | This pattern is handled within commonCastTransforms(), so the code here is dead AFAICT. llvm-svn: 332887
* Revert r332847; it caused us to miscompile certain forms of reference ↵Richard Smith2018-05-2110-77/+47
| | | | | | initialization. llvm-svn: 332886
* CodeGen, Driver: Start using direct split dwarf emission in clang.Peter Collingbourne2018-05-218-60/+112
| | | | | | | | Fixes PR37466. Differential Revision: https://reviews.llvm.org/D47093 llvm-svn: 332885
* LTO: Replace split dwarf implementation that uses objcopy with one that uses ↵Peter Collingbourne2018-05-214-78/+23
| | | | | | | | | | direct emission. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47091 llvm-svn: 332884
* [InstCombine] add tests for cast-of-select; NFCSanjay Patel2018-05-211-0/+133
| | | | | | | | | In all cases, we're pulling the cast above the select. That's not a good canonicalization if we're creating a select that then mismatches the operand size of its condition. llvm-svn: 332883
* [X86] Use __builtin_convertvector to implement some of the packed integer to ↵Craig Topper2018-05-2114-152/+128
| | | | | | | | | | | | packed float conversion intrinsics. I believe this is safe assuming default default FP environment. The conversion might be inexact, but it can never overflow the FP type so this shouldn't be undefined behavior for the uitofp/sitofp instructions. We already do something similar for scalar conversions. Differential Revision: https://reviews.llvm.org/D46863 llvm-svn: 332882
* CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it ↵Peter Collingbourne2018-05-2114-48/+83
| | | | | | | | | | up to dwo output. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47089 llvm-svn: 332881
* Remove CMake workaround for LLD PR24476 which is no longer neededReid Kleckner2018-05-211-8/+0
| | | | llvm-svn: 332880
* Revert r332028; see PR37545 for details.Richard Smith2018-05-212-97/+80
| | | | llvm-svn: 332879
* [DebugInfo] Fix typo "DWARG" in test comment (NFC)Brian Gesiak2018-05-211-1/+1
| | | | | | | | | | | Summary: The correct spelling is "DWARF", the debugging format, not "DWARG". The typo is in a (not executed by lit) comment in a test file, so fixing it does not result in any functional change. Test Plan: check-llvm, just in case llvm-svn: 332878
* Enable Python API for OpenBSD.Zachary Turner2018-05-211-0/+3
| | | | | | Patch by David Carlier llvm-svn: 332877
* [libFuzzer] reinstate -dump_coverage, which is still in use (reverts r332036)Kostya Serebryany2018-05-217-1/+38
| | | | llvm-svn: 332876
* MC: Introduce an ELF dwo object writer and teach llvm-mc about it.Peter Collingbourne2018-05-217-28/+179
| | | | | | | | Part of PR37466. Differential Revision: https://reviews.llvm.org/D47051 llvm-svn: 332875
* AMDGPU: Update GCCBuiltin names for DS FP atomic intrinsicsMatt Arsenault2018-05-211-3/+3
| | | | llvm-svn: 332874
* [DebugInfo] Use absolute addresses in location listsJonas Devlieghere2018-05-218-23/+35
| | | | | | | | | | | Rather than relying on the user to do the address calculating in DW_AT_location we should just dump the absolute address. rdar://problem/38513870 Differential revision: https://reviews.llvm.org/D47152 llvm-svn: 332873
* [X86] Add test cases for D47012.Craig Topper2018-05-212-0/+702
| | | | | | Patch by Thomasz Krupa. llvm-svn: 332872
* Revert "[CMake] Reland "Make simple source used for CMake checks a C file""Petr Hosek2018-05-213-6/+1
| | | | | | | This reverts commit rCRT332679 which doesn't quite work and will be replaced by D47100 and D47115 which is a cleaner solution. llvm-svn: 332871
* MC: Extract a derived class from ELFObjectWriter. NFCI.Peter Collingbourne2018-05-211-13/+19
| | | | | | | | | | This class will be used to create regular, non-split ELF files. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47049 llvm-svn: 332870
* [X86] Add test cases for missed vector rotate matching due to ↵Craig Topper2018-05-211-0/+114
| | | | | | | | SimplifyDemandedBits interfering with the AND masks As requested in D47116 llvm-svn: 332869
* MC: Separate creating a generic object writer from creating a target object ↵Peter Collingbourne2018-05-2165-313/+296
| | | | | | | | | | | | | writer. NFCI. With this we gain a little flexibility in how the generic object writer is created. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47045 llvm-svn: 332868
* MC: Extract ELFObjectWriter's ELF writing functionality into an ELFWriter ↵Peter Collingbourne2018-05-211-350/+368
| | | | | | | | | | | class. NFCI. The idea is that we will be able to use this class to create multiple files. Differential Revision: https://reviews.llvm.org/D47048 llvm-svn: 332867
* Fix ubsan bounds check failure.Peter Collingbourne2018-05-211-1/+2
| | | | llvm-svn: 332866
* [EarlyCSE] Improve EarlyCSE of some absolute value cases.Craig Topper2018-05-214-4/+53
| | | | | | | | | | Change matchSelectPattern to return X and -X for ABS/NABS in a well defined order. Adjust EarlyCSE to account for this. Ensure the SPF result is some kind of min/max and not abs/nabs in one place in InstCombine that made me nervous. Prevously we returned the two operands of the compare part of the abs pattern. The RHS is always going to be a 0i, 1 or -1 constant. This isn't a very meaningful thing to return for any one. There's also some freedom in the abs pattern as to what happens when the value is equal to 0. This freedom led to early cse failing to match when different constants were used in otherwise equivalent operations. By returning the input and its negation in a defined order we can ensure an exact match. This also makes sure both patterns use the exact same subtract instruction for the negation. I believe CSE should evebntually make this happen and properly merge the nsw/nuw flags. But I'm not familiar with CSE and what order it does things in so it seemed like it might be good to really enforce that they were the same. Differential Revision: https://reviews.llvm.org/D47037 llvm-svn: 332865
* MC: Remove stream and output functions from MCObjectWriter. NFCI.Peter Collingbourne2018-05-215-102/+5
| | | | | | | | Part of PR37466. Differential Revision: https://reviews.llvm.org/D47043 llvm-svn: 332864
* MC: Have the object writers return the number of bytes written. NFCI.Peter Collingbourne2018-05-217-20/+30
| | | | | | | | | | This removes the last external use of the stream. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47042 llvm-svn: 332863
* [AMDGPU] Add divergence analysis as a dependency for ISelStanislav Mekhanoshin2018-05-211-0/+1
| | | | | | | | | | AMDGPUDAGToDAGISel adds DivergenceAnalysis in getAnalysisUsage but does not list it in pass dependencies which may lead to crash. Differential Revision: https://reviews.llvm.org/D47151 llvm-svn: 332862
* MC: Change object writers to use endian::Writer. NFCI.Peter Collingbourne2018-05-217-372/+383
| | | | | | | | Part of PR37466. Differential Revision: https://reviews.llvm.org/D47040 llvm-svn: 332861
* [VPlan] Reland r332654 and silence unused func warningDiego Caballero2018-05-2110-42/+890
| | | | | | | | | | r332654 was reverted due to an unused function warning in release build. This commit includes the same code with the warning silenced. Differential Revision: https://reviews.llvm.org/D44338 llvm-svn: 332860
* Fix typo.Rui Ueyama2018-05-211-1/+2
| | | | llvm-svn: 332859
* MC: Change MCAssembler::writeSectionData and writeFragmentPadding to take a ↵Peter Collingbourne2018-05-218-71/+56
| | | | | | | | | | | | | | raw_ostream. NFCI. Also clean up a couple of hacks where we were writing the section contents to another stream by setting the object writer's stream, writing and setting it back. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47038 llvm-svn: 332858
* MC: Change MCAsmBackend::writeNopData() to take a raw_ostream instead of an ↵Peter Collingbourne2018-05-2125-185/+169
| | | | | | | | | | | | | MCObjectWriter. NFCI. To make this work I needed to add an endianness field to MCAsmBackend so that writeNopData() implementations know which endianness to use. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47035 llvm-svn: 332857
* AMDGPU/GlobalISel: Address post-commit review comments for r332379Tom Stellard2018-05-211-1/+1
| | | | | | MCRegisterInfo::getPhysRegSize() will be deprecated. llvm-svn: 332856
* [InstCombine] Fix PR37526: MinMax patterns produce an infinite loop.Alexey Bataev2018-05-212-3/+30
| | | | | | | | | | | | | | | | | Summary: This patch fixes PR37526 by simplifying the newly generated LoadInst instructions. If the pointer address is a bitcast from the pointer to the NewType, we can just remove this extra bitcast instead of creating the new one. This fixes the PR37526 + may speed up the whole compilation process. Reviewers: spatel, RKSimon, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47144 llvm-svn: 332855
* [Clang Tablegen] Add llvm_unreachable() to getModifierName()Mark Searles2018-05-211-0/+2
| | | | | | | | | | | | | | | | | Fix internal build failure: ../../../ClangDiagnosticsEmitter.cpp -o ClangDiagnosticsEmitter.o ../../../ClangDiagnosticsEmitter.cpp: In function 'llvm::StringRef {anonymous}::getModifierName({anonymous}::ModifierType)': ../../../ClangDiagnosticsEmitter.cpp:495:1: error: control reaches end of non-void function [-Werror=return-type] } ^ Build failure triggered by git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332799 91177308-0d34-0410-b5e6-96231b3b80d8 Differential Revision: https://reviews.llvm.org/D47150 llvm-svn: 332854
* [llvm-mca] Removed an empty line generated by the timeline view. NFC.Andrea Di Biagio2018-05-2128-172/+647
| | | | | | Also, regenerate all tests. llvm-svn: 332853
OpenPOWER on IntegriCloud