summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use new triple API to check comdat /NFCXinliang David Li2016-05-251-1/+1
| | | | llvm-svn: 270728
* Use new triple API to check if comdat is supportedXinliang David Li2016-05-251-1/+1
| | | | llvm-svn: 270727
* Add a new helper API in triple /NFCXinliang David Li2016-05-251-0/+3
| | | | llvm-svn: 270726
* [obj2yaml] [yaml2obj] MachO support for rebase opcodesChris Bieneman2016-05-255-21/+264
| | | | | | This is the first bit of support for MachO __LINKEDIT segment data. llvm-svn: 270724
* [CMake] LINK_LIBS need to be public for Darwin dylib targetsChris Bieneman2016-05-252-12/+18
| | | | | | This should actually address PR27855. This results in adding references to the system libs inside generated dylibs so that they get correctly pulled in when linking against the dylib. llvm-svn: 270723
* Move and add comments to the top for tailcall-string-rvo.llTim Shen2016-05-251-5/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D20311 llvm-svn: 270722
* [ELF] - Added support for jmp/call relaxations when ↵George Rimar2016-05-252-9/+59
| | | | | | | | | | | | | | R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX are used. D15779 introduced basic approach to support new relaxations. This patch implements relaxations for jmp and call instructions, described in System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf, B.2 "B.2 Optimize GOTPCRELX Relocations") Differential revision: http://reviews.llvm.org/D20622 llvm-svn: 270721
* [SDAG] Add a fallback multiplication expansionHal Finkel2016-05-252-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | LegalizeIntegerTypes does not have a way to expand multiplications for large integer types (i.e. larger than twice the native bit width). There's no standard runtime call to use in that case, and so we'd just assert. Unfortunately, as it turns out, it is possible to hit this case from standard-ish C code in rare cases. A particular case a user ran into yesterday involved an __int128 induction variable and a loop with a quadratic (not linear) recurrence which triggered some backend logic using SCEVExpander. In this case, the BinomialCoefficient code in SCEV generates some i129 variables, which get widened to i256. At a high level, this is not actually good (i.e. the underlying optimization, PPCLoopPreIncPrep, should not be transforming the loop in question for performance reasons), but regardless, the backend shouldn't crash because of cost-modeling issues in the optimizer. This is a straightforward implementation of the multiplication expansion, based on the algorithm in Hacker's Delight. I validated it against the code for the mul256b function from http://locklessinc.com/articles/256bit_arithmetic/ using random inputs. There should be no functional change for previously-working code (the new expansion code only replaces an assert). Fixes PR19797. llvm-svn: 270720
* [ThinLTO] Fix test check prefix so that intended prefix testedTeresa Johnson2016-05-251-1/+1
| | | | | | | There aren't any checks with prefix PROMOTE, should be PROMOTE_MOD1 which wasn't being tested (but works as expected). llvm-svn: 270719
* [x86, AVX] allow explicit calls to VZERO* to modify state in ↵Sanjay Patel2016-05-252-11/+9
| | | | | | | | | | VZeroUpperInserter pass (PR27823) As noted in the review, there are still problems, so this doesn't the bug completely. Differential Revision: http://reviews.llvm.org/D20529 llvm-svn: 270718
* Make SectionPiece 8 bytes smaller on LP64.Rui Ueyama2016-05-252-12/+23
| | | | | | | | | | | | This patch makes SectionPiece class 8 bytes smaller on platforms on which pointer size is 8 bytes. Sean suggested in a post commit review for r270340 that this could make a differentce, and it actually is. Time to link clang (with debug info) improved from 6.725 seconds to 6.589 seconds or by about 2%. Differential Revision: http://reviews.llvm.org/D20613 llvm-svn: 270717
* [RuntimeDyld] Call the SymbolResolver::findSymbolInLogicalDylib method whenLang Hames2016-05-258-56/+52
| | | | | | | | | | | | | | | | | searching for external symbols, and fall back to the SymbolResolver::findSymbol method if the former returns null. This makes RuntimeDyld behave more like a static linker: Symbol definitions from within the current module's "logical dylib" will be preferred to external definitions. We can build on this behavior in the future to properly support weak symbol handling. Custom symbol resolvers that override the findSymbolInLogicalDylib method may notice changes due to this patch. Clients who have not overridden this method should generally be unaffected, however users of the OrcMCJITReplacement class may notice changes. llvm-svn: 270716
* Clarify that we match BSwap in InstCombine and BitReverse in CGP. NFC.Chad Rosier2016-05-255-10/+10
| | | | | | | | Also, rename recognizeBitReverseOrBSwapIdiom to recognizeBSwapOrBitReverseIdiom, so the ordering of the MatchBSwaps and MatchBitReversals arguments are consistent with the function name. llvm-svn: 270715
* Speed up check by using a recursive visitor.Samuel Benzaquen2016-05-252-66/+84
| | | | | | | | | | | | | | | | Summary: Use a recursive visitor instead of forEachDescendant() matcher. The latter requires several layers of virtual function calls for each node and it is more expensive than the visitor. Benchmark results show improvement of ~6% walltime in clang-tidy. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20597 llvm-svn: 270714
* [tsan] Change some OS X tests to include system headers (xpc.h, mman.h) more ↵Kuba Brecka2016-05-253-3/+7
| | | | | | explicitly. llvm-svn: 270713
* Do not ignore --no_ctors_in_init_array flag.Rui Ueyama2016-05-251-1/+0
| | | | | | That flag is probably too dangerous to ignore silently. llvm-svn: 270711
* [X86][AVX] Sync with clang/test/CodeGen/avx2-builtins.cSimon Pilgrim2016-05-251-98/+1659
| | | | | | Only tests for the gather intrinsic are still to be added llvm-svn: 270710
* ELF: improve CIE no-augmentation testEd Maste2016-05-251-0/+7
| | | | | | | | | | | | | Add another possible error that may be reported for the same case. The original reproduction case that prompted r270706 produced the error "corrupted CIE" instead of "corrupted or unsupported CIE information". The specific error depends on arbitrary data later in the file so check that neither is emitted in case the input is ever changed. Document the process used to create the input .o and rename the test file to .s, as requested by Rafael. llvm-svn: 270709
* [X86][AVX2] Full set of AVX2 intrinsics testsSimon Pilgrim2016-05-251-600/+745
| | | | | | llvm/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll will be synced to this llvm-svn: 270708
* [Clang][AVX512][Builtin] Fix palignr intrinsics headerMichael Zuckerman2016-05-251-3/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D20620 llvm-svn: 270707
* ELF: Handle empty CIE augmentation stringEd Maste2016-05-253-1/+11
| | | | | | | | | | | "A zero length string indicates that no augmentation data is present." The FreeBSD/mips toolchain (GCC 4.2.1) generates .debug_frame sections containing CIE records that have an empty augmentation string. Differential Revision: http://reviews.llvm.org/D19928 llvm-svn: 270706
* [ELF] - Implemented optimization for R_X86_64_GOTPCREL relocation.George Rimar2016-05-258-6/+199
| | | | | | | | | | | | | | | | System V Application Binary Interface AMD64 Architecture Processor Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf, B.2 "B.2 Optimize GOTPCRELX Relocations") introduces possible relaxations for R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. That patch implements the next relaxation: mov foo@GOTPCREL(%rip), %reg => lea foo(%rip), %reg and also opens door for implementing all other ones. Implementation was suggested by Rafael Ávila de Espíndola with few additions and testcases by myself. Differential revision: http://reviews.llvm.org/D15779 llvm-svn: 270705
* [AVX512] Don't rely on value names. They're different in release builds.Benjamin Kramer2016-05-251-9/+9
| | | | llvm-svn: 270704
* [include-fixer] /usr/include/xlocal.h to include/xlocal.h in hardcoded map.Eric Liu2016-05-251-1/+1
| | | | llvm-svn: 270703
* Fix mangled name of method with ns_consumed parameters.Nico Weber2016-05-254-10/+21
| | | | | | | | | | | | | | | | | | | | | | | When a function/method use a parameter with "ns_consumed" attribute, ensure that the mangled name is the same whether -fobjc-arc is used or not. Since "ns_consumed" attribute is generally used to inform ARC that a function/method does sink the reference, it mean it is usually implemented in a compilation unit compiled without -fobjc-arc but used form a compilation unit compiled with it. Originally found while trying to use "ns_consumed" attribute in an Objective-C++ file in Chromium (http://crbug.com/599980) where it caused a linker error. Regression introduced by revision 262278 (previously the attribute was incorrectly not part of the mangled name). Patch from Sylvain Defresne <sdefresne@chromium.org>! http://reviews.llvm.org/D20113 llvm-svn: 270702
* Include local header with quotes instead of angle brackets.Benjamin Kramer2016-05-251-1/+1
| | | | | | This works by accident because we pass '-I.' llvm-svn: 270701
* [include-fixer] Simplify the code since we won't handle multiple includes at ↵Haojian Wu2016-05-251-32/+12
| | | | | | | | | | | | once. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20581 llvm-svn: 270700
* [Clang][AVX512][BUILTIN] Add missing intrinsics for castMichael Zuckerman2016-05-252-11/+125
| | | | | | Differential Revision: http://reviews.llvm.org/D20523 llvm-svn: 270699
* [ThinLTO] Refactor ODR resolution and internalization (NFC)Teresa Johnson2016-05-255-174/+211
| | | | | | | | | Move the now index-based ODR resolution and internalization routines out of ThinLTOCodeGenerator.cpp and into either LTO.cpp (index-based analysis) or FunctionImport.cpp (index-driven optimizations). This is to enable usage by other linkers. llvm-svn: 270698
* Fix braced initializer list (NFC)Teresa Johnson2016-05-251-1/+1
| | | | | | | | | | | | | | After r270617 I am getting an error when building: projects/compiler-rt/lib/profile/InstrProfilingFile.c:33:36: error: missing field 'PidChars' initializer [-Werror,-Wmissing-field-initializers] lprofFilename lprofCurFilename = {0}; ^ Fix the aggregate initializer. llvm-svn: 270697
* [include-fixer] moved STLPostfixMap into findAllSymbols library and make it ↵Eric Liu2016-05-256-364/+364
| | | | | | | | | | | | | | a static variable in function. Summary: [include-fixer] moved STLPostfixMap into findAllSymbols library and make it a static variable in function. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20619 llvm-svn: 270696
* [SCEV] No-wrap flags are not propagated when folding "{S,+,X}+T ==> {S+T,+,X}"Oleg Ranevskyy2016-05-257-19/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: **Description** This makes `WidenIV::widenIVUse` (IndVarSimplify.cpp) fail to widen narrow IV uses in some cases. The latter affects IndVarSimplify which may not eliminate narrow IV's when there actually exists such a possibility, thereby producing ineffective code. When `WidenIV::widenIVUse` gets a NarrowUse such as `{(-2 + %inc.lcssa),+,1}<nsw><%for.body3>`, it first tries to get a wide recurrence for it via the `getWideRecurrence` call. `getWideRecurrence` returns recurrence like this: `{(sext i32 (-2 + %inc.lcssa) to i64),+,1}<nsw><%for.body3>`. Then a wide use operation is generated by `cloneIVUser`. The generated wide use is evaluated to `{(-2 + (sext i32 %inc.lcssa to i64))<nsw>,+,1}<nsw><%for.body3>`, which is different from the `getWideRecurrence` result. `cloneIVUser` sees the difference and returns nullptr. This patch also fixes the broken LLVM tests by adding missing <nsw> entries introduced by the correction. **Minimal reproducer:** ``` int foo(int a, int b, int c); int baz(); void bar() { int arr[20]; int i = 0; for (i = 0; i < 4; ++i) arr[i] = baz(); for (; i < 20; ++i) arr[i] = foo(arr[i - 4], arr[i - 3], arr[i - 2]); } ``` **Clang command line:** ``` clang++ -mllvm -debug -S -emit-llvm -O3 --target=aarch64-linux-elf test.cpp -o test.ir ``` **Expected result:** The ` -mllvm -debug` log shows that all the IV's for the second `for` loop have been eliminated. Reviewers: sanjoy Subscribers: atrick, asl, aemerson, mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D20058 llvm-svn: 270695
* D20525: Use more general function for getting gtid which may be faster than ↵Andrey Churbanov2016-05-251-1/+1
| | | | | | specific one. llvm-svn: 270694
* Fix build problem in MSVCAlexey Bataev2016-05-251-4/+1
| | | | llvm-svn: 270693
* Introduce a native-only unwinder build.Asiri Rathnayake2016-05-258-31/+139
| | | | | | | | | | | | | | | | Currently libunwind is built to support cross-unwinding [1] by default, which requires the buffers unw_context_t and unw_cursor_t to be large enough to hold the vritual register set (VRS) of any supported architecture. This is not desirable for some platforms where the stack usage of the unwinder needs to be kept to a minimum (e.g. bare-metal targets). The current patch introduces a native-only (-DLIBUNWIND_ENABLE_CROSS_UNWINDING=OFF) unwinder variant that adopts strict sizes for the buffers unw_context_t and unw_cursor_t depending on the target architecture. [1] http://www.nongnu.org/libunwind/man/libunwind(3).html#section_4 Change-Id: I380fff9a56c16a0fc520e3b1d8454a34b4a48373 llvm-svn: 270692
* Revert "[AArch64] Using new TargetParser in Clang"Renato Golin2016-05-253-23/+48
| | | | | | | | This reverts commit r270688 and r270689. The issue is not a random order, but a different order for some targets and others (prob. Linux vs Darwin). Reverting until we have a better fix. llvm-svn: 270691
* [OPENMP 4.5] Codegen for dacross loop synchronization constructs.Alexey Bataev2016-05-2513-76/+522
| | | | | | | OpenMP 4.5 adds support for doacross loop synchronization. Patch implements codegen for this construct. llvm-svn: 270690
* [AArch64] Try to fix test from r270688 with unordered outputRenato Golin2016-05-251-1/+4
| | | | llvm-svn: 270689
* [AArch64] Using new TargetParser in ClangRenato Golin2016-05-252-47/+19
| | | | | | | | | | Using AArch64TargetParser in clang to avoid repetitive string parsing. Use TargetParser to do ARCH/CPU/ArchExt parsing instead of local implementation. Patch by Jojo Ma. llvm-svn: 270688
* [AArch64] Adding a TargetParser for AArch64Renato Golin2016-05-254-128/+464
| | | | | | | | | | There's already a ARMTargetParser,now adding a similar one for aarch64. so we can use it to do ARCH/CPU/FPU parsing in clang and llvm, instead of string comparison. Patch by Jojo Ma. llvm-svn: 270687
* [ms][dll] #26935 Defining a dllimport function should cause it to be exportedDenis Zobnin2016-05-258-91/+288
| | | | | | | | | | | | | | | | | | | If we have some function with dllimport attribute and then we have the function definition in the same module but without dllimport attribute we should add dllexport attribute to this function definition. The same should be done for variables. Example: struct __declspec(dllimport) C3 { ~C3(); }; C3::~C3() {;} // we should export this definition. Patch by Andrew V. Tischenko Differential revision: http://reviews.llvm.org/D18953 llvm-svn: 270686
* [X86][AVX2] Added more fast-isel tests to match ↵Simon Pilgrim2016-05-251-37/+660
| | | | | | clang/test/CodeGen/avx2-builtins.c llvm-svn: 270685
* Add unit tests for ModuleCachePavel Labath2016-05-254-0/+192
| | | | | | | | | | Reviewers: ovyalov, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20570 llvm-svn: 270684
* [X86][AVX2] Begun adding fast-isel tests to match ↵Simon Pilgrim2016-05-251-0/+557
| | | | | | clang/test/CodeGen/avx2-builtins.c llvm-svn: 270683
* [clang-tidy] Fix typo in test file name.Benjamin Kramer2016-05-251-0/+0
| | | | | | polo llvm-svn: 270682
* [X86][SSE2] Use storeu intrinsics for _mm_storeu_pd/_mm_storeu_pd testsSimon Pilgrim2016-05-251-6/+10
| | | | | | Also fixed name of _mm_store1_pd test llvm-svn: 270681
* [X86][SSE] Use storeu intrinsics for _mm_storeu_ps testSimon Pilgrim2016-05-251-2/+3
| | | | llvm-svn: 270680
* [X86][SSE] Updated _mm_store_ps1 test to match _mm_store1_psSimon Pilgrim2016-05-251-1/+1
| | | | llvm-svn: 270679
* [X86][SSE] Replace (V)CVTDQ2PD(Y) and (V)CVTPS2PD(Y) lossless conversion ↵Simon Pilgrim2016-05-258-143/+170
| | | | | | | | | | intrinsics with generic IR Followup to D20528 clang patch, this removes the (V)CVTDQ2PD(Y) and (V)CVTPS2PD(Y) llvm intrinsics and auto-upgrades to sitofp/fpext instead. Differential Revision: http://reviews.llvm.org/D20568 llvm-svn: 270678
* [X86] Remove the llvm.x86.sse2.storel.dq intrinsic. It hasn't been used in a ↵Craig Topper2016-05-258-71/+45
| | | | | | long time. llvm-svn: 270677
OpenPOWER on IntegriCloud