summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [RegAllocFast] Add the proper initialize method to use the .mir infrastructureQuentin Colombet2017-07-074-0/+6
| | | | | | NFC llvm-svn: 307427
* [llvm-pdbutil] Fix build.Zachary Turner2017-07-072-216/+227
| | | | | | | | | | Some platforms require an explicit specialization of std::hash for PdbRaw_FeaturesSig. Also a test involving case sensitivity needed to be fixed. For now that particular check just accepts any path even if they're completely different. Long term we should output paths in the correct case to match MSVC. llvm-svn: 307426
* [Local] Update the comment for removeUnreachableBlocks.Davide Italiano2017-07-071-2/+3
| | | | | | | It referenced a wrong function name, and didn't mention what the second argument did. This should be slightly more accurate now. llvm-svn: 307425
* FuzzerUtilDarwin.cpp: We need to pass modifiable strings to posix_spawnMatthias Braun2017-07-071-2/+11
| | | | | | | | This fixes a bug where unmodifiable strings where passed to posix_spawn. This is an attempt to unbreak the greendragon libFuzzer bot. llvm-svn: 307424
* Use windows path syntax when writing PDB module name.Zachary Turner2017-07-074-46/+74
| | | | | | | | | | | | | | Without this we would just append whatever the user wrote on the command line, so if we're in C:\foo and we run lld-link bar/baz.obj, we would write C:\foo\bar/baz.obj in various places in the PDB. MSVC linker does not do this, so we shouldn't either. This fixes some differences in the diff test, so we update the test as well. Differential Revision: https://reviews.llvm.org/D35092 llvm-svn: 307423
* Fix some differences between lld and MSVC generated PDBs.Zachary Turner2017-07-0716-51/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A couple of things were different about our generated PDBs. 1) We were outputting the wrong Version on the PDB Stream. The version we were setting was newer than what MSVC is setting. It's not clear what the implications are, but we change LLD to use PdbImplVC70, as MSVC does. 2) For the optional debug stream indices in the DBI Stream, we were outputting 0 to mean "the stream is not present". MSVC outputs uint16_t(-1), which is the "correct" way to specify that a stream is not present. So we fix that as well. 3) We were setting the PDB Stream signature to 0. This is supposed to be the result of calling time(nullptr). Although this leads to non-deterministic builds, a better way to solve that is by having a command line option explicitly for generating a reproducible build, and have the default behavior of lld-link match the default behavior of link. To test this, I'm making use of the new and improved `pdb diff` sub command. To make it suitable for writing tests against, I had to modify the diff subcommand slightly to print less verbose output. Previously it would always print | <column> | <value1> | <value2> | which is quite verbose, and the values are fragile. All we really want to know is "did we produce the same value as link?" So I added command line options to print a single character representing the result status (different, identical, equivalent), and another to hide the value display. Note that just inspecting the diff output used to write the test, you can see some things that are obviously wrong. That is just reflective of the fact that this is the state of affairs today, not that we're asserting that this is "correct". We can use this as a starting point to discover differences, fix them, and update the test. Differential Revision: https://reviews.llvm.org/D35086 llvm-svn: 307422
* [llvm-pdbutil] Improve diff mode.Zachary Turner2017-07-079-264/+586
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're getting to the point that some MS tools (e.g. DIA) can recognize our PDBs but others (e.g. link.exe) cannot. I think the way forward is to improve our tooling to help us find differences more easily. For example, if we can compile the same program with clang-cl and cl and have a tool tell us all the places where the PDBs differ, this could tell us what we're doing wrong. It's tricky though, because there are a lot of "benign" differences in a PDB. For example, if the string table in one PDB consists of "foo" followed by "bar" and in the other PDB it consists of "bar" followed by "foo", this is not necessarily a critical difference, as long as the uses of these strings also refer to the correct location. On the other hand, if the second PDB doesn't even contain the string "foo" at all, this is a critical difference. diff mode has been in llvm-pdbutil for quite a while, but because of the above challenge along with some others, it's been hard to make it useful. I think this patch addresses that. It looks for all the same things, but it now prints the output in tabular format (carefully formatted and aligned into tables and fields), and it highlights critical differences in red, non-critical differences in yellow, and identical fields in green. This makes it easy to spot the places we differ, and the general concept of outputting arbitrary fields in tabular format can be extended to provide analysis into many of the different types of information that show up in a PDB. Differential Revision: https://reviews.llvm.org/D35039 llvm-svn: 307421
* [X86] Replace 'fallthrough' comments with LLVM_FALLTHROUGH.Craig Topper2017-07-071-6/+6
| | | | llvm-svn: 307420
* vim: add 'builtin', 'nobuiltin', 'nonnull', and 'speculatable' to the ↵Craig Topper2017-07-071-0/+4
| | | | | | keyword list. llvm-svn: 307419
* [cloning] Do not duplicate types when cloning functionsGor Nishanov2017-07-072-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is an addon to the change rl304488 cloning fixes. (Originally rl304226 reverted rl304228 and reapplied rl304488 https://reviews.llvm.org/D33655) rl304488 works great when DILocalVariables that comes from the inlined function has a 'unique-ed' type, but, in the case when the variable type is distinct we will create a second DILocalVariable in the scope of the original function that was inlined. Consider cloning of the following function: ``` define private void @f() !dbg !5 { %1 = alloca i32, !dbg !11 call void @llvm.dbg.declare(metadata i32* %1, metadata !14, metadata !12), !dbg !18 ret void, !dbg !18 } !14 = !DILocalVariable(name: "inlined", scope: !15, file: !6, line: 5, type: !17) ; came from an inlined function !15 = distinct !DISubprogram(name: "inlined", linkageName: "inlined", scope: null, file: !6, line: 8, type: !7, isLocal: true, isDefinition: true, scopeLine: 9, isOptimized: false, unit: !0, variables: !16) !16 = !{!14} !17 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "some_struct", size: 32, align: 32) ``` Without this fix, when function 'f' is cloned, we will create another DILocalVariable for "inlined", due to its type being distinct. ``` define private void @f.1() !dbg !23 { %1 = alloca i32, !dbg !26 call void @llvm.dbg.declare(metadata i32* %1, metadata !28, metadata !12), !dbg !30 ret void, !dbg !30 } !14 = !DILocalVariable(name: "inlined", scope: !15, file: !6, line: 5, type: !17) !15 = distinct !DISubprogram(name: "inlined", linkageName: "inlined", scope: null, file: !6, line: 8, type: !7, isLocal: true, isDefinition: true, scopeLine: 9, isOptimized: false, unit: !0, variables: !16) !16 = !{!14} !17 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "some_struct", size: 32, align: 32) ; !28 = !DILocalVariable(name: "inlined", scope: !15, file: !6, line: 5, type: !29) ; OOPS second DILocalVariable !29 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "some_struct", size: 32, align: 32) ``` Now we have two DILocalVariable for "inlined" within the same scope. This result in assert in AsmPrinter/DwarfDebug.h:131: void llvm::DbgVariable::addMMIEntry(const llvm::DbgVariable &): Assertion `V.Var == Var && "conflicting variable"' failed. (Full example: See: https://bugs.llvm.org/show_bug.cgi?id=33492) In this change we prevent duplication of types so that when a metadata for DILocalVariable is cloned it will get uniqued to the same metadate node as an original variable. Reviewers: loladiro, dblaikie, aprantl, echristo Reviewed By: loladiro Subscribers: EricWF, llvm-commits Differential Revision: https://reviews.llvm.org/D35106 llvm-svn: 307418
* [LoopUnrollRuntime] NFC: use the precomputed loop exit in ConnectPrologAnna Thomas2017-07-071-11/+11
| | | | | | | | | Minor refactoring to use the preexisting loop exit that's already calculated. We do not need to recompute the loop exit in ConnectProlog. Apart from avoiding redundant computation, this is required for supporting multiple loop exits when Prolog remainder loops are generated. llvm-svn: 307417
* [PPC CodeGen] Expand the bitreverse.i32 intrinsic.Tony Jiang2017-07-075-23/+180
| | | | | | | Differential Revision: https://reviews.llvm.org/D33572 Fix PR: https://bugs.llvm.org/show_bug.cgi?id=33093 llvm-svn: 307413
* [LTO] Add a test for ThinLTO + --defsym.Davide Italiano2017-07-071-0/+14
| | | | | | We also get this right since r307303. llvm-svn: 307412
* Fix some more -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-074-5/+9
| | | | llvm-svn: 307411
* [LTO] Add a test for ThinLTO + --wrap.Davide Italiano2017-07-072-0/+21
| | | | | | | | We should get this right after r307303. Differential Revision: https://reviews.llvm.org/D35126 llvm-svn: 307410
* [ARM] Implement interleaved access bug fix from r306334Matthew Simpson2017-07-072-1/+32
| | | | | | | r306334 fixed a bug in AArch64 dealing with wide interleaved accesses having pointer types. The bug also exists in ARM, so this patch copies over the fix. llvm-svn: 307409
* Fix-up for r307307: vm_info.max_address is the first non-addressable ↵Kuba Mracek2017-07-071-1/+1
| | | | | | pointer, so we need to subtract one. llvm-svn: 307408
* [AMDGPU] Assembler: refactor convert methods (VOP3 and MIMG)Sam Kolton2017-07-072-125/+57
| | | | | | | | | | | | Summary: Simplified converter methods for VOP3 and MIMG. Reviewers: dp, artem.tamazov Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, vpykhtin, t-tye Differential Revision: https://reviews.llvm.org/D35047 llvm-svn: 307407
* Fix variable names. NFC.Rafael Espindola2017-07-071-18/+18
| | | | llvm-svn: 307406
* [MachO] Add missing byte-swaps when reading dyld_infoTom Stellard2017-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | Summary: This fixes the following tests on big-endian hosts: lld :: mach-o/dylib-install-names.yaml lld :: mach-o/force_load-dylib.yaml lld :: mach-o/lib-search-paths.yaml lld :: mach-o/upward-dylib-load-command.yaml Reviewers: lhames, kledzik, ruiu Reviewed By: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35022 llvm-svn: 307405
* [x86] add SBB optimization for SETAE (uge) condition codeSanjay Patel2017-07-072-7/+18
| | | | | | | | | | | | | | | | | | | | | | x86 scalar select-of-constants (Cond ? C1 : C2) combining/lowering is a mess with missing optimizations. We handle some patterns, but miss logical variants. To clean that up, we should convert all select-of-constants to logic/math and enhance the combining for the expected patterns from that. DAGCombiner already has the foundation to allow the transforms, so we just need to fill in the holes for x86 math op lowering. Selecting 0 or -1 needs extra attention to produce the optimal code as shown here. Attempt to verify that all of these IR forms are logically equivalent: http://rise4fun.com/Alive/plxs Earlier steps in this series: rL306040 rL306072 Differential Revision: https://reviews.llvm.org/D34652 llvm-svn: 307404
* [DemandedBits] fix formatting; NFCSanjay Patel2017-07-071-9/+6
| | | | llvm-svn: 307403
* [AMDGPU][mc][gfx9] Added support of op_sel/op_sel_hi for V_MAD_MIX*Dmitry Preobrazhensky2017-07-076-65/+530
| | | | | | | | | | See https://bugs.llvm.org//show_bug.cgi?id=33595 Reviewers: vpykhtin, artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D35021 llvm-svn: 307402
* [NFC] [PPCGCodeGeneration] Extend ↵Siddharth Bhat2017-07-071-6/+11
| | | | | | | | | | `invariant-load-hoisting-with-variable-upper-bound` test case. - Check that we have invariant accesses. - Use `-polly-use-llvm-names` for better names in the test. - Rename test function to `f` for brevity. llvm-svn: 307401
* [ValueTracking] Fix the identity case (LHS => RHS) when the LHS is false.Chad Rosier2017-07-072-2/+38
| | | | | | | | | Prior to this commit both of the added test cases were passing. However, in the latter case (test7) we were doing a lot more work to arrive at the same answer (i.e., we were using isImpliedCondMatchingOperands() to determine the implication.). llvm-svn: 307400
* remove duplicate symbol version script entriesEd Maste2017-07-071-3/+0
| | | | | | | | GNU ld ignores duplicates, but lld produces a warning. Differential Revision: https://reviews.llvm.org/D35121 llvm-svn: 307399
* [NFC] [PPCGCodeGeneration] Add test for simple invariant load hoisting.Siddharth Bhat2017-07-071-0/+52
| | | | | | | | - This already works, but add this to ensure that there is no regressions when I expand the invariant load hoisting ability of `PPCGCodeGeneration`. llvm-svn: 307398
* NFC: I simply added CHECK-LABEL to prevent false matches in the tests.Andrew V. Tischenko2017-07-072-0/+2
| | | | llvm-svn: 307397
* [Lanai] Fix -Wimplicit-fallthrough warning. NFCI.Simon Pilgrim2017-07-071-0/+1
| | | | llvm-svn: 307396
* [Hexagon] Fix some more -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-074-0/+6
| | | | llvm-svn: 307395
* clang-format: [JS] do not wrap after "readonly".Martin Probst2017-07-073-7/+18
| | | | | | | | | | | | | | Summary: Breaks after "readonly" trigger automatic semicolon insertion in field declarations. Reviewers: krasimir, djasper Subscribers: klimek Differential Revision: https://reviews.llvm.org/D35112 llvm-svn: 307394
* [AArch64] Fix -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-074-1/+6
| | | | llvm-svn: 307393
* [SafepointIRVerifier] Avoid false positives in GC verifier for compare ↵Anna Thomas2017-07-072-2/+131
| | | | | | | | | | | | | | | | | | | between pointers Today the safepoint IR verifier catches some unrelocated uses of base pointers that are actually valid. With this change, we narrow down the set of false positives. Specifically, the verifier knows about compares to null and compares between 2 unrelocated pointers. Reviewed by: skatkov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35057 llvm-svn: 307392
* Disable TestGoASTContextPavel Labath2017-07-071-0/+1
| | | | | | | it fails with go 1.8 and we don't seem to have a maintainer of that functionality. llvm-svn: 307391
* Add a NativeProcessProtocol Factory classPavel Labath2017-07-0712-553/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the static functions used for creating NativeProcessProtocol instances with a factory pattern, and modernizes the interface of the new class in the process -- I use llvm::Expected instead of the Status+value combo. I also move some of the common code (like the Delegate registration into the base class). The new arrangement has multiple benefits: - it removes the NativeProcess*** dependency from Process/gdb-remote (which for example means that liblldb no longer pulls in this code). - it enables unit testing of the GDBRemoteCommunicationServerLLGS class (by providing a mock Native Process). - serves as another example on how to use the llvm::Expected class (I couldn't get rid of the Initialize-type functions completely here because of the use of shared_from_this, but that's the next thing on my list here) Tests still pass on Linux and I've made sure NetBSD compiles after this. Reviewers: zturner, eugene, krytarowski Subscribers: srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D33778 llvm-svn: 307390
* [AArch64] Use 16 bytes as preferred function alignment on Cortex-A57.Florian Hahn2017-07-072-1/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This change gives a 0.89% speed on execution time, a 0.94% improvement in benchmark scores and a 0.62% increase in binary size on a Cortex-A57. These numbers are the geomean results on a wide range of benchmarks from the test-suite, SPEC2000, SPEC2006 and a range of proprietary suites. The software optimization guide for the Cortex-A57 recommends 16 byte branch alignment. Reviewers: t.p.northover, mcrosier, javed.absar, kristof.beyls, sbaranga Reviewed By: kristof.beyls Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D34954 llvm-svn: 307389
* Recommit [driver][macOS] Pick the system version for theAlex Lorenz2017-07-072-1/+32
| | | | | | | | | | | | | | | | | | | | deployment target if the SDK is newer than the system This commit reverts the revert commit r305891. Now the change from r305678 should be correct because `llvm::sys::getProcessTriple` now returns the correct macOS version of the system after the LLVM change r307372. Original commit message: This commit improves the driver by making sure that it picks the system version for the deployment target when the version of the macOS SDK is newer than the system version. rdar://29449467 Differential Revision: https://reviews.llvm.org/D34175 llvm-svn: 307388
* [driver][mips] Pass long-calls feature flag to the MIPS backendSimon Atanasyan2017-07-072-0/+13
| | | | | | | | Check the `-mlong-calls` command line option and pass the `long-calls` feature flag to the backend. Handling of this feature flag in the backend needs to be implemented by a separate commit. llvm-svn: 307386
* [Frontend] Verify that the bitstream is not empty before readingAlex Lorenz2017-07-073-0/+5
| | | | | | | | | | | | | | the serialised diagnostics Clang should avoid calling report_fatal_error when the file with the serialised diagnostics is empty. This commit changes Clang's serialised diagnostic reader, now it reports an appropriate error instead of crashing. rdar://31939877 Differential Revision: https://reviews.llvm.org/D35069 llvm-svn: 307384
* Fix uninitalized memory access introduced in r307350.Daniel Jasper2017-07-071-1/+1
| | | | | | Found by MSAN :). llvm-svn: 307383
* [PowerPC] Fix -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-071-0/+4
| | | | llvm-svn: 307382
* [AMDGPU] Fix -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-074-1/+7
| | | | llvm-svn: 307381
* [AArch64] Use 16 bytes as preferred function alignment on Cortex-A72.Florian Hahn2017-07-072-2/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: This change gives a 0.34% speed on execution time, a 0.61% improvement in benchmark scores and a 0.57% increase in binary size on a Cortex-A72. These numbers are the geomean results on a wide range of benchmarks from the test-suite, SPEC2000, SPEC2006 and a range of proprietary suites. The software optimization guide for the Cortex-A72 recommends 16 byte branch alignment. Reviewers: t.p.northover, kristof.beyls, rengolin, sbaranga, mcrosier, javed.absar Reviewed By: kristof.beyls Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D34961 llvm-svn: 307380
* [clang-tidy] Fix modernize-use-override incorrect replacementAlexander Kornienko2017-07-072-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For the following code: `modernize-use-override` generates a replacement with incorrect location. ``` struct IntPair { int first, second; }; struct A { virtual void il(IntPair); }; struct B : A { void il(IntPair p = {1, (2 + 3)}) {}; // Generated Fixit: void il(IntPair p = override {1, (2 + 3)}) {}; // Should be: void il(IntPair p = {1, (2 + 3)}) override {}; }; ``` This fixes that and adds a unit test. Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Tags: #clang-tools-extra Patch by Victor Gao! Differential Revision: https://reviews.llvm.org/D35078 llvm-svn: 307379
* [Sparc] Fix -Wimplicit-fallthrough warning. NFCI.Simon Pilgrim2017-07-071-0/+1
| | | | llvm-svn: 307378
* Update the Windows version of updateTripleOSVersion to account forAlex Lorenz2017-07-071-2/+2
| | | | | | changes in r307372 llvm-svn: 307377
* [SystemZ] Fix -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-071-0/+2
| | | | llvm-svn: 307376
* [Arm] Fix -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-072-5/+6
| | | | llvm-svn: 307375
* [Hexagon] Fix -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-073-0/+8
| | | | llvm-svn: 307374
* [ELF] Add call to assignAddresses() before createThunks() [NFC]Peter Smith2017-07-071-0/+1
| | | | | | | | | | In preparation for the addition of rangeThunks() calculate the addresses of all the inputSections so that ThunkSections can be inserted at the right place. Differential Revision: https://reviews.llvm.org/D34688 llvm-svn: 307373
OpenPOWER on IntegriCloud