summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: Handle missed case of block removal during BlockPlacement.Kyle Butt2016-10-271-4/+10
| | | | | | | | | There is a use after free bug in the existing code. Loop layout selects a preferred exit block, and then lays out the loop. If this block is removed during layout, it needs to be invalidated to prevent a use after free. llvm-svn: 285348
* Define ~DIHelper::DIHelper() in .cpp.Rui Ueyama2016-10-272-1/+5
| | | | llvm-svn: 285347
* [PATCH] D25483: [libcxx] [test] Fix non-Standard assumptions about how many ↵Stephan T. Lavavej2016-10-2712-16/+31
| | | | | | elements are allocated llvm-svn: 285346
* [InstCombine] fix foldSPFofSPF() to handle vector splatsSanjay Patel2016-10-272-30/+24
| | | | llvm-svn: 285345
* [libFuzzer] docs: update the examplesKostya Serebryany2016-10-271-30/+30
| | | | llvm-svn: 285344
* [asan] Test jumps which bypass variables declarationVitaly Buka2016-10-271-0/+73
| | | | | | | | | | | | | | | Summary: Clang should not generate lifetime intrinsics for such variables. D24693 PR28267 Reviewers: eugenis Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D24696 llvm-svn: 285343
* Another additional error check for invalid Mach-O files for theKevin Enderby2016-10-2712-0/+75
| | | | | | | | | | | | | | | | | | | | | | obsolete load commands. Again the philosophy of the error checking in libObject for Mach-O files, the idea behind the checking is that we never will return a Mach-O file out of libObject that contains unknown things the library code can’t operate on. So known obsolete load commands will cause a hard error. Also to make things clear I have added comments to the values and structures in Support/Mach-O.h and Support/MachO.def as to what is obsolete. As noted in a TODO in the code, there may need to be a non-default mode to allow some unknown values for well structured Mach-O files with things like unknown load load commands. So things like using an old lldb on a newer Mach-O file could still provide some limited functionality. llvm-svn: 285342
* Add documentation describing the components of a complete toolchain ↵Richard Smith2016-10-273-0/+359
| | | | | | including Clang. llvm-svn: 285341
* [InstCombine] add vector tests for foldSPFofSPF to show missing foldsSanjay Patel2016-10-271-0/+33
| | | | llvm-svn: 285340
* [libFuzzer] docs: separate section for fuzz targetKostya Serebryany2016-10-271-4/+23
| | | | llvm-svn: 285339
* AMDGPU/SI: Handle s_setreg hazard in GCNHazardRecognizerTom Stellard2016-10-273-49/+113
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25528 llvm-svn: 285338
* [libFuzzer] remove large examples from the libFuzzer docs and link to the ↵Kostya Serebryany2016-10-272-163/+6
| | | | | | libFuzzer tutorial instead; also fix a build error in another file llvm-svn: 285337
* [InstCombine] auto-generate checks for min/max testsSanjay Patel2016-10-271-28/+40
| | | | llvm-svn: 285336
* [PPC] Adding the removed testcase againEhsan Amiri2016-10-271-0/+71
| | | | | | | | | | | | | | This testcase was originally part of r284995, but I put it in a wrong directory. So I removed it. Before adding it back I did some small enhancements. Also I changed the assertions a little bit, to take into account the impact of some changes performed since code review is done. This is similar to changes done for another testcase in the original commit. See: https://reviews.llvm.org/D23614#577749 Basically for instead of vxor we now generate xxlxor in some cases, which is better. llvm-svn: 285333
* Add support for "type lookup" to find C and C++ typesEnrico Granata2016-10-275-4/+104
| | | | | | | | This is an important first step in closing the functionality gap between "type lookup" and "images lookup -t" rdar://28971388 llvm-svn: 285332
* [coroutines] Add diagnostics for copy/move assignment operators and ↵Eric Fiselier2016-10-273-59/+104
| | | | | | | | | | | | | | functions with deduced return types. Summary: The title says it all. Additionally this patch refactors the diagnostic code into a separate function. Reviewers: GorNishanov, rsmith Subscribers: majnemer, mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D25292 llvm-svn: 285331
* [LoopUnroll] Check partial unrolling is enabled before initialization. NFC.Haicheng Wu2016-10-271-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D23891 llvm-svn: 285330
* [X86][AVX512] Fix MUL v8i64 costs on non-AVX512DQ targetsSimon Pilgrim2016-10-272-2/+3
| | | | llvm-svn: 285329
* Use -fopenmp=libomp in all OpenMP offloading tests.Samuel Antao2016-10-271-24/+20
| | | | | | This will make sure the right features are being tested even for machines that default to libgomp. llvm-svn: 285327
* [Driver][OpenMP] Add support to create jobs for unbundling actions.Samuel Antao2016-10-2711-61/+316
| | | | | | | | | | | | | | | | | | | Summary: This patch adds the support to create jobs for the `OffloadBundlingAction` which will invoke the `clang-offload-bundler` tool to unbundle input files. Unlike other actions, unbundling actions have multiple outputs. Therefore, this patch adds the required changes to have a variant of `Tool::ConstructJob` with multiple outputs. The way the naming of the results is implemented is also slightly modified so that the same action can use a different offloading prefix for each use by the different offloading actions. With this patch, it is possible to compile a functional OpenMP binary with offloading support, even with separate compilation. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: mkuron, whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21857 llvm-svn: 285326
* [Driver][OpenMP] Add support to create jobs for bundling actions.Samuel Antao2016-10-277-2/+141
| | | | | | | | | | | | Summary: This patch adds the support to create a job for the `OffloadBundlingAction` which will invoke the `clang-offload-bundler` tool. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21856 llvm-svn: 285325
* [Driver][OpenMP] Update actions builder to create unbundling action when ↵Samuel Antao2016-10-277-2/+150
| | | | | | | | | | | | | | | | | necessary. Summary: Each time that offloading support is requested by the user and the input file is not a source file, an action `OffloadUnbundlingAction` is created to signal that the input file may contain bundles, so that the proper tool is then invoked to attempt to extract the components of the bundle. This patch adds the logic to create that action in offload action builder. The job creation for the new action will be proposed in a separate patch. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21853 llvm-svn: 285324
* [Driver][OpenMP] Update actions builder to create bundling action when ↵Samuel Antao2016-10-275-5/+119
| | | | | | | | | | | | | | | | | necessary. Summary: In order to save the user from dealing with multiple output files (for host and device) while using separate compilation, a new action `OffloadBundlingAction` is used when the last phase is not linking. This action will then result in a job that uses the proposed bundling tool to create a single preprocessed/IR/ASM/Object file from multiple ones. The job creation for the new action will be proposed in a separate patch. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21852 llvm-svn: 285323
* Don't create a dummy ELF to process a binary file.Rafael Espindola2016-10-2711-247/+73
| | | | | | | Now that it is easy to create input section and symbols, this is simple. llvm-svn: 285322
* Fix build breakage on buildbots that was due to 285309.Greg Clayton2016-10-271-3/+4
| | | | llvm-svn: 285321
* [Driver][OpenMP] Add logic for offloading-specific argument translation.Samuel Antao2016-10-278-37/+114
| | | | | | | | | | | | | | | Summary: This patch includes support for argument translation that is specific of a given offloading kind. Additionally, it implements the translation for OpenMP device kinds in the gcc tool chain. With this patch, it is possible to compile a functional OpenMP application with offloading capabilities with no separate compilation. Reviewers: echristo, tra, jlebar, rsmith, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21848 llvm-svn: 285320
* [Driver][OpenMP] Build jobs for OpenMP offloading actions for targets using ↵Samuel Antao2016-10-274-34/+313
| | | | | | | | | | | | | | | | | gcc tool chains. Summary: This patch adds logic to create jobs for OpenMP offloading actions by: - tuning the jobs result information to use the offloading prefix even for (device) linking actions. - replacing the device inputs of the host linking jobs by a linker script that embed them in the right sections. Reviewers: echristo, tra, jlebar, rsmith, ABataev, hfinkel Subscribers: mkuron, whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21847 llvm-svn: 285319
* [InstCombine] handle simple vector integer constants in IsFreeToInvertSanjay Patel2016-10-272-8/+42
| | | | llvm-svn: 285318
* Be less aggressive at relaxing got access in this case.Rafael Espindola2016-10-272-2/+22
| | | | | | | | This fixes pr30803 by not relaxing that particular access. We could also let adjustRelaxExpr know that the target is absolute so that it uses R_RELAX_GOT_PC_NOPIC, but it is not clear if it is worth it. llvm-svn: 285317
* [CodeGen] Provide an appropriate alignment for dynamic allocasDavid Majnemer2016-10-272-2/+8
| | | | | | | | | | | | | | GCC documents __builtin_alloca as aligning the storage to at least __BIGGEST_ALIGNMENT__. MSVC documents essentially the same for the x64 ABI: https://msdn.microsoft.com/en-us/library/x9sx5da1.aspx The 32-bit ABI follows the same rule: it emits a call to _alloca_probe_16 Differential Revision: https://reviews.llvm.org/D24378 llvm-svn: 285316
* [MS ABI] Reuse getVFPtrOffsets instead of using getClassAtVTableLocationDavid Majnemer2016-10-271-40/+16
| | | | | | | | | | | | getClassAtVTableLocation hunts through virtual bases without using the MDC layout which is indicative of a bug. Instead, reuse the getVFPtrOffsets machinery to calculate which subobject within the MDC is responsible for the vfptr. Differential Revision: https://reviews.llvm.org/D25895 llvm-svn: 285315
* [Driver][OpenMP] Add specialized action builder for OpenMP offloading actions.Samuel Antao2016-10-272-6/+261
| | | | | | | | | | | | | | | | | Summary: This patch adds a new specialized action builder to create OpenMP offloading actions. The specialized builder is added to the action builder already containing the CUDA specialized builder. OpenMP offloading dependences between host and device actions (expressed with OffloadActions) are different that what is used for CUDA: - Device compile action depends on the host compile action - the device frontend extracts the information about the declarations that have to be emitted by looking into the metadata produced by the host frontend. - The host link action depends on the device link actions - the device images are embedded in the host binary at link time. Reviewers: echristo, tra, rsmith, jlebar, ABataev, hfinkel Subscribers: mkuron, whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21845 llvm-svn: 285314
* [X86][AVX512DQ] Move v2i64 and v4i64 MUL lowering to tablegenSimon Pilgrim2016-10-272-23/+21
| | | | | | As suggested by @igorb on D26011 llvm-svn: 285313
* ARM: ensure that the Windows DBZ check is in rangeSaleem Abdulrasool2016-10-275-44/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows ARM target expects the compiler to emit a division-by-zero check. The check would use the form of: cmp r?, #0 cbz .Ltrap b .Lbody .Lbody: ... .Ltrap: udf #249 @ __brkdiv0 This works great most of the time. However, if the body of the function is greater than 127 bytes, the branch target limitation of cbz becomes an issue. This occurs in the unoptimized code generation cases sometimes (like in compiler-rt). Since this is a matter of correctness, possibly pay a small penalty instead. We now form this slightly differently: cbnz .Lbody udf #249 @ __brkdiv0 .Lbody: ... The positive case is through the branch instead of being the next instruction. However, because of the basic block layout, the negated branch is going to be a short distance always (2 bytes away, after the inserted __brkdiv0). The new t__brkdiv0 instruction is required to explicitly mark the instruction as a terminator as the generic UDF instruction is not a terminator. Addresses PR30532! llvm-svn: 285312
* [Driver][OpenMP] Create tool chains for OpenMP offloading kind.Samuel Antao2016-10-277-67/+167
| | | | | | | | | | | | Summary: This patch adds new logic to create the necessary tool chains to support offloading for OpenMP. The OpenMP related options are checked and the tool chains created accordingly. Diagnostics are emitted in case the options are illegal or express unknown targets. Reviewers: echristo, tra, jlebar, rsmith, ABataev, hfinkel Subscribers: whchung, mkuron, mehdi_amini, cfe-commits, Hahnfeld, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21843 llvm-svn: 285311
* Expand -Wlogical-not-parentheses to also fire on `!x & A`.Nico Weber2016-10-274-17/+67
| | | | | | | | | | | | | This is a misspelling of the intended !(x & A) negated bit test that happens in practice every now and then. I ran this on Chromium and all its dependencies, and it fired 0 times -- no false or true positives, but it would've caught a bug in an in-progress change that had to be caught by a Visual Studio warning instead. https://reviews.llvm.org/D26035 llvm-svn: 285310
* Switch all DWARF variables for tags, attributes and forms over to use the ↵Greg Clayton2016-10-2712-67/+87
| | | | | | | | llvm::dwarf enumerations instead of using raw uint16_t values. This allows easier debugging as users can see the values of the enumerations in the variables view that will show the enumeration string instead of just a number. https://reviews.llvm.org/D26013 llvm-svn: 285309
* Add Loop Sink pass to reverse the LICM based of basic block frequency.Dehao Chen2016-10-2710-14/+703
| | | | | | | | | | | | Summary: LICM may hoist instructions to preheader speculatively. Before code generation, we need to sink down the hoisted instructions inside to loop if it's beneficial. This pass is a reverse of LICM: looking at instructions in preheader and sinks the instruction to basic blocks inside the loop body if basic block frequency is smaller than the preheader frequency. Reviewers: hfinkel, davidxl, chandlerc Subscribers: anna, modocache, mgorny, beanz, reames, dberlin, chandlerc, mcrosier, junbuml, sanjoy, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D22778 llvm-svn: 285308
* [Driver][CUDA][OpenMP] Reimplement tool selection in the driver.Samuel Antao2016-10-272-126/+287
| | | | | | | | | | | | | | | | | Summary: This creates a tool selector in the driver that replaces the existing one. The goal is to better organize the code and make the selector easier to scale, in particular in the presence of offload actions that can be collapsed. The current implementation became more confusing when the support for offloading actions was added. This concern was expressed by Eric in http://reviews.llvm.org/D9888. This patch does not add new testing, it preserves the existing functionality. Reviewers: echristo, tra, jlebar, rsmith, ABataev, hfinkel Subscribers: whchung, guansong, mkuron, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, caomhin, arpith-jacob, carlo.bertolli Differential Revision: https://reviews.llvm.org/D21840 llvm-svn: 285307
* [coroutines] Add allocation and deallocation substatements.Gor Nishanov2016-10-276-15/+289
| | | | | | | | | | | | | | Summary: SemaCoroutine: Add allocation / deallocation substatements. CGCoroutine/Test: Emit allocation and deallocation + test. Reviewers: rsmith Subscribers: ABataev, EricWF, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25879 llvm-svn: 285306
* [mips] Do not allow -opt-bisect-limit to skip the PIC call optimization pass.Vasileios Kalintiris2016-10-272-3/+14
| | | | | | | | | | | | | | r282428 added the MipsOptimizePICCall as an opt-in pass that can be skipped when using the -opt-bisect-limit option. However, this pass is needed because it generates code that conforms to the o32 ABI specification by using the $t9 register for PIC calls with JALR instructions. This bug was exposed by the fact that skipFunction() also checks for the "optnone" attribute. This caused functions with that attribute to break the requirements of the o32 ABI. llvm-svn: 285305
* [X86][AVX512DQ] Improve lowering of MUL v2i64 and v4i64Simon Pilgrim2016-10-274-22/+53
| | | | | | | | | | With DQI but without VLX, lower v2i64 and v4i64 MUL operations with v8i64 MUL (vpmullq). Updated cost table accordingly. Differential Revision: https://reviews.llvm.org/D26011 llvm-svn: 285304
* [ValueTracking] fix matchSelectPattern to allow vector splat folds of ↵Sanjay Patel2016-10-274-32/+13
| | | | | | min/max/abs/nabs llvm-svn: 285303
* Remove duplicated default move ctors/move assign. No functional change.Benjamin Kramer2016-10-272-22/+2
| | | | llvm-svn: 285302
* Attempt to make clang-format.py python 3 - compatible.Alexander Kornienko2016-10-271-1/+1
| | | | llvm-svn: 285301
* Move 'quoted' for string_view from <string_view> to <iomanip> (where the ↵Marshall Clow2016-10-272-12/+9
| | | | | | other versions of 'quoted' live. No functional change. llvm-svn: 285300
* [InstCombine] add tests for missing folds of vector abs/nabs/min/maxSanjay Patel2016-10-274-4/+102
| | | | llvm-svn: 285299
* Fix memory issue in AttrBuilder::removeAttribute uses.Bjorn Pettersson2016-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Found when running Valgrind. This removes two unnecessary assignments when using AttrBuilder::removeAttribute. AttrBuilder::removeAttribute returns a reference to the object. As the LHSes were the same as the callees, the assignments resulted in memcpy calls where dst = src. Commited on behalf-of: dstenb (David Stenberg) Reviewers: mkuper, rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25460 llvm-svn: 285298
* [Hexagon] Do not expand ISD::SELECT for HVX vectorsKrzysztof Parzyszek2016-10-273-16/+88
| | | | llvm-svn: 285297
* [DAGCombiner] Add vector demanded elements support to computeKnownBitsSimon Pilgrim2016-10-274-59/+137
| | | | | | | | | | | | | | | | Currently computeKnownBits returns the common known zero/one bits for all elements of vector data, when we may only be interested in one/some of the elements. This patch adds a DemandedElts argument that allows us to specify the elements we actually care about. The original computeKnownBits implementation calls with a DemandedElts demanding all elements to match current behaviour. Scalar types set this to 1. The approach was found to be easier than trying to add a per-element known bits solution, for a similar usefulness given the combines where computeKnownBits is typically used. I've only added support for a few opcodes so far (the ones that have proven straightforward to test), all others will default to demanding all elements but can be updated in due course. DemandedElts support could similarly be added to computeKnownBitsForTargetNode in a future commit. Differential Revision: https://reviews.llvm.org/D25691 llvm-svn: 285296
OpenPOWER on IntegriCloud