1. Jul 24, 2019
    • Francis Visoiu Mistrih's avatar
      [Remarks][NFC] Move the YAML serializer to its own header · cbbdc418
      Francis Visoiu Mistrih authored
      llvm-svn: 366842
      cbbdc418
    • Yi-Hong Lyu's avatar
      [PowerPC] Remove redundant load immediate instructions · 41a010a4
      Yi-Hong Lyu authored
      Currently PowerPC backend emits code like this:
      
        r3 = li 0
        std r3, 264(r1)
        r3 = li 0
        std r3, 272(r1)
      
      This patch fixes that and other cases where a register already contains a value that is loaded so we will get:
      
        r3 = li 0
        std r3, 264(r1)
        std r3, 272(r1)
      
      Differential Revision: https://reviews.llvm.org/D64220
      
      llvm-svn: 366840
      41a010a4
    • Nico Weber's avatar
      gn build: Merge r366832 · 62ac91f3
      Nico Weber authored
      llvm-svn: 366837
      62ac91f3
    • Nico Weber's avatar
      ld.lld: Demangle symbols from archives in diagnostics · 9c0716f1
      Nico Weber authored
      This ports r366573 from COFF to ELF.
      
      There are now to toString(Archive::Symbol), one doing MSVC demangling
      in COFF and one doing Itanium demangling in ELF, so rename these two
      to toCOFFString() and to toELFString() to not get a duplicate symbol.
      
      Nothing ever passes a raw Archive::Symbol to CHECK(), so these not
      being part of the normal toString() machinery seems ok.
      
      There are two code paths in the ELF linker that emits this type of
      diagnostic:
      
      1. The "normal" one in InputFiles.cpp. This is covered by the tweaked test.
      
      2. An additional one that's only used for libcalls if there's at least
         one bitcode in the link, and if the libcall symbol is lazy, and
         lazily loaded from an archive (i.e. not from a lazy .o file).
         (This code path was added in r339301.) Since all libcall names so far
         are C symbols and never mangled, the change there is not observable
         and hence not covered by tests.
      
      Differential Revision: https://reviews.llvm.org/D65095
      
      llvm-svn: 366836
      9c0716f1
    • Craig Topper's avatar
      [X86] In lowerVectorShuffle, instead of creating a new node to canonicalize... · 76bc3d6e
      Craig Topper authored
      [X86] In lowerVectorShuffle, instead of creating a new node to canonicalize the shuffle mask by commuting, just commute the mask and swap V1/V2.
      
      LegalizeDAG tries to legal the DAG by legalizing nodes before
      their operands.
      
      If we create a new node, we end up legalizing it after its operands.
      This prevents some of the optimizations that can be done when the
      operand is a build_vector since the build_vector will have been
      legalized to something else.
      
      Differential Revision: https://reviews.llvm.org/D65132
      
      llvm-svn: 366835
      76bc3d6e
    • Max Moroz's avatar
      [libFuzzer] Fix __sanitizer_print_memory_profile return type in ExtFunctions.def · 374398af
      Max Moroz authored
      Summary:
      Looks like a typo, as that function actually returns void and is used
      as such in libFuzzer code as well.
      
      Reviewers: kcc, Dor1s
      
      Reviewed By: Dor1s
      
      Subscribers: delcypher, #sanitizers, llvm-commits
      
      Tags: #llvm, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D65160
      
      llvm-svn: 366834
      374398af
    • Jonas Devlieghere's avatar
      [utils] Remove sync-source (with SVN) · db1eb7c5
      Jonas Devlieghere authored
      llvm-svn: 366833
      db1eb7c5
    • Francis Visoiu Mistrih's avatar
      [Remarks] Add unit tests for YAML serialization · 78c92d2e
      Francis Visoiu Mistrih authored
      Add tests for both the string table and non string table case.
      
      llvm-svn: 366832
      78c92d2e
    • Nico Weber's avatar
      clang-format: Fix namespace end comments for namespaces with attributes and macros. · 37944130
      Nico Weber authored
      Fixes PR39247.
      
      While here, also make C++20 `namespace A::inline B::inline C` nested
      inline namespaced definitions work.
      
      Before:
          #define DEPRECATE_WOOF [[deprecated("meow")]]
      
          namespace DEPRECATE_WOOF woof {
          void f() {}
          } // namespace DEPRECATE_WOOFwoof
      
          namespace [[deprecated("meow")]] woof {
            void f() {}
          } // namespace [[deprecated("meow")]]woof
      
          namespace woof::inline bark {
            void f() {}
          } // namespace woof::inlinebark
      
      Now:
          #define DEPRECATE_WOOF [[deprecated("meow")]]
      
          namespace DEPRECATE_WOOF woof {
          void f() {}
          } // namespace woof
      
          namespace [[deprecated("meow")]] woof {
          void f() {}
          } // namespace woof
      
          namespace woof::inline bark {
          void f() {}
          } // namespace woof::inline bark
      
      (In addition to the fixed namespace end comments, also note the correct
      indent of the namespace contents.)
      
      Differential Revision: https://reviews.llvm.org/D65125
      
      llvm-svn: 366831
      37944130
    • Jonas Devlieghere's avatar
      [Utils] Add back utils directory · 93f50594
      Jonas Devlieghere authored
      Due to a bug my earlier commit removed the whole utils directory:
      https://reviews.llvm.org/D65123
      
      llvm-svn: 366830
      93f50594
    • Philip Reames's avatar
      [IndVars] Fix a subtle bug in optimizeLoopExits · ea5c94b4
      Philip Reames authored
      The original code failed to account for the fact that one exit can have a pointer exit count without all of them having pointer exit counts.  This could cause two separate bugs:
      1) We might exit the loop early, and leave optimizations undone.  This is what triggered the assertion failure in the reported test case.
      2) We might optimize one exit, then exit without indicating a change.  This could result in an analysis invalidaton bug if no other transform is done by the rest of indvars.
      
      Note that the pointer exit counts are a really fragile concept.  They show up only when we have a pointer IV w/o a datalayout to provide their size.  It's really questionable to me whether the complexity implied is worth it.
      
      llvm-svn: 366829
      ea5c94b4
    • Nico Weber's avatar
      Improve clang-format-diff help output · 532f7565
      Nico Weber authored
      The description in clang-format-diff.py is more useful than the one
      in `clang-format-diff -h`, so use the same description in both places.
      
      Differential Revision: https://reviews.llvm.org/D64998
      
      llvm-svn: 366828
      532f7565
    • Jonas Devlieghere's avatar
      [Utils] Remove legacy scripts · 6491076e
      Jonas Devlieghere authored
      As pointed out by Nathan in D65155, these scrips don't seem to serve any
      real need anymore.
      
      llvm-svn: 366827
      6491076e
    • Ryan Taylor's avatar
      [IR][Verifier] Allow IntToPtrInst to be !dereferenceable · 6f13637a
      Ryan Taylor authored
      Summary:
      Allow IntToPtrInst to carry !dereferenceable metadata tag.
      This is valid since !dereferenceable can be only be applied to
      pointer type values.
      
      Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64954
      
      llvm-svn: 366826
      6f13637a
    • Sam Elliott's avatar
      [RISCV][NFC] Correct RUN in rvi-pseudos-invalid.s · 404551ac
      Sam Elliott authored
      This test should test both riscv32 and riscv64.
      
      llvm-svn: 366825
      404551ac
    • Jonas Devlieghere's avatar
      [Logging] Fix format strings · eaedc5ef
      Jonas Devlieghere authored
      Change format strings to use the `{}` syntax instead of the printf
      syntax when using LLDB_LOG.
      
      llvm-svn: 366824
      eaedc5ef
    • Jan Korous's avatar
      [clang][NFCI] Fix random typos · e72321f3
      Jan Korous authored
      llvm-svn: 366823
      e72321f3
    • Rainer Orth's avatar
      [compiler-rt][builtins] Provide __clear_cache for SPARC · 569f92f1
      Rainer Orth authored
      While working on https://reviews.llvm.org/D40900, two tests were failing since __clear_cache
      aborted.  While libgcc's __clear_cache is just empty, this only happens because
      gcc (in gcc/config/sparc/sparc.c (sparc32_initialize_trampoline, sparc64_initialize_trampoline))
      emits flush insns directly.
      
      The following patch mimics that.
      
      Tested on sparcv9-sun-solaris2.11.
      
      Differential Revision: https://reviews.llvm.org/D64496
      
      llvm-svn: 366822
      569f92f1
    • Rainer Orth's avatar
      [CMake] Add -z defs on Solaris · 2b7f3a2b
      Rainer Orth authored
      Like other ELF targets, shared objects should be linked with -z defs on Solaris.
      
      Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.
      
      Differential Revision: https://reviews.llvm.org/D64484
      
      llvm-svn: 366821
      2b7f3a2b
    • Rainer Orth's avatar
      [clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC · 2da6eea0
      Rainer Orth authored
      Clang :: Headers/max_align.c currently FAILs on 64-bit SPARC:
      
        error: 'error' diagnostics seen but not expected: 
          File /vol/llvm/src/clang/dist/test/Headers/max_align.c Line 12: static_assert failed due to requirement '8 == _Alignof(max_align_t)' ""
        1 error generated.
      
      This happens because SuitableAlign isn't defined for SPARCv9 unlike SPARCv8
      (which uses the default of 64 bits).  gcc's sparc/sparc.h has
      
        #define BIGGEST_ALIGNMENT (TARGET_ARCH64 ? 128 : 64)
      
      This patch sets SuitableAlign to match and updates the corresponding testcase.
      
      Tested on sparcv9-sun-solaris2.11.
      
      Differential Revision: https://reviews.llvm.org/D64487
      
      llvm-svn: 366820
      2da6eea0
    • Jessica Paquette's avatar
      [GlobalISel][AArch64] Teach GISel to handle shifts in load addressing modes · 2b404d01
      Jessica Paquette authored
      When we select the XRO variants of loads, we can pull in very specific shifts
      (of the size of an element). E.g.
      
      ```
      ldr x1, [x2, x3, lsl #3]
      ```
      
      This teaches GISel to handle these when they're coming from shifts
      specifically.
      
      This adds a new addressing mode function, `selectAddrModeShiftedExtendXReg`
      which recognizes this pattern.
      
      This also packs this up with `selectAddrModeRegisterOffset` into
      `selectAddrModeXRO`. This is intended to be equivalent to `selectAddrModeXRO`
      in AArch64ISelDAGtoDAG.
      
      Also update load-addressing-modes to show that all of the cases here work.
      
      Differential Revision: https://reviews.llvm.org/D65119
      
      llvm-svn: 366819
      2b404d01
  2. Jul 23, 2019