summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[libFuzzer] Port to Windows"Matt Morehouse2018-08-2915-158/+26
| | | | | | This reverts r340949 due to bot breakage again. llvm-svn: 340954
* [OPENMP][NVPTX] Add support for lightweight runtime.Alexey Bataev2018-08-2911-102/+720
| | | | | | | | If the target construct can be executed in SPMD mode + it is a loop based directive with static scheduling, we can use lightweight runtime support. llvm-svn: 340953
* [InstCombine] canonicalize fneg with llvm.sinSanjay Patel2018-08-292-11/+20
| | | | | | | | | | | | | | This is a follow-up to rL339604 which did the same transform for a sin libcall. The handling of intrinsics vs. libcalls is unfortunately scattered, so I'm just adding this next to the existing transform for llvm.cos for now. This should resolve PR38458: https://bugs.llvm.org/show_bug.cgi?id=38458 If the call was already negated, the negates will cancel each other out. llvm-svn: 340952
* [MemorySSA] Add expesive check for validating clobber accesses.Alina Sbirlea2018-08-292-11/+49
| | | | | | | | | | | | Summary: Add validation of clobber accesses as expensive check. Reviewers: george.burgess.iv Subscribers: sanjoy, jlebar, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D51327 llvm-svn: 340951
* [InstCombine] add tests for llvm.sin(-x); NFCSanjay Patel2018-08-291-0/+40
| | | | | | | Also add a corresponding test for llvm.cos with FMF to make sure that was handled correctly. llvm-svn: 340950
* [libFuzzer] Port to WindowsMatt Morehouse2018-08-2915-26/+158
| | | | | | | | | | | | | | | | | | 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. Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: #sanitizers, delcypher, morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 llvm-svn: 340949
* [InstCombine] Expand the simplification of pow() with nested exp{,2}()Evandro Menezes2018-08-292-35/+43
| | | | | | | | | | | | Expand the simplification of `pow(exp{,2}(x), y)` to all FP types. This improvement helps some benchmarks in SPEC CPU2000 and CPU2006, such as 252.eon, 447.dealII, 453.povray. Otherwise, no significant regressions on x86-64 or A64. Differential revision: https://reviews.llvm.org/D51195 llvm-svn: 340948
* [InstCombine] Expand the simplification of pow() into exp2()Evandro Menezes2018-08-292-22/+42
| | | | | | | | | | | | | Generalize the simplification of `pow(2.0, y)` to `pow(2.0 ** n, y)` for all scalar and vector types. This improvement helps some benchmarks in SPEC CPU2000 and CPU2006, such as 252.eon, 447.dealII, 453.povray. Otherwise, no significant regressions on x86-64 or A64. Differential revision: https://reviews.llvm.org/D49273 llvm-svn: 340947
* [llvm-mca] Add fields "Total uOps" and "uOps Per Cycle" to the report ↵Andrea Di Biagio2018-08-2978-199/+554
| | | | | | | | | | | | | | | | | | | | | | | | | | | generated by the SummaryView. This patch adds two new fields to the perf report generated by the SummaryView. Fields are now logically organized into two small groups; only the second group contains throughput indicators. Example: ``` Iterations: 100 Instructions: 300 Total Cycles: 414 Total uOps: 700 Dispatch Width: 4 uOps Per Cycle: 1.69 IPC: 0.72 Block RThroughput: 4.0 ``` This patch also updates the docs for llvm-mca. Due to the nature of this change, several tests in the tools/llvm-mca directory were affected, and had to be updated using script `update_mca_test_checks.py`. llvm-svn: 340946
* [llvm-mca] Don't disable the SummaryView if flag `-all-stats` is false.Andrea Di Biagio2018-08-293-7/+78
| | | | llvm-svn: 340945
* [OPENMP][NVPTX] Lightweight runtime support for SPMD mode.Alexey Bataev2018-08-2911-45/+263
| | | | | | | | | | | | | | | | Summary: Implemented simple and lightweight runtime support for SPMD mode-based constructs. It adds support for L2 sequential parallelism wihtout full runtime support. Also, patch fixes some use cases for uninitialized|lightweight runtime. Reviewers: grokos, kkwli0, Hahnfeld, gtbercea Subscribers: guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D51222 llvm-svn: 340944
* [CMake] Add an lld-test-depends targetMartin Storsjo2018-08-291-0/+3
| | | | | | | | | This builds all dependencies of lld-test/check-lld, without running the tests. This matches llvm-test-depends and clang-test-depends. Differential Revision: https://reviews.llvm.org/D51439 llvm-svn: 340943
* [MinGW] [X86] Add stubs for references to data variables that might end up ↵Martin Storsjo2018-08-2913-22/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | imported from a dll Variables declared with the dllimport attribute are accessed via a stub variable named __imp_<var>. In MinGW configurations, variables that aren't declared with a dllimport attribute might still end up imported from another DLL with runtime pseudo relocs. For x86_64, this avoids the risk that the target is out of range for a 32 bit PC relative reference, in case the target DLL is loaded further than 4 GB from the reference. It also avoids having to make the text section writable at runtime when doing the runtime fixups, which makes it worthwhile to do for i386 as well. Add stub variables for all dso local data references where a definition of the variable isn't visible within the module, since the DLL data autoimporting might make them imported even though they are marked as dso local within LLVM. Don't do this for variables that actually are defined within the same module, since we then know for sure that it actually is dso local. Don't do this for references to functions, since there's no need for runtime pseudo relocations for autoimporting them; if a function from a different DLL is called without the appropriate dllimport attribute, the call just gets routed via a thunk instead. GCC does something similar since 4.9 (when compiling with -mcmodel=medium or large; from that version, medium is the default code model for x86_64 mingw), but only for x86_64. Differential Revision: https://reviews.llvm.org/D51288 llvm-svn: 340942
* [MinGW] Don't mark external variables as DSO localMartin Storsjo2018-08-297-6/+44
| | | | | | | | | | | | Since MinGW supports automatically importing external variables from DLLs even without the DLLImport attribute, we shouldn't mark them as DSO local unless we actually know them to be local for sure. Keep marking thread local variables as DSO local. Differential Revision: https://reviews.llvm.org/D51382 llvm-svn: 340941
* [COFF] Merge the .ctors, .dtors and .CRT sections into .rdata for MinGWMartin Storsjo2018-08-292-10/+20
| | | | | | | | | | | | | | | | | There's no point in keeping them as separate sections. This differs from GNU ld, which places .ctors and .dtors content in .text (implemented by a built-in linker script). But since the content only is pointers, there's no need to have it executable. GNU ld also leaves .CRT separate as its own standalone section. MSVC merges .CRT into .rdata similarly, with a directive embedded in an object file in msvcrt.lib or libcmt.lib. Differential Revision: https://reviews.llvm.org/D51414 llvm-svn: 340940
* [InstCombine] Replace two calls to getNumUses() with !hasNUsesOrMoreCraig Topper2018-08-291-1/+1
| | | | | | We were calling getNumUses to check for 1 or 2 uses. But getNumUses is linear in the number of uses. We can instead use !hasNUsesOrMore(3) which will stop the linear scan as soon as it determines there are at least 3 uses even if there are more. llvm-svn: 340939
* Update Visual Studio Integration version number.Zachary Turner2018-08-291-1/+1
| | | | | | | This updates the version number in the manifest file to match the SVN revision at which it was committed. llvm-svn: 340938
* [Tooling] Do not restore working dir in ClangToolIlya Biryukov2018-08-292-19/+26
| | | | | | | | | | | | | | | | | | | | | | | Summary: Resolve all relative paths before running the tool instead. This fixes the usage of ClangTool in AllTUsExecutor. The executor will try running multiple ClangTool instances in parallel with compile commands that usually have the same working directory. Changing working directory is a global operation, so we end up changing working directory in the middle of running other actions, which leads to spurious compile errors. Reviewers: ioeric, sammccall Reviewed By: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51407 llvm-svn: 340937
* [AMDGPU] Match udot4 pattern.Farhana Aleen2018-08-292-0/+663
| | | | | | | | | | | | | | | | | Summary: D.u32 = S0.u8[0] * S1.u8[0] + S0.u8[1] * S1.u8[1] + S0.u8[2] * S1.u8[2] + S0.u8[3] * S1.u8[3] + S2.u32 Author: FarhanaAleen Reviewed By: arsenm Subscribers: llvm-commits, AMDGPU Differential Revision: https://reviews.llvm.org/D50921 llvm-svn: 340936
* [DebugCounters] Fix DebugCounterTest when running all SupportTestsAlexandre Ganea2018-08-291-3/+2
| | | | | | | | Previously, the DebugCounterTest was failing because CommandLineTest.GetCommandLineArguments was clearing all the global singletons. Differential Revision: https://reviews.llvm.org/D51423 llvm-svn: 340935
* [OPENMP] Create non-const ident_t objects.Mike Rice2018-08-2944-67/+68
| | | | | | | | | | | Currently ident_t objects are created const when debug info is not enabled, but the libittnotify libray in the OpenMP runtime writes to the reserved_2 field (See __kmp_itt_region_forking in openmp/runtime/src/kmp_itt.inl). Now create ident_t objects non-const. Differential Revision: https://reviews.llvm.org/D51331 llvm-svn: 340934
* [InstCombine] add test for vector demanded elements + shrinking; NFCSanjay Patel2018-08-291-0/+15
| | | | llvm-svn: 340933
* [mips] Fix microMIPS unconditional branch offset handlingSimon Atanasyan2018-08-292-2/+105
| | | | | | | | | | | | | | MipsSEInstrInfo class defines for internal purpose unconditional branches as Mips::B nad Mips:J even in case of microMIPS code generation. Under some conditions that leads to the bug - for rather long branch which fits to Mips jump instruction offset size, but does not fit to microMIPS jump offset size, we generate 'short' branch and later show an error 'out of range PC16 fixup' after check in the isBranchOffsetInRange routine. Differential revision: https://reviews.llvm.org/D50615 llvm-svn: 340932
* [mips] Involves microMIPS's jump in the analyzable branch setSimon Atanasyan2018-08-292-6/+3
| | | | | | | | | Involves microMIPS's jump in the analyzable branch set to reduce some code patterns. Differential revision: https://reviews.llvm.org/D50613 llvm-svn: 340931
* [InstCombine] move declarations closer to uses; NFCSanjay Patel2018-08-291-5/+3
| | | | llvm-svn: 340930
* [Preamble] Fix incorrect usage of std::error_categoryAlexandre Ganea2018-08-291-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D51380 llvm-svn: 340929
* [clang-tidy] Add abseil-no-internal-dependencies checkJonas Toth2018-08-2910-2/+196
| | | | | | | | | | | Finds instances where the user depends on internal details and warns them against doing so. Should not be run on internal Abseil files or Abseil source code. Patch by hugoeg! Differential Revision: https://reviews.llvm.org/D50542 llvm-svn: 340928
* [mips] Prevent shrink-wrap for BuildPairF64, ExtractElementF64 when they use $spVladimir Stefanovic2018-08-294-5/+206
| | | | | | | | | | | | | | | | For a certain combination of options, BuildPairF64_{64}, ExtractElementF64{_64} may be expanded into instructions using stack. Add implicit operand $sp for such cases so that ShrinkWrapping doesn't move prologue setup below them. Fixes MultiSource/Benchmarks/MallocBench/cfrac for '--target=mips-img-linux-gnu -mcpu=mips32r6 -mfpxx -mnan=2008' and '--target=mips-img-linux-gnu -mcpu=mips32r6 -mfp64 -mnan=2008 -mno-odd-spreg'. Differential Revision: https://reviews.llvm.org/D50986 llvm-svn: 340927
* [InstCombine] remove unnecessary shuffle undef foldingSanjay Patel2018-08-292-7/+8
| | | | | | | | Add a test for constant folding to show that (shuffle undef, undef, mask) should already be handled via instsimplify. llvm-svn: 340926
* Revert r340922 "[GVNHoist] Re-enable GVNHoist by default"Alexandros Lamprineas2018-08-297-30/+26
| | | | | | | | | | Another sanitizer buildbot failed this time at bootstrap when compiling SemaTemplateInstantiate.cpp with this assertion: `dominates(MD, U) && "Memory Def does not dominate it's uses"'. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/15047 llvm-svn: 340925
* Revert r340884 "Add a RingBuffer class to sanitizer_common"Hans Wennborg2018-08-294-166/+0
| | | | | | | | | | | | | | | | | | | The test doesn't pass on Windows, where sizeof(long) == 4 also on 64-bit, and so it isn't a multiple of sizeof(void*). This also reverts the follow-up r340886. > 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: 340924
* Revert r340921 "[NFC] Unify guards detection"Hans Wennborg2018-08-299-24/+19
| | | | | | | | | | | | | | | | | | This broke the build, see e.g. http://lab.llvm.org:8011/builders/clang-cmake-armv8-lnt/builds/4626/ http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/18647/ http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/5856/ http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/22800/ > We have multiple places in code where we try to identify whether or not > some instruction is a guard. This patch factors out this logic into a separate > utility function which works uniformly in all places. > > Differential Revision: https://reviews.llvm.org/D51152 > Reviewed By: fedor.sergeev llvm-svn: 340923
* [GVNHoist] Re-enable GVNHoist by defaultAlexandros Lamprineas2018-08-297-26/+30
| | | | | | | | | Rebase rL338240 since the excessive memory usage observed when using GVNHoist with UBSan has been fixed by rL340818. Differential Revision: https://reviews.llvm.org/D49858 llvm-svn: 340922
* [NFC] Unify guards detectionMax Kazantsev2018-08-299-19/+24
| | | | | | | | | | | We have multiple places in code where we try to identify whether or not some instruction is a guard. This patch factors out this logic into a separate utility function which works uniformly in all places. Differential Revision: https://reviews.llvm.org/D51152 Reviewed By: fedor.sergeev llvm-svn: 340921
* [mips] Add missing instructionsAleksandar Beserminji2018-08-2922-38/+124
| | | | | | | | Add pll.ps, plu.ps, cvt.s.pu, cvt.s.pl, cvt.ps instructions for FP64. Differential Revision: https://reviews.llvm.org/D50437 llvm-svn: 340920
* [DAGCombiner] Add X / X -> 1 & X % X -> 0 foldsSimon Pilgrim2018-08-295-260/+60
| | | | | | | | Adds more divrem folds to try and get in sync with InstructionSimplify Differential Revision: https://reviews.llvm.org/D50636 llvm-svn: 340919
* 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
OpenPOWER on IntegriCloud