summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Update release notes for BinaryFormat library.Zachary Turner2017-06-081-0/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D34001 llvm-svn: 304995
* Frontend support for Nios2 target.Nikolai Bozhenov2017-06-085-0/+270
| | | | | | | | | | | | | | Summary: - Implements TargetInfo class for Nios2 target. - Enables handling of -march and -mcpu options for Nios2 target. - Definition of Nios2 builtin functions. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D33356 Author: belickim <mateusz.belicki@intel.com> llvm-svn: 304994
* Changed a comparison operator for std::stable_sort to implement strict weak ↵Galina Kistanova2017-06-082-30/+33
| | | | | | | | | ordering. This is a temporarily fix which needs additional work, as it triggers a test3 failure. test3 is commented out till then. llvm-svn: 304993
* [Power9] Exploit vector integer extend instructionsZaara Syeda2017-06-082-0/+141
| | | | | | | | | | | | | | This patch adds build vector patterns to exploit the vector integer extend instructions: vextsb2w - Vector Extend Sign Byte To Word vextsb2d - Vector Extend Sign Byte To Doubleword vextsh2w - Vector Extend Sign Halfword To Word vextsh2d - Vector Extend Sign Halfword To Doubleword vextsw2d - Vector Extend Sign Word To Doubleword Differential Revision: https://reviews.llvm.org/D33510 llvm-svn: 304992
* [PowerPC] add memcmp test with nobuiltin attr; NFCSanjay Patel2017-06-081-0/+15
| | | | | | | | | | | In SDAG, we don't expand libcalls with a nobuiltin attribute. It's not clear if that's correct from the existing code comment: "Don't do the check if marked as nobuiltin for some reason." ...adding a test here either way to show that there is currently a different behavior implemented in the CGP-based expansion. llvm-svn: 304991
* [LazyValueInfo] Make LVILatticeVal intersect method take arguments by ↵Craig Topper2017-06-081-1/+1
| | | | | | reference so we don't copy ConstantRanges unless we need to. llvm-svn: 304990
* [x86] remove unused param from tests; NFCSanjay Patel2017-06-081-10/+10
| | | | llvm-svn: 304989
* Wdocumentation fix.Simon Pilgrim2017-06-081-1/+1
| | | | llvm-svn: 304988
* [CGP / PowerPC] avoid multi-block overhead for simple memcmp expansionSanjay Patel2017-06-082-26/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test diff for PowerPC shows we can better optimize if this case is one block. For x86, there's would be a substantial difference if CGP expansion was enabled because branches are assumed cheap and SDAG can't optimize across blocks. Instead of this: _cmp_eq8: movq (%rdi), %rax cmpq (%rsi), %rax je LBB23_1 ## BB#2: ## %res_block movl $1, %ecx jmp LBB23_3 LBB23_1: xorl %ecx, %ecx LBB23_3: ## %endblock xorl %eax, %eax testl %ecx, %ecx sete %al retq We get this: cmp_eq8: movq (%rdi), %rcx xorl %eax, %eax cmpq (%rsi), %rcx sete %al retq And that matches the optimal codegen that we get from the current expansion in SelectionDAGBuilder::visitMemCmpCall(). If this looks right, then I just need to confirm that vector-sized expansion will work from here, and we can enable CGP memcmp() expansion for x86. Ie, we'll bypass the power-of-2 special cases currently optimized in SDAG because we can lower the IR produced here optimally. Differential Revision: https://reviews.llvm.org/D34005 llvm-svn: 304987
* Add scheduler classes to integer/float horizontal operations.Andrew V. Tischenko2017-06-087-21/+142
| | | | | | | This patch will close PR32801. Differential Revision: https://reviews.llvm.org/D33203 llvm-svn: 304986
* [SLP] More comments fix, NFC.Alexey Bataev2017-06-081-3/+3
| | | | | | Fixed spelling errors on function description. llvm-svn: 304985
* [sanitizer-coverage] Allow using KASAN instrumentation with sancovAlexander Potapenko2017-06-082-2/+3
| | | | llvm-svn: 304984
* [clangd] extend completion testKrasimir Georgiev2017-06-081-2/+28
| | | | llvm-svn: 304983
* [PDB] Don't crash on /debug:fastlink PDBs.Zachary Turner2017-06-083-66/+77
| | | | | | | | | | Apparently support for /debug:fastlink PDBs isn't part of the DIA SDK (!), and it was causing llvm-pdbdump to crash because we weren't checking for a null pointer return value. This manifests when calling findChildren on the IDiaSymbol, and it returns E_NOTIMPL. llvm-svn: 304982
* [clangd] Separate authority less uris from completion testsKrasimir Georgiev2017-06-082-18/+33
| | | | llvm-svn: 304981
* [clangd] Add parameter and return type information to completion resultsKrasimir Georgiev2017-06-082-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds information about the parameters and return types of completion candidates. Previously, for the following code: ``` struct S { int func(int a, double b) const; }; ``` the completer would only return the label of the candidate `func`. Now it will also return the return type `int` and will format the label for the candidate as `func(int a, double b) const`. Reviewers: bkramer, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D34033 llvm-svn: 304980
* [x86] add tests for memcmp expansion; NFCSanjay Patel2017-06-081-37/+293
| | | | | | | | | | | | We already had a test to demonstrate PR33325: https://bugs.llvm.org/show_bug.cgi?id=33325 I'm adding tests for general memcmp expansion (see D34005 / D33963) and: https://bugs.llvm.org/show_bug.cgi?id=33329 ...plus non-power-of-2 sizes, so we can see what that looks like currently or if expanded. llvm-svn: 304979
* [libclang] Expose typedef and address space functionsSven van Haastregt2017-06-085-1/+63
| | | | | | | | | | | | Expose the following functions: - clang_getTypedefName - clang_getAddressSpace Patch by Simon Perretta. Differential Revision: https://reviews.llvm.org/D33598 llvm-svn: 304978
* [clang-tidy] New checker to replace dynamic exception specificationsAlexander Kornienko2017-06-0810-0/+490
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: New checker to replace dynamic exception specifications This is an alternative to D18575 which relied on reparsing the decl to find the location of dynamic exception specifications, but couldn't deal with preprocessor conditionals correctly without reparsing the entire file. This approach uses D20428 to find dynamic exception specification locations and handles all cases correctly. Reviewers: aaron.ballman, alexfh Reviewed By: aaron.ballman, alexfh Subscribers: xazax.hun, mgehre, malcolm.parsons, mgorny, JDevlieghere, cfe-commits, Eugene.Zelenko, etienneb Patch by Don Hinton! Differential Revision: https://reviews.llvm.org/D20693 llvm-svn: 304977
* Fix backtrace of noreturn functions situated at the end of a modulePavel Labath2017-06-0814-36/+136
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: When a call instruction is the last instruction in a function, the backtrace PC will point past the end of the function. We already had special code to handle that, but we did not handle the case where the PC ends up outside of the bounds of the module containing the function, which is a situation that occured in TestNoreturnUnwind on android for some arch/compiler combinations. I fix this by adding an argument to Address resolution code which states that we are ok with addresses pointing to the end of a module/section to resolve to that module/section. I create a reproducible test case for this situation by hand-crafting an executable which has a noreturn function at the end of a module. Reviewers: jasonmolenda, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D32022 llvm-svn: 304976
* InferAddressSpaces: Avoid assertion failure with replacing identicalNirav Dave2017-06-082-0/+43
| | | | | | | | | | | | | | | cloned constexpr Have cloneConstantExprWithNewAddressSpaces return nullptr when returning initial ConstantExpr. Reviewers: arsenm Subscribers: jholewinski, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D33995 llvm-svn: 304975
* Fix a lot of typos. NFC.Michael Kruse2017-06-0829-83/+83
| | | | llvm-svn: 304974
* Regenerate testSimon Pilgrim2017-06-081-24/+24
| | | | llvm-svn: 304973
* This patch closes PR28513: an optimization of multiplication by different ↵Andrew V. Tischenko2017-06-085-361/+4334
| | | | | | | | constants. The initial patch was rejected: I fixed the issue and re-apply it. llvm-svn: 304972
* [ARM] GlobalISel: Add more tests. NFCDiana Picus2017-06-081-0/+149
| | | | | | | | Add a couple of tests to increase coverage for the TableGen'erated code, in particular for rules where 2 generic instructions may be combined into a single machine instruction. llvm-svn: 304971
* [BPI] Don't assume that strcmp returning >0 is more likely than <0John Brawn2017-06-086-16/+327
| | | | | | | | | | | | | | | | | | | | The zero heuristic assumes that integers are more likely positive than negative, but this also has the effect of assuming that strcmp return values are more likely positive than negative. Given that for nonzero strcmp return values it's the ordering of arguments that determines the sign of the result there's no reason to assume that's true. Fix this by inspecting the LHS of the compare and using TargetLibraryInfo to decide if it's strcmp-like, and if so only assume that nonzero is more likely than zero i.e. strings are more often different than the same. This causes a slight code generation change in the spec2006 benchmark 403.gcc, but with no noticeable performance impact. The intent of this patch is to allow better optimisation of dhrystone on Cortex-M cpus, but currently it won't as there are also some changes that need to be made to if-conversion. Differential Revision: https://reviews.llvm.org/D33934 llvm-svn: 304970
* XFAIL tuple deduction guide test on GCCEric Fiselier2017-06-081-0/+5
| | | | llvm-svn: 304969
* [Go] Subtypes functionAndrew Wilkins2017-06-082-0/+32
| | | | | | | | | | This patch adds LLVMGetSubtypes to Go API (as Type.Subtypes), tests included. Patch by Ekaterina Vaartis! Differential Revision: https://reviews.llvm.org/D33901 llvm-svn: 304968
* Add tests for class template deduction on std::tuple.Eric Fiselier2017-06-082-0/+160
| | | | llvm-svn: 304967
* Revert r304955 - Fix class template deduction for scoped_lock.Eric Fiselier2017-06-081-5/+0
| | | | | | | | Richard decided to fix these cases in Clang, even though they are representative of a larger problem for more complex cases. llvm-svn: 304966
* Do not inherit default arguments for friend function in class template.Serge Pavlov2017-06-082-11/+50
| | | | | | | | | | | | | | | | | | | A function declared in a friend declaration may have declarations prior to the containing class definition. If such declaration defines default argument, the friend function declaration inherits them. This behavior causes problems if the class where the friend is declared is a template: during the class instantiation the friend function looks like if it had default arguments, so error is triggered. With this change friend functions declared in class templates do not inherit default arguments. Actual set of them will be defined at the point where the containing class is instantiated. This change fixes PR12724. Differential Revision: https://reviews.llvm.org/D30393 llvm-svn: 304965
* Improve diagnostics if friend function redefines file-level function.Serge Pavlov2017-06-082-1/+34
| | | | | | | | | | | | | | | | | | | | | | Clang makes check for function redefinition after it merged the new declaration with the existing one. As a result, it produces poor diagnostics in the case of a friend function defined inline, as in the code: ``` void func() {} class C { friend void func() {} }; ``` Error message in this case states that `inline declaration of 'func' follows non-inline definition`, which is misleading, as `func` does not have explicit `inline` specifier. With this changes compiler reports function redefinition if the new function is a friend defined inline and it does not have explicit `inline` specifier. Differential Revision: https://reviews.llvm.org/D26065 llvm-svn: 304964
* Catch invalid bitwise operation on vector of floatsSerge Pavlov2017-06-082-10/+34
| | | | | | | | | | | | Bitwise complement applied to vector of floats described with attribute `ext_vector_type` is not diagnosed as error. Attempt to compile such construct causes assertion violation in Instruction.cpp. With this change the complement is treated similar to the case of vector type described with attribute `vector_size`. Differential Revision: https://reviews.llvm.org/D33732 llvm-svn: 304963
* [ODRHash] Make diagnostic message more readable.Richard Trieu2017-06-081-4/+6
| | | | | | | Change the diagnostic message from r304956 to be less confusing by reordering the flow of information. llvm-svn: 304962
* Move fabricateDefaultCommands earlier.Rafael Espindola2017-06-082-8/+13
| | | | | | This then requires delaying a call to getHeaderSize. llvm-svn: 304961
* Simplify.Richard Smith2017-06-081-8/+4
| | | | llvm-svn: 304960
* Correct AMDGPU Hawaii and Kabini target namesTony Tye2017-06-081-3/+3
| | | | | | | | The FirePro and Radeon versions of Hawaii have different 64 bit floating point configurations so use distinct target names for them. Rename the target name for Kabini to accommodate. Differential Revision: https://reviews.llvm.org/D34016 llvm-svn: 304959
* Object: Factor out the code for creating the irsymtab for an arbitrary ↵Peter Collingbourne2017-06-085-45/+96
| | | | | | | | | | | bitcode file. This code now lives in lib/Object. The idea is that it can now be reused by IRObjectFile among other things. Differential Revision: https://reviews.llvm.org/D31921 llvm-svn: 304958
* Weaken restriction in r304862 to allow implicit deduction guides to referenceRichard Smith2017-06-083-5/+16
| | | | | | | the injected-class-name of a specialization that uses a partial / explicit specialization. llvm-svn: 304957
* [ODRHash] Change the fall-back diagnostic error.Richard Trieu2017-06-082-7/+14
| | | | | | | Provide a little more information when a ODR violation is detected, but the specific error could not be diagnosed. llvm-svn: 304956
* Fix class template deduction for scoped_lock.Eric Fiselier2017-06-081-1/+5
| | | | | | | | | r304862 changed how CTD handles deducing a non-primary class template using a non-dependent constructor of the primary template. This change requires libc++ to provide explicit deduction guides to make scoped_lock work again. llvm-svn: 304955
* [CodeGen] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-06-0720-195/+286
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 304954
* Reapply r304929 [mips] Add runtime options to enable/disable madd/sub.fmtPetar Jovanovic2017-06-075-1/+115
| | | | | | | | | | | | | | | | | The test in r304929 broke multiple buildbots as it expected mips target to be registered and available (which is not necessarily true). Updating the test with this condition. Original commit: [mips] Add runtime options to enable/disable madd.fmt and msub.fmt Add options to clang: -mmadd4 and -mno-madd4, use it to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. Patch by Stefan Maksimovic. llvm-svn: 304953
* Use OutputSectionCommands in assignOffsets.Rafael Espindola2017-06-072-8/+11
| | | | | | This allows moving clearOutputSections earlier. llvm-svn: 304952
* When determining the target function of an explicit instantiation, makeJohn McCall2017-06-072-19/+38
| | | | | | | | | | sure that non-template functions don't end up in the candidate set. Fixes PR14211. Patch by Don Hinton! llvm-svn: 304951
* Delete dead code.Rafael Espindola2017-06-071-3/+0
| | | | | | | The real offsets are computed in assignAddresses and we compute the special cases we need earlier after this. llvm-svn: 304950
* [clang-tidy] When" -fno-exceptions is used", this warning is better to be ↵Yan Wang2017-06-072-5/+14
| | | | | | | | | | | | | | | | | | suppressed. Summary: "misc-noexcept-move-constructor" is better not to be issued when "-fno-exceptions" is set. Reviewers: chh, alexfh, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits, xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D34002 llvm-svn: 304949
* Move clearOutputSections earlier. NFC.Rafael Espindola2017-06-071-2/+1
| | | | llvm-svn: 304948
* Convert an use of OutputSections to OutputSectionCommands.Rafael Espindola2017-06-073-11/+16
| | | | | | This allows moving clearOutputSections a bit earlier. llvm-svn: 304947
* [c++1z] Support deducing B in noexcept(B).Richard Smith2017-06-077-45/+175
| | | | | | | | This is not required by the standard (yet), but there seems to be reasonable support for this being a defect according to CWG discussion, and libstdc++ 7.1 relies on it working. llvm-svn: 304946
OpenPOWER on IntegriCloud