summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [libcxx{,abi}] Don't link libpthread and libdl on FuchsiaPetr Hosek2019-12-062-5/+18
| | | | | | | | | These are a part of the libc so linking these explicitly isn't necessary and embedding these as deplibs causes link time error. This issues was introduced in a9b5fff which changed how we emit deplibs. Differential Revision: https://reviews.llvm.org/D71135
* Revert "ARM-Darwin: keep the frame register reserved even if not updated."Alina Sbirlea2019-12-064-18/+3
| | | | | | | | This reverts commit a7d90af1be48234ce583e00fb16e33633d44ae38. This revision came back as the root-cause for crashes in internal ARM-IOS apps. Reproducer in https://bugs.llvm.org/show_bug.cgi?id=44231.
* [x86] add cost model special-case for insert/extract from element 0Sanjay Patel2019-12-065-65/+71
| | | | | | | | | | | | | | | | | This is a follow-up to D70607 where we made any extract element on SLM more costly than default. But that is pessimistic for extract from element 0 because that corresponds to x86 movd/movq instructions. These generally have >1 cycle latency, but they are probably implemented as single uop instructions. Note that no vectorization tests are affected by this change. Also, no targets besides SLM are affected because those are falling through to the default cost of 1 anyway. But this will become visible/important if we add more specializations via cost tables. Differential Revision: https://reviews.llvm.org/D71023
* [PGO][PGSO] Instrument the code gen / target passes.Hiroshi Yamauchi2019-12-0621-61/+283
| | | | | | | | | | | | | | | | | | Summary: Split off of D67120. Add the profile guided size optimization instrumentation / queries in the code gen or target passes. This doesn't enable the size optimizations in those passes yet as they are currently disabled in shouldOptimizeForSize (for non-IR pass queries). Reviewers: davidxl Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71072
* clang/AMDGPU: Fix default for frame-pointer attributeMatt Arsenault2019-12-072-0/+10
| | | | Enabling optimization should allow frame pointer elimination.
* [OPENMP]Reorganize OpenMP warning groups.Alexey Bataev2019-12-066-40/+50
| | | | | openmp-mapping group is a subgroup of openmp-target warning group. Also, added global openmp group to control all other OpenMP warning groups.
* [InstCombine] reduce indentation; NFCSanjay Patel2019-12-061-28/+25
|
* [InstCombine] improve readability; NFCSanjay Patel2019-12-061-10/+6
| | | | CreateIntCast returns the input if its type matches, so need to duplicate that check.
* [InstCombine] reduce code duplication; NFCSanjay Patel2019-12-061-38/+40
|
* [InstCombine] improve readability; NFCSanjay Patel2019-12-061-33/+33
|
* Add `QualType::hasAddressSpace`. NFC.Michael Liao2019-12-067-12/+19
| | | | | - Add that as a shorthand of <T>.getQualifiers().hasAddressSpace(). - Simplify related code.
* [MBP] Avoid tail duplication if it can't bring benefitGuozhi Wei2019-12-0625-634/+923
| | | | | | | | | | | | | Current tail duplication integrated in bb layout is designed to increase the fallthrough from a BB's predecessor to its successor, but we have observed cases that duplication doesn't increase fallthrough, or it brings too much size overhead. To overcome these two issues in function canTailDuplicateUnplacedPreds I add two checks: make sure there is at least one duplication in current work set. the number of duplication should not exceed the number of successors. The modification in hasBetterLayoutPredecessor fixes a bug that potential predecessor must be at the bottom of a chain. Differential Revision: https://reviews.llvm.org/D64376
* [ASTImporter] Implicitly declare parameters for imported ObjCMethodDeclsRaphael Isemann2019-12-063-1/+35
| | | | | | | | | | | | | | | | | | | | Summary: When Sema encounters a ObjCMethodDecl definition it declares the implicit parameters for the ObjCMethodDecl. When importing such a method with the ASTImporter we need to do the same for the imported method otherwise we will crash when generating code (where CodeGen expects that this was called by Sema). Note I had to implement Objective-C[++] support in Language.cpp as this is the first test for Objective-C and this would otherwise just hit this 'not implemented' assert when running the unit test. Reviewers: martong, a.sidorin, shafik Reviewed By: martong Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71112
* [NFC][AIX][XCOFF] if the size of Csect is zero, the Csect do not need write ↵diggerlin2019-12-061-1/+2
| | | | | | | | | | | | | | | any data into sections SUMMARY: if the size of Csect is zero, the Csect do not need write any data into sections for example, the TOC Csect has zero size, it do not need invoke a Asm.writeSectionData(W.OS, Csect.MCCsect, Layout); Reviewers: daltenty Subscribers: rupprecht, seiyai,hiraditya Differential Revision: https://reviews.llvm.org/D71120
* update string comparison in clang-format.pymydeveloperday2019-12-061-1/+1
| | | | | | | | | | | | | | Summary: Python 3.8 introduces a SyntaxWarning about string comparisons with 'is'. This commit updates the string comparison in clang-format.py that is done with 'is not' to '!='. This should not break compatibility with older python versions (tested 3.4.9, 2.7.17, 2.7.5, 3.8.0). Reviewers: MyDeveloperDay, klimek, llvm-commits, cfe-commits Reviewed By: MyDeveloperDay, klimek Patch By: pseyfert Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D70664
* [clang-format] update trailing newline treatment in clang-format.pymydeveloperday2019-12-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The current clang-format.py does not handle trailing newlines at the end of a file correctly. Trailing empty lines get removed except one. As far as I understand this is because clang-format gets fed from stdin and writes to stdout when called from clang-format.py. In a "normal" file (with no trailing empty lines) the string that gets passed to clang-format does not contain a trailing '\n' after the '\n'.join from python. The clang-format binary does not add a trailing newline to input from stdin, but (if there are multiple trailing '\n', all except one get removed). When reading back this means that we see in python from a "normal" file a string with no trailing '\n'. From a file with (potentially multiple) empty line(s) at the end, we get a string with one trailing '\n' back in python. In the former case all is fine, in the latter case split('\n') makes one empty line at the end of the file out of the clang-format output. Desired would be instead that the **file** ends with a newline, but not with an empty line. For the case that a user specifies a range to format (and wants to keep trailing empty lines) I did **not** try to fix this by simply removing all trailing newlines from the clang-format output. Instead, I add a '\n' to the unformatted file content (i.e. newline-terminate what is passed to clang-format) and then strip off the last newline from the output (which itself is now for sure the newline termination of the clang-format output). (Should this get approved, I'll need someone to help me land this.) Reviewers: klimek, MyDeveloperDay Reviewed By: MyDeveloperDay Patch By: pseyfert Subscribers: cfe-commits, llvm-commits Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D70864 update trailing newline treatment in clang-format.py
* [NFC][AIX][XCOFF] fixed compile warning on the strncpy.diggerlin2019-12-061-1/+1
| | | | | | | | | | | | SUMMARY: There is warning when compile the file XCOFFObjectWriter.cpp /srv/llvm-buildbot-srcatch/llvm-build-dir/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/lib/MC/XCOFFObjectWriter.cpp:414:17: warning: 'char* strncpy(char*, const char*, size_t)' specified bound 8 equals destination size [-Wstringop-truncation] The patch fixed the warning. Reviewer: daltenty Differential Revision: https://reviews.llvm.org/D71119
* Cleanup and speedup NativeRegisterContextLinux_arm64Muhammad Omair Javaid2019-12-064-160/+130
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch simplifies register accesses in NativeRegisterContextLinux_arm64 and also adds some bare minimum caching to avoid multiple calls to ptrace during a stop. Linux ptrace returns data in the form of structures containing GPR/FPR data. This means that one single call is enough to read all GPRs or FPRs. We do that once per stop and keep reading from or writing to the buffer that we have in NativeRegisterContextLinux_arm64 class. Before a resume or detach we write all buffers back. This is tested on aarch64 thunder x1 with Ubuntu 18.04. Also tested regressions on x86_64. Reviewers: labath, clayborg Reviewed By: labath Subscribers: kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D69371
* [lldb][test] Handle .categories lookup for inline tests.Jordan Rupprecht2019-12-061-2/+9
| | | | | | | | | | | | | | | Summary: When creating a test with `lldbinline.MakeInlineTest()`, the reported `inspect.getfile(test.__class__)` is `lldbtest.pyc`, meaning any `.categories` file will be ineffective for those tests. Check for the test_filename first, which inline tests will set. Additionally, raise an error with the starting dir if `.categories` is not found. This makes the problem more obvious when it occurs: when the test is separated from the test framework tree. Reviewers: labath, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71099
* [LegalizeTypes] Add missing case for STRICT_FP_ROUND softeningJohn Brawn2019-12-061-0/+1
| | | | This fixes a test failure in test/CodeGen/ARM/fp-intrinsics.ll.
* [OpenMP] Fix linkage issue on FreeBSDDavid Carlier2019-12-061-1/+1
| | | | needs kmp_set_thread_affinity_mask_initial implementation.
* [libomptarget][nfc] Move cuda threadfence functions behind kmpc_implJonChesterfield2019-12-067-13/+21
| | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move cuda threadfence functions behind kmpc_impl Part of building code under common/ without requiring a cuda compiler Reviewers: ABataev, jdoerfert, grokos Reviewed By: ABataev Subscribers: jvesely, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71102
* [libomptarget][nfc] Move three more files to commonJon Chesterfield2019-12-064-6/+6
| | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move three more files to common Reviewers: ABataev, jdoerfert, grokos Reviewed By: ABataev Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71103
* [ARM][MVE] Fix copy-paste error in VQSHL instruction ids.Simon Tatham2019-12-062-12/+12
| | | | | | | | | | | | | | | | | | | | Summary: The immediate forms of the MVE VQSHL instruction have MC names like `MVE_VSLIimms8` and `MVE_VSLIimmu32`. Those names are confusing, because VSLI is a completely different shift instruction with no semantic relation to VQSHL. But it just happens to be defined immediately before VQSHL in `ARMInstrMVE.td`, so this looks like a copy-paste error. Renamed the ids to match the instruction name. Reviewers: ostannard, dmgreen, MarkMurrayARM, miyuki Reviewed By: miyuki Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71114
* [AIX][XCOFF] created a test case to verify the raw text section of ↵diggerlin2019-12-061-0/+22
| | | | | | | | | | | | | xcoffobject file SUMMARY: in the patch https://reviews.llvm.org/D66969 . we need a test case to verify the out text section of the xcoffobject file is correct or not. but we do not have llvm disassembly tools to dump the xcoffobjectfile . since we commit the patch https://reviews.llvm.org/D70255, we have tools for it. we create this test case for it. Reviewers: daltenty,hubert.reinterpretcast, Differential Revision: https://reviews.llvm.org/D70719
* [OPENMP]Moved warning fo mapping non-trivially copiable types into aAlexey Bataev2019-12-0677-549/+549
| | | | | | | separate group. Need to move this warning into a separate group to make easier to disable this warning, if required.
* [AArch64] Fix a bug with jump table generationCullen Rhodes2019-12-063-4/+110
| | | | | | | | | | | | | | | | | | | | Summary: When trying to calculate the offsets for the jump table entries we fail to take into account the block alignment, which could be greater than 4 bytes. This led to cases where the jump table offset was too big to fit in a byte. Reviewers: t.p.northover, sdesmalen, ostannard Reviewed By: ostannard Subscribers: ostannard, kristof.beyls, hiraditya, llvm-commits Committed on behalf of David Sherwood (david-arm) Tags: #llvm Differential Revision: https://reviews.llvm.org/D70533
* gn build: Unbreak mac build after 4066591Nico Weber2019-12-061-1/+5
|
* Fix building shared libraries broken by 8e48e8e3e32.Alexey Lapshin2019-12-062-1/+2
|
* Attempt to fix a debuginfo test that wasn't as generic as I thoughtJeremy Morse2019-12-061-1/+1
| | | | | | | | | An ARM buildbot croaks when this test doesn't have a triple specified: http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/12021/ Move the test to the X86 directory and put an x86_64 triple on the llc command line.
* Fix for PR44000. Optimization record for bytecode input missing.Zahira Ammarguellat2019-12-062-25/+65
| | | | Review is here: https://reviews.llvm.org/D70691
* [clangd] Switch Hover.All to structured testsKadir Cetinkaya2019-12-062-430/+488
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70911
* [clangd] Store index::SymbolKind in HoverInfoKadir Cetinkaya2019-12-063-38/+37
| | | | | | | | | | | | | | | | | | Summary: LSP's SymbolKind has some shortcomings when it comes to C++ types, index::SymbolKind has more detailed info like Destructor, Parameter, MACRO etc. We are planning to make use of that information in our new Hover response, and it would be nice to display the Symbol type in full detail, rather than some approximation. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70723
* [llvm-readobj][llvm-readelf] - Refactor parsing of the SHT_GNU_versym section.Georgii Rymar2019-12-067-36/+353
| | | | | | | This introduce a new helper which is used to parse the SHT_GNU_versym section. LLVM/GNU styles implementations now use it to share the logic. Differential revision: https://reviews.llvm.org/D71054
* [LV] Record GEP widening decisions in recipe (NFCI)Gil Rapaport2019-12-066-81/+152
| | | | | | | | | | | | | InnerLoopVectorizer's code called during VPlan execution still relies on original IR's def-use relations to decide which vector code to generate, limiting VPlan transformations ability to modify def-use relations and still have ILV generate the vector code. This commit moves GEP operand queries controlling how GEPs are widened to a dedicated recipe and extracts GEP widening code to its own ILV method taking those recorded decisions as arguments. This reduces ingredient def-use usage by ILV as a step towards full VPlan-based def-use relations. Differential revision: https://reviews.llvm.org/D69067
* [AArch64][SVE2] Implement while comparison intrinsicsCullen Rhodes2019-12-062-10/+318
| | | | | | | | | | | | | | | | | Summary: Adds the following intrinsics: * whilege, whilegt, whilehi, whilehs Reviewers: sdesmalen, rovka, dancgr, efriedma, rengolin, huntergr Reviewed By: sdesmalen Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70909
* [llvm-readobj] - Implement --dependent-libraries flag.Georgii Rymar2019-12-065-0/+135
| | | | | | | | | | There is no way to dump SHT_LLVM_DEPENDENT_LIBRARIES sections currently. This patch implements this. The section is described here: https://llvm.org/docs/Extensions.html#sht-llvm-dependent-libraries-section-dependent-libraries Differential revision: https://reviews.llvm.org/D70665
* [clangd] Try to fix CompileCommandsTests on windows. NFCSam McCall2019-12-062-14/+21
|
* [DebugInfo][CGP] Update dbg.values when sinking address computationsJeremy Morse2019-12-062-0/+95
| | | | | | | | | | | | | | | | | One of CodeGenPrepare's optimizations is to duplicate address calculations into basic blocks, so that as much information as possible can be folded into memory addressing operands. This is great -- but the dbg.value variable location intrinsics are not updated in the same way. This can lead to dbg.values referring to address computations in other blocks that will never be encoded into the DAG, while duplicate address computations are performed locally that could be used by the dbg.value. Some of these (such as non-constant-offset GEPs) can't be salvaged past. Fix this by, whenever we duplicate an address computation into a block, looking for dbg.value users of the original memory address in the same block, and redirecting those to the local computation. Differential Revision: https://reviews.llvm.org/D58403
* [X86] Regenerate test to fix build bot failuresUlrich Weigand2019-12-061-13/+13
| | | | | | | | | | After my recent commit daee549 the following test case is failing: CodeGen/X86/vector-constrained-fp-intrinsics.ll Not sure why I didn't catch this earlier, seems to be affected by other changes that came in recently. Fixed by regerenating the test again. Sorry for the disruption!
* [AArch64][SVE] Implement integer compare intrinsicsCullen Rhodes2019-12-067-35/+1792
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds intrinsics for the following: * cmphs, cmphi * cmpge, cmpgt * cmpeq, cmpne * cmplt, cmple * cmplo, cmpls Includes a minor change to `TLI.getMemValueType` that fixes a crash due to the scalable flag being dropped. Reviewers: sdesmalen, efriedma, rengolin, rovka, dancgr, huntergr Reviewed By: efriedma Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70889
* [clangd] Fix gcc warning about extra ";" [NFC]Mikael Holmen2019-12-061-1/+1
| | | | | | | | gcc complained with /data/repo/master/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:326:30: warning: extra ';' [-Wpedantic] REGISTER_TWEAK(DefineOutline); ^
* [lldb][NFC] Move [SU]Int64ValueIsValidForByteSize to RegisterValueRaphael Isemann2019-12-062-32/+31
| | | | | | These functions are an implementation detail of RegisterValue, so it doesn't make a lot of sense to implement them in a totally unrelated class.
* [FPEnv][SelectionDAG] Relax chain requirementsUlrich Weigand2019-12-0610-593/+769
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the following changes: 1) SelectionDAGBuilder::visitConstrainedFPIntrinsic currently treats each constrained intrinsic like a global barrier (e.g. a function call) and fully serializes all pending chains. This is actually not required; it is allowed for constrained intrinsics to be reordered w.r.t one another or (nonvolatile) memory accesses. The MI-level scheduler already allows for that flexibility, so it makes sense to allow it at the DAG level as well. This patch therefore changes the way chains for constrained intrisincs are created, and handles them basically like load operations are handled. This has the effect that constrained intrinsics are no longer serialized against one another or (nonvolatile) loads. They are still serialized against stores, but that seems hard to change with the current DAG chain setup, and it also doesn't seem to be a big problem preventing DAG 2) The OPC_CheckFoldableChainNode check requires that each of the intermediate nodes in a multi-node pattern match only has a single use. This check tends to fail if those intermediate nodes are strict operations as those have a chain output that typically indeed has another use. However, we don't really need to consider chains here at all, since they will all be rewritten anyway by UpdateChains later. Other parts of the matcher therefore already ignore chains, but this hasOneUse check doesn't. This patch replaces hasOneUse by a custom test that verifies there is no more than one use of any non-chain output value. In theory, this change could affect code unrelated to strict FP nodes, but at least on SystemZ I could not find any single instance of that happening 3) The SystemZ back-end currently does not allow matching multiply-and- extend operations (32x32 -> 64bit or 64x64 -> 128bit FP multiply) for strict FP operations. This was not possible in the past due to the problems described under 1) and 2) above. With those issues fixed, it is now possible to fully support those instructions in strict mode as well, and this patch does so. Differential Revision: https://reviews.llvm.org/D70913
* [lldb/DWARF] Fix DW_AT_addr_base & DW_AT_low_pc interactionPavel Labath2019-12-062-4/+119
| | | | | | | | | | | | | | | | In DWARF5 DW_AT_low_pc (and DW_AT_entry_pc, and possibly others) can use DW_FORM_addrx to refer to the address indirectly. This means we need to have processed the DW_AT_addr_base attribute before we can do anything with these. Since we were processing the unit attributes serially, this created a problem in cases where the DW_AT_addr_base comes after DW_AT_low_pc -- we would end up computing the wrong unit base address, which also corrupted any values which later depended on that (for instance range lists). Clang currently always emits DW_AT_addr_base last. The fix is simple -- process DW_AT_addr_base first, regardless of its position in the attribute list.
* [lldb][NFC] Remove ability to pass a custom printf format to ↵Raphael Isemann2019-12-062-16/+10
| | | | | | DataExtractor::PutToLog This is luckily not used anywhere.
* [lldb/DWARF] Fix DW_AT_rnglists_base handling for dwo filesPavel Labath2019-12-062-3/+161
| | | | | | | | | | the value of DW_AT_rnglists_base of the skeleton unit is for that unit alone (e.g. used in DW_AT_ranges of the unit DIE) and should not apply to the split unit. The split unit has a hardcoded range list base value -- we should initialize range list code whenever we detect a nonempty debug_rnglists.dwo section.
* [lldb] Migrate VMRange::Dump to raw_ostreamRaphael Isemann2019-12-064-10/+8
|
* [lldb/IRExecutionUnit] Stop searching based on demangled namesPavel Labath2019-12-062-3/+0
| | | | | | | | | | | | | | | | | | | | | Summary: This was causing problems on linux, where we'd end up calling the deleting destructor instead of a regular one (because they have the same demangled name), making a lot of mischief in the process. The only place where this was necessary (according to the test suite, at least) was to call a base structor instead of a complete one, but this is now handled in a more targeted fashion. TestCallOverriddenMethod is now re-enabled as it now passes reliably. Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70722
* [lldb/DWARF] Remove DWARFDebugRangesBase abstract classPavel Labath2019-12-062-13/+4
| | | | | now that we use llvm to parse debug_rnglists, this abstraction is not useful.
OpenPOWER on IntegriCloud