summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Register linkageSpecDecl matcherDave Lee2017-08-311-0/+1
| | | | | | | | | | | | | | | | | Summary: This allows `linkageSpecDecl` to be used from `clang-query`. See also D31869 which similary adds `isStaticStorageClass`. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D37346 llvm-svn: 312283
* AMDGPU: Turn int pack pattern into build_vectorMatt Arsenault2017-08-312-1/+18
| | | | | | | | | | build_vector is a more useful canonical form when pattern matching packed operations, so turn shift into high element into a build_vector. Should show no change for now. llvm-svn: 312282
* Add documentation for force_align_arg_pointer function attributeErich Keane2017-08-312-2/+27
| | | | | | | | Patch By: anatol.pomozov (anatol.pomozov@gmail.com) Differential Revision: https://reviews.llvm.org/D37312 llvm-svn: 312281
* [MachineOutliner] Recommit r312194, missed optimization remarksJessica Paquette2017-08-312-1/+109
| | | | | | | | | | | | | Before, this commit caused a buildbot failure: http://bb.pgr.jp/builders/test-llvm-i686-linux-RA/builds/6026/steps/test_llvm/logs/LLVM%20%3A%3A%20CodeGen__AArch64__machine-outliner-remarks.ll This was caused by the Key value in DiagnosticInfoOptimizationBase being deallocated before emitting the remarks defined in MachineOutliner.cpp. As of r312277 this should no longer be an issue. llvm-svn: 312280
* [x86] add more tests for horizontal ops; NFCSanjay Patel2017-08-312-19/+159
| | | | llvm-svn: 312279
* Fix some size_t / uint32_t mismatched comparisons.Zachary Turner2017-08-311-4/+4
| | | | llvm-svn: 312278
* [NFC] Change Key in Argument to a std::stringJessica Paquette2017-08-311-15/+9
| | | | | | | | | | | | | | | | Before, Key was a StringRef to avoid unnecessary copies. This commit changes that to a std::string. This was okay previously because when people called emit for remarks before, they would create the remark *within* the call to emit. However, if you build the remark up and call emit *afterward*, it's possible to end up freeing the memory assigned to the StringRef before the call to emit. This caused a test failure with https://reviews.llvm.org/D37085 on Linux. Since building remarks before a call to emit is a valid use-case, it makes sense to replace this with a std::string. llvm-svn: 312277
* [llvm-pdbutil] Print detailed S_UDT stats.Zachary Turner2017-08-3111-36/+221
| | | | | | | | | | | | | | This adds a new command line option, -udt-stats, which breaks down the stats of S_UDT records. These are one of the biggest contributors to the size of /DEBUG:FASTLINK PDBs, so they need some additional tools to be able to analyze their usage. This option will dig into each S_UDT record and determine what kind of record it points to, and then break down the statistics by the target type. The goal here is to identify how our object files differ from MSVC object files in S_UDT records, so that we can output fewer of them and reach size parity. llvm-svn: 312276
* [clang-cl] Explicitly set object format to COFF in CL modeOleg Ranevskyy2017-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently object format is taken from the default target triple. For toolchains with a non-COFF default target this may result in an object format inappropriate for pc-windows and lead to compilation issues. For example, the default triple `aarch64-linux-elf` may produce something like `aarch64-pc-windows-msvc19.0.24215-elf` in CL mode. Clang creates `MicrosoftARM64TargetInfo` for such triple with data layout `e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128`. On the other hand, the AArch64 backend in `computeDataLayout` detects a non-COFF target and selects `e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128` as data layout for little endian. Different layouts used by clang and the backend cause an error: ``` error: backend data layout 'e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128' does not match expected target description 'e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128' ``` This can be observed on the clang's Driver/cl-pch.c test with AArch64 as a default target. This patch enforces COFF in CL mode. Reviewers: hans Reviewed By: hans Subscribers: cfe-commits, aemerson, asl, kristof.beyls Differential Revision: https://reviews.llvm.org/D37336 llvm-svn: 312275
* [dsymutil] Don't mark forward declarations as canonical.Jonas Devlieghere2017-08-319-17/+323
| | | | | | | | | | | | | | | | | | This patch completes the work done by Frederic Riss to addresses dsymutil incorrectly considering forward declaration as canonical during uniquing. This resulted in references to the forward declaration even after the definition was encountered. In addition to the test provided by Alexander Shaposhnikov in D29609, I added another test to cover several scenarios that were mentioned in his conversation with Fred. We now also check that uniquing still occurs after the definition was encountered. For more context please refer to D29609 Differential revision: https://reviews.llvm.org/D37127 llvm-svn: 312274
* [polly] Fix non-deterministic output due to iteration of unordered ScopArrayInfoMandeep Singh Grang2017-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: This fixes the following failures in the reverse iteration builder: http://lab.llvm.org:8011/builders/reverse-iteration/builds/25 Polly :: MaximalStaticExpansion/working_deps_between_inners.ll Polly :: MaximalStaticExpansion/working_expansion_multiple_dependences_per_statement.ll Polly :: MaximalStaticExpansion/working_expansion_multiple_instruction_per_statement.ll Polly :: MaximalStaticExpansion/working_phi_expansion.ll Reviewers: simbuerg, Eugene.Zelenko, grosser, zinob, bollu Reviewed By: grosser Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37349 llvm-svn: 312273
OpenPOWER on IntegriCloud