summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objcopy] Adjust the code for the old versions of msvcAlexander Shaposhnikov2018-04-241-1/+1
| | | | | | Follow-up for r330685. llvm-svn: 330686
* Recommit "[llvm-objcopy] Switch over to using TableGen for parsing arguments"Alexander Shaposhnikov2018-04-2412-117/+251
| | | | | | | | | Add explicit dependency on ObjcopyTableGen and rerun the tests on Windows. I will double-check the build bots and revert this commit if necessary. llvm-svn: 330685
* [NFC] Use FileCheck in testMax Kazantsev2018-04-241-1/+5
| | | | llvm-svn: 330684
* [NFC] Use forgetTopmostLoop instead of logic duplicationMax Kazantsev2018-04-241-6/+2
| | | | llvm-svn: 330683
* [X86] Add a BSWAP16 instruction using the 32-bit encoding plus a 0x66 prefix.Craig Topper2018-04-242-3/+7
| | | | | | This encoding is recognized by the CPU, but the behavior is undefined. This makes the disassembler handle it correctly so we don't print bswapl with a 16-bit register. llvm-svn: 330682
* [X86] Remove '#ifdef __x86_64__' around mask_set1_epi64 intrinsics.Craig Topper2018-04-244-11/+0
| | | | | | The unmasked versions already didn't have this restrction. I don't think gcc or icc limit these to 64-bit mode so we shouldn't either. llvm-svn: 330681
* [PM/LoopUnswitch] Remove another over-aggressive assert.Chandler Carruth2018-04-242-4/+74
| | | | | | | | | | This code path can very clearly be called in a context where we have baselined all the cloned blocks to a particular loop and are trying to handle nested subloops. There is no harm in this, so just relax the assert. I've added a test case that will make sure we actually exercise this code path. llvm-svn: 330680
* Fixup Polly for an LLVM header file change.David Blaikie2018-04-242-0/+2
| | | | llvm-svn: 330679
* Remove unused function HexagonEarlyIfConversion::replacePhiEdges. NFC.Eric Christopher2018-04-241-15/+0
| | | | llvm-svn: 330678
* [NFC] Add clarification commentMax Kazantsev2018-04-241-2/+4
| | | | llvm-svn: 330677
* Reflow formatting after previous NFC commit.Eric Christopher2018-04-241-6/+6
| | | | llvm-svn: 330676
* Change if-conditionals to else-if as they should all be mutually exclusive.Eric Christopher2018-04-241-3/+3
| | | | | | No functional change intended. llvm-svn: 330675
* Make add_clang_tool() formatting a bit more consistent.Nico Weber2018-04-241-1/+3
| | | | llvm-svn: 330674
* Mostly revert r330672.Nico Weber2018-04-241-0/+4
| | | | | | | | | The test is apparently needed e.g. for check-cfi on Windows where we get 'C:/b/slave/sanitizer-windows/build/./bin/clang.exe': command not found without it. Try to fix the problem that was fixed by r330672 by also checking for isabs() instead. llvm-svn: 330673
* Remove code that's almost always dead, and harmful if not.Nico Weber2018-04-241-4/+0
| | | | | | | | | | | | | | lit's util.which() would check if the passed-in path existed directly, and if so return it as-is. This is never the case when running llvm's, clang's, or lld's tests normally. But when running `./llvm-lit path/to/clang/test` with a cwd of llvm-build/bin, this if would detect that clang exists at path 'clang' and return 'clang' as the discovered clang binary -- and then lit would use the " clang " -> "*** Do not use 'clang' in tests, use '%clang'. ***" substitution to replace that with a broken test. By removing this early return, lit ends up with the usual absolute path and everything works even in this uncommon case. llvm-svn: 330672
* Fix build break due to content moving from Scalar.h to InstCombine.h in LLVMDavid Blaikie2018-04-241-0/+1
| | | | llvm-svn: 330671
* Fix build breaks in examples due to moving stuff from Scalar.h to InstCombine.hDavid Blaikie2018-04-244-3/+7
| | | | llvm-svn: 330670
* InstCombine: Fix layering by not including Scalar.h in InstCombineDavid Blaikie2018-04-2411-26/+75
| | | | | | | | (notionally Scalar.h is part of libLLVMScalarOpts, so it shouldn't be included by InstCombine which doesn't/shouldn't need to depend on ScalarOpts) llvm-svn: 330669
* [AggressiveInstCombine] Add aggressive inst combiner to the LLVM C API.Craig Topper2018-04-245-0/+15
| | | | | | I just tried to copy what was done for regular InstCombine. Hopefully I didn't miss anything. llvm-svn: 330668
* Reland r301880(!): "[InstSimplify] Handle selects of GEPs with 0 offset"George Burgess IV2018-04-242-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was reminded today that this patch got reverted in r301885. I can no longer reproduce the failure that caused the revert locally (...almost one year later), and the patch applied pretty cleanly, so I guess we'll see if the bots still get angry about it. The original breakage was InstSimplify complaining (in "assertion failed" form) about getting passed some crazy IR when running `ninja check-sanitizer`. I'm unable to find traces of what, exactly, said crazy IR was. I suppose we'll find out pretty soon if that's still the case. :) Original commit: Author: gbiv Date: Mon May 1 18:12:08 2017 New Revision: 301880 URL: http://llvm.org/viewvc/llvm-project?rev=301880&view=rev Log: [InstSimplify] Handle selects of GEPs with 0 offset In particular (since it wouldn't fit nicely in the summary): (select (icmp eq V 0) P (getelementptr P V)) -> (getelementptr P V) Differential Revision: https://reviews.llvm.org/D31435 llvm-svn: 330667
* [HWASan] Use dynamic shadow memory on Android only.Alex Shlyapnikov2018-04-241-3/+3
| | | | | | | | There're issues with IFUNC support on other platforms. Differential Revision: https://reviews.llvm.org/D45847 llvm-svn: 330666
* [HWASan] Use dynamic shadow memory on Android only (LLVM)Alex Shlyapnikov2018-04-241-4/+2
| | | | | | | | There're issues with IFUNC support on other platforms. DIfferential Revision: https://reviews.llvm.org/D45840 llvm-svn: 330665
* [AggressiveInstCombine] Add createAggressiveInstCombinerPass to LinkAllPasses.h.Craig Topper2018-04-241-0/+1
| | | | llvm-svn: 330664
* [AggressiveInstCombine] Add library initializer routine for ↵Craig Topper2018-04-245-1/+11
| | | | | | | | AggressiveInstCombine library. Use it in bugpoint and llvm-opt-fuzzer to match regular InstCombine. This should make aggressive instcombine usable with these tools. llvm-svn: 330663
* [X86] Remove unnecessary vector memory folded InstRW overrides.Simon Pilgrim2018-04-234-187/+4
| | | | | | We have test coverage for these with resources-sse*/avx* llvm-svn: 330662
* [LLVM-C] DIBuilder Bindings For Variable ExpressionsRobert Widmann2018-04-237-59/+226
| | | | | | | | | | | | | | Summary: Add DIBuilder bindings for (global) variable expressions, variable value expressions, and debug value intrinsic insertion. Reviewers: harlanhaskins, deadalnix, whitequark Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45979 llvm-svn: 330661
* [GlobalISel][Legalizer] Look thro copies while combining G_UNMERGE'sRoman Tereshin2018-04-233-17/+43
| | | | | | | | | | | | | | | | | | | | | As we're becoming stricter w/ respect to not allowing vregs having LLTs and regclasses assigned both mid-globalisel pipeline, the number of extra copies grows, some of which separate G_UNMERGE's from their corresponding G_MERGE's, becoming a performance concern. It's worth mentioning that we're already looking through copies while combining legalization artifacts for every kind of artifact but G_UNMERGE. Reviewed By: aditya_nandakumar Reviewers: ab, t.p.northover, volkan, javed.absar Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D45644 llvm-svn: 330660
* [X86] Remove unnecessary BMI2 InstRW overrides.Simon Pilgrim2018-04-233-30/+6
| | | | | | We have test coverage for these with resources-bmi2.s llvm-svn: 330659
* [X86] Move the 32-bit versions of rdfsbase/rdgsbase/wrfsbase/wrgsbase to ↵Craig Topper2018-04-232-6/+4
| | | | | | | | BuiltinsX86_64.def. The 32-bit refers to their input/output type, but the instructions are only available in 64-bit mode. llvm-svn: 330658
* [X86] Move __builtin_ia32_movnti64 andd __builtin_ia32_rdrand64_step to ↵Craig Topper2018-04-232-2/+2
| | | | | | BuiltinsX86_64.def to make them unavailable in 32-bit mode. llvm-svn: 330657
* [AST] strcmp/memcmp always compares unsigned chars.Benjamin Kramer2018-04-232-2/+25
| | | | | | | This makes it return the right result in a couple of edge cases. The wide versions always do the comparison on the underlying wchar_t type. llvm-svn: 330656
* Re-commit r330627 "[libcxx] implement <experimental/simd> declarations based ↵Tim Shen2018-04-2313-0/+1950
| | | | | | | | | | | | on P0214R7." There are 3 changes: * Renamed genertor.pass.cpp to generator.pass.cpp * Removed nothing_to_do.pass.cpp * Mark GCC 4.9 as UNSUPPORTED for the test files that have negative narrowing conversion SFINAE test (see GCC PR63723). llvm-svn: 330655
* [Docs] Regenerate command line documentation.Craig Topper2018-04-231-0/+14
| | | | llvm-svn: 330654
* [LoopInterchange] Do not change LI for BBs in child loops.Florian Hahn2018-04-231-0/+3
| | | | | | | | | | | | | | If a loop with child loops becomes our new inner loop after interchanging, we only need to update LoopInfo for the blocks defined in the old outer loop. BBs in child loops will stay there. Reviewers: efriedma, karthikthecool, mcrosier Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D45970 llvm-svn: 330653
* [libFuzzer] Add feature to not use AFL's deferred forkserver.Matt Morehouse2018-04-231-1/+13
| | | | | | | | | | | | | | A small but substantial minority of libFuzzer-based fuzzers run code that does not play well with fork in global constructors or LLVMFuzzerInitialize. This patch allows these fuzzers to use afl_driver by allowing them to opt-out of using AFL's deferred forkserver which deferres calling fork until after this code. Patch By: metzman Differential Revision: https://reviews.llvm.org/D45744 llvm-svn: 330652
* [Sema] Add -Wno-self-assign-overloadedRoman Lebedev2018-04-236-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It seems there isn't much enthusiasm for `-wtest` D45685. This is more conservative version, which i had in the very first revision of D44883, but that 'erroneously' got removed because of the review. **Based on some [irc] discussions, it must really be documented that we want all the new diagnostics to have their own flags, to ease rollouts, transitions, etc.** Please do note that i'm only adding `-Wno-self-assign-overloaded`, but not `-Wno-self-assign-field-overloaded`, because i'm honestly not aware of any false-positives from the `-field` variant, but i can just as easily add it if wanted. https://reviews.llvm.org/D44883#1068561 Reviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith Reviewed By: dblaikie Subscribers: Quuxplusone, chandlerc, cfe-commits Differential Revision: https://reviews.llvm.org/D45766 llvm-svn: 330651
* Change kAllocatorSpace for powerpc64.Martin Liska2018-04-231-1/+1
| | | | | | | | Fixes issue: https://github.com/google/sanitizers/issues/933 Differential Revision: https://reviews.llvm.org/D45950 llvm-svn: 330650
* log10: Use sw implementation from amd builtinsJan Vesely2018-04-235-19/+173
| | | | | | | | | | Add missing table. Fixes log10d CTS on carrizo. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 330649
* [X86] Remove unnecessary WriteLEA InstRW overrides.Simon Pilgrim2018-04-235-16/+5
| | | | llvm-svn: 330648
* [COFF] Alias /DEBUG:FULL to /DEBUGZachary Turner2018-04-231-0/+1
| | | | | | | | | | | | | | With MSVC linker, /DEBUG is an alias of /DEBUG:FASTLINK, and if you don't want /DEBUG:FASTLINK you have to explicitly specify /DEBUG:FULL. LLD doesn't support /DEBUG:FASTLINK, and so our standard /DEBUG option is what MSVC calls /DEBUG:FULL. To provide command line compatibility with MSVC, we should also support /DEBUG:FULL, and since it's the same as what LLD already does for /DEBUG, just alias it. llvm-svn: 330647
* [DAGCombiner] Unfold scalar masked merge if profitableRoman Lebedev2018-04-233-120/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`) Now, they would no longer be generated (see `@in`). So we need to make sure that they are still generated. If the mask is constant, we do nothing. InstCombine should have unfolded it. Else, i use `hasAndNot()` TLI hook. For now, only handle scalars. https://rise4fun.com/Alive/bO6 ---- I *really* don't like the code i wrote in `DAGCombiner::unfoldMaskedMerge()`. It is super fragile. Is there something like IR Pattern Matchers for this? Reviewers: spatel, craig.topper, RKSimon, javed.absar Reviewed By: spatel Subscribers: andreadb, courbet, kristof.beyls, javed.absar, rengolin, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D45733 llvm-svn: 330646
* [X86][AArch64][NFC] Add tests for masked merge unfoldingRoman Lebedev2018-04-2310-0/+4008
| | | | | | | | | | | | | | | | | | | | 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, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`) Now, they would no longer be generated (see `@in`). I'm guessing `llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp` should be able to unfold this. Reviewers: spatel, craig.topper, RKSimon, javed.absar Reviewed By: spatel Subscribers: nemanjai, rengolin, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D45563 llvm-svn: 330645
* Remove duplicate "error:" from an error message.Rui Ueyama2018-04-233-8/+8
| | | | | | | This patch also simplifies the code a bit which wasn't committed in https://reviews.llvm.org/r330600. llvm-svn: 330644
* [Sanitizer] Internal Printf string width + left-justify.Alex Shlyapnikov2018-04-232-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Example: Printf("%-5s", "123"); should yield: '123 ' In case Printf's requested string field width is larger than the string argument length, the resulting string should be padded up to the requested width. For the simplicity sake, implementing left-justified (right padding) only. Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45906 llvm-svn: 330643
* [AggressiveInstCombine] add tests for PR37098; NFCSanjay Patel2018-04-231-0/+39
| | | | | | | | | I'm not sure if this is where we should try to fold these patterns inspired by: https://bugs.llvm.org/show_bug.cgi?id=37098 ...if this isn't the right place, we can move the tests. llvm-svn: 330642
* [CallSiteSplit] Make sure we remove nonnull if the parameter turns out to be ↵Xin Tong2018-04-232-1/+34
| | | | | | | | | | | | | | a constant. Summary: We do not need nonull attribute if we know an argument is going to be constant. Reviewers: junbuml, davide, fhahn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45608 llvm-svn: 330641
* [X86] Revert r330638 - accidental commitGabor Buella2018-04-2317-216/+2
| | | | llvm-svn: 330640
* Fix a broken typedef; NFCIGeorge Burgess IV2018-04-231-4/+1
| | | | | | | | | | | | | Richard Smith noted that `typedef typename iplist::iplist_impl_type iplist_impl_type` is incorrect, per http://eel.is/c++draft/basic.scope#class-2 It seems that neither clang nor gcc get too angry about this, but a newer version of msvc does. Thanks to jcmac on IRC for pointing this out! llvm-svn: 330639
* [X86] movdiri and movdir64b instructionsGabor Buella2018-04-2317-2/+216
| | | | | Reviewers: craig.topper llvm-svn: 330638
* [clangd] Implementation of workspace/symbol requestMarc-Andre Laperle2018-04-2322-25/+714
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a basic implementation of the "workspace/symbol" request which is used to find symbols by a string query. Since this is similar to code completion in terms of result, this implementation reuses the "fuzzyFind" in order to get matches. For now, the scoring algorithm is the same as code completion and improvements could be done in the future. The index model doesn't contain quite enough symbols for this to cover common symbols like methods, enum class enumerators, functions in unamed namespaces, etc. The index model will be augmented separately to achieve this. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: jkorous, hokein, simark, sammccall, klimek, mgorny, ilya-biryukov, mgrang, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D44882 llvm-svn: 330637
OpenPOWER on IntegriCloud