summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] - Make LLD accept Ttext-segment X/Ttext-segment=X aliases for -Ttext.George Rimar2016-12-152-0/+8
| | | | | | | | | | | | | | | | It os used in work/emulators/qemu-user-static port. Which tries to use -Ttext-segment and then: # In case ld does not support -Ttext-segment, edit the default linker # script via sed to set the .text start addr. This is needed on FreeBSD # at least. <here it calls -verbose to extract and edit default bfd linker script.> Actually now we are do not fully support -Ttext properly (see D27613), but we also seems never will provide anything close to default script, like bfd do, so at least this patch introduces proper alias handling. llvm-svn: 289827
* Fix ubsan failures in lane mask shiftsKrzysztof Parzyszek2016-12-151-4/+8
| | | | llvm-svn: 289826
* [X86][SSE] Fix domains for VZEXT_LOAD type instructionsSimon Pilgrim2016-12-1548-202/+196
| | | | | | | | Add the missing domain equivalences for movss, movsd, movd and movq zero extending loading instructions. Differential Revision: https://reviews.llvm.org/D27684 llvm-svn: 289825
* [ELF] - Apply format (2). NFC.George Rimar2016-12-151-2/+4
| | | | llvm-svn: 289824
* [ELF] - Apply format. NFC.George Rimar2016-12-151-5/+4
| | | | llvm-svn: 289823
* Fix for regression after Global Load Scalarization patchAlexander Timofeev2016-12-152-1/+13
| | | | llvm-svn: 289822
* Fix build for mingw.Hafiz Abid Qadeer2016-12-1516-28/+20
| | | | | | | | | | | | Summary: I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there. Reviewers: zturner, labath, abidh Subscribers: ki.stfu, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27759 llvm-svn: 289821
* Extract LaneBitmask into a separate typeKrzysztof Parzyszek2016-12-1540-326/+421
| | | | | | | | | | | | Specifically avoid implicit conversions from/to integral types to avoid potential errors when changing the underlying type. For example, a typical initialization of a "full" mask was "LaneMask = ~0u", which would result in a value of 0x00000000FFFFFFFF if the type was extended to uint64_t. Differential Revision: https://reviews.llvm.org/D27454 llvm-svn: 289820
* [CostModel][X86] Updated reverse shuffle costsSimon Pilgrim2016-12-152-37/+151
| | | | llvm-svn: 289819
* [TEST] Initial commit of tests for minmax horizontal reductions.Alexey Bataev2016-12-151-0/+1725
| | | | llvm-svn: 289817
* [change-namespace] fix a case references to templated using alias are ↵Eric Liu2016-12-152-4/+18
| | | | | | qualified types. llvm-svn: 289816
* Restrict ranges of extension mapsRoman Gareev2016-12-152-1/+147
| | | | | | | | | | | To prevent copy statements from accessing arrays out of bounds, ranges of their extension maps are restricted, according to the constraints of domains. Reviewed-by: Michael Kruse <llvm@meinersbur.de> Differential Revision: https://reviews.llvm.org/D25655 llvm-svn: 289815
* Revert "[TESTS] Initial commit of tests, by Andrew Tischenko"Alexey Bataev2016-12-152-350/+0
| | | | | | This reverts commit ee709f8988653a0334fbf100cdbbdd83a3933347. llvm-svn: 289814
* [InstCombine] New opportunities for FoldAndOfICmp and FoldXorOfICmpEhsan Amiri2016-12-153-2/+302
| | | | | | | | | | | | | | | | | A number of new patterns for simplifying and/xor of icmp: (icmp ne %x, 0) ^ (icmp ne %y, 0) => icmp ne %x, %y if the following is true: 1- (%x = and %a, %mask) and (%y = and %b, %mask) 2- %mask is a power of 2. (icmp eq %x, 0) & (icmp ne %y, 0) => icmp ult %x, %y if the following is true: 1- (%x = and %a, %mask1) and (%y = and %b, %mask2) 2- Let %t be the smallest power of 2 where %mask1 & %t != 0. Then for any %s that is a power of 2 and %s & %mask2 != 0, we must have %s <= %t. For example if %mask1 = 24 and %mask2 = 16, setting %s = 16 and %t = 8 violates condition (2) above. So this optimization cannot be applied. llvm-svn: 289813
* Revert "[TESTS] Initial commit of tests, by Andrew Tischenko"Alexey Bataev2016-12-151-27/+0
| | | | | | This reverts commit 5898c713bee5e96aae87c73e11f3f4a7d19c74ed. llvm-svn: 289812
* [CostModel] Fix long standing bug with reverse shuffle mask detectionSimon Pilgrim2016-12-152-1/+32
| | | | | | Incorrect 'undef' mask index matching meant that broadcast shuffles could be detected as reverse shuffles llvm-svn: 289811
* [ELF] - Partial support of --gdb-index command line option (Part 3).George Rimar2016-12-155-15/+215
| | | | | | | | | | | | | Patch continues work started in D24706 and D25821. in this patch symbol table and constant pool areas were added to .gdb_index section output. This one finishes the implementation of --gdb-index functionality in LLD. Differential revision: https://reviews.llvm.org/D26283 llvm-svn: 289810
* [TESTS] Initial commit of tests, by Andrew TischenkoAlexey Bataev2016-12-151-0/+27
| | | | llvm-svn: 289809
* [NFC] Fix typos in getMacroKernelParams.Roman Gareev2016-12-151-5/+3
| | | | llvm-svn: 289808
* [TESTS] Initial commit of tests, by Andrew TischenkoAlexey Bataev2016-12-152-0/+350
| | | | llvm-svn: 289807
* The order of the loops defines the data reused in the BLIS implementation ofRoman Gareev2016-12-154-160/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gemm ([1]). In particular, elements of the matrix B, the second operand of matrix multiplication, are reused between iterations of the innermost loop. To keep the reused data in cache, only elements of matrix A, the first operand of matrix multiplication, should be evicted during an iteration of the innermost loop. To provide such a cache replacement policy, elements of the matrix A can, in particular, be loaded first and, consequently, be least-recently-used. In our case matrices are stored in row-major order instead of column-major order used in the BLIS implementation ([1]). One of the ways to address it is to accordingly change the order of the loops of the loop nest. However, it makes elements of the matrix A to be reused in the innermost loop and, consequently, requires to load elements of the matrix B first. Since the LLVM vectorizer always generates loads from the matrix A before loads from the matrix B and we can not provide it. Consequently, we only change the BLIS micro kernel and the computation of its parameters instead. In particular, reused elements of the matrix B are successively multiplied by specific elements of the matrix A . Refs.: [1] - http://www.cs.utexas.edu/users/flame/pubs/TOMS-BLIS-Analytical.pdf Reviewed-by: Tobias Grosser <tobias@grosser.es> Differential Revision: https://reviews.llvm.org/D25653 llvm-svn: 289806
* [Power9] Allow AnyExt immediates for XXSPLTIBNemanja Ivanovic2016-12-153-7/+16
| | | | | | | | | | In some situations, the BUILD_VECTOR node that builds a v18i8 vector by a splat of an i8 constant will end up with signed 8-bit values and other situations, it'll end up with unsigned ones. Handle both situations. Fixes PR31340. llvm-svn: 289804
* [AVR] Support floats in the instrumention passDylan McKay2016-12-152-18/+35
| | | | | | This also refactors some common code into the 'GetTypeName' method. llvm-svn: 289803
* Fix XFAILS for is_trivially_destructible traitEric Fiselier2016-12-152-6/+0
| | | | llvm-svn: 289802
* Remove linux/personality.h wrapperPavel Labath2016-12-152-26/+0
| | | | | | | | | This code is currently unused. Removing it should make porting of the linux plugin to NetBSD easier, and we can always add it later if needed. llvm-svn: 289801
* [CostModel][X86] Add tests for reverse shuffle costsSimon Pilgrim2016-12-151-0/+143
| | | | llvm-svn: 289800
* [change-namespace] handling templated type aliases correctly.Eric Liu2016-12-152-16/+114
| | | | | | | | | | | | Summary: This fixes templated type aliases and templated type aliases in classes. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27801 llvm-svn: 289799
* Add missing triple target for numeric section flag testPrakhar Bahuguna2016-12-151-1/+1
| | | | llvm-svn: 289798
* [clang-tidy] Enhance modernize-use-auto to templated function castsMalcolm Parsons2016-12-155-10/+241
| | | | | | | | | | | | | | | | Summary: Use auto when declaring variables that are initialized by calling a templated function that returns its explicit first argument. Fixes PR26763. Reviewers: aaron.ballman, alexfh, staronj, Prazek Subscribers: Eugene.Zelenko, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27166 llvm-svn: 289797
* [ELF] - Attempt to fix ubuntu 64x buildbot (2). George Rimar2016-12-151-1/+1
| | | | | | | Fixed inaccurate member type: uint32_t -> size_t (http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/2984/steps/build/logs/stdio). llvm-svn: 289796
* Simplify format member detection in FormatVariadicPavel Labath2016-12-157-161/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the format member search, which was quite complicated, with a more direct approach to detecting whether a class should be formatted using the format-member method. Instead we use a special type llvm::format_adapter, which every adapter must inherit from. Then the search can be simply implemented with the is_base_of type trait. Aside from the simplification, I like this way more because it makes it more explicit that you are supposed to use this type only for adapter-like formattings, and the other approach (format_provider overloads) should be used as a default (a mistake I made when first trying to use this library). The only slight change in behaviour here is that now choose the format-adapter branch even if the format member invocation will fail to compile (e.g. because it is a non-const member function and we are passing a const adapter), whereas previously we would have gone on to search for format_providers for the type. However, I think that is actually a good thing, as it probably means the programmer did something wrong. Reviewers: zturner, inglorion Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27679 llvm-svn: 289795
* [Thumb] Teach ISel how to lower compares of AND bitmasks efficientlySjoerd Meijer2016-12-159-23/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is essentially a recommit of r285893, but with a correctness fix. The problem of the original commit was that this: bic r5, r7, #31 cbz r5, .LBB2_10 got rewritten into: lsrs r5, r7, #5 beq .LBB2_10 The result in destination register r5 is not the same and this is incorrect when r5 is not dead. So this fix includes checking the uses of the AND destination register. And also, compared to the original commit, some regression tests didn't need changing anymore because of this extra check. For completeness, this was the original commit message: For the common pattern (CMPZ (AND x, #bitmask), #0), we can do some more efficient instruction selection if the bitmask is one consecutive sequence of set bits (32 - clz(bm) - ctz(bm) == popcount(bm)). 1) If the bitmask touches the LSB, then we can remove all the upper bits and set the flags by doing one LSLS. 2) If the bitmask touches the MSB, then we can remove all the lower bits and set the flags with one LSRS. 3) If the bitmask has popcount == 1 (only one set bit), we can shift that bit into the sign bit with one LSLS and change the condition query from NE/EQ to MI/PL (we could also implement this by shifting into the carry bit and branching on BCC/BCS). 4) Otherwise, we can emit a sequence of LSLS+LSRS to remove the upper and lower zero bits of the mask. 1-3 require only one 16-bit instruction and can elide the CMP. 4 requires two 16-bit instructions but can elide the CMP and doesn't require materializing a complex immediate, so is also a win. Differential Revision: https://reviews.llvm.org/D27761 llvm-svn: 289794
* [AVR] Add argument indices to the instrumention hook functionsDylan McKay2016-12-151-2/+4
| | | | | | | This allows the instrumention hook functions to do better pretty-printing. llvm-svn: 289793
* [ELF] - Attempt to fix ubuntu bot.George Rimar2016-12-151-1/+1
| | | | | | (http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/2982) llvm-svn: 289792
* Remove references to AssumptionCache. NFC.Michael Kruse2016-12-154-82/+79
| | | | | | | | | | The AssumptionCache was removed in r289756 after being replaced by the an addtional operand list of affected values in r289755. The absence of that cache means that we have now have to manually search for llvm.assume intrinsics as now done by other passes (LazyValueInfo, CodeMetrics) do not take into account an llvm::Instruction's user lists (ScalarEvolution). llvm-svn: 289791
* [ELF] - Partial support of --gdb-index command line option (Part 2).George Rimar2016-12-155-43/+149
| | | | | | | | | | Patch continues work started in D24706, in this patch address area was added to .gdb_index section output. Differential revision: https://reviews.llvm.org/D25821 llvm-svn: 289790
* [XRay][compiler-rt][NFC] Deduplicate code in x86-64 trampolines.Dean Michael Berris2016-12-151-62/+37
| | | | | | | | | | | | | | | | | Summary: The layout of all registers saved on stack shouldn't deviate and will be reused in future trampolines as well. While there, fix whitespace and clarify comments. Author: mpel Reviewers: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27799 llvm-svn: 289789
* Fix for build warning in execute-only supportPrakhar Bahuguna2016-12-151-2/+2
| | | | llvm-svn: 289788
* Re-commit r289252 and r289285, and fix PR31374Yaxun Liu2016-12-1518-67/+765
| | | | llvm-svn: 289787
* [ARM] Implement execute-only support in CodeGenPrakhar Bahuguna2016-12-154-1/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This implements execute-only support for ARM code generation, which prevents the compiler from generating data accesses to code sections. The following changes are involved: * Add the CodeGen option "-arm-execute-only" to the ARM code generator. * Add the clang flag "-mexecute-only" as well as the GCC-compatible alias "-mpure-code" to enable this option. * When enabled, literal pools are replaced with MOVW/MOVT instructions, with VMOV used in addition for floating-point literals. As the MOVT instruction is required, execute-only support is only available in Thumb mode for targets supporting ARMv8-M baseline or Thumb2. * Jump tables are placed in data sections when in execute-only mode. * The execute-only text section is assigned section ID 0, and is marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'. This also overrides selection of ELF sections for globals. Reviewers: t.p.northover, rengolin Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D27450 llvm-svn: 289786
* Allow ELF section flags to be specified numericallyPrakhar Bahuguna2016-12-152-0/+41
| | | | | | | | | | | | | | | | | Summary: GAS already allows flags for sections to be specified directly as a numeric value. This functionality is particularly useful for setting processor or application-specific values that may not be directly supported or understood by LLVM. This patch allows LLVM to use numeric section flag values verbatim if specified by the assembly file. Reviewers: grosbach, rafael, t.p.northover, rengolin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27451 llvm-svn: 289785
* [ARM] Implement execute-only support in CodeGenPrakhar Bahuguna2016-12-1527-20/+455
| | | | | | | | | | | | | | | | | | | | This implements execute-only support for ARM code generation, which prevents the compiler from generating data accesses to code sections. The following changes are involved: * Add the CodeGen option "-arm-execute-only" to the ARM code generator. * Add the clang flag "-mexecute-only" as well as the GCC-compatible alias "-mpure-code" to enable this option. * When enabled, literal pools are replaced with MOVW/MOVT instructions, with VMOV used in addition for floating-point literals. As the MOVT instruction is required, execute-only support is only available in Thumb mode for targets supporting ARMv8-M baseline or Thumb2. * Jump tables are placed in data sections when in execute-only mode. * The execute-only text section is assigned section ID 0, and is marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'. This also overrides selection of ELF sections for globals. llvm-svn: 289784
* CodeGen: force builtins to be localSaleem Abdulrasool2016-12-151-3/+3
| | | | | | | | Unfortunately _setjmp3 can be both import or local. The ASAN tests try to emulate the flags which makes this harder to detect. Rely on the linker creating or using thunks here instead. Should repair the ASAN windows bots. llvm-svn: 289783
* [ELF] - Do not crash when move location counter backward.George Rimar2016-12-152-1/+14
| | | | | | | | | | | | | | | | | PR31335 shows that we do that in next case: SECTIONS { .text 0x2000 : {. = 0x100 ; *(.text) } } though documentations says that "If . is used inside a section description however, it refers to the byte offset from the start of that section, not an absolute address. " looks does not work as documented in bfd (as mentioned in comments for PR31335). Until we find out the expected behavior was suggested at least not to 'crash', what we do after trying to generate huge file. Differential revision: https://reviews.llvm.org/D27712 llvm-svn: 289782
* Fix typoEric Fiselier2016-12-151-1/+1
| | | | llvm-svn: 289781
* Add tests for LWG 2796Eric Fiselier2016-12-152-0/+73
| | | | llvm-svn: 289780
* Add missing -mtriple to MIR test caseSanjoy Das2016-12-151-1/+1
| | | | llvm-svn: 289779
* Add more test cases for PR31384Eric Fiselier2016-12-151-9/+59
| | | | llvm-svn: 289778
* Attempt to fix llvm-readobj crash on ppc64 due to r289674Yaxun Liu2016-12-151-1/+1
| | | | llvm-svn: 289777
* CodeGen: fix runtime function dll storageSaleem Abdulrasool2016-12-158-21/+238
| | | | | | | | | | | | | | | | | Properly attribute DLL storage to runtime functions. When generating the runtime function, scan for an existing declaration which may provide an explicit declaration (local storage) or a DLL import or export storage from the user. Honour that if available. Otherwise, if building with a local visibility of the public or standard namespaces (-flto-visibility-public-std), give the symbols local storage (it indicates a /MT[d] link, so static runtime). Otherwise, assume that the link is dynamic, and give the runtime function dllimport storage. This allows for implementations to get the correct storage as long as they are properly declared, the user to override the import storage, and in case no explicit storage is given, use of the import storage. llvm-svn: 289776
OpenPOWER on IntegriCloud