summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default ↵Eric Fiselier2018-02-0719-26/+805
| | | | | | | | | | | | | | | | | | | constructible types. Summary: This patch fixes llvm.org/PR35491 and LWG2157 (https://cplusplus.github.io/LWG/issue2157) The fix attempts to maintain ABI compatibility by replacing the array with a instance of `aligned_storage`. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: lichray, cfe-commits Differential Revision: https://reviews.llvm.org/D41223 llvm-svn: 324526
* [PR36008] Avoid -Wsign-compare warning for enum constants inAlex Lorenz2018-02-072-0/+23
| | | | | | | | | | | | | typeof expressions This commit looks through typeof type at the original expression when diagnosing -Wsign-compare to avoid an unfriendly diagnostic. rdar://36588828 Differential Revision: https://reviews.llvm.org/D42561 llvm-svn: 324514
* Add ld.lld.1 man page, describing lld's ELF linkerEd Maste2018-02-071-0/+479
| | | | | | | | | | | | | | | One of the FreeBSD requirements for enabling lld as the system linker is that it has a man page. Other FreeBSD developers and I created one using lld's --help output as a starting point. This is an expanded and improved version of that. This man page would benefit from additional content, but it provides basic user-facing coverage of lld's options and serves as a good starting point. Differential Revision: https://reviews.llvm.org/D42963 llvm-svn: 324512
* Revert "[DebugInfo] Improvements to representation of enumeration types ↵Momchil Velikov2018-02-0716-392/+51
| | | | | | | | (PR36168)" Revert commit r324489, it broke LLDB tests. llvm-svn: 324511
* [SLP] Add a tests for PR36280, NFC.Alexey Bataev2018-02-071-0/+28
| | | | llvm-svn: 324510
* Remove an errant ^S Jim Ingham2018-02-071-1/+1
| | | | | | (still can't get over those Emacs habits...) llvm-svn: 324509
* Revert [DebugInfo] Improvements to representation of enumeration types ↵Momchil Velikov2018-02-075-112/+10
| | | | | | | | (PR36168)" Revert due to breaking buildbots (LLDB tests) llvm-svn: 324508
* [analyzer] [NFC] Factor out generating path diagnostics for a statement into ↵George Karpenkov2018-02-071-636/+648
| | | | | | | | a function Differential Revision: https://reviews.llvm.org/D42558 llvm-svn: 324507
* Revert "Recommit r324107."Rafael Espindola2018-02-0722-310/+124
| | | | | | | | | | | | | | This reverts commit r324500. The bots found two failures: ThreadSanitizer-x86_64 :: Linux/pie_no_aslr.cc ThreadSanitizer-x86_64 :: pie_test.cc when using gold. The issue is a limitation in gold when building pie binaries. I will investigate how to work around it. llvm-svn: 324505
* Generate PDB files for profiling even in Release build.Zachary Turner2018-02-071-0/+6
| | | | | | | | | | | | This patch enables PDB generation for Release build, which has slightly different optimize option with RelWithDebInfo on windows. This helps to know slow part of Release build when profiling. Patch by Takuto Ikuta Differential Revision: https://reviews.llvm.org/D42632 llvm-svn: 324504
* Comment on 'Review' issuesMarshall Clow2018-02-071-8/+8
| | | | llvm-svn: 324503
* Add --build-id=fast as a synonym for --build-id.Rui Ueyama2018-02-072-0/+4
| | | | | | | | | | | | When you omit an argument, most options fall back to their defaults. For example, --color-diagnostics is a synonym for --color-diagnostics=auto. We don't have a way to specify the default choice for --build-id, so we can't describe --build-id (without an argument) in that way. This patch adds "fast" for the default build-id choice. Differential Revision: https://reviews.llvm.org/D43032 llvm-svn: 324502
* Fix r324498: the commit removed the '-' before the disable-llvm-verifier flagEric Fiselier2018-02-071-1/+1
| | | | llvm-svn: 324501
* Recommit r324107.Rafael Espindola2018-02-0722-124/+310
| | | | | | | | | | | | | | | | | | | | | | | It now includes a fix to not mark available_externally definitions as dso_local. Original message: Start setting dso_local in clang. This starts adding dso_local to clang. The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go away. My objective for now is to move enough of it to clang to remove the need for the TargetMachine one to handle PIE copy relocations and -fno-plt. With that it should then be easy to implement a -fno-copy-reloc in clang. This patch just adds the cases where we assume a symbol to be local based on the file being compiled for an executable or a shared library. llvm-svn: 324500
* Don't pass ForDefinition_t in places it is redundant.Rafael Espindola2018-02-078-84/+56
| | | | | | | | | | | | | | I found this while looking at the ppc failures caused by the dso_local change. The issue was that the patch would produce the wrong answer for available_externally. Having ForDefinition_t available in places where the code can just check the linkage is a bit of a foot gun. This patch removes the ForDefiniton_t argument in places where the linkage is already know. llvm-svn: 324499
* [Driver] Add option to manually control discarding value names in LLVM IR.Eric Fiselier2018-02-074-4/+45
| | | | | | | | | | | | | | | | | | | Summary: Currently, assertion-disabled Clang builds emit value names when generating LLVM IR. This is controlled by the `NDEBUG` macro, and is not easily overridable. In order to get IR output containing names from a release build of Clang, the user must manually construct the CC1 invocation w/o the `-discard-value-names` option. This is less than ideal. For example, Godbolt uses a release build of Clang, and so when asked to emit LLVM IR the result lacks names, making it harder to read. Manually invoking CC1 on Compiler Explorer is not feasible. This patch adds the driver options `-fdiscard-value-names` and `-fno-discard-value-names` which allow the user to override the default behavior. If neither is specified, the old behavior remains. Reviewers: erichkeane, aaron.ballman, lebedev.ri Reviewed By: aaron.ballman Subscribers: bogner, cfe-commits Differential Revision: https://reviews.llvm.org/D42887 llvm-svn: 324498
* [X86] Regenerate test using update_mir_test_checks.py. NFCCraig Topper2018-02-071-155/+268
| | | | llvm-svn: 324497
* [asan] Fix filename size on linux platforms.Yvan Roux2018-02-071-1/+2
| | | | | | | | | | | | This is a a fix for: https://bugs.llvm.org/show_bug.cgi?id=35996 Use filename limits from system headers to be synchronized with what LD_PRELOAD can handle. Differential Revision: https://reviews.llvm.org/D42900 llvm-svn: 324496
* [OpenMP][libomptarget] Add data sharing support in libomptargetGheorghe-Teodor Bercea2018-02-076-1/+65
| | | | | | | | | | | | | | Summary: This patch extends the libomptarget functionality in patch D14254 with support for the data sharing scheme for supporting implicitly shared variables. The runtime therefore maintains a list of references to shared variables. Reviewers: carlo.bertolli, ABataev, Hahnfeld, grokos, caomhin, hfinkel Reviewed By: Hahnfeld, grokos Subscribers: guansong, llvm-commits, openmp-commits Differential Revision: https://reviews.llvm.org/D41485 llvm-svn: 324495
* Revert "AMDGPU: Add 32-bit constant address space"Rafael Espindola2018-02-0714-375/+19
| | | | | | | | This reverts commit r324487. It broke clang tests. llvm-svn: 324494
* 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
OpenPOWER on IntegriCloud