summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs"Reid Kleckner2017-09-195-362/+38
| | | | | | | | | This reverts r313640, originally r313400, one more time for essentially the same issue. My BitVector of spilled location numbers isn't working because we coalesce identical DBG_VALUE locations as we rewrite them, invalidating the location numbers used to index the BitVector. llvm-svn: 313679
* Import all inlined indirect call targets for SamplePGO.Dehao Chen2017-09-193-9/+21
| | | | | | | | | | | | | | Summary: In the ThinLTO compilation, if a function is inlined in the profiling binary, we need to inline it before annotation. If the callee is not available in the primary module, a first step is needed to import that callee function. For the current implementation, if the call is an indirect call, which has been promoted to >1 targets and inlined, SamplePGO will only import one target with the largest sample count. This patch fixed the bug to import all targets instead. Reviewers: tejohnson, davidxl Reviewed By: tejohnson Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D36637 llvm-svn: 313678
* [Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compareRoman Lebedev2017-09-195-24/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As requested by Sam McCall: > Enums (not new I guess). Typical case: if (enum < 0 || enum > MAX) > The warning strongly suggests that the enum < 0 check has no effect > (for enums with nonnegative ranges). > Clang doesn't seem to optimize such checks out though, and they seem > likely to catch bugs in some cases. Yes, only if there's UB elsewhere, > but I assume not optimizing out these checks indicates a deliberate > decision to stay somewhat compatible with a technically-incorrect > mental model. > If this is the case, should we move these to a > -Wtautological-compare-enum subcategory? Reviewers: rjmccall, rsmith, aaron.ballman, sammccall, bkramer, djasper Reviewed By: aaron.ballman Subscribers: jroelofs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D37629 llvm-svn: 313677
* [MSP430] Align functions on 2-byte boundary instead of 4.Vadzim Dambrouski2017-09-191-1/+1
| | | | | | | | | | | | | | | | Summary: There is no benefit in having the 4-byte alignment, and removing this restriction can save a lot of space for some applications. Reviewers: asl, awygle Reviewed By: awygle Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36165 llvm-svn: 313676
* [OpenMP] fix seg-faults printing diagnostics with invalid ordered(n) valuesRachel Craik2017-09-193-6/+20
| | | | | | | | | | | When the value specified for n in ordered(n) is larger than the number of loops a segmentation fault can occur in one of two ways when attempting to print out a diagnostic for an associated depend(sink : vec): 1) The iteration vector vec contains less than n items 2) The iteration vector vec contains a variable that is not a loop control variable This patch addresses both of these issues. Differential Revision: https://reviews.llvm.org/D38049 llvm-svn: 313675
* [TableGen] Generate formatted DAGISelEmitter without relying on ↵Craig Topper2017-09-191-91/+93
| | | | | | | | | | | | | | formatted_raw_ostream. The generated DAG isel file currently makes use of formatted_raw_ostream primarily for generating a hierarchical representation while also skipping over the initial comment that contains the current index. It was reported in D37957 that this formatting might be slow due to the need to keep track of column numbers by monitoring all the written data for new lines. This patch attempts to rewrite the emitter to make use of simpler formatting mechanisms to generate a fairly similar output. The main difference is that the number in the index comment is now right justified and padded with spaces inside the comment. Previously we appended the spaces after the comment. Differential Revision: https://reviews.llvm.org/D37966 llvm-svn: 313674
* llvm-dwarfdump: un-hide more command line optionsAdrian Prantl2017-09-192-4/+14
| | | | llvm-svn: 313673
* Move test into non-target-specific directory.Adrian Prantl2017-09-191-0/+0
| | | | llvm-svn: 313672
* [SimplifyCFG] fix typos/formatting; NFCSanjay Patel2017-09-191-24/+22
| | | | llvm-svn: 313671
* [AMDGPU] Prevent post-RA scheduler from breaking memory clausesStanislav Mekhanoshin2017-09-1925-87/+177
| | | | | | | | | The pre-RA scheduler does load/store clustering, but post-RA scheduler undoes it. Add mutation to prevent it. Differential Revision: https://reviews.llvm.org/D38014 llvm-svn: 313670
* [SystemZ] Fix truncstore + bswap codegen bugUlrich Weigand2017-09-192-1/+19
| | | | | | | | | | | | | SystemZTargetLowering::combineSTORE contains code to transform a combination of STORE + BSWAP into a STRV type instruction. This transformation is correct for regular stores, but not for truncating stores. The routine neglected to check for that case. Fixes a miscompilation of llvm-objcopy with clang, which caused test suite failures in the SystemZ multistage build bot. llvm-svn: 313669
* Revert "ExecutionEngine: add R_AARCH64_ABS{16,32}"Saleem Abdulrasool2017-09-192-25/+0
| | | | | | | | This reverts commit SVN r313654. Seems that it is triggering an assertion on Windows specifically. Revert until I can build on Windows and look into what is happening there. llvm-svn: 313668
* Simplify. NFC.Rui Ueyama2017-09-191-8/+6
| | | | llvm-svn: 313667
* Teach clang to tolerate the 'p = nullptr + n' idiom used by glibcAndrew Kaylor2017-09-199-2/+205
| | | | | | Differential Revision: https://reviews.llvm.org/D37042 llvm-svn: 313666
* Revert "[llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstr"Jake Ehrlich2017-09-197-237/+31
| | | | | | | This reverts commit r313663. Broken because overlapping-sections was reverted. llvm-svn: 313665
* Revert "[llvm-objcopy] Add support for nested and overlapping segments"Jake Ehrlich2017-09-197-522/+6
| | | | | | This reverts commit r313656. Appears to be broken on Windows. llvm-svn: 313664
* [llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstrJake Ehrlich2017-09-197-31/+237
| | | | | | | | | | | | | | | This change adds support for sections involved in dynamic loading such as SHT_DYNAMIC, SHT_DYNSYM, and allocated string tables. The two added binaries used for tests can be downloaded [[ https://drive.google.com/file/d/0B3gtIAmiMwZXOXE3T0RobFg4ZTg/view?usp=sharing | here ]] and [[ https://drive.google.com/file/d/0B3gtIAmiMwZXTFJSQUJZMGxNSXc/view?usp=sharing | here ]] Differential Revision: https://reviews.llvm.org/D36560 llvm-svn: 313663
* Fix test to not depend on another subdirectories Input directoryDavid Blaikie2017-09-192-2/+51
| | | | | | | | Inputs should be placed local to the test (or possibly in a common parent? I think we do that in some places - but the only common parent between these two directories is 'test' which seems a bit overly broad). llvm-svn: 313662
* [llvm-objcopy] Add test to check that architecture specific values are not ↵Jake Ehrlich2017-09-192-1/+16
| | | | | | | | | | | used on wrong architecture. This change adds a test that checks the an error is produced when a hexagon specific reserved section index is used but e_machine is not EM_HEXAGON. Differential Revision: https://reviews.llvm.org/D38017 llvm-svn: 313661
* Recommit r313647 now that GCC seems to accept the offeringKrzysztof Parzyszek2017-09-193-45/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some member types to MachineValueTypeSet::const_iterator so that iterator_traits can work with it. Improve TableGen performance of -gen-dag-isel (motivated by X86 backend) The introduction of parameterized register classes in r313271 caused the matcher generation code in TableGen to run much slower, particularly so in the unoptimized (debug) build. This patch recovers some of the lost performance. Summary of changes: - Cache the set of legal types in TypeInfer::getLegalTypes. The contents of this set do not change. - Add LLVM_ATTRIBUTE_ALWAYS_INLINE to several small functions. Normally this would not be necessary, but in the debug build TableGen is not optimized, so this helps a little bit. - Add an early exit from TypeSetByHwMode::operator== for the case when one or both arguments are "simple", i.e. only have one mode. This saves some time in GenerateVariants. - Finally, replace the underlying storage type in TypeSetByHwMode::SetType with MachineValueTypeSet based on std::array instead of std::set. This significantly reduces the number of memory allocation calls. I've done a number of experiments with the underlying type of InfoByHwMode. The type is a map, and for targets that do not use the parameterization, this map has only one entry. The best (unoptimized) performance, somewhat surprisingly came from std::map, followed closely by std::unordered_map. DenseMap was the slowest by a large margin. Various hand-crafted solutions (emulating enough of the map interface not to make sweeping changes to the users) did not yield any observable improvements. llvm-svn: 313660
* dwarfdump/symbolizer: Avoid loading unneeded CUs from a DWPDavid Blaikie2017-09-194-20/+71
| | | | | | | | When symbolizing large binaries, parsing every CU in a DWP file is a significant performance penalty. Instead, use the index to only load the CUs that are needed. llvm-svn: 313659
* Handle profile mismatch correctly for SamplePGO.Dehao Chen2017-09-193-1/+29
| | | | | | | | | | | | | | Summary: Fix the bug when promoted call return type mismatches with the promoted function, we should not try to inline it. Otherwise it may lead to compiler crash. Reviewers: davidxl, tejohnson, eraman Reviewed By: tejohnson Subscribers: llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D38018 llvm-svn: 313658
* Re-land "Fix Bug 30978 by emitting cv file checksums."Reid Kleckner2017-09-1916-81/+305
| | | | | | | This reverts r313431 and brings back r313374 with a fix to write checksums as binary data and not ASCII hex strings. llvm-svn: 313657
* [llvm-objcopy] Add support for nested and overlapping segmentsJake Ehrlich2017-09-197-6/+522
| | | | | | | | | This change adds support for nested and even overlapping segments. This means that PT_PHDR, PT_GNU_RELRO, PT_TLS, and PT_DYNAMIC can be supported properly. Differential Revision: https://reviews.llvm.org/D36558 llvm-svn: 313656
* Re-land r313210 - Fix for bug 34532 - A few rough corners related to ↵Adrian McCarthy2017-09-196-5/+100
| | | | | | | | | | | | | | | | | | | | | | | | post-mortem debugging (core/minidump) The main change is to avoid setting the process state as running when debugging core/minidumps (details in the bug). Also included a few small, related fixes around how the errors propagate in this case. Fixed the FreeBSD/Windows break: the intention was to keep Process::WillResume() and Process::DoResume() "in-sync", but this had the unfortunate consequence of breaking Process sub-classes which don't override WillResume(). The safer approach is to keep Process::WillResume() untouched and only override it in the minidump and core implementations. patch by lemo Bug: https://bugs.llvm.org/show_bug.cgi?id=34532 Differential Revision: https://reviews.llvm.org/D37651 llvm-svn: 313655
* ExecutionEngine: add R_AARCH64_ABS{16,32}Saleem Abdulrasool2017-09-192-0/+25
| | | | | | | | | | Add support for the R_AARCH64_ABS{16,32} relocations in the execution engine. This is primarily used for DWARF debug information relocations and needed by the LLVM JIT to support JITing for lldb. Patch by Alex Langford! llvm-svn: 313654
* Fix ClangDiagnosticHandler::is*RemarkEnabled membersAdam Nemet2017-09-192-4/+16
| | | | | | | Apparently these weren't really working. I added test coverage and fixed the typo in the name and the parameter. llvm-svn: 313653
* Set ANDROID when any android abi is used, not just androideabiFrancis Ricci2017-09-191-1/+1
| | | | | | | | | | | Reviewers: compnerd, beanz Subscribers: srhines, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D38044 Change-Id: Idab521f187aba18977818d91503763e0e9d3aa0e llvm-svn: 313652
* Revert "Improve TableGen performance of -gen-dag-isel (motivated by X86 ↵Krzysztof Parzyszek2017-09-193-222/+45
| | | | | | | | backend)" It breaks a lot of bots due to missing "__iterator_category". llvm-svn: 313651
* Ensure that armhf builtins library is created when using an hf abiFrancis Ricci2017-09-191-0/+5
| | | | | | | | | | | | Reviewers: beanz, compnerd Reviewed By: compnerd Subscribers: aemerson, mgorny, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D38045 llvm-svn: 313650
* Move "(void)variable" closer to the assertion that uses it, NFCKrzysztof Parzyszek2017-09-191-1/+1
| | | | llvm-svn: 313649
* [cmake] Add SOURCE_DIR argument to llvm_check_source_file_listShoaib Meenai2017-09-191-4/+16
| | | | | | | | | The motivation is to be able to check sources outside the current directory. See D31363 for example usage. Differential Revision: https://reviews.llvm.org/D37859 llvm-svn: 313648
* Improve TableGen performance of -gen-dag-isel (motivated by X86 backend)Krzysztof Parzyszek2017-09-193-45/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of parameterized register classes in r313271 caused the matcher generation code in TableGen to run much slower, particularly so in the unoptimized (debug) build. This patch recovers some of the lost performance. Summary of changes: - Cache the set of legal types in TypeInfer::getLegalTypes. The contents of this set do not change. - Add LLVM_ATTRIBUTE_ALWAYS_INLINE to several small functions. Normally this would not be necessary, but in the debug build TableGen is not optimized, so this helps a little bit. - Add an early exit from TypeSetByHwMode::operator== for the case when one or both arguments are "simple", i.e. only have one mode. This saves some time in GenerateVariants. - Finally, replace the underlying storage type in TypeSetByHwMode::SetType with MachineValueTypeSet based on std::array instead of std::set. This significantly reduces the number of memory allocation calls. I've done a number of experiments with the underlying type of InfoByHwMode. The type is a map, and for targets that do not use the parameterization, this map has only one entry. The best (unoptimized) performance, somewhat surprisingly came from std::map, followed closely by std::unordered_map. DenseMap was the slowest by a large margin. Various hand-crafted solutions (emulating enough of the map interface not to make sweeping changes to the users) did not yield any observable improvements. llvm-svn: 313647
* Tweak orphan section placement.Rafael Espindola2017-09-192-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | Given a linker script that ends in .some_sec { ...} ; __stack_start = .; . = . + 0x2000; __stack_end = .; lld would put orphan sections like .comment before __stack_end, corrupting the intended meaning. The reason we don't normally move orphans past assignments to . is to avoid breaking rx_sec : { *(rx_sec) } . = ALIGN(0x1000); /* The RW PT_LOAD starts here*/ but in this case, there is nothing after and it seems safer to put the orphan section last. This seems to match bfd's behavior and is convenient for writing linker scripts that care about the layout of SHF_ALLOC sections, but not of any non SHF_ALLOC sections. llvm-svn: 313646
* [mips][compiler-rt] UnXFAIL test.Simon Dardis2017-09-191-2/+0
| | | | | | lsan and asan were reporting leaks caused by a glibc configuration issue. llvm-svn: 313645
* [X86] Convert X86ISD::SELECT to ISD::VSELECT just before instruction ↵Craig Topper2017-09-193-22/+3
| | | | | | | | | | selection to avoid duplicate patterns Similar to what we do for X86ISD::SHRUNKBLEND just turn X86ISD::SELECT into ISD::VSELECT. This allows us to remove the duplicated TRUNC patterns. Differential Revision: https://reviews.llvm.org/D38022 llvm-svn: 313644
* Resubmit "Fix llvm-lit script generation in libcxx."Zachary Turner2017-09-194-6/+20
| | | | | | | | After speaking with the libcxx owners, they agreed that this is a bug in the bot that needs to be fixed by the bot owners, and the CMake changes are correct. llvm-svn: 313643
* Fix build of TaskPoolTest with xcodebuildFrancis Ricci2017-09-191-1/+1
| | | | llvm-svn: 313642
* [sanitizer] Don't define common ReportDeadlySignal on FuchsiaPetr Hosek2017-09-191-2/+2
| | | | | | | | | | This causes a linker error because of duplicate symbol since ReportDeadlySignal is defined both in sanitizer_common_libcdep and sanitizer_fuchsia. Differential Revision: https://reviews.llvm.org/D37952 llvm-svn: 313641
* Re-land r313400 "[DebugInfo] Insert DW_OP_deref when spilling indirect ↵Reid Kleckner2017-09-195-38/+362
| | | | | | | | | | | | | | DBG_VALUEs" I forgot to zero out the BitVector when reusing it between UserValues. Later uses of the same location number for a different UserValue would falsely indicate that they were spilled. Usually this would lead to incorrect debug info, but in some cases they would indicate something nonsensical like a memory location based on a vector register (Q8 on ARM). llvm-svn: 313640
* [PowerPC Peephole] Constants into a join add, use ADDI over LI/ADD.Tony Jiang2017-09-192-0/+176
| | | | | | | | | | Two blocks prior to the join each perform an li and the the join block has an add using the initialized register. Optimize each predecessor block to instead use addi and delete the li's and add. Differential Revision: https://reviews.llvm.org/D36734 llvm-svn: 313639
* [AArch64] Extend tests of loads and stores of register pairsEvandro Menezes2017-09-192-2/+45
| | | | | | Include instances of FP register pairs. llvm-svn: 313638
* Use ThreadLauncher to launch TaskPool threadsFrancis Ricci2017-09-199-10/+21
| | | | | | | | | | | | | | | | | | Summary: This allows for the stack size to be configured, which isn't possible with std::thread. Prevents overflowing the stack when performing complex operations in the task pool on darwin, where the default pthread stack size is only 512kb. This also moves TaskPool from Utility to Host. Reviewers: labath, tberghammer, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D37930 llvm-svn: 313637
* [Power9] Add missing Power9 instructions.Tony Jiang2017-09-197-442/+120
| | | | | | | The following 8 instructions are implemented in this patch. addpcis(subpcis, lnia), darn, maddhd, maddhdu, maddld, setb llvm-svn: 313636
* dwarfdump: Delay parsing abbreviations until they're neededDavid Blaikie2017-09-194-16/+40
| | | | | | | | | | | This speeds up dumping specific DIEs by not parsing abbreviations for units that are not used. (this is also handy to have in eventually to speed up llvm-symbolizer for .dwp files, where parsing most of the DWP file can be avoided by using the index) llvm-svn: 313635
* Revert r313600 due to bot failures on Green Dragon.Mike Edwards2017-09-191-0/+2
| | | | | | http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_check/35585/ llvm-svn: 313634
* [globalisel] Add a G_BSWAP instruction and support bswap using it.Daniel Sanders2017-09-195-1/+74
| | | | llvm-svn: 313633
* [X86][SSE] Add 'redundant pand' test case from PR34620Simon Pilgrim2017-09-191-0/+19
| | | | llvm-svn: 313632
* [x86] regenerate checks; NFCSanjay Patel2017-09-191-13/+76
| | | | llvm-svn: 313631
* [SLP] Reduce test, NFC.Alexey Bataev2017-09-191-134/+56
| | | | llvm-svn: 313630
OpenPOWER on IntegriCloud