Skip to content
  1. Feb 01, 2018
    • Jonas Devlieghere's avatar
      [NFC] 'DWARFv5' -> 'DWARF v5' · 197e47f5
      Jonas Devlieghere authored
      llvm-svn: 323950
      197e47f5
    • Sam McCall's avatar
      [clangd] Use pthread instead of thread_local to support more runtimes. · e0a3dec9
      Sam McCall authored
      Summary:
      thread_local has nice syntax and semantics, but requires __cxa_thread_atexit,
      and some not-ancient runtime libraries don't provide it.
      The clang-x86_64-linux-selfhost-modules buildbot is one example :-)
      
      It works on windows, and the other platforms clang-tools-extra supports should
      all have the relevant pthread API. So we just use that if it's available,
      falling back to thread_local (so if a platform has neither, we'll fail to link).
      
      The fallback should really be the other way, that would require cmake changes.
      
      Reviewers: ilya-biryukov, bkramer
      
      Subscribers: klimek, jkorous-apple, ioeric, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D42742
      
      llvm-svn: 323949
      e0a3dec9
    • Yvan Roux's avatar
      Test commit: Fix a comment. · 705e26a2
      Yvan Roux authored
      llvm-svn: 323947
      705e26a2
    • Mikael Holmen's avatar
      [LSR] Don't force bases of foldable formulae to the final type. · 6d06976e
      Mikael Holmen authored
      Summary:
      Before emitting code for scaled registers, we prevent
      SCEVExpander from hoisting any scaled addressing mode
      by emitting all the bases first. However, these bases
      are being forced to the final type, resulting in some
      odd code.
      
      For example, if the type of the base is an integer and
      the final type is a pointer, we will emit an inttoptr
      for the base, a ptrtoint for the scale, and then a
      'reverse' GEP where the GEP pointer is actually the base
      integer and the index is the pointer. It's more intuitive
      to use the pointer as a pointer and the integer as index.
      
      Patch by: Bevin Hansson
      
      Reviewers: atrick, qcolombet, sanjoy
      
      Reviewed By: qcolombet
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D42103
      
      llvm-svn: 323946
      6d06976e
    • Marshall Clow's avatar
      Add static_asserts to basic_ios and basic_stream_buf to ensure that that the... · 1a6493b4
      Marshall Clow authored
      Add static_asserts to basic_ios and basic_stream_buf to ensure that that the traits match the character type. This is a requirement on the user - now we get consistent failures at compile time instead of incomprehensible error messages or runtime failures. This is also LWG#2994 - not yet adopted.
      
      llvm-svn: 323945
      1a6493b4
    • Rafael Espindola's avatar
      Simplify by sorting relocations before writing them. · 7ce2b4cd
      Rafael Espindola authored
      llvm-svn: 323944
      7ce2b4cd
    • Akira Hatanaka's avatar
      [CodeGen] Fix an assertion failure in CGRecordLowering. · fc681efd
      Akira Hatanaka authored
      This patch fixes a bug in CGRecordLowering::accumulateBitFields where it
      unconditionally starts a new run and emits a storage field when it sees
      a zero-sized bitfield, which causes an assertion in insertPadding to
      fail when -fno-bitfield-type-align is used.
      
      It shouldn't emit new storage if UseZeroLengthBitfieldAlignment and
      UseBitFieldTypeAlignment are both false.
      
      rdar://problem/36762205
      
      llvm-svn: 323943
      fc681efd
    • Jan Vesely's avatar
      half_powr: Implement using powr · 3b8b4eb6
      Jan Vesely authored
      
      
      v2: Use full precision implementation
      
      Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
      Signed-off-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      llvm-svn: 323942
      3b8b4eb6
    • George Karpenkov's avatar
      [analyzer] [tests] Show the number of removed/added bug reports · dece62a7
      George Karpenkov authored
      Differential Revision: https://reviews.llvm.org/D42718
      
      llvm-svn: 323941
      dece62a7
    • Dean Michael Berris's avatar
      [XRay][compiler-rt+llvm] Update XRay register stashing semantics · cdca0730
      Dean Michael Berris authored
      Summary:
      This change expands the amount of registers stashed by the entry and
      `__xray_CustomEvent` trampolines.
      
      We've found that since the `__xray_CustomEvent` trampoline calls can show up in
      situations where the scratch registers are being used, and since we don't
      typically want to affect the code-gen around the disabled
      `__xray_customevent(...)` intrinsic calls, that we need to save and restore the
      state of even the scratch registers in the handling of these custom events.
      
      Reviewers: pcc, pelikan, dblaikie, eizan, kpw, echristo, chandlerc
      
      Reviewed By: echristo
      
      Subscribers: chandlerc, echristo, hiraditya, davide, dblaikie, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40894
      
      llvm-svn: 323940
      cdca0730
    • Richard Smith's avatar
      PR36181: Teach CodeGen to properly ignore requests to emit dependent entities. · 32b615c2
      Richard Smith authored
      Previously, friend function definitions within class templates slipped through
      the gaps and caused the MS mangler to assert.
      
      llvm-svn: 323935
      32b615c2
    • Rafael Espindola's avatar
      [MC] Fix assembler infinite loop on EH table using LEB padding. · 45b12f18
      Rafael Espindola authored
      Fix the infinite loop reported in PR35809. It can occur with GCC-style
      EH table assembly, where the compiler relies on the assembler to
      calculate the offsets in the EH table.
      
      Also see https://sourceware.org/bugzilla/show_bug.cgi?id=4029 for the
      equivalent issue in the GNU assembler.
      
      Patch by Ryan Prichard!
      
      llvm-svn: 323934
      45b12f18
    • Amara Emerson's avatar
      [GlobalOpt] Improve common case efficiency of static global initializer evaluation · 93b0ff20
      Amara Emerson authored
      For very, very large global initializers which can be statically evaluated, the
      code would create vectors of temporary Constants, modifying them in place,
      before committing the resulting Constant aggregate to the global's initializer
      value. This had effectively O(n^2) complexity in the size of the global
      initializer and would cause memory and non-termination issues compiling some
      workloads.
      
      This change performs the static initializer evaluation and creation in batches,
      once for each global in the evaluated IR memory. The existing code is maintained
      as a last resort when the initializers are more complex than simple values in a
      large aggregate. This should theoretically by NFC, no test as the example case
      is massive. The existing test cases pass with this, as well as the llvm test
      suite.
      
      To give an example, consider the following C++ code adapted from the clang
      regression tests:
      struct S {
       int n = 10;
       int m = 2 * n;
       S(int a) : n(a) {}
      };
      
      template<typename T>
      struct U {
       T *r = &q;
       T q = 42;
       U *p = this;
      };
      
      U<S> e;
      
      The global static constructor for 'e' will need to initialize 'r' and 'p' of
      the outer struct, while also initializing the inner 'q' structs 'n' and 'm'
      members. This batch algorithm will simply use general CommitValueTo() method
      to handle the complex nested S struct initialization of 'q', before
      processing the outermost members in a single batch. Using CommitValueTo() to
      handle member in the outer struct is inefficient when the struct/array is
      very large as we end up creating and destroy constant arrays for each
      initialization.
      For the above case, we expect the following IR to be generated:
      
      %struct.U = type { %struct.S*, %struct.S, %struct.U* }
      %struct.S = type { i32, i32 }
      @e = global %struct.U { %struct.S* gep inbounds (%struct.U, %struct.U* @e,
                                                       i64 0, i32 1),
                              %struct.S { i32 42, i32 84 }, %struct.U* @e }
      The %struct.S { i32 42, i32 84 } inner initializer is treated as a complex
      constant expression, while the other two elements of @e are "simple".
      
      Differential Revision: https://reviews.llvm.org/D42612
      
      llvm-svn: 323933
      93b0ff20
    • Matt Arsenault's avatar
      DAG: Fix not truncating when promoting bswap/bitreverse · df0f2507
      Matt Arsenault authored
      These need to convert back to the original type, like any
      other promotion.
      
      llvm-svn: 323932
      df0f2507
    • Sam Clegg's avatar
      [WebAssembly] Write minimal types section · 8f6d2def
      Sam Clegg authored
      Don't include type signatures that are not referenced by
      some relocation.
      
      We don't include this in the -gc-sections settings since
      we are always building the type section from scratch,
      just like we do the table elements.
      
      In the future we might want to unify the relocation
      processing which is currently done once for gc-sections
      and then again for building the sympathetic type and
      table sections.
      
      Differential Revision: https://reviews.llvm.org/D42747
      
      llvm-svn: 323931
      8f6d2def
    • Bob Haarman's avatar
      [COFF] make /incremental control overwriting unchanged import libraries · 5ec44851
      Bob Haarman authored
      Summary:
      r323164 made lld-link not overwrite import libraries when their
      contents haven't changed. MSVC's link.exe does this only when
      performing incremental linking. This change makes lld-link's import
      library overwriting similarly dependent on whether or not incremental
      linking is being performed. This is controlled by the /incremental or
      /incremental:no options. In addition, /opt:icf, /opt:ref, and /order
      turn off /incremental and issue a warning if /incremental was
      specified on the command line.
      
      Reviewers: rnk, ruiu, zturner
      
      Reviewed By: ruiu
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D42716
      
      llvm-svn: 323930
      5ec44851
  2. Jan 31, 2018
Loading