summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [scudo] Refactor of CRC32 and ARM runtime CRC32 detectionKostya Kortchinsky2017-01-188-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ARM & AArch64 runtime detection for hardware support of CRC32 has been added via check of the AT_HWVAL auxiliary vector. Following Michal's suggestions in D28417, the CRC32 code has been further changed and looks better now. When compiled with full relro (which is strongly suggested to benefit from additional hardening), the weak symbol for computeHardwareCRC32 is read-only and the assembly generated is fairly clean and straight forward. As suggested, an additional optimization is to skip the runtime check if SSE 4.2 has been enabled globally, as opposed to only for scudo_crc32.cpp. scudo_crc32.h has no purpose anymore and was removed. Reviewers: alekseyshl, kcc, rengolin, mgorny, phosek Reviewed By: rengolin, mgorny Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D28574 llvm-svn: 292409
* Don't create a comdat group for a dropped def with initializerTeresa Johnson2017-01-182-2/+24
| | | | | | | | | | | | | | | | | | Non-prevailing weak/linkonce odr symbols will be dropped by ThinLTO to available_externally when possible. If they had an initializer in the global_ctors list, a comdat group was being created. This code already had logic to skip available_externally defs, but now the EliminateAvailableExternally pass will drop these symbols to declarations earlier. Change the check to skip all declarations for linker (which includes available_externally along with declarations). Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28737 llvm-svn: 292408
* Revert 292404 due to buildbot failures.Kirill Bobyrev2017-01-182-5/+5
| | | | llvm-svn: 292407
* [ASTUnit] Reset diag state when creating the ASTUnit.Benjamin Kramer2017-01-181-0/+1
| | | | | | A client could call this with a dirty diagnostic engine, don't crash. llvm-svn: 292406
* [include-fixer] Don't return a correction if the header insertion failed.Benjamin Kramer2017-01-181-10/+10
| | | | | | | | This is could happen in cases involving macros and we don't want to return an invalid fixit for it or a confusing error message with no fixit. llvm-svn: 292405
* [X86] Minor code cleanup to fix several clang-tidy warnings. NFCKirill Bobyrev2017-01-182-5/+5
| | | | llvm-svn: 292404
* [ARM] Create SubtargetFeatures from build attrsSam Parker2017-01-1810-42/+322
| | | | | | | | | | | An ELFObjectFile can now create SubtargetFeatures from the available ARM build attributes, in a similar manner to MIPS. I've moved the MIPS code into its own function and the ARM handler also has a separate function. Differential Revision: https://reviews.llvm.org/D28291 llvm-svn: 292403
* [Basic] Remove source manager references from diag state points.Benjamin Kramer2017-01-182-33/+40
| | | | | | | | | This is just wasted space, we don't support state points from multiple source managers. Validate that there's no state when resetting the source manager and use the 'global' reference to the sourcemanager instead of the ones in the diag state. llvm-svn: 292402
* raw_fd_ostream: Make file handles non-inheritable by defaultPavel Labath2017-01-181-2/+2
| | | | | | | | | | | | | | | | Summary: This makes the file descriptors on unix platform non-inheritable (O_CLOEXEC). There is no change in behavior on windows, as the handles were already non-inheritable there. Reviewers: rnk, rafael Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28854 llvm-svn: 292401
* Revert r292374 to debug Windows buildbot failure.Arpith Chacko Jacob2017-01-1815-1612/+42
| | | | llvm-svn: 292400
* Warn when calling a non interrupt function from an interrupt on ARMJonathan Roelofs2017-01-183-0/+23
| | | | | | | | | | The idea for this originated from a really tricky bug: ISRs on ARM don't automatically save off the VFP regs, so if say, memcpy gets interrupted and the ISR itself calls memcpy, the regs are left clobbered when the ISR is done. https://reviews.llvm.org/D28820 llvm-svn: 292375
* [OpenMP] Codegen support for 'target parallel' on the host.Arpith Chacko Jacob2017-01-1815-42/+1612
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for codegen of 'target parallel' on the host. It is also the first combined directive that requires two or more captured statements. Support for this functionality is included in the patch. A combined directive such as 'target parallel' has two captured statements, one for the 'target' and the other for the 'parallel' region. Two captured statements are required because each has different implicit parameters (see SemaOpenMP.cpp). For example, the 'parallel' has 'global_tid' and 'bound_tid' while the 'target' does not. The patch adds support for handling multiple captured statements based on the combined directive. When codegen'ing the 'target parallel' directive, the 'target' outlined function is created using the outer captured statement and the 'parallel' outlined function is created using the inner captured statement. Reviewers: ABataev Differential Revision: https://reviews.llvm.org/D28753 llvm-svn: 292374
* [Assembler] Fix crash when assembling .quad for AArch32.Chad Rosier2017-01-182-1/+11
| | | | | | | | | | | A 64-bit relocation does not exist in 32-bit ARMELF. Report an error instead of crashing. PR23870 Patch by Sanne Wouda (sanwou01). Differential Revision: https://reviews.llvm.org/D28851 llvm-svn: 292373
* [thumb,framelowering] Reset NoVRegs in Thumb1FrameLowering::emitPrologue.Florian Hahn2017-01-182-0/+6
| | | | | | | | | | | | | | | | | | | | | | | Summary: In this function, virtual registers can be introduced (for example through calls to emitThumbRegPlusImmInReg). doScavengeFrameVirtualRegs will replace those virtual registers with concrete registers later on in PrologEpilogInserter, which sets NoVRegs again. This patch fixes the Codegen/Thumb/segmented-stacks.ll test case which failed with expensive checks. https://llvm.org/bugs/show_bug.cgi?id=27484 Reviewers: rnk, bkramer, olista01 Reviewed By: olista01 Subscribers: llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D28829 llvm-svn: 292372
* [InstCombine][AVX2] Add DemandedElts support for VPERMD/VPERMPS shufflesSimon Pilgrim2017-01-182-8/+8
| | | | | | Simplify a vpermv shuffle mask based on the elements of the mask that are actually demanded. llvm-svn: 292371
* Re-revert: [globalisel] Tablegen-erate current Register Bank InformationDaniel Sanders2017-01-1816-437/+193
| | | | | | | More missing guards. My build didn't notice it due to a stale file left over from a Global ISel build. llvm-svn: 292369
* [InstCombine][AVX2] Tests showing missed opportunities to pass demanded elts ↵Simon Pilgrim2017-01-181-0/+27
| | | | | | through a vpermd/vpermps shuffle llvm-svn: 292368
* Re-commit: [globalisel] Tablegen-erate current Register Bank InformationDaniel Sanders2017-01-1816-193/+437
| | | | | | | | | | | | | | | | | | | | | | | Summary: Adds a RegisterBank tablegen class that can be used to declare the register banks and an associated tablegen pass to generate the necessary code. Changes since last commit: The new tablegen pass is now correctly guarded by LLVM_BUILD_GLOBAL_ISEL and this should fix the buildbots however it may not be the whole fix. The previous buildbot failures suggest there may be a memory bug lurking that I'm unable to reproduce (including when using asan) or spot in the source. If they re-occur on this commit then I'll need assistance from the bot owners to track it down. Reviewers: t.p.northover, ab, rovka, qcolombet Reviewed By: qcolombet Subscribers: aditya_nandakumar, rengolin, kristof.beyls, vkalintiris, mgorny, dberris, llvm-commits, rovka Differential Revision: https://reviews.llvm.org/D27338 llvm-svn: 292367
* [ARM] Create objdump subtarget from build attrsSam Parker2017-01-1819-58/+686
| | | | | | | | | | | Enable an ELFObjectFile to read the its arm build attributes to produce a target triple with a specific ARM architecture. llvm-objdump now uses this functionality to automatically produce a more accurate target. Differential Revision: https://reviews.llvm.org/D28769 llvm-svn: 292366
* [InstCombine] Remove unnecessary intrinsics demanded elts handlingSimon Pilgrim2017-01-181-22/+2
| | | | | | As discussed on D28777 - we don't need to handle 'all element' shuffles inside InstCombiner::visitCallInst as InstCombiner::SimplifyDemandedVectorElts will do everything we need. llvm-svn: 292365
* Fix windows build for previous commitPavel Labath2017-01-181-1/+2
| | | | | | We get an error about a redefinition of getcwd(). This seems to fix it. llvm-svn: 292364
* Fixed parser error on windows shell evaluation of RUN script lineSimon Pilgrim2017-01-181-3/+1
| | | | llvm-svn: 292363
* [X86][SSE] Simplify umax knownbits testSimon Pilgrim2017-01-181-1/+1
| | | | | | combineSRA doesn't detect sign bits splats that it does itself so just use -1 as the demanded input so that its already splatted llvm-svn: 292361
* Add a more succinct logging syntaxPavel Labath2017-01-187-65/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds the LLDB_LOG macro, which enables one to write more succinct log statements. if (log) log->Printf("log something: %d", var); becomes LLDB_LOG(log, "log something: {0}, var); The macro still internally does the "if(log)" dance, so the arguments are only evaluated if logging is enabled, meaning it has the same overhead as the previous syntax. Additionally, the log statements will be automatically prefixed with the file and function generating the log (if the corresponding new argument to the "log enable" command is enabled), so one does not need to manually specify this in the log statement. It also uses the new llvm formatv syntax, which means we don't have to worry about PRIx64 macros and similar, and we can log complex object (llvm::StringRef, lldb_private::Error, ...) more easily. Differential Revision: https://reviews.llvm.org/D27459 llvm-svn: 292360
* [ELF] Move createThunks() after scanRelocations()Peter Smith2017-01-185-44/+53
| | | | | | | | | | | | | | | | | | | | A necessary first step towards range extension thunks is to delay the creation of thunks until the layout of InputSections within OutputSections has been done. The change scans the relocations directly from InputSections rather than looking in the ELF File the InputSection came from. This will allow a future change to redirect the relocations to symbols defined by Thunks rather than indirect when resolving relocations. A side-effect of moving ThunkCreation is that the OutSecOff of InputSections may change in an OutputSection that contains Thunks. In well behaved programs thunks are not in OutputSections with dynamic relocations. Differential Revision: https://reviews.llvm.org/D28811 llvm-svn: 292359
* [X86] Improve mul combine for negative multiplayer (2^c - 1)Michael Zuckerman2017-01-182-16/+261
| | | | | | | | | | | This patch improves the mul instruction combine function (combineMul) by adding new layer of logic. In this patch, we are adding the ability to fold (mul x, -((1 << c) -1)) or (mul x, -((1 << c) +1)) into (neg(X << c) -x) or (neg((x << c) + x) respective. Differential Revision: https://reviews.llvm.org/D28232 llvm-svn: 292358
* Revert "[XRay][Arm] Repair XRay table emission on Arm32 and add tests to ↵Renato Golin2017-01-183-15/+0
| | | | | | | | | | | identify such problem earlier" This reverts commit r292210, as it broke the Thumb buldbot with: clang-5.0: error: the clang compiler does not support '-fxray-instrument on thumbv7-unknown-linux-gnueabihf'. llvm-svn: 292357
* Revert "[XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests"Renato Golin2017-01-182-9/+2
| | | | | | | | | This reverts commit r292211, as it broke the Thumb buldbot with: clang-5.0: error: the clang compiler does not support '-fxray-instrument on thumbv7-unknown-linux-gnueabihf' llvm-svn: 292356
* Revert "[xray] try to fix thumb buildbot"Renato Golin2017-01-181-1/+0
| | | | | | This reverts commit r292268, as it didn't fix the buildbots. llvm-svn: 292355
* [SystemZ] Proper handling of undef flag while expanding pseudo.Jonas Paulsson2017-01-183-7/+35
| | | | | | | | During post-RA pseudo expansion, an 'undef' flag of the source operand should be propagated by emitGRX32Move(). Review: Ulrich Weigand llvm-svn: 292353
* [X86] Fix for bugzilla 31576 - add support for "data32" instruction prefixMarina Yatsina2017-01-1811-2/+100
| | | | | | | | | | | This patch fixes bugzilla 31576 (https://llvm.org/bugs/show_bug.cgi?id=31576). "data32" instruction prefix was not defined in the llvm. An exception had to be added to the X86 tablegen and AsmPrinter because both "data16" and "data32" are encoded to 0x66 (but in different modes). Differential Revision: https://reviews.llvm.org/D28468 llvm-svn: 292352
* Re-add mechanism to override LIT options using enviroment variables.Eric Fiselier2017-01-181-17/+27
| | | | | | | There was a dumb mistake in the original commit that has now been fixed llvm-svn: 292351
* Use C++11 static_assert() for build asserts.Jonathan Peyton2017-01-181-21/+2
| | | | llvm-svn: 292350
* Fix memory error in case of reinit using kmp_set_defaults() for lock code.Jonathan Peyton2017-01-182-0/+59
| | | | | | | | The lock tables were being reallocated if kmp_set_defaults() was called. In the env_init code it says that the user should be able to switch between different KMP_CONSISTENCY_CHECK values which is what this change enables. llvm-svn: 292349
* Fix small memory leak regarding __kmp_nested_proc_bindJonathan Peyton2017-01-181-0/+4
| | | | | | | There is no corresponding free() for this expandable array. The logic is added in __kmp_cleanup() next to the freeing of __kmp_nested_nth. llvm-svn: 292348
* Revert "Add mechanism to override LIT options using enviroment variables"Eric Fiselier2017-01-181-27/+17
| | | | | | | The buildbots currently depend on the old configuration. I'll recommit once Zorg is fixed and reset llvm-svn: 292347
* Add mechanism to override LIT options using enviroment variablesEric Fiselier2017-01-181-17/+27
| | | | llvm-svn: 292346
* Fix filesystem::path assignment from {}Eric Fiselier2017-01-183-0/+51
| | | | | | | | Adding `path::operator=(string_type&&)` made the expression `p = {}` ambiguous. This path fixes that ambiguity by making the `string&&` overload a template so it ranks lower during overload resolution. llvm-svn: 292345
* [CMake] Separate LLVM_ENABLE_LTO and LLVM_ENABLE_LLDPetr Hosek2017-01-181-3/+5
| | | | | | | | | These two are independent: it's possible to use LLD without LTO, and it's possible to do LTO build without LLD. Differential Revision: https://reviews.llvm.org/D28821 llvm-svn: 292343
* Get more std::string _LIBCPP_DEBUG tests passingEric Fiselier2017-01-182-5/+8
| | | | llvm-svn: 292342
* More configuration changes for running the test suite against MSVC's STLEric Fiselier2017-01-184-1/+17
| | | | llvm-svn: 292337
* Return early if writeMapFile failed.Rui Ueyama2017-01-182-0/+8
| | | | | | | | This patch adds a test for an invalid output path for -Map option, though that test is not for verifying that we are using error() instead of fatal() in writeMapFile. llvm-svn: 292336
* math: Add logb builtinAaron Watry2017-01-185-0/+36
| | | | | | | | | Ported from the amd-builtins branch. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com> CC: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 292335
* math: Add expm1 builtin functionAaron Watry2017-01-186-0/+293
| | | | | | | | | Ported from the amd-builtins branch. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com> CC: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 292334
* [LoopDeletion] (cleanup, NFC) Fix one more local variable that didn'tChandler Carruth2017-01-181-2/+2
| | | | | | | | | follow LLVM's naming conventions while I'm here. Again, sorry I didn't spot this earlier to coalesce with other cleanup changes. llvm-svn: 292333
* [PM] Teach LoopDeletion to correctly update the LPM when loops areChandler Carruth2017-01-184-11/+66
| | | | | | | | | deleted. I've expanded its test coverage a bit including adding one test that will crash clearly without this change. llvm-svn: 292332
* [LoopDeletion] (cleanup, NFC) Make this test actually test what itChandler Carruth2017-01-181-17/+72
| | | | | | | | | | | | claims to test. LoopSimplify was unifying the multiple exits in this test case, making it never even test the multiple exit handling of LoopDeletion. Doh. Now it works (thanks to a great idea from mkuper) and will fail if we ever change something to make it stop working. llvm-svn: 292331
* ELF: Add support for relocation type R_X86_64_8.Peter Collingbourne2017-01-184-0/+25
| | | | | | | | | Although this relocation type is not part of the x86-64 psABI, I intend to use it internally as part of the ThinLTO implementation. Differential Revision: https://reviews.llvm.org/D28841 llvm-svn: 292330
* [AVX-512] Replace subvector broadcast builtins with shufflevectors and selects.Craig Topper2017-01-189-265/+260
| | | | | | Verified that the backend codegens this equally well. llvm-svn: 292329
* DAG: Consider nnan in isKnownNeverNaNMatt Arsenault2017-01-182-0/+19
| | | | llvm-svn: 292328
OpenPOWER on IntegriCloud