summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Keep attributes, calling convention, etc, when remangling intrinsicDaniel Berlin2017-03-012-51/+41
| | | | | | | | | | | | Summary: Fix issue reported where intrinsic calling convention is dropped after r295253. Reviewers: sanjoy Subscribers: materi, llvm-commits Differential Revision: https://reviews.llvm.org/D30422 llvm-svn: 296563
* [Analyzer] Fix crash in ObjCPropertyChecker on protocol propertyDevin Coughlin2017-03-012-2/+8
| | | | | | | | | | | Fix a crash in the ObjCPropertyChecker when analyzing a 'copy' property of an NSMutable* type in a protocol. rdar://problem/30766684 Differential Revision: https://reviews.llvm.org/D30482 llvm-svn: 296562
* Fix PR32097 - is_abstract doesn't work on class templates.Eric Fiselier2017-03-012-12/+12
| | | | | | | | | | This patch fixes llvm.org/PR32097 by using the __is_abstract builtin type-trait instead of the previous library-only implementation. All supported compilers provide this trait. I've tested as far back as Clang 3.2, GCC 4.6 and MSVC trunk. llvm-svn: 296561
* Move constexpr arrays out of class definition.Zachary Turner2017-03-011-3/+4
| | | | | | GCC Linker doesn't seem to like this. llvm-svn: 296560
* [DebugInfo] Fix some Include What You Use warnings; other minor fixes (NFC).Eugene Zelenko2017-03-0124-157/+276
| | | | llvm-svn: 296559
* Updated the XFAIL comment in variant tests.Michael Park2017-03-012-2/+8
| | | | | | | | | | | | | | Summary: `ConstexprTestTypes::NoCtors` is an aggregate type (and consequently a literal type) in C++17, but not in C++14 since it has a base class. This patch updates the comment to accurately describe the reason for the XFAIL. Reviewers: EricWF Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D30481 llvm-svn: 296558
* Fix signed / unsigned comparison warning.Zachary Turner2017-03-011-1/+1
| | | | llvm-svn: 296557
* [PDB] Add an additional test for BinaryStreamRef.Zachary Turner2017-03-012-3/+60
| | | | | | | | | | | A bug was uncovered where if you have a StreamRef whose ViewOffset is > 0, then when you call readLongestContiguousChunk it will succeed even when it shouldn't, and it always return you a buffer that was taken as if the ViewOffset was 0. Fixed this bug and added a test for it. llvm-svn: 296556
* [PDB] Add tests for BinaryStream.Zachary Turner2017-03-012-0/+644
| | | | llvm-svn: 296555
* [PS4] Set our default dialect to C++11. NFC for other targets.Paul Robinson2017-03-011-1/+5
| | | | | | | Reapplies r296209 now that r296549 has fixed what really seems to be the last problematic test. llvm-svn: 296554
* [opt-viewer] Suggest installing the faster parser (libYAML)Adam Nemet2017-03-011-3/+2
| | | | llvm-svn: 296553
* [CodeGen] Remove dead FastISel code after SDAG emitted a tailcall.Ahmed Bougacha2017-03-012-0/+29
| | | | | | | | | | | | | | | | | | When SDAGISel (top-down) selects a tail-call, it skips the remainder of the block. If, before that, FastISel (bottom-up) selected some of the (no-op) next few instructions, we can end up with dead instructions following the terminator (selected by SDAGISel). We need to erase them, as we know they aren't necessary (in addition to being incorrect). We already do this when FastISel falls back on the tail-call itself. Also remove the FastISel-emitted code if we fallback on the instructions between the tail-call and the return. llvm-svn: 296552
* [GlobalISel] Replace all combined G_EXTRACT uses.Ahmed Bougacha2017-03-012-4/+23
| | | | | | | | | | | Iterating on the use-list we're modifying doesn't work: after the first iteration, the use-list iterator will point to a MachineOperand referencing the new register. This caused us to skip the other uses to replace. Instead, use MRI.replaceRegWith(), which accounts for this behavior. llvm-svn: 296551
* Add missing module/license header. NFC.Paul Robinson2017-03-011-0/+13
| | | | llvm-svn: 296550
* [Test] Make Lit tests C++11 compatible - IR orderingCharles Li2017-03-011-19/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D30430 llvm-svn: 296549
* Greg Clayton is no longer working at Apple, he will continue toJason Molenda2017-03-011-2/+1
| | | | | | review patches etc from his clayborg email address. llvm-svn: 296548
* [opt-viewer] Handle column number 0Adam Nemet2017-02-281-1/+1
| | | | | | | The asm-printer now emits remarks with function location which have unspecified (0) source column number. llvm-svn: 296547
* Revert "(HEAD, origin/master, origin/HEAD, master) [LV] These should missed ↵Adam Nemet2017-02-281-2/+2
| | | | | | | | | | remarks" This reverts commit r296544. This got committed by accident. llvm-svn: 296546
* [LV] These should missed remarksAdam Nemet2017-02-281-2/+2
| | | | llvm-svn: 296544
* Teach the IR verifier to reject conflicting debug info for function arguments.Adrian Prantl2017-02-282-0/+64
| | | | | | | | | | | | | Conflicting debug info for function arguments causes hard-to-debug assertions in the DWARF backend, so the Verifier should reject it. For performance reasons this only checks function arguments from non-inlined debug intrinsics for now. rdar://problem/30520286 This reapplies r295749 after fixing PR32042. llvm-svn: 296543
* [ELF] - Allow the Code Model flag when using LTOMartell Malone2017-02-285-0/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D29445 llvm-svn: 296542
* [DWARFv5] llvm-mc support for new unit header.Paul Robinson2017-02-284-23/+42
| | | | | | | | | This is for running the assembler with -g (to emit DWARF describing the assembler source). Differential Revision: http://reviews.llvm.org/D30475 llvm-svn: 296541
* [WebAssembly] Convert the remaining unit tests to the new wasm-object-file ↵Dan Gohman2017-02-2838-221/+261
| | | | | | | | | | | target. To facilitate this, add a new hidden command-line option to disable the explicit-locals pass. That causes llc to emit invalid code that doesn't have all locals converted to get_local/set_local, however it simplifies testwriting in many cases. llvm-svn: 296540
* Update AMDGPU test branch-relaxation.ll for changes after post-dom fixesDaniel Berlin2017-02-281-13/+5
| | | | llvm-svn: 296539
* [ARM] Don't generate deprecated T1 STM.Eli Friedman2017-02-282-4/+22
| | | | | | | | | | | This prevents generating stm r1!, {r0, r1} on Thumb1, where value stored for r1 is UNKONWN. Patch by Zhaoshi Zheng. Differential Revision: https://reviews.llvm.org/D27910 llvm-svn: 296538
* [Hexagon] Generate extract instructions more aggressivelyKrzysztof Parzyszek2017-02-285-4/+282
| | | | llvm-svn: 296537
* [libFuzzer] remove usage of the old coverage instrumentationKostya Serebryany2017-02-283-70/+0
| | | | llvm-svn: 296536
* Fix PR 24415 (at least), by making our post-dominator tree behavior sane.Daniel Berlin2017-02-2816-106/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, our post-dom tree tries to ignore and remove the effects of infinite loops. It fails miserably at this, because it tries to do it ahead of time, and thus can only detect self-loops, and any other type of infinite loop, it pretends doesn't exist at all. This can, in a bunch of cases, lead to wrong answers and a completely empty post-dom tree. Wrong answer: ``` declare void foo() define internal void @f() { entry: br i1 undef, label %bb35, label %bb3.i bb3.i: call void @foo() br label %bb3.i bb35.loopexit3: br label %bb35 bb35: ret void } ``` We get: ``` Inorder PostDominator Tree: [1] <<exit node>> {0,7} [2] %bb35 {1,6} [3] %bb35.loopexit3 {2,3} [3] %entry {4,5} ``` This is a trivial modification of the testcase for PR 6047 Note that we pretend bb3.i doesn't exist. We also pretend that bb35 post-dominates entry. While it's true that it does not exit in a theoretical sense, it's not really helpful to try to ignore the effect and pretend that bb35 post-dominates entry. Worse, we pretend the infinite loop does nothing (it's usually considered a side-effect), and doesn't even exist, even when it calls a function. Sadly, this makes it impossible to use when you are trying to move code safely. All compilers also create virtual or real single exit nodes (including us), and connect infinite loops there (which this patch does). In fact, others have worked around our behavior here, to the point of building their own post-dom trees: https://zneak.github.io/fcd/2016/02/17/structuring.html and pointing out the region infrastructure is near-useless for them with postdom in this state :( Completely empty post-dom tree: ``` define void @spam() #0 { bb: br label %bb1 bb1: ; preds = %bb1, %bb br label %bb1 bb2: ; No predecessors! ret void } ``` Printing analysis 'Post-Dominator Tree Construction' for function 'foo': =============================-------------------------------- Inorder PostDominator Tree: [1] <<exit node>> {0,1} :( (note that even if you ignore the effects of infinite loops, bb2 should be present as an exit node that post-dominates nothing). This patch changes post-dom to properly handle infinite loops and does root finding during calculation to prevent empty tress in such cases. We match gcc's (and the canonical theoretical) behavior for infinite loops (find the backedge, connect it to the exit block). Testcases coming as soon as i finish running this on a ton of random graphs :) Reviewers: chandlerc, davide Subscribers: bryant, llvm-commits Differential Revision: https://reviews.llvm.org/D29705 llvm-svn: 296535
* ELF ICF: Merge only functions.Rui Ueyama2017-02-282-2/+22
| | | | | | | | | | | | | | | | | | | Previously, LLD merged all read-only sections. So the following program prints out "true" if -icf=all is specified. static const int foo = 1; static const int bar = 1; int main() { printf("%s\n", &foo == &bar ? "true" : "false"); } This is somewhat counter-intuitive, and it actually caused nasty issues. One example is https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c24. This patch changes the way how it works. Now ICF merges only functions (i.e. executable sections). Differential Revision: https://reviews.llvm.org/D30365 llvm-svn: 296534
* gold-plugin: Remove unused variable.Peter Collingbourne2017-02-281-1/+0
| | | | llvm-svn: 296533
* [Hexagon] Fix instruction selection for sign-extending i1 to i64Krzysztof Parzyszek2017-02-282-27/+50
| | | | llvm-svn: 296532
* Add additional areas I'm responsible for in the lldb codebase.Jason Molenda2017-02-281-1/+2
| | | | llvm-svn: 296531
* Add comments about .hash and .gnu.hash.Rui Ueyama2017-02-281-0/+31
| | | | llvm-svn: 296529
* [XRay][Docs] Update the XRay documentationDean Michael Berris2017-02-281-26/+93
| | | | | | | | | | | | | | | Summary: Update the XRay docs to mention new subcomands to the llvm-xray tool, and details on FDR mode logging. Also list down available libraries for use part of the LLVM distribution. Reviewers: rSerge, pelikan, echristo, timshen, sdardis, rengolin Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30395 llvm-svn: 296528
* Actually add error handling to unpacking the dyld compact bind andKevin Enderby2017-02-284-28/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other tables. Providing a helpful error message to what the error is and where the error occurred based on which opcode it was associated with. There have been handful of bug fixes dealing with bad bind info in object files, r294021 and r249845, which only put a band aid on the problem after a bad bind table was created after unpacking from its compact info. In these cases a bind table should have never been created and an error should have simply been generated. This change puts in place the plumbing to allow checking and returning of an error when the compact info is unpacked. This follows the model of iterators that can fail that Lang Hanes designed when fixing the problem for bad archives r275316 (or r275361). This change uses one of the existing test cases that now causes an error instead of printing <<bad library ordinal>> after a bad bind table is created. The error uses the offset into the opcode table as shown with the macOS dyldinfo(1) tool to indicate where the error is and which opcode and which parameter is in error. For example the exiting test case has this lazy binding opcode table: % dyldinfo -opcodes test/tools/llvm-objdump/Inputs/bad-ordinal.macho-x86_64 … lazy binding opcodes: 0x0000 BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB(0x02, 0x00000010) 0x0002 BIND_OPCODE_SET_DYLIB_ORDINAL_IMM(2) In the test case the binary only has one library so setting the library ordinal to the value of 2 in the BIND_OPCODE_SET_DYLIB_ORDINAL_IMM opcode at 0x0002 above is an error. This now produces this error message: % llvm-objdump -lazy-bind bad-ordinal.macho-x86_64 … llvm-objdump: 'bad-ordinal.macho-x86_64': truncated or malformed object (for BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB bad library ordinal: 2 (max 1) for opcode at: 0x2) This change provides the plumbing for the error handling and one example of an error message. Other error checks and test cases will be added in follow on commits. llvm-svn: 296527
* Mark some libFuzzer tests as XFAIL'd on DarwinMehdi Amini2017-02-284-0/+7
| | | | | | | | We're bringing up a bot on Green Dragon right now: http://green.lab.llvm.org/green/view/Experimental/job/libFuzzer llvm-svn: 296526
* Removing couple unnecessary architecture guards.Jonathan Peyton2017-02-281-2/+2
| | | | | | | | | This section of code (__kmp_test_then_* functions) is guarded by (KMP_ARCH_X86 || KMP_ARCH_X86_64) so it does not make sense to have other architecture guards inside this section. Non-x86 architectures always use intrinsics (__sync_*) llvm-svn: 296525
* AMDGPU: Fix types for VOP_I16_I16_I16Matt Arsenault2017-02-281-1/+1
| | | | llvm-svn: 296523
* [ODRHash] Add basic support for CXXRecordDeclRichard Trieu2017-02-284-4/+79
| | | | llvm-svn: 296521
* AMDGPU: Add definition for v_swap_b32Matt Arsenault2017-02-284-4/+73
| | | | | | | | This is somewhat tricky because there are two pairs of tied operands, and it isn't allowed to be VOP3 encoded. llvm-svn: 296519
* Allow attributes before union definitionErich Keane2017-02-286-5/+56
| | | | | | | | permits typedef union __attribute__((transparent_union)) {...} Differential Revision: https://reviews.llvm.org/D28266 llvm-svn: 296518
* clang-format the Mangled changes.Zachary Turner2017-02-281-12/+14
| | | | llvm-svn: 296517
* Wrap the call to UndecorateSymbolName in a mutex.Zachary Turner2017-02-281-11/+19
| | | | | | | MSDN documents that this function is not thread-safe, so we wrap it in a global mutex. llvm-svn: 296516
* AMDGPU: Add definition for v_xad_u32Matt Arsenault2017-02-282-0/+6
| | | | llvm-svn: 296515
* [DWARFv5] Emit new unit header format.Paul Robinson2017-02-2815-23/+383
| | | | | | | | | Requesting DWARF v5 will now get you the new compile-unit and type-unit headers. llvm-dwarfdump will also recognize them. Differential Revision: http://reviews.llvm.org/D30206 llvm-svn: 296514
* AMDGPU: Add ds_nop to assemblerMatt Arsenault2017-02-282-1/+26
| | | | llvm-svn: 296513
* AMDGPU: Add definitions for ds_{read|write}_b{96|128}Matt Arsenault2017-02-282-4/+28
| | | | | | | | | It's not clear to me if this is always better than doing ds_write2_b64 This adds the constraint of a 128-bit register input instead of a pair of 64-bit. llvm-svn: 296512
* Minor refactoring. NFC.Rui Ueyama2017-02-281-4/+5
| | | | llvm-svn: 296511
* Use make<> instead of new (BAlloc). NFC.Rui Ueyama2017-02-283-9/+8
| | | | | | We converted them before, but there were a few remaining occurrences. llvm-svn: 296510
* De-template DefinedRegular.Rui Ueyama2017-02-2817-119/+107
| | | | | | Differential Revision: https://reviews.llvm.org/D30348 llvm-svn: 296508
OpenPOWER on IntegriCloud