summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce the abseil-redundant-strcat-calls check.Aaron Ballman2018-08-298-0/+404
| | | | | | This flags redundant calls to absl::StrCat where the result is being passed to another call to absl::StrCat or absl::StrAppend. Patch by Hugo Gonzalez and Samuel Benzaquen. llvm-svn: 340918
* [DAGCombiner] Add X / X -> 1 & X % X -> 0 folds (test tweaks)Simon Pilgrim2018-08-291-37/+37
| | | | | | | | Adjust missed test to avoid the X / X -> 1 & X % X -> 0 folds while keeping their original purposes. Differential Revision: https://reviews.llvm.org/D50636 llvm-svn: 340917
* [DAGCombiner] Add X / X -> 1 & X % X -> 0 folds (test tweaks)Simon Pilgrim2018-08-293-50/+63
| | | | | | | | Adjust tests to avoid the X / X -> 1 & X % X -> 0 folds while keeping their original purposes. Differential Revision: https://reviews.llvm.org/D50636 llvm-svn: 340916
* Introduce the abseil-str-cat-append check.Aaron Ballman2018-08-298-0/+295
| | | | | | This flags uses of absl::StrCat when absl::StrAppend should be used instead. Patch by Hugo Gonzalez and Benjamin Kramer. llvm-svn: 340915
* [NFC] Factor out guard utility methods into a separate fileMax Kazantsev2018-08-294-48/+97
| | | | | | | | | | This patch creates file GuardUtils which will contain logic for work with guards that can be shared across different passes. Differential Revision: https://reviews.llvm.org/D51151 Reviewed By: fedor.sergeev llvm-svn: 340914
* [X86][AVX] Prefer VPBLENDW+VPBLENDD to VPBLENDVB for v16i16 blend shufflesSimon Pilgrim2018-08-296-87/+67
| | | | | | | | | | Noticed while looking at D49562 codegen - we can avoid a large constant mask load and a slow VPBLENDVB select op by using VPBLENDW+VPBLENDD instead. TODO: As discussed on the patch, we should investigate adding VPBLENDVB handling to target shuffle combining as well, that will allow us to extend this to VPBLENDW+VPBLENDW+VPBLENDD. Differential Revision: https://reviews.llvm.org/D50074 llvm-svn: 340913
* [MC] fix a clang-tidy warning, NFCKrasimir Georgiev2018-08-291-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: Per clang-tidy: function 'llvm::MCStreamer::checkCVLocSection' has a definition with different parameter names .../llvm/lib/MC/MCStreamer.cpp:275:18: the definition seen here .../llvm/include/llvm/MC/MCStreamer.h:235:8: differing parameters are named here: ('FuncId'), in definition: ('FunctionId') Reviewers: bkramer Reviewed By: bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51406 llvm-svn: 340912
* [ARM] Set __ARM_FEATURE_SIMD32 for +dsp coresSam Parker2018-08-292-5/+9
| | | | | | | | | | | | | | ARM_FEATURE_DSP is already set for targets with the +dsp feature. In the backend, this target feature is also used to represent the availability of the of the instructions that the ACLE guard through the __ARM_FEATURE_SIMD32 macro. We don't have any cores that implement one and not the other, so set this macro for cores later than V6 or for Cortex-M cores that the target parser, or user, reports that the 'dsp' instructions are supported. Differential Revision: https://reviews.llvm.org/D51093 llvm-svn: 340911
* Remove debug code accidently committed in rL340837. NFCI.Simon Pilgrim2018-08-291-3/+0
| | | | llvm-svn: 340908
* Introduce new type for inteceptors UINTMAX_TKamil Rytarowski2018-08-292-2/+3
| | | | | | | | | | | | | | | | | | | | | Summary: The UINTMAX_T type will be used in new interceptors. While there, correct the type of strtoumax(3) from INTMAX_T to UINTMAX_T. Original patch from Yang Zheng. Reviewers: vitalybuka, kcc, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, tomsun.0.7, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D51106 llvm-svn: 340907
* Revert r340904 "[llvm-mc] - Allow to set custom flags for debug sections."George Rimar2018-08-293-27/+4
| | | | | | | It broke PPC64 BB: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/23252 llvm-svn: 340906
* [benchmark] NFC: Turn benchmark ON on all non-Windows buildbotsKirill Bobyrev2018-08-292-2/+8
| | | | | | | | | The problems with benchmark build should be fixed now, but Windows buildbots still run into errors seemingly because of the bug in clang-cl. Because of that, benchmark shouldn't be built on Windows at this point. llvm-svn: 340905
* [llvm-mc] - Allow to set custom flags for debug sections.George Rimar2018-08-293-4/+27
| | | | | | | | | | | | | | | | | | | | | | I am experimenting with a single split dwarf (.dwo sections in .o files). I want to make linker to ignore .dwo sections in .o, for that I am trying to add SHF_EXCLUDE flag ("E") for them in my asm sample. I found that currently, it is impossible to add any flag for debug sections using llvm-mc. That happens because we have a set of predefined unique sections created early with default flags: https://github.com/llvm-mirror/llvm/blob/master/lib/MC/MCObjectFileInfo.cpp#L391 This patch allows a user to add any flags he wants. I had to edit TargetLoweringObjectFileImpl.cpp to set MetaData type for debug sections. Their kind was Data by default (so they were allocatable) and so after changes introduced by this patch the SHF_ALLOC flag was applied for them, what does not make sense for debug sections. One of OrcJITTests tests failed because of that. Differential revision: https://reviews.llvm.org/D51361 llvm-svn: 340904
* AMDGPU: Fix getInstSizeInBytesNicolai Haehnle2018-08-295-35/+46
| | | | | | | | | | | | | | | | | | | | | | | Summary: Add some optional code to validate getInstSizeInBytes for emitted instructions. This flushed out some issues which are fixed by this patch: - Streamline getInstSizeInBytes - Properly define the VI readlane/writelane instruction as VOP3 - Fix the inline constant determination. Specifically, this change fixes an issue where a 32-bit value of 0xffffffff was recorded as unsigned. This is equal to -1 when restricting to a 32-bit comparison, and an inline constant can be used. Reviewers: arsenm, rampitec Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D50629 Change-Id: Id87c3b7975839da0de8156a124b0ce98c5fb47f2 llvm-svn: 340903
* 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
OpenPOWER on IntegriCloud