summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Always add a .note.GNU-stack section if -r.Rui Ueyama2018-08-298-16/+47
| | | | | | | | | | | | With this patch, lld creates a .note.GNU_stack and adds that to an output file if it is creating a re-linkable object file (i.e. if -r is given). If we don't do this, and if you use GNU linkers as a final linker, they create an executable whose stack area is executable, which is considered pretty bad these days. Differential Revision: https://reviews.llvm.org/D51400 llvm-svn: 340902
* [PDB] Resolve a symbol context block info correctlyAleksandr Urakov2018-08-293-6/+63
| | | | | | | | | | | | | | | | | | | Summary: This patch allows to resolve a symbol context block info even if a function info was not requested. Also it adds the correct resolving of nested blocks (the previous implementation used function blocks instead of them). Reviewers: zturner, asmith, labath Reviewed By: asmith Subscribers: lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51104 llvm-svn: 340901
* LoopSink: Don't sink into blocks without an insertion point (PR38462)Hans Wennborg2018-08-292-0/+73
| | | | | | | | | In the PR, LoopSink was trying to sink into a catchswitch block, which doesn't have a valid insertion point. Differential Revision: https://reviews.llvm.org/D51307 llvm-svn: 340900
* [SelectionDAG] Remove masked_gather/scatter from TargetSelectionDAG.td.Craig Topper2018-08-291-14/+0
| | | | | | These aren't used in tree and the number of operands in the type profile is wrong. X86 uses its own ISD opcode and type profile after op legalization. llvm-svn: 340899
* [SelectionDAG] Add some comments to ISDOpcodes.h about the operands of ↵Craig Topper2018-08-291-0/+9
| | | | | | MLOAD, MSTORE, MGATHER, MSCATTER. NFC llvm-svn: 340898
* Add support for various C++14 demanglings.Zachary Turner2018-08-294-24/+91
| | | | | | | | | | Mostly this includes <auto> and <decltype-auto> return values. Additionally, this fixes a fairly obscure back-referencing bug that was encountered in one of the C++14 tests, which is that if you have something like Foo<&bar, &bar> then the `bar` forms a backreference. llvm-svn: 340896
* [MS Demangler] Add output flags to all function calls.Zachary Turner2018-08-293-138/+138
| | | | | | | | | | | | Previously we had a FunctionSigFlags, but it's more flexible to just have one set of output flags that apply to the entire process and just pipe the entire set of flags through the output process. This will be useful when we start allowing the user to customize the outputting behavior. llvm-svn: 340894
* NFC. fixing time-passes test failure on Windows.Fedor Sergeev2018-08-291-1/+1
| | | | llvm-svn: 340893
* [GISel]: Add legalization support for Widening UADDO/USUBOAditya Nandakumar2018-08-292-0/+101
| | | | | | | | | | | https://reviews.llvm.org/D51384 Added code in LegalizerHelper to widen UADDO/USUBO along with unit tests. Reviewed by volkan. llvm-svn: 340892
* [X86] Support v2i32 gather/scatter indices with ↵Craig Topper2018-08-294-21/+528
| | | | | | | | | | | | | | | | -x86-experimental-vector-widening-legalization Summary: This is split out from D41062 to cover the code in LegalVectorTypes.cpp Reviewers: RKSimon, spatel, efriedma Reviewed By: efriedma Subscribers: sdardis, jvesely, nhaehnle, jrtc27, atanasyan, llvm-commits Differential Revision: https://reviews.llvm.org/D51337 llvm-svn: 340891
* [ELF] Change llvm-objdump -D to -d for check lines that only inspect text ↵Fangrui Song2018-08-299-17/+17
| | | | | | | | | | | | sections Reviewers: ruiu, sfertile, syzaara, espindola Subscribers: emaste, nemanjai, arichardson, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D51389 llvm-svn: 340890
* Start reserving x18 by default on Android targets.Peter Collingbourne2018-08-293-1/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D45588 llvm-svn: 340889
* [llvm-mca] Remove unused formal. NFC.Matt Davis2018-08-292-5/+4
| | | | llvm-svn: 340888
* [llvm-mca] Move the initialization of Pipeline. NFC.Matt Davis2018-08-291-2/+2
| | | | | | Code cleanup to make the pipeline creation routine easier to read. llvm-svn: 340887
* [sanitizer] fix a testKostya Serebryany2018-08-281-19/+20
| | | | llvm-svn: 340886
* [LLDB] Fix script to work with GNU sedShoaib Meenai2018-08-281-5/+6
| | | | | | | | | | | | | | | | | GNU sed and BSD sed have a different command-line syntax for in-place editing, and the current form of the script would only work with BSD sed. The easiest way to get cross-platform behavior is to specify a backup suffix and then just delete the backup file at the end. (BSD sed is the default on macOS, but it's possible to acquire GNU coreutils and have your `sed` be GNU sed even on macOS; I'm aware it's not officially supported in any capacity, but it's easy enough to support here.) An alternative would be using `perl -p -i -e` instead of `sed -i`, but I figured it was best to make the minimal working change. Differential Revision: https://reviews.llvm.org/D51374 llvm-svn: 340885
* Add a RingBuffer class to sanitizer_commonKostya Serebryany2018-08-284-0/+165
| | | | | | | | | | | | | | Summary: a constrained RingBuffer optimized for fast push Reviewers: eugenis Reviewed By: eugenis Subscribers: kubamracek, mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51196 llvm-svn: 340884
* [codeview] Clean up machinery for deferring .cv_loc emissionReid Kleckner2018-08-2815-144/+84
| | | | | | | | | | | Now that we create the label at the point of the directive, we don't need to set the "current CV location", and then later when we emit the next instruction, create a label for it and emit it. DWARF still defers the labels used in .debug_loc until the next instruction or value, for reasons unknown. llvm-svn: 340883
* [QTOOL-37352] Consider isLegalAddressingImm in Constant HoistingZhaoshi Zheng2018-08-282-1/+141
| | | | | | | | | | | | | | In Thumb1, legal imm range is [0, 255] for ADD/SUB instructions. However, the legal imm range for LD/ST in (R+Imm) addressing mode is [0, 127]. Imms in [128, 255] are materialized by mov R, #imm, and LD/STs use them in (R+R) addressing mode. This patch checks if a constant is used as offset in (R+Imm), if so, it checks isLegalAddressingMode passing the constant value as BaseOffset. Differential Revision: https://reviews.llvm.org/D50931 llvm-svn: 340882
* [ORC] Add a testcase for r338975.Lang Hames2018-08-282-0/+9
| | | | | | Tests that bad object files generate a predictable error from the JIT APIs. llvm-svn: 340881
* Allow IRInterpreter to deal with non-power-of-2 sized types to support some ↵Frederic Riss2018-08-283-11/+53
| | | | | | | | | | | | | | | | | | | | bitfield accesses. Summary: For some bitfield patterns (like the one added by this commit), Clang will generate non-regular data types like i24 or i48. This patch follows a pretty naive approach of just bumping the type size to the next power of 2. DataExtractor know how to deal with weird sizes. The operations on Scalar do not know how to deal with those types though, so we have to legalize the size when creating a Scalar. Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51245 llvm-svn: 340880
* [X86] Add kadd intrinsics to match gcc and icc.Craig Topper2018-08-286-1/+101
| | | | | | | | | | | | This adds the following intrinsics: _kadd_mask64 _kadd_mask32 _kadd_mask16 _kadd_mask8 These are missing from the Intel Intrinsics Guide, but are implemented by both gcc and icc. llvm-svn: 340879
* [codeview] Emit labels for .cv_loc immediatelyReid Kleckner2018-08-283-8/+181
| | | | | | | | | | | | | | | Previously we followed the DWARF implementation, which waits until the next instruction or data to emit the label to use in the .debug_loc section. We might want to consider re-evaluating that design choice as well, since it means the .loc skips alignment padding, for better or worse. This was the most minimal fix I could come up with, but we should be able to do a lot of cleanups now that we don't need to save a pending CV location on the CodeViewContext. I plan to do those next, but this immediately fixes an assertion for some of our users. llvm-svn: 340878
* Remove unnecessary entitlement in debugserver for iOS.Jason Molenda2018-08-281-2/+0
| | | | | | <rdar://problem/43631901> llvm-svn: 340877
* [lldb] Fix lldb build on muslRaphael Isemann2018-08-281-0/+1
| | | | | | | | | | | | | | | | | | | Summary: limits.h is needed for getting PATH_MAX definition, this comes to fore with musl libc where limits.h is not included indirectly via other system headers. Patch by Khem Raj, thanks! Reviewers: compnerd Reviewed By: compnerd Subscribers: llvm-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D31275 llvm-svn: 340876
* [X86] Remove GCCBuiltin from kadd intrinsics.Craig Topper2018-08-281-4/+4
| | | | | | We need to custom handle it in clang so we can bit cast to the mask type. llvm-svn: 340875
* [ORC] Replace lookupFlags in JITSymbolResolver with getResponsibilitySet.Lang Hames2018-08-2817-228/+261
| | | | | | | | | | | | | | The new method name/behavior more closely models the way it was being used. It also fixes an assertion that can occur when using the new ORC Core APIs, where flags alone don't necessarily provide enough context to decide whether the caller is responsible for materializing a given symbol (which was always the reason this API existed). The default implementation of getResponsibilitySet uses lookupFlags to determine responsibility as before, so existing JITSymbolResolvers should continue to work. llvm-svn: 340874
* [HIP] Fix output file extensionYaxun Liu2018-08-282-1/+10
| | | | | | | | | | | | | | | | | | OffloadBundlingJobAction constructor accepts a list of JobAction as inputs. The host JobAction is the last one. The file type of OffloadBundlingJobAction should be determined by the host JobAction (the last one) instead of the first one. Since HIP emits LLVM bitcode for device compilation, device JobAction has different file type as host Job Action. This bug causes incorrect output file extension for HIP. This patch fixes it by using the last input JobAction (host JobAction) to determine file type of OffloadBundlingJobAction. Differential Revision: https://reviews.llvm.org/D51336 llvm-svn: 340873
* [NFC][PassTiming] factor out generic PassTimingInfoFedor Sergeev2018-08-289-97/+221
| | | | | | | | Moving PassTimingInfo from legacy pass manager code into a separate header. Making it suitable for both legacy and new pass manager. Adding a test on -time-passes main functionality. llvm-svn: 340872
* [SimpleLoopUnswitch] Form dedicated exits after trivial unswitches.Alina Sbirlea2018-08-284-5/+92
| | | | | | | | | | | | | | Summary: Form dedicated exits after trivial unswitches. Fixes PR38737, PR38283. Reviewers: chandlerc, fedor.sergeev Subscribers: sanjoy, jlebar, uabelho, llvm-commits Differential Revision: https://reviews.llvm.org/D51375 llvm-svn: 340871
* [ORC] Add an addObjectFile method to LLJIT.Lang Hames2018-08-285-25/+71
| | | | | | | | | | The addObjectFile method adds the given object file to the JIT session, making its code available for execution. Support for the -extra-object flag is added to lli when operating in -jit-kind=orc-lazy mode to support testing of this feature. llvm-svn: 340870
* [X86] Add intrinsics for KADD instructionsCraig Topper2018-08-284-0/+116
| | | | | | | | | | These are intrinsics for supporting kadd builtins in clang. These builtins are already in gcc to implement intrinsics from icc. Though they are missing from the Intel Intrinsics Guide. This instruction adds two mask registers together as if they were scalar rather than a vXi1. We might be able to get away with a bitcast to scalar and a normal add instruction, but that would require DAG combine smarts in the backend to recoqnize add+bitcast. For now I'd prefer to go with the easiest implementation so we can get these builtins in to clang with good codegen. Differential Revision: https://reviews.llvm.org/D51370 llvm-svn: 340869
* [AMDGPU] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=offFangrui Song2018-08-281-2/+1
| | | | llvm-svn: 340868
* Revert "[libFuzzer] Port to Windows"Matt Morehouse2018-08-2815-148/+26
| | | | | | This reverts commit r340860 due to failing tests. llvm-svn: 340867
* AMDGPU: Don't delete instructions if S_ENDPGM has implicit usesMatt Arsenault2018-08-282-1/+25
| | | | | | | | This can leave behind the uses with the defs removed. Since this should only really happen in tests, it's not worth the effort of trying to handle this. llvm-svn: 340866
* [GISel]: Add missing opcodes for overflow intrinsicsAditya Nandakumar2018-08-285-18/+66
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D51197 Currently, IRTranslator (and GISel) seems to be arbitrarily picking which overflow intrinsics get mapped into opcodes which either have a carry as an input or not. For intrinsics such as Intrinsic::uadd_with_overflow, translate it to an opcode (G_UADDO) which doesn't have any carry inputs (similar to LLVM IR). This patch adds 4 missing opcodes for completeness - G_UADDO, G_USUBO, G_SSUBE and G_SADDE. llvm-svn: 340865
* [WebAssembly][NFC] Document stackifier tablegen backendThomas Lively2018-08-282-3/+19
| | | | | | | | | | | | | | Summary: Add comments to help readers avoid having to read tablegen backends to understand the code. Also remove unecessary breaks from the output. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51371 llvm-svn: 340864
* [llvm-mca] use llvm::any_of instead of std::any_of. NFCAndrea Di Biagio2018-08-281-1/+2
| | | | llvm-svn: 340863
* AMDGPU: Force shrinking of add/sub even if the carry is usedMatt Arsenault2018-08-282-9/+39
| | | | | | | | | The original motivating example uses a 64-bit add, so the carry is used. Insert a copy from VCC. This may allow shrinking of the used carry instruction. At worst, we are replacing a mov to materialize the constant with a copy of vcc. llvm-svn: 340862
* [WebAssembly][NFC] Fix formatting from rL340781Thomas Lively2018-08-281-2/+4
| | | | | | | | | | Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51367 llvm-svn: 340861
* [libFuzzer] Port to WindowsMatt Morehouse2018-08-2815-26/+148
| | | | | | | | | | | | | | | | | | | | Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them. Patch By: metzman Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 llvm-svn: 340860
* AMDGPU: Shrink insts to fold immediatesMatt Arsenault2018-08-286-54/+564
| | | | | | | | | This needs to be done in the SSA fold operands pass to be effective, so there is a bit of overlap with SIShrinkInstructions but I don't think this is practically avoidable. llvm-svn: 340859
* [WebAssembly][NFC] Fix up SIMD bitwise testsThomas Lively2018-08-281-12/+15
| | | | | | | | | | | | | | Summary: The updated tests were previously infallible because the SIMD bitwise operations do not contain vector types in their names. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51369 llvm-svn: 340858
* [WebAssembly] v128.notThomas Lively2018-08-282-0/+66
| | | | | | Implementation and tests. llvm-svn: 340857
* SafeStack: Fix thread liveness check on *BSDVlad Tsyrklevich2018-08-281-1/+4
| | | | | | | | | | | | | | | | Summary: The Linux/BSD system call interfaces report errors differently, use the internal_iserror() function to correctly check errors on either. Reviewers: eugenis Reviewed By: eugenis Subscribers: delcypher, llvm-commits, #sanitizers, krytarowski, kcc, devnexen Differential Revision: https://reviews.llvm.org/D51368 llvm-svn: 340856
* AMDGPU: Move canShrink into TIIMatt Arsenault2018-08-283-56/+57
| | | | llvm-svn: 340855
* Define variables in test case rather than using values from functionsAkira Hatanaka2018-08-281-2/+2
| | | | | | emitted ealier. llvm-svn: 340854
* [DAGCombine] Rework MERGE_VALUES to inline in single pass. NFCI.Nirav Dave2018-08-281-1/+4
| | | | | | | Avoid hyperlinear cost of inlining MERGE_VALUE node by constructing temporary vector and doing a single replacement. llvm-svn: 340853
* [DAG] Avoid recomputing Divergence checks. NFCI.Nirav Dave2018-08-281-6/+10
| | | | | | | When making multiple updates to the same SDNode, recompute node divergence only once after all changes have been made. llvm-svn: 340852
* [DAG] Fix updateDivergence calculationNirav Dave2018-08-281-1/+1
| | | | | | | Check correct SDNode when deciding if we should update the divergence property. llvm-svn: 340851
OpenPOWER on IntegriCloud