summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* lldb running on an ios device is using the _dyld_get_all_image_infos()Jason Molenda2018-02-071-0/+21
| | | | | | | | | SPI call to to find its own shared cache's UUID. On newer sytems we need to use the a new SPI which will return the UUID directly. <rdar://problem/36625871> llvm-svn: 324437
* [Mips][AMDGPU] Update test cases to not use vector lt/gt compares that can ↵Craig Topper2018-02-073-92/+98
| | | | | | | | | | be simplified to an equality/inequality or to always true/false. For example 'ugt X, 0' can be simplified to 'ne X, 0'. Or 'uge X, 0' is always true. We already simplify this for scalars in SimplifySetCC, but we don't currently for vectors in SimplifySetCC. D42948 proposes to change that. llvm-svn: 324436
* Don't set dso_local flag in LTO resolutions for absolute symbols defined in ELFDmitry Mikulin2018-02-073-1/+23
| | | | | | | | | objects, it confuses codegen into generating pc-rel relocations for those symbols, which leads to linker errors. Differential Revision: https://reviews.llvm.org/D42977 llvm-svn: 324435
* Make sure that --no-check-sections doesn't print out warning messages.Rui Ueyama2018-02-071-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D42988 llvm-svn: 324434
* [NFC] Change odd cast-through-unknown behavior to an OptionalErich Keane2018-02-071-9/+9
| | | | | | | | | | | This bit of code in the driver uses '~0U' as a sentinel value. The result is an odd mishmash of casts just to work. This replaces it with an optional, which is a little less crazy looking. --ehis line, and those below, will be ignored-- M lib/Driver/Driver.cpp llvm-svn: 324433
* [clang-tidy] Update fuchsia-multiple-inheritance to check for templatesJulie Hockett2018-02-072-2/+4
| | | | | | | | | | | Updating fuchsia-multiple-inheritance to not crash when a record inherits a template. Fixes PR36052. Differential Revision: https://reviews.llvm.org/D42918 llvm-svn: 324432
* AMDGPU: Select BFI patterns with 64-bit intsMatt Arsenault2018-02-074-18/+192
| | | | llvm-svn: 324431
* [NFC] Correct a typo'ed comment and reworded, since it is awkward.Erich Keane2018-02-071-1/+1
| | | | llvm-svn: 324430
* [LCSSAVerification] Run verification only when asserts are enabled.Michael Zolotukhin2018-02-071-1/+3
| | | | llvm-svn: 324429
* Simplify libtool compatibility hack.Rafael Espindola2018-02-071-7/+1
| | | | | | | | | | | | | I tested that if I remove "elf" from the message, building a program that uses libtool prints checking whether to build shared libraries... no but with this patch it still prints checking whether to build shared libraries... yes llvm-svn: 324428
* [DAGCombiner][AMDGPU][X86] Turn cttz/ctlz into ↵Craig Topper2018-02-063-12/+16
| | | | | | | | | | | | cttz_zero_undef/ctlz_zero_undef if we can prove the input is never zero X86 currently has a late DAG combine after cttz/ctlz are turned into BSR+BSF+CMOV to detect this and remove the CMOV. But we should be able to do this much earlier and avoid creating the cmov all together. For the changed AMDGPU test case it appears that previously the i8 cttz was type legalized to i16 which introduced an OR with 256 in order to limit the result to 8 on the widened type. At this point the result is known to never be zero, but nothing checked that. Then operation legalization is told to promote all i16 cttz to i32. This introduces an extend and a truncate and another OR with 65536 to limit the result to 16. With the DAG combiner change we are able to prevent the creation of the second OR since the opcode will have been changed to cttz_zero_undef after the first OR. I the lack of the OR caused the instruction to change to v_ffbl_b32_sdwa Differential Revision: https://reviews.llvm.org/D42985 llvm-svn: 324427
* Add DWARF for discriminated unionsAdrian Prantl2018-02-0619-56/+380
| | | | | | | | | | | | | | | | | | | | | | | | | n Rust, an enum that carries data in the variants is, essentially, a discriminated union. Furthermore, the Rust compiler will perform space optimizations on such enums in some situations. Previously, DWARF for these constructs was emitted using a hack (a magic field name); but this approach stopped working when more space optimizations were added in https://github.com/rust-lang/rust/pull/45225. This patch changes LLVM to allow discriminated unions to be represented in DWARF. It adds createDiscriminatedUnionType and createDiscriminatedMemberType to DIBuilder and then arranges for this to be emitted using DWARF's DW_TAG_variant_part and DW_TAG_variant. Note that DWARF requires that a discriminated union be represented as a structure with a variant part. However, as Rust only needs to emit pure discriminated unions, this is what I chose to expose on DIBuilder. Patch by Tom Tromey! Differential Revision: https://reviews.llvm.org/D42082 llvm-svn: 324426
* [Sema][ObjC] Use SmallSetVector to fix a failing test on the reverseAkira Hatanaka2018-02-063-6/+26
| | | | | | | | | | | | | iteration bot. This commit reverts r315639, which was causing clang to print diagnostics that weren't printed before. Instead, it declares OverrideSearch::Overridden as a SmallSetVector to fix the non-deterministic behavior r315639 was trying to fix. rdar://problem/36445528 llvm-svn: 324425
* Place undefined globals in .bss instead of .dataEli Friedman2018-02-063-3/+30
| | | | | | | | | | | | | | | | | | | | | | Following up on the discussion from http://lists.llvm.org/pipermail/llvm-dev/2017-April/112305.html, undef values are now placed in the .bss as well as null values. This prevents undef global values taking up potentially huge amounts of space in the .data section. The following two lines now both generate equivalent .bss data: @vals1 = internal unnamed_addr global [20000000 x i32] zeroinitializer, align 4 @vals2 = internal unnamed_addr global [20000000 x i32] undef, align 4 ; previously unaccounted for This is primarily motivated by the corresponding issue in the Rust compiler (https://github.com/rust-lang/rust/issues/41315). Differential Revision: https://reviews.llvm.org/D41705 Patch by varkor! llvm-svn: 324424
* Remove more of the std::experimental bits that are now in std::. All the _v ↵Marshall Clow2018-02-0650-3997/+4
| | | | | | type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 324423
* [LivePhysRegs] Fix handling of return instructions.Eli Friedman2018-02-063-18/+61
| | | | | | | | | | | | | | | | | See D42509 for the original version of this. Basically, there are two significant changes to behavior here: - addLiveOuts always adds all pristine registers (even if a block has no successors). - addLiveOuts and addLiveOutsNoPristines always add all callee-saved registers for return blocks (including conditional return blocks). I cleaned up the functions a bit to make it clear these properties hold. Differential Revision: https://reviews.llvm.org/D42655 llvm-svn: 324422
* Convert a use of Config->Static.Rafael Espindola2018-02-062-2/+6
| | | | | | | | | | In lld this was the only use of Config->Static where it meant anything else other than "use .a instead of .so". If a program turns out to not use any dynamic libraries, we should produce the same result with and without -static. llvm-svn: 324421
* [Myriad] Define __ma2x5x and __ma2x8xWalter Lee2018-02-062-0/+11
| | | | | | | | | | | | Summary: Add architecture defines for ma2x5x and ma2x8x. Reviewers: jyknight Subscribers: fedor.sergeev, MartinO Differential Revision: https://reviews.llvm.org/D42882 llvm-svn: 324420
* [Lex] Fix handling numerical literals ending with ' and signed exponent.Volodymyr Sapsai2018-02-062-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | For input `0'e+1` lexer tokenized as numeric constant only `0'e`. Later NumericLiteralParser skipped 0 and ' as digits and parsed `e+1` as valid exponent going past the end of the token. Because it didn't mark numeric literal as having an error, it continued parsing and tried to expandUCNs with StringRef of length -2. The fix is not to parse exponent when we reached the end of token. Discovered by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4588 rdar://problem/36076719 Reviewers: rsmith, t.p.northover Reviewed By: rsmith Subscribers: cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D41834 llvm-svn: 324419
* Store just argv[0] in Config.Rafael Espindola2018-02-064-9/+9
| | | | | | | Having the full argv there seems in conflict with the desire to parse all command line options in the Driver. llvm-svn: 324418
* [AArch64] Adjust the cost model for Exynos M3Evandro Menezes2018-02-061-4/+4
| | | | | | | Fix the modeling of long division and SIMD conversion from integer and horizontal minimum and maximum. llvm-svn: 324417
* Add SelectionDAGDumper support for strict FP nodesAndrew Kaylor2018-02-061-0/+20
| | | | | | Patch by Kevin P. Neal llvm-svn: 324416
OpenPOWER on IntegriCloud