summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: [JS] Support for (.. of ..) loops.Daniel Jasper2016-02-113-1/+6
| | | | | | | | | | Before: for (var i of[2, 3]) {} After: for (var i of [2, 3]) {} llvm-svn: 260518
* clang-format: Make indentation after "<<" more consistent.Daniel Jasper2016-02-112-3/+16
| | | | | | | | | | | | | | | | | | | | | | Before: Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) << aaa; After: Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) << aaa; llvm-svn: 260517
* separate nested >>Eric Fiselier2016-02-111-1/+1
| | | | llvm-svn: 260516
* Re-commit "Introduce a cmake module to figure out whether we need to link ↵Vasileios Kalintiris2016-02-116-0/+52
| | | | | | | | | | with libatomic." This re-applies commit r260235. However, this time we add -gcc-toolchain to the compiler's flags when the user has specified the LIBCXX_GCC_TOOLCHAIN variable. llvm-svn: 260515
* Teach __hash_table how to handle unordered_map's __hash_value_type.Eric Fiselier2016-02-114-42/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is fairly large and contains a number of changes. The main change is teaching '__hash_table' how to handle '__hash_value_type'. Unfortunately this change is a rampant layering violation, but it's required to make unordered_map conforming without re-writing all of __hash_table. After this change 'unordered_map' can delegate to '__hash_table' in almost all cases. The major changes found in this patch are: * Teach __hash_table to differentiate between the true container value type and the node value type by introducing the "__container_value_type" and "__node_value_type" typedefs. In the case of unordered_map '__container_value_type' is 'pair<const Key, Value>' and '__node_value_type' is '__hash_value_type'. * Switch almost all overloads in '__hash_table' previously taking 'value_type' (AKA '__node_value_type) to take '__container_value_type' instead. Previously 'pair<K, V>' would be implicitly converted to '__hash_value_type<K, V>' because of the function signature. * Add '__get_key', '__get_value', '__get_ptr', and '__move' static functions to '__key_value_types'. These functions allow '__hash_table' to unwrap '__node_value_type' objects into '__container_value_type' and its sub-parts. * Pass '__hash_value_type::__value_' to 'a.construct(p, ...)' instead of '__hash_value_type' itself. The C++14 standard requires that 'a.construct()' and 'a.destroy()' are only ever instantiated for the containers value type. * Remove '__hash_value_type's constructors and destructors. We should never construct an instance of this type. (TODO this is UB but we already do it in plenty of places). * Add a generic "try-emplace" function to '__hash_table' called '__emplace_unique_key_args(Key const&, Args...)'. The following changes were done as cleanup: * Introduce the '_LIBCPP_CXX03_LANG' macro to be used in place of '_LIBCPP_HAS_NO_VARIADICS' or '_LIBCPP_HAS_NO_RVALUE_REFERENCE'. * Cleanup C++11 only overloads that assume an incomplete C++11 implementation. For example this patch removes the __construct_node overloads that do manual pack expansion. * Forward 'unordered_map::emplace' to '__hash_table' and remove dead code resulting from the change. This includes almost all 'unordered_map::__construct_node' overloads. The following changes are planed for future revisions: * Fix LWG issue #2469 by delegating 'unordered_map::operator[]' to use '__emplace_unique_key_args'. * Rewrite 'unordered_map::try_emplace' in terms of '__emplace_unique_key_args'. * Optimize '__emplace_unique' to call '__emplace_unique_key_args' when possible. This prevent unneeded allocations when inserting duplicate entries. The additional follow up work needed after this patch: * Respect the lifetime rules for '__hash_value_type' by actually constructing it. * Make '__insert_multi' act similar to '__insert_unique' for objects of type 'T&' and 'T const &&' with 'T = __container_value_type'. llvm-svn: 260514
* Teach __hash_table how to handle unordered_map's __hash_value_type.Eric Fiselier2016-02-119-357/+1288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is fairly large and contains a number of changes. The main change is teaching '__hash_table' how to handle '__hash_value_type'. Unfortunately this change is a rampant layering violation, but it's required to make unordered_map conforming without re-writing all of __hash_table. After this change 'unordered_map' can delegate to '__hash_table' in almost all cases. The major changes found in this patch are: * Teach __hash_table to differentiate between the true container value type and the node value type by introducing the "__container_value_type" and "__node_value_type" typedefs. In the case of unordered_map '__container_value_type' is 'pair<const Key, Value>' and '__node_value_type' is '__hash_value_type'. * Switch almost all overloads in '__hash_table' previously taking 'value_type' (AKA '__node_value_type) to take '__container_value_type' instead. Previously 'pair<K, V>' would be implicitly converted to '__hash_value_type<K, V>' because of the function signature. * Add '__get_key', '__get_value', '__get_ptr', and '__move' static functions to '__key_value_types'. These functions allow '__hash_table' to unwrap '__node_value_type' objects into '__container_value_type' and its sub-parts. * Pass '__hash_value_type::__value_' to 'a.construct(p, ...)' instead of '__hash_value_type' itself. The C++14 standard requires that 'a.construct()' and 'a.destroy()' are only ever instantiated for the containers value type. * Remove '__hash_value_type's constructors and destructors. We should never construct an instance of this type. (TODO this is UB but we already do it in plenty of places). * Add a generic "try-emplace" function to '__hash_table' called '__emplace_unique_key_args(Key const&, Args...)'. The following changes were done as cleanup: * Introduce the '_LIBCPP_CXX03_LANG' macro to be used in place of '_LIBCPP_HAS_NO_VARIADICS' or '_LIBCPP_HAS_NO_RVALUE_REFERENCE'. * Cleanup C++11 only overloads that assume an incomplete C++11 implementation. For example this patch removes the __construct_node overloads that do manual pack expansion. * Forward 'unordered_map::emplace' to '__hash_table' and remove dead code resulting from the change. This includes almost all 'unordered_map::__construct_node' overloads. The following changes are planed for future revisions: * Fix LWG issue #2469 by delegating 'unordered_map::operator[]' to use '__emplace_unique_key_args'. * Rewrite 'unordered_map::try_emplace' in terms of '__emplace_unique_key_args'. * Optimize '__emplace_unique' to call '__emplace_unique_key_args' when possible. This prevent unneeded allocations when inserting duplicate entries. The additional follow up work needed after this patch: * Respect the lifetime rules for '__hash_value_type' by actually constructing it. * Make '__insert_multi' act similar to '__insert_unique' for objects of type 'T&' and 'T const &&' with 'T = __container_value_type'. llvm-svn: 260513
* Handle floating-point type homogeneous aggregate return values in ABISysV_armOmair Javaid2016-02-111-0/+76
| | | | | | | | For details refer to review link given below. Differential revision: http://reviews.llvm.org/D16975 llvm-svn: 260512
* Fix MSVC 2013 build after rL260504Tamas Berghammer2016-02-111-1/+1
| | | | llvm-svn: 260511
* [MCU] Fix assertion failure on function returning empty union.Denis Zobnin2016-02-112-1/+75
| | | | | | | | Treat empty struct/union in return type as void for MCU ABI. PR26438. Differential Revision: http://reviews.llvm.org/D16808 llvm-svn: 260510
* Don't propagate dereferenceable attribute through gc.relocate in InstCombineArtur Pilipenko2016-02-112-17/+0
| | | | | | | | Reviewed By: reames Differential Revision: http://reviews.llvm.org/D16143 llvm-svn: 260509
* [ELF] - Remove R_X86_64_GOTTPOFF from static relocation processingGeorge Rimar2016-02-113-10/+14
| | | | | | | | | | R_X86_64_TPOFF64 is a dynamic relocation, it should not appear in static relocation processing. Patch fixes it. Differential revision: http://reviews.llvm.org/D16880 llvm-svn: 260508
* [X86] Enable the LEA optimization pass by default.Andrey Turetskiy2016-02-112-5/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D16877 llvm-svn: 260507
* Update of "GCC extensions not implemented yet" in Clang User's ManualAndrey Bokhanko2016-02-111-10/+0
| | | | | | | | | | #pragma weak, global register variables and static initialization of flexible array members are supported now, so they are removed from "GCC extensions not implemented yet" list. Differential Revision: http://reviews.llvm.org/D16851 llvm-svn: 260506
* [clang-tidy] Fix an assert failure in 'readability-braces-around-statements' ↵Haojian Wu2016-02-112-1/+11
| | | | | | | | | | | | | | | | | | check. Summary: The check will trigger a assert failure("CondEndLoc.isValid") when checking the IfStmt whose condition expression is not parsed. In this case, we should ignore that. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17069 llvm-svn: 260505
* Fixed typo in comment & coding style for LoopVersioningLICM.Ashutosh Nema2016-02-112-13/+12
| | | | llvm-svn: 260504
* [clang-tidy] Add a check to find unintended semicolons that changes the ↵Gabor Horvath2016-02-117-0/+304
| | | | | | | | | | semantics. Reviewers: hokein, alexfh Differential Revision: http://reviews.llvm.org/D16535 llvm-svn: 260503
* [TableGen] Use range-based for loops. NFCCraig Topper2016-02-111-10/+7
| | | | llvm-svn: 260502
* [TableGen] Don't call emitSourceFileHeader a second time in the middle of ↵Craig Topper2016-02-111-3/+1
| | | | | | the output file. llvm-svn: 260501
* [TableGen] Whitespace cleanup in output file. NFCCraig Topper2016-02-111-14/+14
| | | | llvm-svn: 260500
* [TableGen] Simplify code slightly. NFCCraig Topper2016-02-111-6/+3
| | | | llvm-svn: 260499
* [MC][ELF] Handle MIPS specific .sdata and .sbss directivesSimon Atanasyan2016-02-113-24/+53
| | | | | | | | | MIPS specific .sdata and .sbss directives create corresponding sections with proper initialized ELF flags including ELF::SHF_MIPS_GPREL. Differential Revision: http://reviews.llvm.org/D17001 llvm-svn: 260498
* clang-format: Make it more expensive to break template parameters.Daniel Jasper2016-02-112-1/+6
| | | | | | | | | | | | | | | | | | In particular, make it more expensive than breaking after the return type of a function definition/declaration. Before: template <typename T> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa< T>::aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa); After: template <typename T> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa<T>::aaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa); llvm-svn: 260497
* [Objective-c] Stop attaching section "datacoal_nt" to global variables.Akira Hatanaka2016-02-115-14/+9
| | | | | | | | | | | | | The current macho linker just copies symbols in section datacoal_nt to section data, so it doesn't really matter whether or not section "datacoal_nt" is attached to the global variable. This is a follow-up to r250370, which made changes in llvm to stop putting functions and data in the *coal* sections. rdar://problem/24528611 llvm-svn: 260496
* AMDGPU: Fix constant bus use check with subregistersMatt Arsenault2016-02-113-12/+37
| | | | | | | | | | | If the two operands to an instruction were both subregisters of the same super register, it would incorrectly think this counted as the same constant bus use. This fixes the verifier error in fmin_legacy.ll which was missing -verify-machineinstrs. llvm-svn: 260495
* AMDGPU: Fix passes depending on dominator tree for no reasonMatt Arsenault2016-02-112-16/+4
| | | | llvm-svn: 260494
* AMDGPU: Remove some old intrinsic uses from testsMatt Arsenault2016-02-1166-532/+486
| | | | llvm-svn: 260493
* [OPENMP] Rename OMPCapturedFieldDecl to OMPCapturedExprDecl, NFC.Alexey Bataev2016-02-1117-92/+82
| | | | | | | | OMPCapturedExprDecl allows caopturing not only of fielddecls, but also other expressions. It also allows to simplify codegen for several clauses. llvm-svn: 260492
* AMDGPU: Fix not handling new workitem intrinsics in DivergenceAnalysisMatt Arsenault2016-02-112-0/+48
| | | | llvm-svn: 260491
* AMDGPU: Split R600 and SI store loweringMatt Arsenault2016-02-115-90/+89
| | | | | | | These were only sharing some somewhat incorrect logic for when to scalarize or split vectors. llvm-svn: 260490
* [readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.Michael J. Spencer2016-02-113-3/+68
| | | | llvm-svn: 260489
* [readobj] Handle ELF files with no section table or with no program headers.Michael J. Spencer2016-02-119-110/+377
| | | | | | | | This adds support for finding the dynamic table and dynamic symbol table via the section table or the program header table. If there's no section table an attempt is made to figure out the length of the dynamic symbol table. llvm-svn: 260488
* [readobj] Move dynamic table parsing to a new function. NFC.Michael J. Spencer2016-02-111-5/+14
| | | | llvm-svn: 260487
* [readobj] Sort switch by enum value.Michael J. Spencer2016-02-111-29/+29
| | | | | | | Sort by enum value, but keep related entries adjacent. This makes it easier to compare against documentation. llvm-svn: 260486
* [readobj] Parse sections before dynamic table.Michael J. Spencer2016-02-111-36/+36
| | | | | | | NFC. This code will be expanded to handle dynamic tables that don't have a PT_DYNAMIC. llvm-svn: 260485
* Fix const confusion while lambda function usageHemant Kulkarni2016-02-111-24/+26
| | | | llvm-svn: 260484
* [AMDGPU] Assembler: Fix VOP3 only instructionsTom Stellard2016-02-115-94/+190
| | | | | | | | | | | | | | | | | | | | | Separate methods to convert parsed instructions to MCInst: - VOP3 only instructions (always create modifiers as operands in MCInst) - VOP2 instrunctions with modifiers (create modifiers as operands in MCInst when e64 encoding is forced or modifiers are parsed) - VOP2 instructions without modifiers (do not create modifiers as operands in MCInst) - Add VOP3Only flag. Pass HasMods flag to VOP3Common. - Simplify code that deals with modifiers (-1 is now same as 0). This is no longer needed. - Add few tests (more will be added separately). Update error message now correct. Patch By: Nikolay Haustov Differential Revision: http://reviews.llvm.org/D16778 llvm-svn: 260483
* [llvm-nm] Simplify code logic. Rewrite a single function an inline.Davide Italiano2016-02-111-16/+4
| | | | llvm-svn: 260482
* Un-XFAIL a passing test on WindowsReid Kleckner2016-02-111-1/+1
| | | | llvm-svn: 260481
* Move mmap_limit_mp test to PosixReid Kleckner2016-02-111-0/+0
| | | | | | | | | This test isn't posix specific, but it doesn't pass on Windows and is XFAILed. I suspect that this test, which is expected to fail, is causing the hangs I'm seeing on our WinASan builder. Moving it to Posix seems to be the cleanest way to avoid running it on Windows. llvm-svn: 260480
* [CUDA] Don't crash when trying to printf a non-scalar object.Justin Lebar2016-02-112-0/+24
| | | | | | | | | | | | | | Summary: We can't do the right thing, since there's no right thing to do, but at least we can not crash the compiler. Reviewers: majnemer, rnk Subscribers: cfe-commits, jhen, tra Differential Revision: http://reviews.llvm.org/D17103 llvm-svn: 260479
* Remove unused ToolChain arg from Driver::ConstructPhaseAction and BuildAction.Justin Lebar2016-02-112-20/+13
| | | | | | | | | | | | | | | | Summary: Actions don't depend on the toolchain; they get bound to a particular toolchain via BindArch. No functional changes. Reviewers: echristo Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17100 llvm-svn: 260478
* ELF: Sort .[cd]tors by priority as we do for .{init,fini}_array.Rui Ueyama2016-02-112-1/+40
| | | | llvm-svn: 260477
* Reduce code repetition. NFC.Rui Ueyama2016-02-111-14/+4
| | | | llvm-svn: 260476
* Silence MSVC warning about non-void prototypesReid Kleckner2016-02-111-3/+3
| | | | | | | | | | | It thinks that these functions don't match the function pointer type that they are passed with: GCDAProfiling.c(578) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)' GCDAProfiling.c(579) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)' GCDAProfiling.c(580) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)' llvm-svn: 260475
* [GlobalISel][MachineRegisterInfo] Add a method to create generic vregs.Quentin Colombet2016-02-113-0/+25
| | | | | | | | | | | | | | | | For now, generic virtual registers will not have a register class. We may want to change that. For instance, if we want to use all the methods from TargetRegisterInfo with generic virtual registers, we need to either have some sort of generic register classes that do what we want, or teach those methods how to deal with nullptr register class. Although the latter seems easy enough to do, we may still want to differenciate generic register classes from nullptr to catch cases where nullptr gets introduced by a bug of some sort. Anyway, I will file a PR to keep track of that. llvm-svn: 260474
* [asan] Dump adb output on failure.Evgeniy Stepanov2016-02-111-2/+12
| | | | | | | This is an asan/android test harness change aiming to catch "adb pull" failures on the buildbot. llvm-svn: 260473
* Fix two tests relying on LLVM -O1 behaviorReid Kleckner2016-02-112-3/+3
| | | | | | Something changed the inference of nonnull. llvm-svn: 260472
* Fix build failure caused in r260430Hemant Kulkarni2016-02-111-1/+1
| | | | llvm-svn: 260471
* [llvm-nm] Minor style change. Prefer EXIT_SUCCESS over 0.Davide Italiano2016-02-101-1/+1
| | | | llvm-svn: 260470
* Fix Windows bot failure in Transforms/FunctionImport/funcimport.llTeresa Johnson2016-02-101-1/+1
| | | | | | | | | Make sure we split ":" from the end of the global function id (which is <path>:<function> for local functions) instead of the beginning to avoid splitting at the wrong place for Windows file paths that contain a ":". llvm-svn: 260469
OpenPOWER on IntegriCloud