summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Specify the namespace in llvm::make_unique to fix the windows buildJustin Bogner2017-09-011-1/+1
| | | | llvm-svn: 312341
* [WebAssembly] Fix getSymbolValue for exported globalsSam Clegg2017-09-014-8/+21
| | | | | | | | | | | | The code wasn't previously taking into account that the global index space is not same as the into in the Globals array since the latter does not include imported globals. This fixes the WebAssembly waterfall failures. Differential Revision: https://reviews.llvm.org/D37384 llvm-svn: 312340
* [libFuzzer] Enable 8-bit counters test on macOSGeorge Karpenkov2017-09-011-1/+0
| | | | llvm-svn: 312339
* llvm-isel-fuzzer: Make buildable and testable without libFuzzerJustin Bogner2017-09-013-3/+64
| | | | | | | | | | | | | | This adds a dummy main so we can build and run the llvm-isel-fuzzer functionality when we aren't building LLVM with coverage. The approach here should serve as a template to stop in-tree fuzzers from bitrotting (See llvm.org/pr34314). Note that I'll probably move most of the logic in DummyISelFuzzer's `main` to a library so it's easy to reuse it in other fuzz targets, but I'm planning on doing that in a follow up that also consolidates argument handling in our LLVMFuzzerInitialize implementations. llvm-svn: 312338
* AMDGPU: IMPLICIT_DEFs and DBG_VALUEs do not contribute to wait statesNicolai Haehnle2017-09-012-4/+40
| | | | | | | | | | | | | | | Summary: This fixes a bug that was exposed on gfx9 in various GL45-CTS.shaders.loops.*_iterations.select_iteration_count_fragment tests, e.g. GL45-CTS.shaders.loops.do_while_uniform_iterations.select_iteration_count_fragment Reviewers: arsenm Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D36193 llvm-svn: 312337
* std::function -> llvm::function_ref. NFC.Benjamin Kramer2017-09-014-9/+12
| | | | llvm-svn: 312336
* [X86] Add test case I forgot to commit with r312285.Craig Topper2017-09-011-0/+49
| | | | llvm-svn: 312335
* ModuleSummaryAnalysis: Correctly handle refs from function inline asm to ↵Peter Collingbourne2017-09-012-54/+72
| | | | | | | | | | | | | module inline asm. If a function contains inline asm and the module-level inline asm contains the definition of a local symbol, prevent the function from being imported in case the function-level inline asm refers to a symbol in the module-level inline asm. Differential Revision: https://reviews.llvm.org/D37370 llvm-svn: 312332
* [LoopVectorizer] Use two step casting for float to pointer types.Manoj Gupta2017-09-013-3/+172
| | | | | | | | | | | | | | | | | | | | Summary: LoopVectorizer is creating casts between vec<ptr> and vec<float> types on ARM when compiling OpenCV. Since, tIs is illegal to directly cast a floating point type to a pointer type even if the types have same size causing a crash. Fix the crash using a two-step casting by bitcasting to integer and integer to pointer/float. Fixes PR33804. Reviewers: mkuper, Ayal, dlj, rengolin, srhines Reviewed By: rengolin Subscribers: aemerson, kristof.beyls, mkazantsev, Meinersbur, rengolin, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D35498 llvm-svn: 312331
* Driver: extract modules flag handling (NFC)Saleem Abdulrasool2017-09-011-157/+162
| | | | | | | Extract a function to render the options related to modules. This reduces the cyclomatic complexity of the `ConstructJob` function. NFC. llvm-svn: 312330
* [SCEV] Add URem support to SCEVAlexandre Isoard2017-09-014-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In LLVM IR the following code: %r = urem <ty> %t, %b is equivalent to %q = udiv <ty> %t, %b %s = mul <ty> nuw %q, %b %r = sub <ty> nuw %t, %q ; (t / b) * b + (t % b) = t As UDiv, Mul and Sub are already supported by SCEV, URem can be implemented with minimal effort using that relation: %r --> (-%b * (%t /u %b)) + %t We implement two special cases: - if %b is 1, the result is always 0 - if %b is a power-of-two, we produce a zext/trunc based expression instead That is, the following code: %r = urem i32 %t, 65536 Produces: %r --> (zext i16 (trunc i32 %a to i16) to i32) Note that while this helps get a tighter bound on the range analysis and the known-bits analysis, this exposes some normalization shortcoming of SCEVs: %div = udim i32 %a, 65536 %mul = mul i32 %div, 65536 %rem = urem i32 %a, 65536 %add = add i32 %mul, %rem Will usually not be reduced. llvm-svn: 312329
* Re-enable "[MachineCopyPropagation] Extend pass to do COPY source forwarding"Geoff Berry2017-09-0178-343/+889
| | | | | | | | | | | | | | | | | | | | | | | | | | | Issues addressed since original review: - Moved removal of dead instructions found by LiveIntervals::shrinkToUses() outside of loop iterating over instructions to avoid instructions being deleted while pointed to by iterator. - Fixed ARMLoadStoreOptimizer bug exposed by this change in r311907. - The pass no longer forwards COPYs to physical register uses, since doing so can break code that implicitly relies on the physical register number of the use. - The pass no longer forwards COPYs to undef uses, since doing so can break the machine verifier by creating LiveRanges that don't end on a use (since the undef operand is not considered a use). [MachineCopyPropagation] Extend pass to do COPY source forwarding This change extends MachineCopyPropagation to do COPY source forwarding. This change also extends the MachineCopyPropagation pass to be able to be run during register allocation, after physical registers have been assigned, but before the virtual registers have been re-written, which allows it to remove virtual register COPY LiveIntervals that become dead through the forwarding of all of their uses. llvm-svn: 312328
* [ELF] - Never call splitIntoPieces() twice. NFC.George Rimar2017-09-012-1/+1
| | | | | | | | Previously it was called twice for .comment synthetic section. That created 2 pieces of data, which was deduplicated anyways, but was not clean. llvm-svn: 312327
* [MergeICmps] Fix build of rL312315 on clang-with-thin-lto-windows:Clement Courbet2017-09-011-2/+4
| | | | | | | | | | | | | | MergeICmps.cpp(68,15): error: chosen constructor is explicit in copy-initialization return {}; APInt.h(339,12): note: explicit constructor declared here explicit APInt() : BitWidth(1) { U.VAL = 0; } ^ MergeICmps.cpp(56,9): note: in implicit initialization of field 'Offset' with omitted initializer APInt Offset; ^ llvm-svn: 312326
* Adding missing test case in rL312318Strahinja Petrovic2017-09-011-0/+65
| | | | | | | | | Adding test for debug info for integer variables whose type is shrinked to bool. Patch by Nikola Prica. llvm-svn: 312325
* Fix Memory Access of failing tests.Michael Kruse2017-09-014-2/+111
| | | | | | | | | | | Mark scalar dependences for different statements belonging to same BB as 'Inter'. Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in> Differential Revision: https://reviews.llvm.org/D37147 llvm-svn: 312324
* [ARM] GlobalISel: Support ROPI global variablesDiana Picus2017-09-014-5/+212
| | | | | | | In the ROPI relocation model, read-only variables are accessed relative to the PC. We use the (MOV|LDRLIT)_ga_pcrel pseudoinstructions for this. llvm-svn: 312323
* Reland rL312315: [MergeICmps] MergeICmps is a new optimization pass that ↵Clement Courbet2017-09-0110-0/+853
| | | | | | | | | | turns chains of integer Add missing header. This reverts commit 86dd6335cf7607af22f383a9a8e072ba929848cf. llvm-svn: 312322
* [ARM] Add 2-operand assembly aliases for Thumb1 ADD/SUBOliver Stannard2017-09-013-3/+79
| | | | | | | | | | | | | | | | This adds 2-operand assembly aliases for these instructions: add r0, r1 => add r0, r0, r1 sub r0, r1 => sub r0, r0, r1 Previously this syntax was only accepted for Thumb2 targets, where the wide versions of the instructions were used. This patch allows the 2-operand syntax to be used for Thumb1 targets, and selects the narrow encoding when it is used for Thumb2 targets. Differential revision: https://reviews.llvm.org/D37377 llvm-svn: 312321
* Move static helper into ARMTargetLowering. NFCDiana Picus2017-09-012-1/+3
| | | | | | | This exposes the isReadOnly(GlobalValue *) in the ARMTargetLowering so we can make use of it in GlobalISel as well. llvm-svn: 312320
* [ARM] GlobalISel: More tests. NFC.Diana Picus2017-09-012-2/+116
| | | | | | | | Test constants as well in the PIC tests. These are also represented as G_GLOBAL_VALUE, and although they are treated just like other globals for PIC, they won't be for ROPI, so it's good to have this coverage. llvm-svn: 312319
* Debug info for variables whose type is shrinked to boolStrahinja Petrovic2017-09-013-1/+39
| | | | | | | | | | | | | This patch provides such debug information for integer variables whose type is shrinked to bool by providing dwarf expression which returns either constant initial value or other value. Patch by Nikola Prica. Differential Revision: https://reviews.llvm.org/D35994 llvm-svn: 312318
* Revert "[MergeICmps] MergeICmps is a new optimization pass that turns chains ↵Clement Courbet2017-09-0110-849/+0
| | | | | | | | | | of integer" Break build This reverts commit d07ab866f7f88f81e49046d691a80dcd32d7198b. llvm-svn: 312317
* [refactor] Use a RefactoringResultConsumer instead of tagged refactoringAlex Lorenz2017-09-015-86/+129
| | | | | | | | | | | | | rule classes This commit changes the way that the refactoring results are produced. Instead of using different `RefactoringActionRule` subclasses for each result type, Clang now use a single `RefactoringResultConsumer`. This was suggested by Manuel in https://reviews.llvm.org/D36075. Differential Revision: https://reviews.llvm.org/D37291 llvm-svn: 312316
* [MergeICmps] MergeICmps is a new optimization pass that turns chains of integerClement Courbet2017-09-0110-0/+849
| | | | | | | | | | | | | | | | | comparisons into memcmp. Thanks to recent improvements in the LLVM codegen, the memcmp is typically inlined as a chain of efficient hardware comparisons. This typically benefits C++ member or nonmember operator==(). For now this is disabled by default until: - https://bugs.llvm.org/show_bug.cgi?id=33329 is complete - Benchmarks show that this is always useful. Differential Revision: https://reviews.llvm.org/D33987 llvm-svn: 312315
* [AVX512] Suppress duplicate register only FMA patterns.Craig Topper2017-09-011-30/+40
| | | | | | | | Previously we generated a register only pattern for each of the 3 instruction forms, but they are all identical as far as isel is concerned. So drop the others and just keep the 213 version. This removes 2968 bytes from the isel table. llvm-svn: 312313
* [X86] Remove unused multiclass.Craig Topper2017-09-011-17/+0
| | | | llvm-svn: 312312
* [X86] Simplify some multiclasses by inheriting from similar ones. NFCCraig Topper2017-09-011-17/+9
| | | | llvm-svn: 312311
* [X86] Add a couple TODOs to the PMADD52 instrucions about missing commuting ↵Craig Topper2017-09-011-0/+3
| | | | | | opportunities. llvm-svn: 312310
* [X86] Add isel patterns for memory forms of FMA3 intrinsic instructionsCraig Topper2017-09-012-48/+65
| | | | llvm-svn: 312309
* [X86] Remove unnecessary COPY_TO_REGCLASS(VR128) from the output patterns ↵Craig Topper2017-09-011-4/+4
| | | | | | | | for FMA instrinsics. The instructions are already defined as writing a VR128 register. llvm-svn: 312308
* Run GVN during the cleanupRoman Gareev2017-09-011-0/+1
| | | | | | | | | | | | | Currently, GVN can be necessary to eliminate redundant instructions in case of, for instance, GEMM and float type. This patch makes GVN be run during the cleanup. Reviewed-by: Tobias Grosser <tobias@grosser.es>, Michael Kruse <llvm@meinersbur.de> Differential Revision: https://reviews.llvm.org/D37340 llvm-svn: 312307
* Reland r312224 - [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI ↵Martin Storsjo2017-09-013-10/+15
| | | | | | | | | | | | | | | | | data on MinGW This fixes cases where dynamic classes produced RTTI data with external linkage, producing linker errors about duplicate symbols. This touches code close to what was changed in SVN r244266, but this change doesn't break the tests added in that revision. The previous version had missed to update CodeGenCXX/virt-dtor-key.cpp, which had a behaviour change only when running the testsuite on windows. Differential revision: https://reviews.llvm.org/D37327 llvm-svn: 312306
* [ELF] Generate symbol assignments for predefined symbolsPetr Hosek2017-09-013-37/+88
| | | | | | | | | | | | | | | | | | | The problem with symbol assignments in implicit linker scripts is that they can refer synthetic symbols such as _end, _etext or _edata. The value of these symbols is currently fixed only after all linker script commands are processed, so these assignments will be using non-final and hence invalid value. Rather than fixing the symbol values after all command processing have finished, we instead change the logic to generate symbol assignment commands that set the value of these symbols while processing the commands, this ensures that the value is going to be correct by the time any reference to these symbol is processed and is equivalent to defining these symbols explicitly in linker script as BFD ld does. Differential Revision: https://reviews.llvm.org/D36986 llvm-svn: 312305
* Drop unused statistic counterTobias Grosser2017-09-011-1/+0
| | | | llvm-svn: 312304
* Fix check-llvm on kernel 4.9+ with asan or msanVitaly Buka2017-09-011-4/+10
| | | | | | | | | | | | | | Summary: Before https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.9.46&id=84638335900f1995495838fe1bd4870c43ec1f67 test worked because memory allocated with mmap was not counted against RLIMIT_DATA. Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37366 llvm-svn: 312303
* [CMake] Add more runtime configurations.Leo Li2017-09-011-0/+1
| | | | | | | | | | | | | | | Summary: - `project` is required when `runtime/CMakeList.txt` is the top-level `CMakeList.txt` file. This will establish version and policy settings. - `-D_FILE_OFFSET_BITS=64` should never be set for Android runtimes. Reviewers: srhines, pirama, beanz Subscribers: llvm-commits, srhines, mgorny Differential Revision: https://reviews.llvm.org/D35648 llvm-svn: 312302
* AMDGPU: Fold clamp modifier for packed instructionsMatt Arsenault2017-08-317-35/+260
| | | | llvm-svn: 312297
* [OPENMP] Fix the test, NFC.Alexey Bataev2017-08-311-1/+1
| | | | llvm-svn: 312296
* Revert "[ubsan] Make check-ubsan depend on check-ubsan-minimal."Evgeniy Stepanov2017-08-311-4/+0
| | | | | | | | | Breaks buildbot with CMake Error at projects/compiler-rt/test/CMakeLists.txt:76 (add_dependencies): The dependency target "check-ubsan-minimal" of target "check-ubsan" does not exist. llvm-svn: 312295
* [WebAssembly] Fix getSymbolValue() for data symbolsSam Clegg2017-08-315-5/+10
| | | | | | | | | | This is mostly a fix for the output of `llvm-nm` See Bug 34392: https://bugs.llvm.org//show_bug.cgi?id=34392 Differential Revision: https://reviews.llvm.org/D37359 llvm-svn: 312294
* [OPENMP] Fix for PR34398: assert with random access iterator if theAlexey Bataev2017-08-3122-22/+34
| | | | | | | | | | | | step>1. If the loop is a loot with random access iterators and the iteration construct is represented it += n, then the compiler crashed because of reusing of the same MaterializedTemporaryExpr around N. Patch fixes it by using the expression as written, without any special kind of wrappings. llvm-svn: 312292
* [ubsan] Make check-ubsan depend on check-ubsan-minimal.Evgeniy Stepanov2017-08-311-0/+4
| | | | | | | | | | | | Summary: This way we don't need to add check-ubsan-minimal steps to all the bots. Reviewers: vitalybuka Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D37350 llvm-svn: 312291
* [IR] Missing changes for r312289 (NFC).Eugene Zelenko2017-08-312-9/+16
| | | | llvm-svn: 312290
* [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-08-3111-172/+345
| | | | | | warnings; other minor fixes. Also affected in files (NFC). llvm-svn: 312289
* [lit] Fix some issues with short paths in test discovery introduced in r312254Reid Kleckner2017-08-312-1/+8
| | | | llvm-svn: 312288
* [WebAssembly] Refactor load ISel tablegen patterns into classesDerek Schuff2017-08-313-332/+217
| | | | | | | | | Not all of these will be able to be used by atomics because tablegen, but it still seems like a good change by itself. Differential Revision: https://reviews.llvm.org/D37345 llvm-svn: 312287
* [WebAssembly] Validate exports when parsing object filesSam Clegg2017-08-316-0/+75
| | | | | | | | Subscribers: jfb, dschuff, jgravelle-google, aheejin Differential Revision: https://reviews.llvm.org/D37358 llvm-svn: 312286
* [X86] Don't pull carry through X86ISD::ADD carryin, -1 if we can't guranteed ↵Craig Topper2017-08-311-22/+45
| | | | | | | | | | | | | | | | we're really using the carry flag from the add. Prior to this patch we had a DAG combine that tried to bypass an X86ISD::ADD with -1 being added to the carry flag of some previous operation. We would then pass the carry flag directly to user. But this is only safe if the user is looking for the carry flag and not the zero flag. So we need to only do this combine in a context where we know what flag the consumer is using. Fixes PR34381. Differential Revision: https://reviews.llvm.org/D37317 llvm-svn: 312285
* [llvm-nm] Fix output formatting of -f sysv for 64bit targetsSam Clegg2017-08-314-3/+26
| | | | | | Differential Revision: https://reviews.llvm.org/D37347 llvm-svn: 312284
OpenPOWER on IntegriCloud