summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [TargetParser] Use enum classes for various ARM kind enums.Florian Hahn2017-07-2714-617/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Using c++11 enum classes ensures that only valid enum values are used for ArchKind, ProfileKind, VersionKind and ISAKind. This removes the need for checks that the provided values map to a proper enum value, allows us to get rid of AK_LAST and prevents comparing values from different enums. It also removes a bunch of static_cast from unsigned to enum values and vice versa, at the cost of introducing static casts to access AArch64ARCHNames and ARMARCHNames by ArchKind. FPUKind and ArchExtKind are the only remaining old-style enum in TargetParser.h. I think it's beneficial to keep ArchExtKind as old-style enum, but FPUKind can be converted too, but this patch is quite big, so could do this in a follow-up patch. I could also split this patch up a bit, if people would prefer that. Reviewers: rengolin, javed.absar, chandlerc, rovka Reviewed By: rovka Subscribers: aemerson, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D35882 llvm-svn: 309287
* [SLP] Outline code for the check that instruction users are part ofAlexey Bataev2017-07-271-4/+11
| | | | | | vectorization tree, NFC. llvm-svn: 309284
* [SelectionDAG] Avoid repeated calls to getNumOperands in for loop. NFCI.Simon Pilgrim2017-07-271-1/+1
| | | | llvm-svn: 309283
* Make new PM honor -fdebug-info-for-profiling (clang side)Dehao Chen2017-07-271-22/+21
| | | | | | | | | | | | | | Summary: The new PM needs to invoke add-discriminator pass when building with -fdebug-info-for-profiling. Reviewers: chandlerc, davidxl Reviewed By: chandlerc Subscribers: sanjoy, cfe-commits Differential Revision: https://reviews.llvm.org/D35746 llvm-svn: 309282
* Fix assert from r309278David Blaikie2017-07-271-4/+4
| | | | llvm-svn: 309281
* remove redundant checkAdrian Prantl2017-07-271-1/+1
| | | | llvm-svn: 309280
* ThinLTO: Don't import aliases of any kind (even linkonce_odr)David Blaikie2017-07-276-128/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Until a more advanced version of importing can be implemented for aliases (one that imports an alias as an available_externally definition of the aliasee), skip the narrow subset of cases that was possible but came at a cost: aliases of linkonce_odr functions could be imported because the linkonce_odr function could be safely duplicated from the source module. This came/comes at the cost of not being able to 'home' imported linkonce functions (they had to be emitted linkonce_odr in all the destination modules (even if they weren't used by an alias) rather than as available_externally - causing extra object size). Tangentially, this also was the only reason ThinLTO would emit multiple CUs in to the resulting DWARF - which happens to be a problem for Fission (there's a fix for this in GDB but not released yet, etc). (actually it's not the only reason - but I'm sending a patch to fix the other reason shortly) There's no reason to believe this particularly narrow alias importing was especially/meaningfully important, only that it was /possible/ to implement in this way. When a more general solution is done, it should still satisfy the DWARF concerns above, since the import will still be available_externally, and thus not create extra CUs. Since now all aliases are treated the same, I removed/simplified some test cases since they were testing corner cases where there are no longer any corners. Reviewers: tejohnson, mehdi_amini Differential Revision: https://reviews.llvm.org/D35875 llvm-svn: 309278
* [SelectionDAG] Tidyup mask creation. NFCI.Simon Pilgrim2017-07-271-6/+3
| | | | | | Assign all concat elements to UNDEF and then just replace the first element, instead of copying everything individually. llvm-svn: 309277
* [clang-diff] Rename, NFCJohannes Altmanninger2017-07-271-2/+2
| | | | llvm-svn: 309276
* Update isl to isl-0.18-800-g4018f45Tobias Grosser2017-07-277-17/+114
| | | | | | | | | This fixes a bug in isl_flow where triggering the compute out could result in undefined or unexpected behavior. This fixes some recent regressions we saw in the android buildbots. Thanks Eli Friedman for reducing the corresponding test cases. llvm-svn: 309274
* [ScopBuilder/Simplify] Refactor isEscaping. NFC.Michael Kruse2017-07-274-41/+26
| | | | | | | | | | | | ScopBuilder and Simplify (through VirtualInstruction.cpp) previously used this functionality in their own implementation. Refactor them both into a common one into the Scop class. BlockGenerator also makes use of a similiar functionality, but also records outside users and takes place after region simplification. Merging it as well would be more complicated. llvm-svn: 309273
* [ARM] Mark labels in skipAlignedDPRCS2Spills as fallthrough (NFC).Florian Hahn2017-07-271-0/+2
| | | | | | | | | The comment at the top of the switch statement indicates that the fall-through behavior is intentional. By using LLVM_FALLTHROUGH, -Wimplicit-fallthrough are silenced, which is enabled by default in GCC 7. llvm-svn: 309272
* [Simplify] Count PHINodes in simplifiable exit nodes as escaping use.Michael Kruse2017-07-272-0/+44
| | | | | | | | | After region exit simplification, the incoming block of a phi node in the SCoP region's exit block lands outside of the region. Since we treat SCoPs as if this already happened, we need to account for that when looking for outside uses of scalars (i.e. escaping scalars). llvm-svn: 309271
* [OPENMP] Codegen for 'in_reduction' clause.Alexey Bataev2017-07-2712-21/+420
| | | | | | | | | | | | | | | | | | Added codegen for task-based directive with in_reduction clause. ``` <body> ``` The next code is emitted: ``` void *td; ... td = call i8* @__kmpc_task_reduction_init(); ... <type> *priv = (<type> *)call i8* @__kmpc_task_reduction_get_th_data(i32 GTID, i8* td, i8* <orig>) ``` llvm-svn: 309270
* Added cost of ZEROALL and ZEROUPPER instrs in btver2 cpu.Andrew V. Tischenko2017-07-272-2/+13
| | | | | | Differential Revision https://reviews.llvm.org/D35834 llvm-svn: 309269
* [InlineCost, NFC] Change CallAnalyzer::isGEPFree to use TTI::getUserCost ↵Evgeny Astigeevich2017-07-271-6/+5
| | | | | | | | | | | | | | instead of TTI::getGEPCost Currently CallAnalyzer::isGEPFree uses TTI::getGEPCost to check if GEP is free. TTI::getGEPCost cannot handle cases when GEPs participate in Def-Use dependencies (see https://reviews.llvm.org/D31186 for example). There is TTI::getUserCost which can calculate the cost more accurately by taking dependencies into account. Differential Revision: https://reviews.llvm.org/D33685 llvm-svn: 309268
* [globalisel][tablegen] Ensure MatchTable's are compile-time constants with ↵Daniel Sanders2017-07-271-1/+1
| | | | | | | | | constexpr. NFC. This should prevent any re-occurence of the problem where the table was initialized at run-time. llvm-svn: 309267
* [X86][AVX] Regenerate shuffle tests with broadcast comments.Simon Pilgrim2017-07-271-2/+2
| | | | llvm-svn: 309266
* XFAIL/XFlakey some tests what become very flakey on the Linux buildbotTamas Berghammer2017-07-272-0/+2
| | | | llvm-svn: 309265
* Re-commit: r309094 [globalisel][tablegen] Fuse the generated tables together.Daniel Sanders2017-07-274-199/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Now that we have control flow in place, fuse the per-rule tables into a single table. This is a compile-time saving at this point. However, this will also enable the optimization of a table so that similar instructions can be tested together, reducing the time spent on the matching the code. This is NFC in terms of externally visible behaviour but some internals have changed slightly. State.MIs is no longer reset between each rule that is attempted because it's not necessary to do so. As a consequence of this the restriction on the order that instructions are added to State.MIs has been relaxed to only affect recorded instructions that require new elements to be added to the vector. GIM_RecordInsn can now write to any element from 1 to State.MIs.size() instead of just State.MIs.size(). The compile-time regressions from the last commit were caused by the ARM target including a non-const variable (zero_reg) in the table and therefore generating an initializer for it. That variable is now const. Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D35681 llvm-svn: 309264
* [CodeGen][ARM] ARM runtime helper functions are not always soft-fpPeter Smith2017-07-273-12/+250
| | | | | | | Re-commit r309257 with less precise register checks in arm-float-helpers.c test. llvm-svn: 309263
* [X86] Adding test cases for LEA factorization (PR32755 / D35014)Simon Pilgrim2017-07-273-0/+156
| | | | | | Differential Revision: https://reviews.llvm.org/D35886 llvm-svn: 309262
* [X86] Tidyup MaskedLoad/Store mask creation. NFCI.Simon Pilgrim2017-07-271-8/+3
| | | | | | Assign all concat elements to zero and then just replace the first element, instead of setting them all to null and copying everything in. llvm-svn: 309261
* [TTI] fixing a bug in the isLegalMaskedScatter APIMohammed Agabaria2017-07-271-1/+1
| | | | | | | | | isLegalMaskedScatter called the Gather version which is a bug. use test case is provided within the patch of AVX2 gathers at: https://reviews.llvm.org/D35772 Differential Revision: https://reviews.llvm.org/D35786 llvm-svn: 309260
* [CodeGen][ARM] Revert r309257Peter Smith2017-07-273-250/+12
| | | | | | | The test arm-float-helpers.c appears to be failing on some builders and needs some work to make it more robust. llvm-svn: 309259
* Revert r309252 "[ELF] - Fix missing relocation when linking executable with ↵George Rimar2017-07-274-40/+7
| | | | | | | | | --unresolved-symbols=ignore-all" It broke bot: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/4231 llvm-svn: 309258
* [CodeGen][ARM] ARM runtime helper functions are not always soft-fpPeter Smith2017-07-273-12/+250
| | | | | | | | | | | | | | | | | | | The ARM Runtime ABI document (IHI0043) defines the AEABI floating point helper functions in 4.1.2 The floating-point helper functions. These functions always use the base PCS (soft-fp). However helper functions defined outside of this document such as the complex-number multiply and divide helpers are not covered by this requirement and should use hard-float PCS if the target is hard-float as both compiler-rt and libgcc for a hard-float sysroot implement these functions with a hard-float PCS. All of the floating point helper functions that are explicitly soft float are expanded in the llvm ARM backend. This change makes clang not force the BuiltinCC to AAPCS for AAPCS_VFP. With this change the ARM compiler-rt tests involving _Complex pass with both hard-fp and soft-fp targets. Differential Revision: https://reviews.llvm.org/D35538 llvm-svn: 309257
* [PowerPC] Pass CPU to assembler with -no-integrated-asNemanja Ivanovic2017-07-275-7/+42
| | | | | | | | | This just adds the CPU to a list of commands passed to GAS when not using the integrated assembler. Differential Revision: https://reviews.llvm.org/D33820 llvm-svn: 309256
* [PowerPC] enable optimizeCompareInstr for branch with static branch hintHiroshi Inoue2017-07-273-7/+55
| | | | | | | | | | In optimizeCompareInstr, a compare instruction is eliminated by using a record form instruction if possible. If the branch instruction that uses the result of the compare has a static branch hint, the optimization does not happen. This patch makes this optimization happen regardless of the branch hint by splitting branch hint and branch condition before checking the predicate to identify the possible optimizations. Differential Revision: https://reviews.llvm.org/D35801 llvm-svn: 309255
* [ELD] - Sorted in ASCIIbetical order. NFC.George Rimar2017-07-271-1/+1
| | | | llvm-svn: 309254
* [ELF] - Store PhdrEntry values by pointers instead of storing by value.George Rimar2017-07-273-82/+84
| | | | | | | | | | | That is slightly more convinent as allows to store pointer on program header entry in a more safe way. Change was used in 2 patches currently on review. Differential revision: https://reviews.llvm.org/D35832 llvm-svn: 309253
* [ELF] - Fix missing relocation when linking executable with ↵George Rimar2017-07-274-7/+40
| | | | | | | | | | | | | | | | | | --unresolved-symbols=ignore-all This is PR32112. Previously when we linked executable with --unresolved-symbols=ignore-all and undefined symbols, like: _start: callq und@PLT we did not create relocations, though it looks in that case we should delegate handling of such symbols to runtime linker, hence should emit them. Patch fixes that. Differential revision: https://reviews.llvm.org/D35724 llvm-svn: 309252
* Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things ↵Petr Hosek2017-07-2711-824/+0
| | | | | | | | | | started"" This change is failing tests on Windows bots due to permissions. This reverts commit r309249. llvm-svn: 309251
* [LLDB][MIPS] Fix emulation of Instruction for MIPS64R6 target.Nitesh Jain2017-07-271-18/+57
| | | | | Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 309250
* Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"Petr Hosek2017-07-2711-0/+824
| | | | | | | | | | | | | | | As discussed on llvm-dev I've implemented the first basic steps towards llvm-objcopy/llvm-objtool (name pending). This change adds the ability to copy (without modification) 64-bit little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS, SHT_NULL and SHT_STRTAB sections. Patch by Jake Ehrlich Differential Revision: https://reviews.llvm.org/D33964 llvm-svn: 309249
* [X86] Improve the unknown stepping support for Intel CPUs in getHostCPUNameCraig Topper2017-07-271-2/+22
| | | | | | | | This patch improves our guessing of unknown Intel CPUs to support Goldmont and skylake-avx512. Differential Revision: https://reviews.llvm.org/D35161 llvm-svn: 309246
* [Coverage] NFC: Simplify sanity checks with a SpellingRange utilityVedant Kumar2017-07-271-21/+41
| | | | | | This should simplify D35925. llvm-svn: 309245
* [Coverage] NFC: Save a pair of calls to get{Start,End}Vedant Kumar2017-07-271-3/+5
| | | | llvm-svn: 309244
* [GISel]: Missed passing in a parameter to addUsesFromArgsAditya Nandakumar2017-07-271-1/+1
| | | | llvm-svn: 309243
* Remove check for i686.Eric Beckmann2017-07-271-6/+1
| | | | | | | libxml2 is supported for 32 bit, so our build system should be checking the target rather than native os when choosing shared libs. llvm-svn: 309242
* Re-enable libxml2 tests.Eric Beckmann2017-07-271-0/+3
| | | | llvm-svn: 309241
* [DWARF] Minor code style modification, no functionality change.Spyridoula Gravani2017-07-271-8/+5
| | | | llvm-svn: 309240
* Add {Obj,Import,Bitcode}File::Instances to COFF input files.Rui Ueyama2017-07-278-29/+29
| | | | | | | We did the same thing for ELF in r309152, and I want to maintain COFF and ELF as close as possible. llvm-svn: 309239
* Fix the formatting for help on option value types.Jim Ingham2017-07-272-1/+10
| | | | | | | | Patch by Jessica Han <jessicah@juniper.net> https://reviews.llvm.org/D35525 llvm-svn: 309238
* DebugInfo: Ensure imported entities at the top level of an inlined function ↵David Blaikie2017-07-275-22/+94
| | | | | | | | | | | | | | | | | | | | | | don't cause degenerate concrete definitions Local imported entities at the top level of a subprogram were being handled differently from those in nested scopes - that different handling would cause pseudo concrete out-of-line definitions to be created (but without any of their attributes, nor an abstract_origin) in the case where there was no real concrete definition. These local imported entities also only appeared in the concrete definition where those imported entities in nested scopes appear in all cases (abstract, concrete, and inlined). This change at least makes top level case handle the same as the others - though there's a FIXME to improve this to /only/ emit them into the abstract origin (though this requires more plumbing - like the abstract subprogram and variable handling that must defer population until the end of the unit to discover if there is an abstract origin, or only a standalone concrete definition). llvm-svn: 309237
* [Hexagon] Fix expensive checks build bot broken in r309230.Eugene Zelenko2017-07-261-0/+1
| | | | llvm-svn: 309236
* [CMake] Disable -Werror for CMake checksPetr Hosek2017-07-261-0/+1
| | | | | | | | | -Werror may cause some of the CMake checks to fail, so we disable it even if it's enabled for the build itself. Differential Revision: https://reviews.llvm.org/D35924 llvm-svn: 309235
* Add --gc-sections to a test.Rafael Espindola2017-07-261-1/+9
| | | | | | | This shows that the logic in --gc-sections is a bit more precise than what can be easily done in LTO. llvm-svn: 309234
* [Hexagon] Partially revert r309230 which caused some build bots failures.Eugene Zelenko2017-07-261-9/+7
| | | | llvm-svn: 309233
* Make __start_sec __end_sec handling more precise.Rafael Espindola2017-07-263-3/+29
| | | | | | | | | | With this we only ask LTO to keep a C named section if there is a __start_ or __end symbol. This is not as strict as lld's --gc-sections, but is as good as we can get without having a far more detailed ir summary. llvm-svn: 309232
OpenPOWER on IntegriCloud