summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a testcase for r275581David Majnemer2016-07-191-0/+28
| | | | llvm-svn: 276002
* [RegionInfo] Some cleanupsDavid Majnemer2016-07-192-110/+87
| | | | | | | | | - Use unique_ptr instead of managing a container of new'd pointers. - Use range based for loops. No functional change is intended. llvm-svn: 276001
* [RegionPass] Some minor cleanupsDavid Majnemer2016-07-191-4/+2
| | | | | | No functional change is intended. llvm-svn: 276000
* [LoopPass] Some minor cleanupsDavid Majnemer2016-07-191-7/+5
| | | | | | No functional change is intended. llvm-svn: 275999
* This code block breaks the docs build ↵Aaron Ballman2016-07-191-1/+1
| | | | | | (http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/11920/steps/docs-llvm-html/logs/stdio), but I cannot see anything immediately wrong with it and cannot reproduce the diagnostic locally. Setting the code highlighting to none instead of nasm to hopefully get the bot stumbling back towards green. llvm-svn: 275998
* libunwind: sync some coments with NetBSD's versionEd Maste2016-07-191-13/+13
| | | | | | | | NetBSD's system unwinder is a modified version of LLVM's libunwind. Slightly reduce diffs by updating comments to match theirs where appropriate. llvm-svn: 275997
* libunwind: Use conventional DWARF capitalization in comments and errorsEd Maste2016-07-198-46/+46
| | | | llvm-svn: 275996
* add tests related to PR28466Sanjay Patel2016-07-191-1/+60
| | | | llvm-svn: 275995
* [X86][AVX512] Added AVX512 subvector broadcast testsSimon Pilgrim2016-07-192-0/+464
| | | | llvm-svn: 275994
* cppcoreguidelines-pro-bounds-constant-array-index: ignore implicit constructorMatthias Gehre2016-07-192-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The code struct A { int x[3]; }; gets an compiler-generated copy constructor that uses ArraySubscriptExpr (see below). Previously, the check would generate a warning on that copy constructor. This commit disables the warning on implicitly generated code. AST: |-CXXConstructorDecl 0x337b3c8 <col:8> col:8 implicit used constexpr A 'void (const struct A &) noexcept' inline | |-ParmVarDecl 0x337b510 <col:8> col:8 used 'const struct A &' | |-CXXCtorInitializer Field 0x3379238 'x' 'int [3]' | | `-ImplicitCastExpr 0x337e158 <col:8> 'int' <LValueToRValue> | | `-ArraySubscriptExpr 0x337e130 <col:8> 'const int' lvalue | | |-ImplicitCastExpr 0x337e118 <col:8> 'const int *' <ArrayToPointerDecay> | | | `-MemberExpr 0x337dfc8 <col:8> 'int const[3]' lvalue .x 0x3379238 | | | `-DeclRefExpr 0x337dfa0 <col:8> 'const struct A' lvalue ParmVar 0x337b510 '' 'const struct A &' | | `-ImplicitCastExpr 0x337e098 <col:8> 'unsigned long' <LValueToRValue> | | `-DeclRefExpr 0x337e070 <col:8> 'unsigned long' lvalue Var 0x337e010 '__i0' 'unsigned long' Reviewers: alexfh, aaron.ballman Subscribers: aemerson, nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D22381 llvm-svn: 275993
* [X86][AVX] Fixed typo in test namesSimon Pilgrim2016-07-192-6/+6
| | | | llvm-svn: 275992
* [DSE] Add additional debug output. NFC.Chad Rosier2016-07-191-0/+3
| | | | llvm-svn: 275991
* add missing test for simplifySelectBitTest()Sanjay Patel2016-07-191-0/+14
| | | | llvm-svn: 275990
* [InstCombine] Enable cast-folding in logic(cast(icmp), cast(icmp))Tobias Grosser2016-07-192-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, InstCombine is already able to fold expressions of the form `logic(cast(A), cast(B))` to the simpler form `cast(logic(A, B))`, where logic designates one of `and`/`or`/`xor`. This transformation is implemented in `foldCastedBitwiseLogic()` in InstCombineAndOrXor.cpp. However, this optimization will not be performed if both `A` and `B` are `icmp` instructions. The decision to preclude casts of `icmp` instructions originates in r48715 in combination with r261707, and can be best understood by the title of the former one: > Transform (zext (or (icmp), (icmp))) to (or (zext (cimp), (zext icmp))) if at least one of the (zext icmp) can be transformed to eliminate an icmp. Apparently, it introduced a transformation that is a reverse of the transformation that is done in `foldCastedBitwiseLogic()`. Its purpose is to expose pairs of `zext icmp` that would subsequently be optimized by `transformZExtICmp()` in InstCombineCasts.cpp. Therefore, in order to avoid an endless loop of switching back and forth between these two transformations, the one in `foldCastedBitwiseLogic()` has been restricted to exclude `icmp` instructions which is mirrored in the responsible check: `if ((!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src)) && ...` This check seems to sort out more cases than necessary because: - the reverse transformation is obviously done for `or` instructions only - and also not every `zext icmp` pair is necessarily the result of this reverse transformation Therefore we now remove this check and replace it by a more finegrained one in `shouldOptimizeCast()` that now rejects only those `logic(zext(icmp), zext(icmp))` that would be able to be optimized by `transformZExtICmp()`, which also avoids the mentioned endless loop. That means we are now able to also simplify expressions of the form `logic(cast(icmp), cast(icmp))` to `cast(logic(icmp, icmp))` (`cast` being an arbitrary `CastInst`). As an example, consider the following IR snippet ``` %1 = icmp sgt i64 %a, %b %2 = zext i1 %1 to i8 %3 = icmp slt i64 %a, %c %4 = zext i1 %3 to i8 %5 = and i8 %2, %4 ``` which would now be transformed to ``` %1 = icmp sgt i64 %a, %b %2 = icmp slt i64 %a, %c %3 = and i1 %1, %2 %4 = zext i1 %3 to i8 ``` This issue became apparent when experimenting with the programming language Julia, which makes use of LLVM. Currently, Julia lowers its `Bool` datatype to LLVM's `i8` (also see https://github.com/JuliaLang/julia/pull/17225). In fact, the above IR example is the lowered form of the Julia snippet `(a > b) & (a < c)`. Like shown above, this may introduce `zext` operations, casting between `i1` and `i8`, which could for example hinder ScalarEvolution and Polly on certain code. Reviewers: grosser, vtjnash, majnemer Subscribers: majnemer, llvm-commits Differential Revision: https://reviews.llvm.org/D22511 Contributed-by: Matthias Reisinger llvm-svn: 275989
* AMDGPU: Only use legal inline immediates with kill pseudoMatt Arsenault2016-07-195-3/+15
| | | | | | | | | | | Only if the value is negative or positive is what matters, so use a constant that doesn't require an instruction to materialize. These should really just emit the write exec directly, but for stick with the kill pseudo-terminator. llvm-svn: 275988
* GPGPU: Bail out of scops with hoisted invariant loadsTobias Grosser2016-07-193-5/+14
| | | | | | | This is currently not supported and will only be added later. Also update the test cases to ensure no invariant code hoisting is applied. llvm-svn: 275987
* clangRename: Update libdeps to add clangASTMatchers.NAKAMURA Takumi2016-07-191-0/+1
| | | | | | Note, ClangRenameTests is linking USRFindingAction.cpp directly. llvm-svn: 275986
* ClangRenameTests: Update libdeps. r275958 introduced clangASTMatchers.NAKAMURA Takumi2016-07-191-0/+1
| | | | llvm-svn: 275985
* fix compiler warnings [NFC]Etienne Bergeron2016-07-191-3/+3
| | | | llvm-svn: 275984
* Typo corrections identified by codespellEd Maste2016-07-1925-33/+33
| | | | | | | | | Submitted by giffunip@yahoo.com; I fixed a couple of nearby errors and incorrect changes in the patch. llvm.org/pr27634 llvm-svn: 275983
* [compiler-rt] Fix Asan imports/exports unittestEtienne Bergeron2016-07-191-5/+24
| | | | | | | | | | | | | | | | | | | Summary: Avoid mismatch between imports/exports for 32-bit and 64-bits version. The test is running grep over macros to detect which functions are intercepted. Unfortunately, exception handlers differ in 32-bit and 64-bit. This patch is removing the exception handlers from the test. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22484 llvm-svn: 275982
* [X86][SSE] Reimplement SSE fp2si conversion intrinsics instead of using ↵Simon Pilgrim2016-07-1914-95/+138
| | | | | | | | | | | | | | | | | | generic IR D20859 and D20860 attempted to replace the SSE (V)CVTTPS2DQ and VCVTTPD2DQ truncating conversions with generic IR instead. It turns out that the behaviour of these intrinsics is different enough from generic IR that this will cause problems, INF/NAN/out of range values are guaranteed to result in a 0x80000000 value - which plays havoc with constant folding which converts them to either zero or UNDEF. This is also an issue with the scalar implementations (which were already generic IR and what I was trying to match). This patch changes both scalar and packed versions back to using x86-specific builtins. It also deals with the other scalar conversion cases that are runtime rounding mode dependent and can have similar issues with constant folding. A companion clang patch is at D22105 Differential Revision: https://reviews.llvm.org/D22106 llvm-svn: 275981
* [include-fixer] A refactoring of IncludeFixerContext.Haojian Wu2016-07-196-66/+66
| | | | | | | | | | | | | | | | | Summary: No functional changes in this patch. It is a refactoring (pull out a structure representing the symbol being queried). This is a preparing step for inserting missing namespace qualifiers to all instances of an unidentified symbol. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22510 llvm-svn: 275980
* [ARM] Refactor Thumb2 Mul and Mla instr descsSam Parker2016-07-192-331/+169
| | | | | | | | | | | Recommitting after r274347 was reverted. This patch introduces some classes to refactor the 3 and 4 register Thumb2 multiplication instruction descriptions, plus improved tests for some of those instructions. Differential Revision: https://reviews.llvm.org/D21929 llvm-svn: 275979
* [AArch64] PredictableSelectIsExpensive for Vulcan.Pankaj Gode2016-07-191-0/+1
| | | | | | | | Adding PredictableSelectIsExpensive for Vulcan Differential Revision: https://reviews.llvm.org/D22448 llvm-svn: 275978
* Add support for tlsldm assembler operator to ARM targetPeter Smith2016-07-192-4/+13
| | | | | | | | | | | | | | | | | | | | The standard local dynamic model for TLS on ARM systems needs two relocations: - R_ARM_TLS_LDM32 (module idx) - R_ARM_TLS_LDO32 (offset of object from origin of module TLS block) In GNU style assembler we use symbol(tlsldm) and symbol(tlsldo) to produce these relocations. llvm-mc for ARM supports symbol(tlsldo) but does not support symbol(tlsldm). This patch wires up the existing symbol(tlsldm) to R_ARM_TLS_LDM32. TLS for ARM is defined in Addenda to, and Errata in, the ABI for the ARM Architecture Differential Revision: https://reviews.llvm.org/D22461 llvm-svn: 275977
* [AARCH64] Fix linu triple typoSimon Pilgrim2016-07-191-1/+1
| | | | | | As promised in D22191 llvm-svn: 275976
* Add support of the latest Ubuntu (Yakkety Yak - 16.10)Sylvestre Ledru2016-07-191-1/+3
| | | | llvm-svn: 275975
* Fix for failing bot sanitizer-x86_64-linux-fast after r275970Dmitry Polukhin2016-07-191-3/+1
| | | | | | More info http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14774/steps/check-clang%20msan/logs/stdio llvm-svn: 275974
* [AARCH64] Enable AARCH64 lit tests on windows dev machinesSimon Pilgrim2016-07-19177-212/+193
| | | | | | | | | | As discussed on PR27654, this patch fixes the triples of a lot of aarch64 tests and enables lit tests on windows This will hopefully help stop cases where windows developers break the aarch64 target Differential Revision: https://reviews.llvm.org/D22191 llvm-svn: 275973
* Fix build with gcc 6.Rafael Espindola2016-07-194-11/+11
| | | | llvm-svn: 275972
* Get rid of VS2015 operator precedence warning. NFCI.Simon Pilgrim2016-07-191-1/+1
| | | | llvm-svn: 275971
* Deprecated (legacy) string literal conversion to 'char *' causes strange ↵Dmitry Polukhin2016-07-193-4/+16
| | | | | | | | | | | | | | overloading resolution It's a patch for PR28050. Seems like overloading resolution wipes out the first standard conversion sequence (before user-defined conversion) in case of deprecated string literal conversion. Differential revision: https://reviews.llvm.org/D21228 Patch by Alexander Makarov llvm-svn: 275970
* GPGPU: Disable invariant load hoisting for GPU code generationTobias Grosser2016-07-191-0/+5
| | | | | | | | This simplifies the upcoming patches to add code generation for ScopStmts. Load hoisting support will later be added in a separate commit. This commit will be implicitly tested by the subsequent GPGPU changes. llvm-svn: 275969
* [mips][ias] R_MIPS_GOT_(PAGE|OFST) do not need symbolsDaniel Sanders2016-07-192-9/+35
| | | | | | | | | | Reviewers: sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: https://reviews.llvm.org/D22458 llvm-svn: 275968
* [mips] Correct label prefixes for N32 and N64.Daniel Sanders2016-07-1935-280/+400
| | | | | | | | | | | | | | | | | Summary: N32 and N64 follow the standard ELF conventions (.L) whereas O32 uses its own ($). This fixes the majority of object differences between -fintegrated-as and -fno-integrated-as. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D22412 llvm-svn: 275967
* [mips] Recognise the triple used by Debian stretch for mips64el.Daniel Sanders2016-07-192-2/+6
| | | | | | | | | | | | | Summary: The triple used for this distribution is mips64el-linux-gnuabi64. Reviewers: sdardis Subscribers: sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D22406 llvm-svn: 275966
* [ELF] Minimal PHDRS parser and section to segment assignment supportEugene Leviant2016-07-195-66/+343
| | | | llvm-svn: 275965
* [InstCombine] Minor cleanup of cast simplification code [NFC]Tobias Grosser2016-07-193-60/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch cleans up parts of InstCombine to raise its compliance with the LLVM coding standards and to increase its readability. The changes and according rationale are summarized in the following: - Rename `ShouldOptimizeCast()` to `shouldOptimizeCast()` since functions should start with a lower case letter. - Move `shouldOptimizeCast()` from InstCombineCasts.cpp to InstCombineAndOrXor.cpp since it's only used there. - Simplify interface of `shouldOptimizeCast()`. - Minor code style adaptions in `shouldOptimizeCast()`. - Remove the documentation on the function definition of `shouldOptimizeCast()` since it just repeats the documentation on its declaration. Also enhance the documentation on its declaration with more information describing its intended use and make it doxygen-compliant. - Change a comment in `foldCastedBitwiseLogic()` from `fold (logic (cast A), (cast B)) -> (cast (logic A, B))` to `fold logic(cast(A), cast(B)) -> cast(logic(A, B))` since the surrounding comments use this format. - Remove comment `Only do this if the casts both really cause code to be generated.` in `foldCastedBitwiseLogic()` since it just repeats parts of the documentation of `shouldOptimizeCast()` and does not help to improve readability. - Simplify the interface of `isEliminableCastPair()`. - Removed the documentation on the function definition of `isEliminableCastPair()` which only contained obvious statements about its implementation. Instead added more general doxygen-compliant documentation to its declaration. - Renamed parameter `DoXform` of `transformZExtIcmp()` to `DoTransform` to make its intention clearer. - Moved documentation of `transformZExtIcmp()` from its definition to its declaration and made it doxygen-compliant. Reviewers: vtjnash, grosser Subscribers: majnemer, llvm-commits Differential Revision: https://reviews.llvm.org/D22449 Contributed-by: Matthias Reisinger llvm-svn: 275964
* Style: drop some unnecessary ';' [NFC]Tobias Grosser2016-07-193-7/+7
| | | | llvm-svn: 275963
* test: Add missing 'REQUIRES' lineTobias Grosser2016-07-191-0/+2
| | | | llvm-svn: 275962
* Reformat comment from 3 to 2 lines. NFC.George Rimar2016-07-191-2/+1
| | | | llvm-svn: 275961
* test: Add missing 'REQUIRES' lineTobias Grosser2016-07-191-0/+2
| | | | llvm-svn: 275960
* Fixed comment. NFC.George Rimar2016-07-191-1/+1
| | | | llvm-svn: 275959
* [clang-rename] add support for overridden functionsKirill Bobyrev2016-07-191-42/+102
| | | | | | | | Reviewers: klimek Differential Revision: https://reviews.llvm.org/D22408 llvm-svn: 275958
* GPGPU: Emit in-kernel synchronization statementsTobias Grosser2016-07-192-0/+54
| | | | | | | We use this opportunity to further classify the different user statements that can arise and add TODOs for the ones not yet implemented. llvm-svn: 275957
* GPGPU: generate control flow within the kernelTobias Grosser2016-07-194-9/+35
| | | | llvm-svn: 275956
* GPGPU: add scop parameters to kernel argumentsTobias Grosser2016-07-192-1/+57
| | | | llvm-svn: 275955
* GPGPU: add host iterators to kernel argumentsTobias Grosser2016-07-192-1/+26
| | | | llvm-svn: 275954
* GPGPU: add intrinsic functions to obtain a kernels thread and block idsTobias Grosser2016-07-193-0/+75
| | | | llvm-svn: 275953
OpenPOWER on IntegriCloud