summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert dsymutil -update commitsJonas Devlieghere2018-02-078-341/+45
| | | | | | | Revert "[dsymutil][test] Check the updated dSYM instead of companion file." Revert "[dsymutil] Upstream update feature." llvm-svn: 324493
* [test] Don't drop existing categories for methods.Jonas Devlieghere2018-02-071-7/+10
| | | | | | | | | The change in r324488 dropped the existing category attribute in for instance methods. This patch corrects that. Differential revision: https://reviews.llvm.org/D43024 llvm-svn: 324492
* [SelectionDAG] More Aggressibly prune nodes in AddChains. NFCI.Nirav Dave2018-02-071-1/+3
| | | | | | | | Travel all chains paths to first non-tokenfactor node can be exponential work. Add simple redundency check to avoid this. Fixes PR36264. llvm-svn: 324491
* [DebugInfo] Improvements to representation of enumeration types (PR36168)Momchil Velikov2018-02-075-10/+112
| | | | | | | | | | | | | | | This patch: * fixes an incorrect sign-extension of unsigned values, when emitting debug info metadata for enumerators * the enumerators metadata is created with a flag, which determines interpretation of the value bits (signed or unsigned) * the enumerations metadata contains the underlying integer type and a flag, indicating whether this is a C++ "fixed enum" Differential Revision: https://reviews.llvm.org/D42736 llvm-svn: 324490
* [DebugInfo] Improvements to representation of enumeration types (PR36168)Momchil Velikov2018-02-0716-51/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the LLVM part of fixing the issues, described in https://bugs.llvm.org/show_bug.cgi?id=36168 * The representation of enumerator values in the debug info metadata now contains a boolean flag isUnsigned, which determines how the bits of the value are interpreted. * The DW_TAG_enumeration type DIE now always (for DWARF version >= 3) includes a DW_AT_type attribute, which refers to the underlying integer type, as suggested in DWARFv4 (5.7 Enumeration Type Entries). * The debug info metadata for enumeration type contains (in flags) indication whether this is a C++11 "fixed enum". * For C++11 enumeration with a fixed underlying type, the DIE also includes the DW_AT_enum_class attribute (for DWARF version >= 4). * Encoding of enumerator constants uses DW_FORM_sdata for signed values and DW_FORM_udata for unsigned values, as suggested by DWARFv4 (7.5.4 Attribute Encodings). The changes should be backwards compatible: * the isUnsigned attribute is optional and defaults to false. * if the underlying type for the enumeration is not available, the enumerator values are considered signed. * the FixedEnum flag defaults to clear. * the bitcode format for DIEnumerator stores the unsigned flag bit #1 of the first record element, so the format does not change and the zero previously stored there is consistent with the false default for IsUnsigned. Differential Revision: https://reviews.llvm.org/D42734 llvm-svn: 324489
* [test] Enable setting category for inline tests.Jonas Devlieghere2018-02-071-2/+7
| | | | | | | | | Inlined tests have a test function that is actually an instance method, which requires a slightly different approach when it comes to setting the category attribute. The attribute must be set on the actual function, rather than on a particular instance. llvm-svn: 324488
* AMDGPU: Add 32-bit constant address spaceMarek Olsak2018-02-0714-19/+375
| | | | | | | | | | | | | | | | | | | | | | | Note: This is a candidate for LLVM 6.0, because it was planned to be in that release but was delayed due to a long review period. Merge conflict in release_60 - resolution: Add "-p6:32:32" into the second (non-amdgiz) string. Only scalar loads support 32-bit pointers. An address in a VGPR will fail to compile. That's OK because the results of loads will only be used in places where VGPRs are forbidden. Updated AMDGPUAliasAnalysis and used SReg_64_XEXEC. The tests cover all uses cases we need for Mesa. Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D41651 llvm-svn: 324487
* AMDGPU: Remove the s_buffer workaround for GFX9 chipsMarek Olsak2018-02-073-19/+4
| | | | | | | | | | | | | | | | | | Summary: I checked the AMD closed source compiler and the workaround is only needed when x3 is emulated as x4, which we don't do in LLVM. SMEM x3 opcodes don't exist, and instead there is a possibility to use x4 with the last component being unused. If the last component is out of buffer bounds and falls on the next 4K page, the hw hangs. Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D42756 llvm-svn: 324486
* [X86][AVX] Add PACKSSDW/PACKUSDW support for truncation of clamped valuesSimon Pilgrim2018-02-073-60/+20
| | | | | | SSE and shorter vector sizes will have to wait until we can add support for general SMIN/SMAX matching. llvm-svn: 324485
* [dsymutil][test] Check the updated dSYM instead of companion file.Jonas Devlieghere2018-02-072-5/+5
| | | | | | | | This patch has llvm-dwarfdump check the whole dSYM, rather than the hard-coded path to the Mach-O companion file. This might be what's causing the Windows bot to fail. llvm-svn: 324483
* [SLPVectorizer][NFC] Make a loop more readable.Clement Courbet2018-02-071-7/+5
| | | | llvm-svn: 324482
* Correct a bug in GetArgsAndEnv() for NetBSDKamil Rytarowski2018-02-071-2/+1
| | | | | | Fix setting envp. llvm-svn: 324481
* [dsymutil] Upstream update feature.Jonas Devlieghere2018-02-078-45/+341
| | | | | | | | | | | Now that dsymutil can generate accelerator tables, we can upstream the update logic that, as the name implies, updates the accelerator tables in an existing dSYM bundle. In combination with `-minimize` this can be used to remove redundant .debug_(inlines|pubtypes|pubnames). Differential revision: https://reviews.llvm.org/D42880 llvm-svn: 324480
* [X86] Regenerate atomic i32 testsSimon Pilgrim2018-02-071-127/+630
| | | | llvm-svn: 324479
* [Orc] Pacify -pedantic.Benjamin Kramer2018-02-071-1/+1
| | | | llvm-svn: 324478
* [mips] Support 'y' operand code to print exact log2 of the operandSimon Atanasyan2018-02-073-0/+29
| | | | llvm-svn: 324477
* [mips] Handle 'M' and 'L' operand codes for memory operandsSimon Atanasyan2018-02-072-7/+37
| | | | | | | | Both operand codes now work the same way in case of register or memory operands. It print high-order or low-order word in a double-word register or memory location. llvm-svn: 324476
* [clangd] Do not precent-encode numbers in URI.Eric Liu2018-02-072-1/+3
| | | | | | | | | | Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, cfe-commits, sammccall Differential Revision: https://reviews.llvm.org/D43009 llvm-svn: 324475
* [BinaryFormat] Remove dangling declaration of DiscriminantStringPavel Labath2018-02-071-1/+0
| | | | | | | The implementation of the function was deleted in r324426. This also removes the declaration. llvm-svn: 324474
* Re-enable "[SCEV] Make isLoopEntryGuardedByCond a bit smarter"Max Kazantsev2018-02-077-11/+200
| | | | | | | | | The failures happened because of assert which was overconfident about SCEV's proving capabilities and is generally not valid. Differential Revision: https://reviews.llvm.org/D42835 llvm-svn: 324473
* Remove function DW_DSC_value_to_namePavel Labath2018-02-072-12/+0
| | | | | | It is unused, and the underlying llvm function has been removed as well. llvm-svn: 324472
* [clang-format] Fix ObjC message arguments formatting.Jacek Olesiak2018-02-074-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes formatting of ObjC message arguments when inline block is a first argument. Having inline block as a first argument when method has multiple parameters is discouraged by Apple: "It’s best practice to use only one block argument to a method. If the method also needs other non-block arguments, the block should come last" (https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html#//apple_ref/doc/uid/TP40011210-CH8-SW7), it should be correctly formatted nevertheless. Current formatting: ``` [object blockArgument:^{ a = 42; } anotherArg:42]; ``` Fixed (colon alignment): ``` [object blockArgument:^{ a = 42; } anotherArg:42]; ``` Test Plan: make -j12 FormatTests && tools/clang/unittests/Format/FormatTests Reviewers: krasimir, benhamilton Reviewed By: krasimir, benhamilton Subscribers: benhamilton, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42493 llvm-svn: 324469
* [ELF][MIPS] Mark the test as required MIPS target support. NFCSimon Atanasyan2018-02-071-0/+2
| | | | llvm-svn: 324468
* [ELF][MIPS] Ignore incorrect version definition index for _gp_disp symbolSimon Atanasyan2018-02-074-0/+35
| | | | | | | | | | | | MIPS BFD linker puts _gp_disp symbol into DSO files and assigns zero version definition index to it. This value means 'unversioned local symbol' while _gp_disp is a section global symbol. We have to handle this bug in the LLD because BFD linker is used for building MIPS toolchain libraries. Differential revision: https://reviews.llvm.org/D42486 llvm-svn: 324467
* [MergeICmps] Re-commit rL324317 "Enable the MergeICmps Pass by default."Clement Courbet2018-02-074-46/+20
| | | | | | | | | | | | | | | | | | With fixes from rL324341. Original commit message: [MergeICmps] Enable the MergeICmps Pass by default. Summary: Now that PR33325 is fixed, this should always improve the generated code. Reviewers: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42793 llvm-svn: 324465
* [ELF] - Fix BB after r324463.George Rimar2018-02-071-1/+1
| | | | | | Test requires arm, but specified x86. llvm-svn: 324464
* [ELF] - Remove unused synthetic sections correctly.George Rimar2018-02-073-15/+22
| | | | | | | | | | | | | | | | This is PR35740 which now crashes because we remove unused synthetic sections incorrectly. We can keep input section description and corresponding output section live even if it must be empty and dead. This results in a crash because SHF_LINK_ORDER handling code tries to access first section which is nullptr in this case. Patch fixes the issue. Differential revision: https://reviews.llvm.org/D42681 llvm-svn: 324463
* Revert [SCEV] Make isLoopEntryGuardedByCond a bit smarterSerguei Katkov2018-02-077-205/+12
| | | | | | | | Revert rL324453 commit which causes buildbot failures. Differential Revision: https://reviews.llvm.org/D42835 llvm-svn: 324462
* [ELF] - Make defsym to work correctly with reserved symbols.George Rimar2018-02-072-1/+31
| | | | | | | | | | | | Previously --defsym=foo2=etext+2 would produce incorrect value for foo2 because expressions did not work correctly with reserved symbols, section offset was calculated wrong for them. Fixes PR35744. Differential revision: https://reviews.llvm.org/D42911 llvm-svn: 324461
* [ELF] - Allow set CPU string with -plugin-opt=mcpu=<xxx>George Rimar2018-02-073-7/+9
| | | | | | | | | | | | | | Previously we ignored -plugin-opt=mcpu=<xxx> and the only way to set CPU string was to pass -mllvm -mcpu=<xxx> Though clang may pass it with use of plugin options: -plugin-opt=mcpu=x86-64 Since we are trying to be compatible in command line with gold plugin, seems we should support it too. Differential revision: https://reviews.llvm.org/D42956 llvm-svn: 324459
* Revert r324455 "[ThinLTO] - Simplify code in ThinLTOBitcodeWriter."George Rimar2018-02-071-11/+37
| | | | | | | It broke BB: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/23721 llvm-svn: 324458
* [ELF] - Add testcase for -debugger-tune=<value>George Rimar2018-02-071-0/+35
| | | | | | | | | | | | | In D42733 we supported different LTO command line options, including -debugger-tune=<value>. Initially debugger-tune support was needed to fix PR36035. Patch adds testcase for this option to check we don't simply ignore it. Differential revision: https://reviews.llvm.org/D42961 llvm-svn: 324457
* [ARM] FP16 mov imm patternSjoerd Meijer2018-02-072-3/+17
| | | | | | | | | This is a follow up of r324321, adding a match pattern for mov with a FP16 immediate (also fixing operand vfp_f16imm that wasn't even compiling). Differential Revision: https://reviews.llvm.org/D42973 llvm-svn: 324456
* [ThinLTO] - Simplify code in ThinLTOBitcodeWriter.George Rimar2018-02-071-37/+11
| | | | | | | | | | Recently introduced convertToDeclaration is very similar to code used in filterModule function. Patch reuses it to reduce duplication. Differential revision: https://reviews.llvm.org/D42971 llvm-svn: 324455
* [Fuzzer] Use Zircon's public API on FuchsiaPetr Hosek2018-02-071-31/+43
| | | | | | | | | | The original libFuzzer Fuchsia port relied on convenience libraries, but these are not exported as part of Fuchsia sysroot. This change eliminates the use of these libraries and relies on public API only. Differential Revision: https://reviews.llvm.org/D42996 llvm-svn: 324454
* [SCEV] Make isLoopEntryGuardedByCond a bit smarterMax Kazantsev2018-02-077-12/+205
| | | | | | | | | | | Sometimes `isLoopEntryGuardedByCond` cannot prove predicate `a > b` directly. But it is a common situation when `a >= b` is known from ranges and `a != b` is known from a dominating condition. Thia patch teaches SCEV to sum these facts together and prove strict comparison via non-strict one. Differential Revision: https://reviews.llvm.org/D42835 llvm-svn: 324453
* The xfailed test from r324448 passed on one of the bots: remove it entirely ↵Michael Zolotukhin2018-02-071-69/+0
| | | | | | for now. llvm-svn: 324451
* [LoopPrediction] Introduce utility function getLatchPredicateForGuard. NFC.Serguei Katkov2018-02-071-17/+30
| | | | | | | Factor out getting the predicate for latch condition in a guard to utility function getLatchPredicateForGuard. llvm-svn: 324450
* [x86/retpoline] Make the external thunk names exactly match the namesChandler Carruth2018-02-072-39/+68
| | | | | | | | | | | | | | | | | | | that happened to end up in GCC. This is really unfortunate, as the names don't have much rhyme or reason to them. Originally in the discussions it seemed fine to rely on aliases to map different names to whatever external thunk code developers wished to use but there are practical problems with that in the kernel it turns out. And since we're discovering this practical problems late and since GCC has already shipped a release with one set of names, we are forced, yet again, to blindly match what is there. Somewhat rushing this patch out for the Linux kernel folks to test and so we can get it patched into our releases. Differential Revision: https://reviews.llvm.org/D42998 llvm-svn: 324449
* Xfail the test added in r324445 until the underlying issue in LoopSink is fixed.Michael Zolotukhin2018-02-072-61/+69
| | | | llvm-svn: 324448
* [LegalizeDAG] Truncate condition operand of ISD::SELECTEugene Leviant2018-02-072-1/+67
| | | | | | Differential revision: https://reviews.llvm.org/D42737 llvm-svn: 324447
* AMDGPU/GlobalISel: Mark 32-bit G_FPTOUI as legalTom Stellard2018-02-072-0/+25
| | | | | | | | | | | | Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D42152 llvm-svn: 324446
* Follow-up for r324429: "[LCSSAVerification] Run verification only when ↵Michael Zolotukhin2018-02-072-1/+66
| | | | | | | | | | | | | asserts are enabled." Before r324429 we essentially didn't have a verification of LCSSA, so no wonder that it has been broken: currently loop-sink breaks it (the attached test illustrates the failure). It was detected during a stage2 RA build, so to unbreak it I'm disabling the check for now. llvm-svn: 324445
* [ThinLTO] Serialize WithGlobalValueDeadStripping index flag for distributed ↵Teresa Johnson2018-02-0713-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | backends Summary: A recent fix to drop dead symbols (r323633) did not work for ThinLTO distributed backends because we lose the WithGlobalValueDeadStripping set on the index during the thin link. This patch adds a new flags record to the bitcode format for the index, and serializes this flag for the combined index (it would always be 0 for the per-module index generated by the compile step, so no need to serialize the new flags record there until/unless we add another flag that applies to the per-module indexes). Generally this flag should always be set for the distributed backends, which are necessarily performed after the thin link. However, if we were to simply set this flag on the index applied to the distributed backends (invoked via clang), we would lose the ability to disable dead stripping via -compute-dead=false for debugging purposes. Reviewers: grimar, pcc Subscribers: mehdi_amini, inglorion, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D42799 llvm-svn: 324444
* [WebAssembly] Add __data_end link-sythentic symbol.Sam Clegg2018-02-0716-2/+104
| | | | | | | | | | | | | | This is similar to _end (See https://linux.die.net/man/3/edata for more) but using our own unique name since our use cases will most likely be different and we want to keep our options open WRT to memory layout. This change will allow is to remove the DataSize from the linking metadata section which is currently being used by emscripten to derive the end of the data. Differential Revision: https://reviews.llvm.org/D42867 llvm-svn: 324443
* GlobalISel: Always check operand types when executing match tableVolkan Keles2018-02-072-18/+65
| | | | | | | | | | | | | | | | | | Summary: Some of the commands tries to get the register without checking if the specified operands is a register and causing crash. All commands should check the type of the operand first and reject if the type is not expected. Reviewers: dsanders, qcolombet Reviewed By: qcolombet Subscribers: qcolombet, rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D42984 llvm-svn: 324442
* test: use target triple for the testSaleem Abdulrasool2018-02-071-1/+1
| | | | | | | | Now that `pragma comment` is also used on ELF-ish targets with a restricted set of options, we need to specify the full target here for the test. llvm-svn: 324441
* [AMDGPU] Suppress redundant waitcnt instrs.Mark Searles2018-02-073-19/+63
| | | | | | | | | | | | 1. Run the memory legalizer prior to the waitcnt pass; keep the policy that the waitcnt pass does not remove any waitcnts within the incoming IR. 2. The waitcnt pass doesn't (yet) track waitcnts that exist prior to the waitcnt pass (it just skips over them); because the waitcnt pass is ignorant of them, it may insert a redundant waitcnt. To avoid this, check the prev instr. If it and the to-be-inserted waitcnt are the same, suppress the insertion. We keep the existing waitcnt under the assumption that whomever, e.g., the memory legalizer, inserted it knows what they were doing. 3. Follow-on work: teach the waitcnt pass to record the pre-existing waitcnts for better waitcnt production. Differential Revision: https://reviews.llvm.org/D42854 llvm-svn: 324440
* AST: support SwiftCC on MS ABISaleem Abdulrasool2018-02-072-3/+31
| | | | | | | | Microsoft has reserved the identifier 'S' as the swift calling convention. Decorate the symbols appropriately. This enables swift on Windows. llvm-svn: 324439
* Support `#pragma comment(lib, "name")` in the frontend for ELFSaleem Abdulrasool2018-02-078-9/+48
| | | | | | | | | | | | | This adds the frontend support required to support the use of the comment pragma to enable auto linking on ELFish targets. This is a generic ELF extension supported by LLVM. We need to change the handling for the "dependentlib" in order to accommodate the previously discussed encoding for the dependent library descriptor. Without the custom handling of the PCK_Lib directive, the -l prefixed option would be encoded into the resulting object (which is treated as a frontend error). llvm-svn: 324438
OpenPOWER on IntegriCloud