summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Make it obvious that st_value for common symbols has a different meaning.Rui Ueyama2017-02-281-5/+13
| | | | llvm-svn: 296507
* [AMDGPU] Add second pass of the schedulerStanislav Mekhanoshin2017-02-282-7/+126
| | | | | | | | | | | If during scheduling we have identified that we cannot keep optimistic occupancy increase critical register pressure limit and try scheduling of the whole function again. In this case blocks with smaller pressure will have a chance for better scheduling. Differential Revision: https://reviews.llvm.org/D30442 llvm-svn: 296506
* Fix wrong TLS symbol values.Rui Ueyama2017-02-285-12/+4
| | | | | | | | | | I do not fully understand why we had these values in the tests, but the new value matches what ld.bfd and ld.gold set, so I guess that was just a mistake. Differential Revision: https://reviews.llvm.org/D30441 llvm-svn: 296505
* Fix a bug in r294611 w.r.t. Darwin Kernel debugging.Jim Ingham2017-02-284-0/+19
| | | | | | <rdar://problem/30735021> llvm-svn: 296504
* Revert "Add terminator to .eh_frame sections"Rafael Espindola2017-02-289-19/+10
| | | | | | | | | | | | | | This reverts commit r296378. I am pretty sure this is incorrect. In particular, for just .cfi_startproc nop .cfi_endproc We now add an extra 4 zeros that neither bfd nor gold add. llvm-svn: 296503
* [DAGCombiner] use dyn_cast values in foldSelectOfConstants(); NFCSanjay Patel2017-02-281-6/+8
| | | | llvm-svn: 296502
* Fix -Wcovered-switch-default warning.Zachary Turner2017-02-281-2/+0
| | | | llvm-svn: 296501
* [LCG] Fix EXPENSIVE_CHECKS typo. NFCFrancis Visoiu Mistrih2017-02-281-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D30434 llvm-svn: 296500
* clang-format: [Java] Fix bug in enum formatting.Daniel Jasper2017-02-282-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Before: public enum VeryLongEnum { ENUM_WITH_MANY_PARAMETERS("aaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbb", "ccccccccccccccccccc") , SECOND_ENUM("a", "b", "c"); private VeryLongEnum(String a, String b, String c) {} } After: public enum VeryLongEnum { ENUM_WITH_MANY_PARAMETERS("aaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbb", "ccccccccccccccccccc") , SECOND_ENUM("a", "b", "c"); private VeryLongEnum(String a, String b, String c) {} } llvm-svn: 296499
* Add function importing info from samplepgo profile to the module summary.Dehao Chen2017-02-2814-29/+139
| | | | | | | | | | | | | | Summary: For SamplePGO, the profile may contain cross-module inline stacks. As we need to make sure the profile annotation happens when all the hot inline stacks are expanded, we need to pass this info to the module importer so that it can import proper functions if necessary. This patch implemented this feature by emitting cross-module targets as part of function entry metadata. In the module-summary phase, the metadata is used to build call edges that points to functions need to be imported. Reviewers: mehdi_amini, tejohnson Reviewed By: tejohnson Subscribers: davidxl, llvm-commits Differential Revision: https://reviews.llvm.org/D30053 llvm-svn: 296498
* Workaround MSVC bug when using TrailingObjects from a template.James Y Knight2017-02-282-0/+28
| | | | | | | | | | | | | MSVC appears to be getting confused as to whether OverloadToken is supposed to be public or not. This was discovered by code in Swift, and has been reported to microsoft by hughbe: https://connect.microsoft.com/VisualStudio/feedback/details/3116517 Differential Revision: https://reviews.llvm.org/D29880 llvm-svn: 296497
* [x86] add alternate IR tests for select of constants; NFCSanjay Patel2017-02-281-0/+68
| | | | llvm-svn: 296496
* Fix incorrect logic in StackFrame::Disassemble.Zachary Turner2017-02-281-11/+13
| | | | | | This had broken as the result of some previous cleanup. llvm-svn: 296495
* [PDB] Add BinaryStreamError.Zachary Turner2017-02-2813-80/+184
| | | | | | | This migrates the stream code away from MSFError to using its own custom Error class. llvm-svn: 296494
* Set default CPU for OpenBSD/arm to Cortex-A8Brad Smith2017-02-282-0/+5
| | | | llvm-svn: 296493
* Fix issue with test case. Make test x86_64 specificDavid Bozier2017-02-281-2/+2
| | | | llvm-svn: 296492
* [AMDGPU] New method to estimate register pressureStanislav Mekhanoshin2017-02-282-21/+150
| | | | | | | | | | | | | | | | | | | | | | | | This change introduces new method to estimate register pressure in GCNScheduler. Standard RPTracker gives huge error due to the following reasons: 1. It does not account for live-ins or live-outs if value is not used in the region itself. That creates a huge error in a very common case if there are a lot of live-thu registers. 2. It does not properly count subregs. 3. It assumes a register used as an input operand can be reused as an output. This is not always possible by itself, this is not what RA will finally do in many cases for various reasons not limited to RA's inability to do so, and this is not so if the value is actually a live-thu. In addition we can now see clear separation between live-in pressure which we cannot change with the scheduling and tentative pressure which we can change. Differential Revision: https://reviews.llvm.org/D30439 llvm-svn: 296491
* Migrate all of aarch64-linux-gnu to \01_mcount instead of just when passing ↵Eric Christopher2017-02-282-4/+6
| | | | | | | | along gnueabi as this matches both gcc and what the kernel expects. More of PR27311 llvm-svn: 296490
* [AMDGPU] Change amd_kernel_code_t's minor version to 1Konstantin Zhuravlyov2017-02-283-3/+3
| | | | | | | | - We do emit amd_kernel_code_t v1.1 Differential Revision: https://reviews.llvm.org/D30433 llvm-svn: 296489
* Strip debug info when inlining into a nodebug function.Adrian Prantl2017-02-283-15/+70
| | | | | | | | | | | | | The LLVM backend cannot produce any debug info for an llvm::Function without a DISubprogram attachment. When inlining a debug-info-carrying function into a nodebug function, there is therefore no reason to keep any debug info intrinsic calls or debug locations on the instructions. This fixes a problem discovered in PR32042. rdar://problem/30679307 llvm-svn: 296488
* [llvm-cov] Error-out when an unsupported format is used (PR32087)Vedant Kumar2017-02-282-1/+10
| | | | llvm-svn: 296487
OpenPOWER on IntegriCloud