summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [gcov] Make the CLang side coverage test work with the newChandler Carruth2018-05-021-7/+15
| | | | | | | | | instrumentation codegeneration strategy of using a data structure and a loop. Required some finesse to get the critical things being tested to surface in a nice way for FileCheck but I think this preserves the original intent of the test. llvm-svn: 331411
* [PowerPC] No CTR loop if the candidate exiting block is in a different loopNemanja Ivanovic2018-05-022-0/+81
| | | | | | | | | | | | | | | | The CTR loops pass will insert the decrementing branch instruction in an exiting block for the loop being transformed. However if that block is part of another loop as well (whether a nested loop or with irreducible CFG), it is not valid to use that exiting block. In fact, if the loop hass irreducible CFG, we don't bother analyzing it and we just bail on the transformation. In practice, this doesn't lead to a noticeable reduction in the number of loops transformed by this pass. Fixes https://bugs.llvm.org/show_bug.cgi?id=37229 Differential Revision: https://reviews.llvm.org/D46162 llvm-svn: 331410
* [ObjC] The absence of ownership qualifiers on an ambiguous property leadsAlex Lorenz2018-05-022-4/+49
| | | | | | | | | to synthesis of a valid property even when the selected protocol property has ownership qualifiers rdar://39024725 llvm-svn: 331409
* [GCOV] Emit the writeout function as nested loops of global data.Chandler Carruth2018-05-023-44/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this change, LLVM would in some cases emit *massive* writeout functions with many 10s of 1000s of function calls in straight-line code. This is a very wasteful way to represent what are fundamentally loops and creates a number of scalability issues. Among other things, register allocating these calls is extremely expensive. While D46127 makes this less severe, we'll still run into scaling issues with this eventually. If not in the compile time, just from the code size. Now the pass builds up global data structures modeling the inputs to these functions, and simply loops over the data structures calling the relevant functions with those values. This ensures that the code size is a fixed and only data size grows with larger amounts of coverage data. A trivial change to IRBuilder is included to make it easier to build the constants that make up the global data. Reviewers: wmi, echristo Subscribers: sanjoy, mcrosier, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D46357 llvm-svn: 331407
* Use conventional spelling of always-failing assert.Richard Smith2018-05-021-1/+1
| | | | | | Fixes -Wstring-conversion warning that was breaking -Werror builds. llvm-svn: 331406
* Added support for ThinLTO plugin options : thinlto-index-only and ↵Rumeet Dhindsa2018-05-0210-31/+221
| | | | | | | | thinlto-prefix-replace Differential Revision: https://reviews.llvm.org/D46034 llvm-svn: 331405
* [llvm-rc] Default to writing the output next to the input, if no output is ↵Martin Storsjo2018-05-023-2/+14
| | | | | | | | | | specified This matches what rc.exe does if no output is specified. Differential Revision: https://reviews.llvm.org/D46239 llvm-svn: 331403
* [llvm-cvtres] Allow parameters preceded by '-' in addition to '/'Martin Storsjo2018-05-022-9/+15
| | | | | | | | The real cvtres.exe also allows parameters in either form. Differential Revision: https://reviews.llvm.org/D46358 llvm-svn: 331402
* [analyzer] Revert r331096 "CStringChecker: Add support for BSD strlcpy()...".Artem Dergachev2018-05-021-39/+2
| | | | | | | | | The return values of the newly supported functions were not handled correctly: strlcpy()/strlcat() return string sizes rather than pointers. Differential Revision: https://reviews.llvm.org/D45177 llvm-svn: 331401
* [llvm-objcopy] Add --discard-all (-x) optionPaul Semel2018-05-025-6/+116
| | | | llvm-svn: 331400
* [X86] Mark all x86 specific builtins as nothrow.Craig Topper2018-05-022-1763/+1763
| | | | | | | | | | | | I believe all of the x86 builtins should be considered nothrow. I've left the incssp builtins alone because I think its current attributes are wrong and I'm following up with the contributor for that. I plan to start adding const as well, but that requires more careful auditing. Differential Revision: https://reviews.llvm.org/D46328 llvm-svn: 331399
* [GlobalISel][InstructionSelect] Making Coverage Info generation optional on ↵Roman Tereshin2018-05-021-10/+18
| | | | | | | | | | | | | | | | | | per-match table basis to make sure that Testgen always has access to coverage info even if the match table used by the selector itself is stripped off that information for performance reasons. Reviewers: dsanders, aemerson Reviewed By: dsanders Subscribers: rovka, kristof.beyls, llvm-commits, dsanders Differential Revision: https://reviews.llvm.org/D46098 llvm-svn: 331398
* [llvm-objcopy] Add --weaken optionPaul Semel2018-05-023-0/+102
| | | | llvm-svn: 331397
* [GlobalISel][InstructionSelect] Refactoring buildMatchTable out, NFCRoman Tereshin2018-05-021-24/+38
| | | | | | | | | | | | | | | to share it between the Instruction Selector in optimized and non-optimized modes both and the Testgen. Reviewers: dsanders, aemerson Reviewed By: dsanders Subscribers: rovka, kristof.beyls, llvm-commits, dsanders Differential Revision: https://reviews.llvm.org/D46097 llvm-svn: 331396
* [GlobalISel][InstructionSelect] Refactoring out a getMatchTable virtual ↵Roman Tereshin2018-05-023-29/+47
| | | | | | | | | | | | | | | | | | | | | method + other small NFC's The main goal is to share getMatchTable between the Instruction Selector and the Testgen. The commit also contains some NFC only loosely related to refactoring out the getMatchTable, but strongly related to the initial Testgen patch (see https://reviews.llvm.org/D43962) Reviewers: dsanders, aemerson Reviewed By: dsanders Subscribers: rovka, kristof.beyls, llvm-commits, dsanders Differential Revision: https://reviews.llvm.org/D46096 llvm-svn: 331395
* Use the UUID from the minidump's CodeView Record for placeholder modulesLeonard Mosescu2018-05-0210-20/+152
| | | | | | | | | | | | | | | This change adds support for two types of Minidump CodeView records: PDB70 (reference: https://crashpad.chromium.org/doxygen/structcrashpad_1_1CodeViewRecordPDB70.html) This is by far the most common record type. ELF BuildID (found in Breakpad/Crashpad generated minidumps) This would set a proper UUID for placeholder modules, in turn enabling an accurate match with local module images. Differential Revision: https://reviews.llvm.org/D46292 llvm-svn: 331394
* [OPENMP] Add support for reductions on simd directives in targetAlexey Bataev2018-05-022-19/+73
| | | | | | | | regions. Added codegen for `simd reduction()` constructs in target directives. llvm-svn: 331393
* Revert "Emit an error when mixing <stdatomic.h> and <atomic>"Volodymyr Sapsai2018-05-022-14/+0
| | | | | | | | | | | | | It reverts r331378 as it caused test failures ThreadSanitizer-x86_64 :: Darwin/gcd-groups-destructor.mm ThreadSanitizer-x86_64 :: Darwin/libcxx-shared-ptr-stress.mm ThreadSanitizer-x86_64 :: Darwin/xpc-race.mm Only clang part of the change is reverted, libc++ part remains as is because it emits error less aggressively. llvm-svn: 331392
* [llvm-rc] Add rudimentary support for codepagesMartin Storsjo2018-05-029-21/+153
| | | | | | | | | | | | | | | | | | | | | | Only support UTF-8 (since LLVM contains UTF-8 parsing support already, and the code even does that already) and Windows-1252 (where most code points has the same value in unicode). Keep the existing default as only allowing ASCII input. Using the option type JoinedOrSeparate, since the real rc.exe handles options in this form, even if llvm-rc uses Separate for other similar existing options. Rename the struct SearchParams to WriterParams since it's now used for more than just include paths. Add a missing getResourceTypeName method to the BundleResource class, to fix error printing from within STRINGTABLE resources (used in tests). Differential Revision: https://reviews.llvm.org/D46238 llvm-svn: 331391
* [Driver] Infer Android sysroot location.Dan Albert2018-05-021-0/+9
| | | | | | | | | | | | | | | | Summary: Android toolchains include their headers and libraries in a self-contained directory within the toolchain. Reviewers: srhines Reviewed By: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45291 llvm-svn: 331390
* [Driver] Obey computed sysroot when finding libc++ headers.Dan Albert2018-05-021-2/+3
| | | | | | | | | | | | | | | | Summary: A handful of targets will try some default paths if --sysroot is not provided. If that is the case, it should be used for the libc++ header paths. Reviewers: srhines, EricWF Reviewed By: srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45292 llvm-svn: 331389
* [X86][SNB] Fix scheduling of MMX integer multiply instructions.Simon Pilgrim2018-05-026-32/+32
| | | | | | The entries were being bound to the wrong class. llvm-svn: 331388
* Move the TestPlugin project into the Tests folder in CMake.Aaron Ballman2018-05-021-0/+1
| | | | llvm-svn: 331387
* [X86] Split WriteShuffle/WriteVarShuffle + WriteBlend/WriteVarBlend into XMM ↵Simon Pilgrim2018-05-0214-270/+209
| | | | | | and YMM/ZMM scheduler classes llvm-svn: 331386
* [OPENMP] Analyze the type of the mapped entity instead of its base.Alexey Bataev2018-05-022-2/+17
| | | | | | | If the mapped entity is a data member, we erroneously checked the type of its base rather than the type of the mapped entity itself. llvm-svn: 331385
* [COFF, ARM64] Hook up a few remaining relocationsMartin Storsjo2018-05-022-0/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D46355 llvm-svn: 331384
* [AMDGPU] A trivial fix for a buildbot failure caused by "commit ↵Farhana Aleen2018-05-022-1/+40
| | | | | | | 224a839fcbbead221f872cd32a1dd0c308d37299". Author: FarhanaAleen llvm-svn: 331383
* [sanitizer] Fix Fuchsia ReadBinaryName not to crash when uninitializedPetr Hosek2018-05-021-2/+4
| | | | | | | | | | | | | If the sanitizer runtime is loaded in a binary that doesn't really support it, then __sanitizer_startup_hook will never have been called to initialize StoredArgv. This case can't be supported, but its failure mode shouldn't be to crash in sanitizer_common internals. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D46344 llvm-svn: 331382
* [reassociate] Fix excessive revisits when processing long chains of ↵Daniel Sanders2018-05-023-10/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reassociatable instructions. Summary: Some of our internal testing detected a major compile time regression which I've tracked down to: r278938 - Revert "Reassociate: Reprocess RedoInsts after each inst". It appears that processing long chains of reassociatable instructions causes non-linear (potentially exponential) growth in the number of times an instruction is revisited. For example, the included test revisits instructions 220 times in a 20-instruction test. It appears that r278938 reversed the order instructions were visited and that this is preventing scheduled revisits from being cancelled as a result of visiting the instructions naturally during normal processing. However, simply reversing the order also harmed the generated code. Upon closer inspection, it was discovered that revisits occurred in the opposite order to the first pass (Thanks to escha for spotting that). This patch makes the revisit order consistent with the first pass which allows more revisits to be cancelled. This does appear to have a small impact on the generated code in few cases but it significantly reduces compile-time. After this patch, our internal test that was most affected by the regression dropped from ~2 million revisits to ~4k resulting in Reassociate having 0.46% of the runtime it had before (99.54% improvement). Here's the summaries reported by lnt for the LLVM test-suite with --benchmarking-only: | metric | geomean before patch | geomean after patch | delta | | ----- | ----- | ----- | ----- | | compile time | 0.1956 | 0.1261 | -35.54% | | execution time | 0.3240 | 0.3237 | - | | code size | 7365.4459 | 7365.6079 | - | The results have a few wins and losses on compile-time, mostly in the +/- 2.5% range. There was one outlier though: | Performance Regressions - compile_time | Δ | Previous | Current | | MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/CrystalMk | 9.82% | 2.0473 | 2.2483 | Reviewers: javed.absar, dberlin Reviewed By: dberlin Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D45734 llvm-svn: 331381
* [X86] Cleanup WriteFShuffle/WriteFVarShuffle (+256 variants) scheduler ↵Simon Pilgrim2018-05-029-533/+335
| | | | | | classes with more common default values llvm-svn: 331380
* Emit an error when mixing <stdatomic.h> and <atomic>Volodymyr Sapsai2018-05-022-0/+31
| | | | | | | | | | | | | | | | | | | | | Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error explicitly telling about the incompatibility. Introduce the macro `__ALLOW_STDC_ATOMICS_IN_CXX__` that allows to choose in C++ between C atomics and C++ atomics. rdar://problem/27435938 Reviewers: rsmith, EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: jkorous-apple, christof, bumblebritches57, JonChesterfield, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D45470 llvm-svn: 331379
* Emit an error when mixing <stdatomic.h> and <atomic>Volodymyr Sapsai2018-05-022-0/+14
| | | | | | | | | | | | | | | | | | | | | Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error explicitly telling about the incompatibility. Introduce the macro `__ALLOW_STDC_ATOMICS_IN_CXX__` that allows to choose in C++ between C atomics and C++ atomics. rdar://problem/27435938 Reviewers: rsmith, EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: jkorous-apple, christof, bumblebritches57, JonChesterfield, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D45470 llvm-svn: 331378
* [OPENMP] Do not emit warning for implicitly declared target functions.Alexey Bataev2018-05-022-16/+18
| | | | | | | Since upcoming OpenMP 5.0 functions can be mapped implicitly as declare target and we should not emit warnings for such functions. llvm-svn: 331377
* Add assertion to padding size calculation, NFCKrzysztof Parzyszek2018-05-021-0/+1
| | | | | | | | | | The size of an object cannot be less than the emitted size of all the contained elements. This would cause an overflow in padding size calculation. Add an assert to catch this. Patch by Suyog Sarda. llvm-svn: 331376
* Silence compiler warning.Adrian Prantl2018-05-021-0/+1
| | | | llvm-svn: 331375
* Fix gdb-remote qMemoryRegionInfo unit tests for xml-enabled buildsPavel Labath2018-05-021-8/+26
| | | | | | | | | | | | | | | | | In case we are building with xml enabled, the GetMemoryRegionInfo function will send extra packets to query te extended memory map, which the tests were not expecting. Add an expectation for this to the test. Right now, it's just a basic one which pretends we don't support the extension, however, it would be also interesting the add a test which verifies the extension-enabled case. I also noticed that the test does a pretty lousy job of validating the returned memory region info, so I add a couple of extra assertions to improve that. llvm-svn: 331374
* Enable AUTOBRIEF in doxygen configuration.Adrian Prantl2018-05-02133-3648/+3307
| | | | | | | | | | | | | | This brings the LLDB configuration closer to LLVM's and removes visual clutter in the source code by removing the @brief commands from comments. This patch also reflows the paragraphs in all doxygen comments. See also https://reviews.llvm.org/D46290. Differential Revision: https://reviews.llvm.org/D46321 llvm-svn: 331373
* [OPENMP] Enable c++ exceptions outside of the target constructs iff they areAlexey Bataev2018-05-025-2/+83
| | | | | | | | | | enabled for the host. If the compilation for the host enables C++ exceptions, but they are not supported by the device, we still need to allow the code with the exception handling constructs outside of the target regions. llvm-svn: 331372
* Revert "[AMDGPU] performAddCombine should run after DAG is legalized."Farhana Aleen2018-05-022-40/+1
| | | | | | This reverts commit 6b97d2995566b4dddd6bf0d75579ff44501d4494. llvm-svn: 331371
* Add -foutline option to enable the MachineOutliner in AArch64Jessica Paquette2018-05-023-0/+11
| | | | | | | | | | | | | Since we've been working on productizing the MachineOutliner in AArch64, it makes sense to provide a more user-friendly way to enable it. This allows users of AArch64 to enable the outliner using -foutline instead of -mllvm -enable-machine-outliner. Other, less mature implementations (e.g, x86-64) can still enable the pass using the -mllvm option. Also add a test to make sure it works. llvm-svn: 331370
* [X86] Convert most remaining XOP uses of X86SchedWritePair scheduler classes ↵Simon Pilgrim2018-05-021-88/+102
| | | | | | to X86SchedWriteWidths. llvm-svn: 331369
* [AMDGPU] performAddCombine should run after DAG is legalized.Farhana Aleen2018-05-022-1/+40
| | | | | | | | | | | | | | | | Summary: performAddCombine should run after DAG is legalized; Otherwise generic optimization in the DAGCombiner can optimize an addcarry+trunc into an addcarry instruction with illegal types. Author: FarhanaAleen Reviewed By: rampitec Subscribers: llvm-commits, AMDGPU Differential Revision: https://reviews.llvm.org/D46337 llvm-svn: 331368
* Fix line-endings. NFCI.Simon Pilgrim2018-05-021-3/+3
| | | | llvm-svn: 331367
* clc_sqrt: Reuse unary_decl.incJan Vesely2018-05-022-50/+3
| | | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 331366
* [OPENMP] Support C++ member functions in the device constructs.Alexey Bataev2018-05-024-14/+18
| | | | | | | Added correct emission of the C++ member functions for the device function when they are used in the device constructs. llvm-svn: 331365
* Pass compiler arguments in the create_ll.sh scriptPhilip Pfaffe2018-05-021-2/+5
| | | | | | | | | | | | | | | | | Summary: Occasionally you need an include or similar things to be configured when making a new testcase. Allow passing these to the script and down to the compiler calls. Reviewers: grosser, Meinersbur, bollu Reviewed By: Meinersbur Subscribers: bollu, llvm-commits, pollydev Differential Revision: https://reviews.llvm.org/D46359 llvm-svn: 331364
* Revert "[polly] [ScopInfo] Don't pre-compute the name of the Scop's region."Philip Pfaffe2018-05-022-3/+6
| | | | | | | | | This reverts commit 0f9dc03765dc301fff7a52e2a0e1dd3e5f3130c5, r328666. The change introduced a use-after-free, caused by the temporary name string being destroyed after converting it to a StringRef. llvm-svn: 331363
* Re-land rL331357 "[X86] Fix scheduling info for VMPSADBWYrmi."Clement Courbet2018-05-021-1/+1
| | | | | | | | Without the rebase mess. https://reviews.llvm.org/D46356 llvm-svn: 331362
* [analyzer] Fix filename in cross-file HTML reportMalcolm Parsons2018-05-022-1/+5
| | | | | | | | | | | | | | | | | Summary: The filename is currently taken from the start of the path, while the line and column are taken from the end of the path. This didn't matter until cross-file path reporting was added. Reviewers: george.karpenkov, dcoughlin, vlad.tsyrklevich Reviewed By: george.karpenkov, vlad.tsyrklevich Subscribers: xazax.hun, szepet, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D45611 llvm-svn: 331361
* [X86] Cleanup WriteFMul scheduler classes with more common default valuesSimon Pilgrim2018-05-023-70/+14
| | | | | | Intel models were targeting x87 instead of packed sse. llvm-svn: 331360
OpenPOWER on IntegriCloud