1. Dec 07, 2019
    • Sanjay Patel's avatar
      Revert "[InstCombine] reduce indentation; NFC" · 142a75a9
      Sanjay Patel authored
      This reverts commit 8bf8ef71.
      At least 1 of these supposedly NFC commits wasn't - sanitizer bot is angry.
      142a75a9
    • Petr Hosek's avatar
      [libcxx{,abi}] Don't link libpthread and libdl on Fuchsia · 1aa17023
      Petr Hosek authored
      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 a9b5fff5 which changed how we emit deplibs.
      
      Differential Revision: https://reviews.llvm.org/D71135
      1aa17023
    • Alina Sbirlea's avatar
      Revert "ARM-Darwin: keep the frame register reserved even if not updated." · c7faa681
      Alina Sbirlea authored
      This reverts commit a7d90af1.
      
      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.
      c7faa681
    • Sanjay Patel's avatar
      [x86] add cost model special-case for insert/extract from element 0 · 7ff0fcb5
      Sanjay Patel authored
      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
      7ff0fcb5
    • Hiroshi Yamauchi's avatar
      [PGO][PGSO] Instrument the code gen / target passes. · 9a0b5e14
      Hiroshi Yamauchi authored
      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
      9a0b5e14
    • Matt Arsenault's avatar
      clang/AMDGPU: Fix default for frame-pointer attribute · 2cc11941
      Matt Arsenault authored
      Enabling optimization should allow frame pointer elimination.
      2cc11941
    • Alexey Bataev's avatar
      [OPENMP]Reorganize OpenMP warning groups. · 543ffb4a
      Alexey Bataev authored
      openmp-mapping group is a subgroup of openmp-target warning group. Also,
      added global openmp group to control all other OpenMP warning groups.
      543ffb4a
    • Sanjay Patel's avatar
      [InstCombine] reduce indentation; NFC · 8bf8ef71
      Sanjay Patel authored
      8bf8ef71
    • Sanjay Patel's avatar
      [InstCombine] improve readability; NFC · 7250ef36
      Sanjay Patel authored
      CreateIntCast returns the input if its type matches, so need to duplicate that check.
      7250ef36
    • Sanjay Patel's avatar
      [InstCombine] reduce code duplication; NFC · db573965
      Sanjay Patel authored
      db573965
    • Sanjay Patel's avatar
      [InstCombine] improve readability; NFC · 6bb62a9d
      Sanjay Patel authored
      6bb62a9d
    • Michael Liao's avatar
      Add `QualType::hasAddressSpace`. NFC. · f2ace9d6
      Michael Liao authored
      - Add that as a shorthand of <T>.getQualifiers().hasAddressSpace().
      - Simplify related code.
      f2ace9d6
    • Guozhi Wei's avatar
      [MBP] Avoid tail duplication if it can't bring benefit · 72942459
      Guozhi Wei authored
      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
      72942459
    • Raphael Isemann's avatar
      [ASTImporter] Implicitly declare parameters for imported ObjCMethodDecls · 164e0fc5
      Raphael Isemann authored
      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
      164e0fc5
    • diggerlin's avatar
      [NFC][AIX][XCOFF] if the size of Csect is zero, the Csect do not need write any data into sections · 50d72fa1
      diggerlin authored
      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
      50d72fa1
    • mydeveloperday's avatar
      update string comparison in clang-format.py · 79f8c20e
      mydeveloperday authored
      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
      79f8c20e
    • mydeveloperday's avatar
      [clang-format] update trailing newline treatment in clang-format.py · b8e03ff5
      mydeveloperday authored
      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
      b8e03ff5
    • diggerlin's avatar
      [NFC][AIX][XCOFF] fixed compile warning on the strncpy. · c04b63ec
      diggerlin authored
      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
      c04b63ec
    • Muhammad Omair Javaid's avatar
      Cleanup and speedup NativeRegisterContextLinux_arm64 · b6f9d7b8
      Muhammad Omair Javaid authored
      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
      b6f9d7b8
    • Jordan Rupprecht's avatar
      [lldb][test] Handle .categories lookup for inline tests. · 03a242bd
      Jordan Rupprecht authored
      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
      03a242bd
  2. Dec 06, 2019