summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a sample_test directory with simple starterJim Ingham2017-03-015-0/+103
| | | | | | test cases for standard and "inline" tests. llvm-svn: 296669
* [DAG] Prevent Stale nodes from entering worklistNirav Dave2017-03-012-4/+30
| | | | | | | | | | | | | | | Add check that deleted nodes do not get added to worklist. This can occur when a node's operand is simplified to an existing node. This fixes PR32108. Reviewers: jyknight, hfinkel, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30506 llvm-svn: 296668
* Add test cases for merging stores of multiply used storesNirav Dave2017-03-011-0/+88
| | | | llvm-svn: 296667
* [RDF] Replace {} with explicit constructor, since not all compilers like itKrzysztof Parzyszek2017-03-011-1/+1
| | | | llvm-svn: 296666
* NewGVN: Add debug counter for value numberingDaniel Berlin2017-03-013-8/+39
| | | | llvm-svn: 296665
* clang-format: [JS] Properly format object literals with shorthands.Daniel Jasper2017-03-012-3/+9
| | | | | | | | | | | | | | | | | Before: return { a, b: 'b', c, }; After: return { a, b: 'b', c, }; llvm-svn: 296664
* [DWARF] Print leading zeros in type signaturePaul Robinson2017-03-014-4/+4
| | | | llvm-svn: 296663
* [RDF] Add recursion limit to getAllReachingDefsRecKrzysztof Parzyszek2017-03-013-9/+40
| | | | | | | For large programs this function can take significant amounts of time. Let it abort gracefully when the program is too complex. llvm-svn: 296662
* [PDB] Fix and re-enable BinaryStreamArray test.Zachary Turner2017-03-012-36/+39
| | | | | | | | | | | This was due to the test stream choosing an arbitrary partition index for introducing the discontinuity rather than choosing an index that would be correctly aligned for the type of data. Also added an assertion into FixedStreamArray so that this will be caught on all bots in the future, and not just the UBSan bot. llvm-svn: 296661
* Reorder fields for better packing. (NFC)Paul Robinson2017-03-011-1/+1
| | | | llvm-svn: 296660
* clang-format: [JS/TS] Properly understand cast expressions.Daniel Jasper2017-03-012-2/+8
| | | | | | | | | | Many things were wrong: - We didn't always allow wrapping after "as", which can be necessary. - We used to Undestand the identifier after "as" as a start of a name. - We didn't properly parse the structure of the expression with "as" having the precedence of relational operators llvm-svn: 296659
* enable building with LTO on Windows using clang-cl and lldBob Haarman2017-03-011-10/+27
| | | | | | | | | | | | | | Summary: With clang-cl gaining support for link-time optimization, we can now enable builds using LTO when using clang-cl and lld on Windows. To do this, we must not pass the -flto flag to the linker; lld-link does not understand it, but will perform LTO automatically when it encounters bitcode files. We also don't pass /Brepro when using LTO - the compiler doesn't generate object files for LTO, so passing the flag would only result in a warning about it being unused. Reviewers: rnk, ruiu, hans Reviewed By: hans Subscribers: mgorny, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30240 llvm-svn: 296658
* Restrict usage of MemoryMappingLayout to platforms which support itFilipe Cabecinhas2017-03-011-0/+2
| | | | llvm-svn: 296657
* [PCH] Avoid VarDecl emission attempt if no owning module avaiableBruno Cardoso Lopes2017-03-012-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a stopgap fix for PR31863, a regression introduced in r276159. Consider this snippet: struct FVector; struct FVector {}; struct FBox { FVector Min; FBox(int); }; namespace { FBox InvalidBoundingBox(0); } While parsing the DECL_VAR for 'struct FBox', clang recursively read all the dep decls until it finds the DECL_CXX_RECORD forward declaration for 'struct FVector'. Then, it resumes all the way up back to DECL_VAR handling in `ReadDeclRecord`, where it checks if `isConsumerInterestedIn` for the decl. One of the condition for `isConsumerInterestedIn` to return false is if the VarDecl is imported from a module `D->getImportedOwningModule()`, because it will get emitted when we import the relevant module. However, before checking if it comes from a module, clang checks if `Ctx.DeclMustBeEmitted(D)`, which triggers the emission of 'struct FBox'. Since one of its fields is still incomplete, it crashes. Instead, check if `D->getImportedOwningModule()` is true before calling `Ctx.DeclMustBeEmitted(D)`. Differential Revision: https://reviews.llvm.org/D29753 rdar://problem/30173654 llvm-svn: 296656
* Alphabetize some cases (NFC)Paul Robinson2017-03-011-12/+12
| | | | llvm-svn: 296655
* Revert r296575 "[SLP] Fixes the bug due to absence of in order uses of ↵Hans Wennborg2017-03-015-138/+81
| | | | | | | | scalars which needs to be available" It caused miscompiles, e.g. in Chromium (PR32109). llvm-svn: 296654
* Reapply r296419: [asan] Print a "PC is at a non-executable memory region" ↵Filipe Cabecinhas2017-03-012-0/+44
| | | | | | | | | | | | | | message if that's the case Summary: Points the user to look at function pointer assignments. Reviewers: kcc, eugenis, kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30432 llvm-svn: 296653
* [DWARF] Default lower bound should respect requested DWARF version.Paul Robinson2017-03-013-11/+81
| | | | | | | | | | | | | DWARF may define a default lower-bound for arrays in languages defined in a particular DWARF version. But the logic to suppress an unnecessary lower-bound attribute was looking at the hard-coded default DWARF version, not the version that had been requested. Also updated the list with all languages defined in DWARF v5. Differential Revision: http://reviews.llvm.org/D30484 llvm-svn: 296652
* [DAGCombiner] Support {a|s}ext, {a|z|s}ext load nodes in load combineArtur Pilipenko2017-03-019-170/+74
| | | | | | | | | | | | Resubmit r295336 after the bug with non-zero offset patterns on BE targets is fixed (r296336). Support {a|s}ext, {a|z|s}ext load nodes as a part of load combine patters. Reviewed By: filcab Differential Revision: https://reviews.llvm.org/D29591 llvm-svn: 296651
* Add a reference to a Ulrich Drepper's paper.Rui Ueyama2017-03-011-1/+8
| | | | llvm-svn: 296650
* Introduce an 'external_source_symbol' attribute that describes the originAlex Lorenz2017-03-0115-26/+430
| | | | | | | | | | | | | | | | and the nature of a declaration This commit adds an external_source_symbol attribute to Clang. This attribute specifies that a declaration originates from an external source and describes the nature of that source. This attribute will be used to improve IDE features like 'jump-to-definition' for mixed-language projects or project that use auto-generated code. rdar://30423368 Differential Revision: https://reviews.llvm.org/D29819 llvm-svn: 296649
* [Test] NFC: Fixed typo in commentsCharles Li2017-03-012-5/+5
| | | | | | Changed "declerations" to "declarations" llvm-svn: 296648
* [Hexagon] Fix testcase accidentally broken by r296645Krzysztof Parzyszek2017-03-011-2/+2
| | | | llvm-svn: 296647
* [analyzer] pr32088: Don't destroy the temporary if its initializer causes ↵Devin Coughlin2017-03-012-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | return. In the following code involving GNU statement-expression extension: struct S { ~S(); }; void foo() { const S &x = ({ return; S(); }); } function 'foo()' returns before reference x is initialized. We shouldn't call the destructor for the temporary object lifetime-extended by 'x' in this case, because the object never gets constructed in the first place. The real problem is probably in the CFG somewhere, so this is a quick-and-dirty hotfix rather than the perfect solution. A patch by Artem Dergachev! rdar://problem/30759076 Differential Revision: https://reviews.llvm.org/D30499 llvm-svn: 296646
* [Hexagon] Fix lowering of formal arguments of type i1Krzysztof Parzyszek2017-03-012-3/+26
| | | | | | | | | | | On Hexagon, values of type i1 are passed in registers of type i32, even though i1 is not a legal value for these registers. This is a special case and needs special handling to maintain consistency of the lowering information. This fixes PR32089. llvm-svn: 296645
* [PDB] Re-add BinaryStreamTest.Zachary Turner2017-03-012-0/+701
| | | | | | | | This re-adds all the binary stream tests. This was reverted due to some misaligned reads. For now the offending test is disabled while I investigate. llvm-svn: 296643
* [GVNHoist] Don't hoist unsafe scalars at -Oz (PR31729)Hans Wennborg2017-03-012-22/+89
| | | | | | | | Based on Aditya Kumar's patch: Differential Revision: https://reviews.llvm.org/D29092 llvm-svn: 296642
* Remove unittests/DebugInfo/PDB/BinaryStreamTest.cpp (from r296555)Vedant Kumar2017-03-012-701/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It breaks the ToT UBSan bots: /Users/vk/Desktop/llvm/include/llvm/DebugInfo/MSF/BinaryStreamArray.h:246:12: runtime error: reference binding to misaligned address 0x7f925540939a for type 'const int', which requires 4 byte alignment 0x7f925540939a: note: pointer points here 05 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 70 98 50 06 01 00 ^ 0 DebugInfoPDBTests 0x0000000106263cbd llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 45 1 DebugInfoPDBTests 0x00000001062628ff llvm::sys::RunSignalHandlers() + 159 2 DebugInfoPDBTests 0x0000000106264593 SignalHandler(int) + 179 3 libsystem_platform.dylib 0x0000000107bb3fba _sigtramp + 26 4 libsystem_pthread.dylib 0x0000000107bd82c8 _pthread_keys + 9720 5 libsystem_c.dylib 0x0000000107947f83 abort + 127 6 libclang_rt.ubsan_osx_dynamic.dylib 0x0000000106bb5fc2 __sanitizer::Abort() + 66 7 DebugInfoPDBTests 0x000000010613f880 llvm::FixedStreamArrayIterator<int>::operator+=(long) + 0 8 DebugInfoPDBTests 0x000000010613f615 llvm::FixedStreamArrayIterator<int>::operator*() const + 37 9 DebugInfoPDBTests 0x000000010613f3cb std::__1::enable_if<__is_forward_iterator<llvm::FixedStreamArrayIterator<int> >::value, void>::type std::__1::vector<int, std::__1::allocator<int> >::__construct_at_end<llvm::FixedStreamArrayIterator<int> >(llvm::FixedStreamArrayIterator<int>, llvm::FixedStreamArrayIterator<int>, unsigned long) + 251 10 DebugInfoPDBTests 0x000000010613f292 std::__1::vector<int, std::__1::allocator<int> >::vector<llvm::FixedStreamArrayIterator<int> >(llvm::FixedStreamArrayIterator<int>, std::__1::enable_if<(__is_forward_iterator<llvm::FixedStreamArrayIterator<int> >::value) && (is_constructible<int, std::__1::iterator_traits<llvm::FixedStreamArrayIterator<int> >::reference>::value), llvm::FixedStreamArrayIterator<int> >::type) + 226 11 DebugInfoPDBTests 0x000000010613ddb7 std::__1::vector<int, std::__1::allocator<int> >::vector<llvm::FixedStreamArrayIterator<int> >(llvm::FixedStreamArrayIterator<int>, std::__1::enable_if<(__is_forward_iterator<llvm::FixedStreamArrayIterator<int> >::value) && (is_constructible<int, std::__1::iterator_traits<llvm::FixedStreamArrayIterator<int> >::reference>::value), llvm::FixedStreamArrayIterator<int> >::type) + 87 12 DebugInfoPDBTests 0x000000010613d4af (anonymous namespace)::BinaryStreamTest_StreamReaderIntegerArray_Test::TestBody() + 1279 13 DebugInfoPDBTests 0x00000001062780f3 testing::Test::Run() + 179 14 DebugInfoPDBTests 0x0000000106279594 testing::TestInfo::Run() + 308 15 DebugInfoPDBTests 0x000000010627a6a3 testing::TestCase::Run() + 307 16 DebugInfoPDBTests 0x00000001062849d4 testing::internal::UnitTestImpl::RunAllTests() + 756 17 DebugInfoPDBTests 0x0000000106284558 testing::UnitTest::Run() + 152 18 DebugInfoPDBTests 0x0000000106266fa5 main + 117 19 libdyld.dylib 0x00000001078506a5 start + 1 zsh: abort ./unittests/DebugInfo/PDB/DebugInfoPDBTests llvm-svn: 296641
* [PDB] Remove use of std error codes.Zachary Turner2017-03-011-7/+6
| | | | | | | | | | I already created a BinaryStreamError class for this purpose, so update the code to use that on the remaining occurrences of errc values. This should also address the issue which led to r296583. llvm-svn: 296640
* [clang-format] Don't add namespace end comments for unbalanced right braces ↵Krasimir Georgiev2017-03-012-0/+13
| | | | | | after namespace end llvm-svn: 296638
* [clangd] Unbreak the shared build.Benjamin Kramer2017-03-011-0/+1
| | | | llvm-svn: 296637
* [clangd] Add support for FixIts.Benjamin Kramer2017-03-0110-61/+384
| | | | | | | | | | | | | | | | | | | Summary: This uses CodeActions to show 'apply fix' actions when code actions are requested for a location. The actions themselves make use of a clangd.applyFix command which has to be implemented on the editor side. I included an implementation for vscode. This also adds a -run-synchronously flag which runs everything on the main thread. This is useful for testing. Reviewers: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30498 llvm-svn: 296636
* Fix namespaces after clang-format updateTobias Grosser2017-03-015-6/+6
| | | | llvm-svn: 296635
* clang-format r296631Diana Picus2017-03-011-5/+6
| | | | | | Apparently I forgot to run it after fixing up some things... llvm-svn: 296634
* [clang-format] Add a new flag FixNamespaceComments to FormatStyleKrasimir Georgiev2017-03-015-32/+93
| | | | | | | | | | | | | | | | Summary: This patch enables namespace end comments under a new flag FixNamespaceComments, which is enabled for the LLVM and Google styles. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30405 llvm-svn: 296632
* [ARM] GlobalISel: Lower call params that need extensionsDiana Picus2017-03-012-24/+61
| | | | | | | | | | | | | | | | | | | | | | Lower i1, i8 and i16 call parameters by extending them before storing them on the stack. Also make sure we encode the correct, extended size in the corresponding memory operand, and that we compute the correct stack size in the end. The latter is a bit more complicated because we used to compute the stack size in the getStackAddress method, based on the Size and Offset of the parameters. However, if the last parameter is sign extended, we'd be using the wrong, non-extended size, and we'd end up with a smaller stack than we need to hold the extended value. Instead of hacking this up based on the value of Size in getStackAddress, we move our stack size handling logic to assignArg, where we have access to the CCState which knows everything we could possibly want to know about the stack. This way we don't need to duplicate any knowledge or resort to any ugly hacks. On this same occasion, update the IRTranslator test to check the sizes of the stores everywhere, not just for sign extended paramteres. llvm-svn: 296631
* [x86] auto-generate checks; NFCSanjay Patel2017-03-011-18/+38
| | | | llvm-svn: 296629
* [x86] regenerate checks; NFCSanjay Patel2017-03-011-7/+1
| | | | llvm-svn: 296628
* [clang-tidy] Attempt to fix the test where exceptions are disabled by default.Alexander Kornienko2017-03-011-1/+1
| | | | llvm-svn: 296627
* [DeadStoreElimination] Check function modref behavior before considering ↵Igor Laevsky2017-03-012-1/+13
| | | | | | | | memory clobbered Differential Revision: https://reviews.llvm.org/D29996 llvm-svn: 296625
* [mips] Drop unneeded REQUIRES line in test. NFCISimon Dardis2017-03-011-1/+0
| | | | | | rL296111 provides the proper fix. llvm-svn: 296622
* [PPC] add tests for select-of-constants with binop; NFCSanjay Patel2017-03-011-0/+557
| | | | llvm-svn: 296621
* Simplify. NFC.Rafael Espindola2017-03-011-1/+1
| | | | llvm-svn: 296620
* Simplify. NFC.Rafael Espindola2017-03-011-9/+5
| | | | llvm-svn: 296619
* [clangd] Add a toy VS Code integration for development purposesKrasimir Georgiev2017-03-0112-0/+251
| | | | | | | | | | | | | | Summary: This patch adds bare-bone VS Code integration for development purposes of clangd. Reviewers: klimek, bkramer, mprobst Reviewed By: bkramer Subscribers: mprobst Differential Revision: https://reviews.llvm.org/D30102 llvm-svn: 296618
* [BasicAA] Take attributes into account when requesting modref info for a ↵Igor Laevsky2017-03-014-10/+78
| | | | | | | | call site Differential Revision: https://reviews.llvm.org/D29989 llvm-svn: 296617
* Introducing clang::tooling::AtomicChange for refactoring tools.Eric Liu2017-03-016-5/+498
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: An AtomicChange is used to create and group a set of source edits, e.g. replacements or header insertions. Edits in an AtomicChange should be related, e.g. replacements for the same type reference and the corresponding header insertion/deletion. An AtomicChange is uniquely identified by a key position and will either be fully applied or not applied at all. The key position should be the location of the key syntactical element that is being changed, e.g. the call to a refactored method. Next step: add a tool that applies AtomicChange. Reviewers: klimek, djasper Reviewed By: klimek Subscribers: alexshap, cfe-commits, djasper, mgorny Differential Revision: https://reviews.llvm.org/D27054 llvm-svn: 296616
* [SLP] Preserve IR flags when vectorizing horizontal reductions.Alexey Bataev2017-03-013-18/+21
| | | | | | | | | | | | | | | | | | Summary: The SLP vectorizer should propagate IR-level optimization hints/flags (nsw, nuw, exact, fast-math) when converting scalar horizontal reductions instructions into vectors, just like for other vectorized instructions. It doe not include IR propagation for extra arguments, we need to handle original scalar operations for extra args to propagate correct flags. Reviewers: mkuper, mzolotukhin, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30418 llvm-svn: 296614
* [SLP] Preserve IR flags for extra args.Alexey Bataev2017-03-013-14/+16
| | | | | | | | | | | | | | | Summary: We should preserve IR flags for extra args. These IR flags should be taken from original scalar operations, not from the reduction operations. Reviewers: mkuper, mzolotukhin, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30447 llvm-svn: 296613
* [libcxxabi] Clean up macro usage.Ranjeet Singh2017-03-019-40/+33
| | | | | | | | Convention in libcxxabi is to use !defined(FOO) not !FOO. Differential Revision: https://reviews.llvm.org/D30459 llvm-svn: 296612
OpenPOWER on IntegriCloud