summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Verifier] Check that GEP indexes has correct typesIgor Laevsky2017-12-143-0/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D40391 llvm-svn: 320680
* [DAGCombine] Move AND nodes to multiple load leavesSam Parker2017-12-142-355/+421
| | | | | | | | | | | | | | | | | | | | | | | | Recommitting rL319773, which was reverted due to a recursive issue causing timeouts. This happened because I failed to check whether the discovered loads could be narrowed further. In the case of a tree with one or more narrow loads, that could not be further narrowed, as well as a node that would need masking, an AND could be introduced which could then be visited and recombined again with the same load. This could again create the masking load, with would be combined again... We now check that the load can be narrowed so that this process stops. Original commit message: Search from AND nodes to find whether they can be propagated back to loads, so that the AND and load can be combined into a narrow load. We search through OR, XOR and other AND nodes and all bar one of the leaves are required to be loads or constants. The exception node then needs to be masked off meaning that the 'and' isn't removed, but the loads(s) are narrowed still. Differential Revision: https://reviews.llvm.org/D41177 llvm-svn: 320679
* [clangd] Fix the unitttest build error on buildbot.Haojian Wu2017-12-141-0/+1
| | | | llvm-svn: 320678
* [COFF] Error out if 20 bit thumb branches are out of rangeMartin Storsjo2017-12-143-0/+14
| | | | | | | | | This is similar to what was added in SVN r277838 for 24 bit branch instructions. Differential Revision: https://reviews.llvm.org/D41163 llvm-svn: 320677
* [COFF] Sort .pdata for arm64Martin Storsjo2017-12-142-1/+88
| | | | | | | | | | This works for linking the output from the MSVC compiler. The pdata entries for arm64 seem to be 8 bytes in the same (or at least similar) form to arm. Differential Revision: https://reviews.llvm.org/D41160 llvm-svn: 320676
* [X86] Make ANY_EXTEND from vXi1 Custom for more types.Craig Topper2017-12-146-9524/+774
| | | | | | We should be able to support ANY_EXTEND for any types we support ZERO_EXTEND for. llvm-svn: 320675
* [SelectionDAG][X86] Improve legalization of v32i1 CONCAT_VECTORS of v16i1 ↵Craig Topper2017-12-147-6850/+523
| | | | | | | | | | for AVX512F. A v32i1 CONCAT_VECTORS of v16i1 uses promotion to v32i8 to legalize the v32i1. This results in a bunch of extract_vector_elts and a build_vector that ultimately gets scalarized. This patch checks to see if v16i8 is legal and inserts a any_extend to that so that we can concat v16i8 to v32i8 and avoid creating the extracts. llvm-svn: 320674
* [X86] Remove redundant setOperationAction calls.Craig Topper2017-12-141-2/+0
| | | | | | These calls already exist earlier under AVX2 feature. llvm-svn: 320673
* [LV] Support efficient vectorization of an induction with redundant castsDorit Nuzman2017-12-146-25/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | D30041 extended SCEVPredicateRewriter to improve handling of Phi nodes whose update chain involves casts; PSCEV can now build an AddRecurrence for some forms of such phi nodes, under the proper runtime overflow test. This means that we can identify such phi nodes as an induction, and the loop-vectorizer can now vectorize such inductions, however inefficiently. The vectorizer doesn't know that it can ignore the casts, and so it vectorizes them. This patch records the casts in the InductionDescriptor, so that they could be marked to be ignored for cost calculation (we use VecValuesToIgnore for that) and ignored for vectorization/widening/scalarization (i.e. treated as TriviallyDead). In addition to marking all these casts to be ignored, we also need to make sure that each cast is mapped to the right vector value in the vector loop body (be it a widened, vectorized, or scalarized induction). So whenever an induction phi is mapped to a vector value (during vectorization/widening/ scalarization), we also map the respective cast instruction (if exists) to that vector value. (If the phi-update sequence of an induction involves more than one cast, then the above mapping to vector value is relevant only for the last cast of the sequence as we allow only the "last cast" to be used outside the induction update chain itself). This is the last step in addressing PR30654. llvm-svn: 320672
* Fix a build bot failure.Igor Kudrin2017-12-141-1/+1
| | | | llvm-svn: 320671
* [X86][AES]: Adding full coverage of MC encoding for the AES and AVXAES isa ↵Gadi Haber2017-12-144-0/+1016
| | | | | | | | | | | | | | | sets.<NFC> NFC. Adding MC regressions tests to cover the AES and AVXAES ISA sets both 32 and 64 bit. This patch is part of a larger task to cover MC encoding of all X86 ISA Sets. started in revision: https://reviews.llvm.org/D39952 Reviewers: zvi, craig.topper, m_zuckerman, RKSimon Differential Revision: https://reviews.llvm.org/D41154 Change-Id: I2564f9797628d0c070c4766f837f399337fb87d2 llvm-svn: 320670
* [SelectionDAG] When legalizing the result type of CONCAT_VECTORS, take into ↵Craig Topper2017-12-143-328/+245
| | | | | | | | | | account whether the input type also needs to be promoted. If so go ahead and get the promoted input vector to extract from. Previously, we would create a bunch of any_extends of extract_vector_elts with illegal input type that needs to be promoted. The legalization of those extract_vector_elts would then potentially introduce a truncate. So now we have a bunch of any_extends of truncates. By legalizing both parts together we avoid creating these extra nodes. The test changes seem to be because we were previously combining the build_vector with the any_extend before the any_extend got combined with the truncate. llvm-svn: 320669
* [ELF] Prevent crash in writing an .ARM.exidx sentinel entry.Igor Kudrin2017-12-142-9/+39
| | | | | | | | | | | | We might crash in 'ARMExidxSentinelSection::writeTo()' because it expected the sentinel entry to be put in the same 'InputSectionDescription' as the last real entry. This assumption fails if the last output section command for .ARM.exidx is anything but an input section description, because in this case 'OutputSection::addSection()' creates a new 'InputSectionDescription'. Differential Revision: https://reviews.llvm.org/D41105 llvm-svn: 320668
* Fix crash on invalid.Rafael Espindola2017-12-143-1/+10
| | | | | | | We would fail an assert if a shared library had a local symbol after sh_info. llvm-svn: 320667
* MC/AsmPrinter: Reduce code duplication.Matthias Braun2017-12-145-43/+36
| | | | | | | | | | Factor out duplicated code emitting mach-o version-min specifiers. This should be NFC but happens to fix a bug where the code in MCMachoStreamer didn't take the version skew between darwin and macos versions into account. llvm-svn: 320666
* [scudo] Disabling the interface test on armhfKostya Kortchinsky2017-12-141-0/+1
| | | | | | | | | | | | | | | | | | Summary: I will investigate the breakage tomorrow, disable on armhf to turn the bots green over the night. http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/2952/steps/ninja%20check%202/logs/FAIL%3A%20Scudo-armhf%3A%3A%20interface.cpp This is post https://reviews.llvm.org/D41128. Reviewers: alekseyshl Subscribers: aemerson, kristof.beyls, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D41218 llvm-svn: 320665
* [XRay][compiler-rt] Coalesce calls to mprotect to reduce patching overheadDean Michael Berris2017-12-144-137/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change, XRay would conservatively patch sections of the code one sled at a time. Upon testing/profiling, this turns out to take an inordinate amount of time and cycles. For an instrumented clang binary, the cycles spent both in the patching/unpatching routine constituted 4% of the cycles -- this didn't count the time spent in the kernel while performing the mprotect calls in quick succession. With this change, we're coalescing the number of calls to mprotect from being linear to the number of instrumentation points, to now being a lower constant when patching all the sleds through `__xray_patch()` or `__xray_unpatch()`. In the case of calling `__xray_patch_function()` or `__xray_unpatch_function()` we're now doing an mprotect call once for all the sleds for that function (reduction of at least 2x calls to mprotect). Reviewers: kpw, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41153 llvm-svn: 320664
* Set of corrections for MSan/NetBSDKamil Rytarowski2017-12-144-11/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Changes: - Don't attempt to intercept GLIBC specific functions like __strtol_internal. This is required to stop intercepting it as we leak dlerror(3) for dlsym(3) that cannot manage to find a symbol. - Correct interception of fstatat(2). - Don't run a test for fgetgrent_r() that is missing on NetBSD. - Correct link_map location (offset) in Obj_Entry on x86_64 and i386. - Stop intercepting getpshared-like functions in pthread(3). This is feature is not enabled by default on NetBSD as it's unfinished. - Switch intercepting from UTMP to UTMPX functions. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, kcc Reviewed By: vitalybuka Subscribers: llvm-commits, srhines, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41053 llvm-svn: 320663
* [WebAssembly] Update YAML expected output after llvm changeSam Clegg2017-12-149-15/+14
| | | | | | | | See: https://reviews.llvm.org/D41202 Differential Revision: https://reviews.llvm.org/D41210 llvm-svn: 320662
* MC: Add support for mach-o build_versionMatthias Braun2017-12-1413-118/+360
| | | | | | | | LC_BUILD_VERSION is a new load command superseding the previously used LC_XXX_MIN_VERSION commands. This adds an assembler directive along with encoding/streaming support. llvm-svn: 320661
* [asan] Use linker initialization for the allocatorKuba Mracek2017-12-141-3/+3
| | | | | | | | This saves ~2 MB of dirty memory footprint. Can be a big deal on mobile devices especially when running multiple processes with ASan. Differential Revision: https://reviews.llvm.org/D40627 llvm-svn: 320660
* [sanitizer] Use MADV_FREE on Darwin/BSD to release pages to the OSKuba Mracek2017-12-142-1/+7
| | | | | | | | MADV_DONTNEED on Linux actually mark the pages as free to be overwritten with zeroes, but on Darwin and BSD, it's just an advisory flag (the OS cannot discard the content). We should use MADV_FREE on Darwin and BSD. Differential Revision: https://reviews.llvm.org/D40666 llvm-svn: 320659
* [CMake] Pass LLVM_HAVE_LINK_VERSION_SCRIPT to external projectsPetr Hosek2017-12-131-0/+1
| | | | | | | | Some external projects depend on this LLVM CMake variable. Differential Revision: https://reviews.llvm.org/D41205 llvm-svn: 320658
* [cmake] Add support for case-sensitive Windows SDKsShoaib Meenai2017-12-131-12/+77
| | | | | | | | | | When the Windows SDK is hosted on a case-sensitive filesystem (e.g. when compiling on Linux and not using ciopfs), we can automatically generate a VFS overlay for headers and symlinks for libraries. Differential Revision: https://reviews.llvm.org/D41156 llvm-svn: 320657
* [cmake] Support host architectures other than x64Shoaib Meenai2017-12-131-5/+28
| | | | | | | | Allow building for other architectures when cross-compiling for Windows. Differential Revision: https://reviews.llvm.org/D41158 llvm-svn: 320656
* Recommit r320461 "[X86] Use regular expressions more aggressively to reduce ↵Craig Topper2017-12-134-1032/+48
| | | | | | | | | | | | | | the number of scheduler entries needed for FMA3 instructions." I've hopefully sidestepped the MSVC issue that caused it to be reverted. We no longer include the Sched enum from X86GenInstrInfo.inc on the X86 target. So hopefully MSVC's preprocessor will skip over it and nothing will notice the 11000 character enum name. Original commit message: When the scheduler tables are generated by tablegen, the instructions are divided up into groups based on their default scheduling information and how they are referenced by groups for each processor. For any set of instructions that are matched by a specific InstRW line, that group of instructions is guaranteed to not be in a group with any other instructions. So in general, the more InstRW class definitions are created, the more groups we end up with in the generated files. Particularly if a lot of the InstRW lines only match to single instructions, which is true of a large number of the Intel scheduler models. This change alone reduces the number of instructions groups from ~6000 to ~5500. And there's lots more we could do. llvm-svn: 320655
* Move Repl to SectionBase.Rafael Espindola2017-12-134-25/+18
| | | | | | | | | | | | | | | | It is currently in InputSectionBase. Only InputSections are used in ICF, so Repl should be move to InputSection to clear the class hierarchy or, like this patch does, to SectionBase for convenience. The convenience of having it on the base class is that we can just access the replacement without having to first check if it is an InputSection. It is a bit less code and a bit faster as some of this code is very hot. I got up to 1.77% improvement in clang-gdb-index and no regressions according to lnt. llvm-svn: 320654
* [EarlyCSE] recognize swapped variants of abs/nabs as equivalentSanjay Patel2017-12-132-15/+14
| | | | | | | | Extends https://reviews.llvm.org/rL320640 Differential Revision: https://reviews.llvm.org/D41136 llvm-svn: 320653
* Inline a small function.Rui Ueyama2017-12-132-11/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D41204 llvm-svn: 320652
* [X86] Add missing MULX32 schedule testSimon Pilgrim2017-12-131-1/+51
| | | | llvm-svn: 320651
* CodeGen: Fix assertion in machine inst sheduler due to llvm.dbg.valueYaxun Liu2017-12-134-11/+125
| | | | | | | | | | | | | | | | | Two issues were found about machine inst scheduler when compiling ProRender with -g for amdgcn target: GCNScheduleDAGMILive::schedule tries to update LiveIntervals for DBG_VALUE, which it should not since DBG_VALUE is not mapped in LiveIntervals. when DBG_VALUE is the last instruction of MBB, ScheduleDAGInstrs::buildSchedGraph and ScheduleDAGMILive::scheduleMI does not move RPTracker properly, which causes assertion. This patch fixes that. Differential Revision: https://reviews.llvm.org/D41132 llvm-svn: 320650
* [CodeView] Teach clang to emit the .debug$H COFF section.Zachary Turner2017-12-1311-15/+592
| | | | | | | | | | | | | | | Currently this is an LLVM extension to the COFF spec which is experimental and intended to speed up linking. For now it is behind a hidden cl::opt flag, but in the future we can move it to a "real" cc1 flag and have the driver pass it through whenever it is appropriate. The patch to actually make use of this section in lld will come in a followup. Differential Revision: https://reviews.llvm.org/D40917 llvm-svn: 320649
* Recover some overzealously removed includes.Michael Zolotukhin2017-12-135-0/+5
| | | | llvm-svn: 320648
* [EarlyCSE] add tests for swapped abs/nabs; NFCSanjay Patel2017-12-131-0/+38
| | | | llvm-svn: 320647
* Speculative build fix for llvm-pdbdump on Linux after Michael's #include ↵Hans Wennborg2017-12-131-0/+1
| | | | | | removals llvm-svn: 320646
* Speculative build fix for lld on Linux after Michael's #include removalsHans Wennborg2017-12-131-0/+1
| | | | llvm-svn: 320645
* [X86] Add CLWB schedule testSimon Pilgrim2017-12-131-0/+18
| | | | llvm-svn: 320644
* [libFuzzer] Add dummy call of LLVMFuzzerTestOneInput to afl_driver.Matt Morehouse2017-12-131-1/+7
| | | | | | | | | | | | | | | | | | | | Summary: Add dummy call of LLVMFuzzerTestOneInput to afl_driver before it starts executing on actual inputs. Do this so that first time initialization performed by LLVMFuzzerTestOneInput is not considered code covered by a particular input. Patch By: metzman Reviewers: kcc, morehouse Reviewed By: kcc Subscribers: llvm-commits, Sanitizers Differential Revision: https://reviews.llvm.org/D41193 llvm-svn: 320643
* [WebAssembly] Use bitfield types in wasm YAML representationSam Clegg2017-12-1317-53/+90
| | | | | | Differential Revision: https://reviews.llvm.org/D41202 llvm-svn: 320642
* Reverting [JumpThreading] Preservation of DT and LVI across the passBrian M. Rzycki2017-12-1312-893/+99
| | | | | | | Stage 2 bootstrap failed: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/14434 llvm-svn: 320641
* [EarlyCSE] recognize commuted and swapped variants of min/max as equivalent ↵Sanjay Patel2017-12-132-22/+54
| | | | | | | | | | | | | (PR35642) As shown in: https://bugs.llvm.org/show_bug.cgi?id=35642 ...we can have different forms of min/max, so we should recognize those here in EarlyCSE similar to how we already handle binops and compares that can commute. Differential Revision: https://reviews.llvm.org/D41136 llvm-svn: 320640
* [WebAssembly] Add linking metatdata test coverage for wasm2yamlSam Clegg2017-12-133-2/+60
| | | | | | | | Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish Differential Revision: https://reviews.llvm.org/D41196 llvm-svn: 320639
* IRGen: When performing CFI checks, load vtable pointer from vbase when ↵Peter Collingbourne2017-12-137-12/+103
| | | | | | | | | | | | | | necessary. Under the Microsoft ABI, it is possible for an object not to have a virtual table pointer of its own if all of its virtual functions were introduced by virtual bases. In that case, we need to load the vtable pointer from one of the virtual bases and perform the type check using its type. Differential Revision: https://reviews.llvm.org/D41036 llvm-svn: 320638
* [X86] Move ADX schedule tests out of schedule-x86_64.llSimon Pilgrim2017-12-132-208/+114
| | | | llvm-svn: 320637
* Remove redundant includes from lib/Target/X86.Michael Zolotukhin2017-12-1312-31/+0
| | | | llvm-svn: 320636
* Remove redundant includes from lib/Target/ARM.Michael Zolotukhin2017-12-138-17/+0
| | | | llvm-svn: 320635
* Remove redundant includes from lib/Target/AArch64.Michael Zolotukhin2017-12-137-13/+0
| | | | llvm-svn: 320634
* Remove redundant includes from lib/Target/*.cpp.Michael Zolotukhin2017-12-133-5/+0
| | | | llvm-svn: 320633
* Remove redundant includes from utils/TableGen.Michael Zolotukhin2017-12-136-7/+0
| | | | llvm-svn: 320632
* Remove redundant includes from tools.Michael Zolotukhin2017-12-1345-141/+0
| | | | llvm-svn: 320631
OpenPOWER on IntegriCloud