1. Oct 21, 2016
    • Zachary Turner's avatar
      [CodeView] Refactor serialization to use StreamInterface. · 4d49eb9f
      Zachary Turner authored
      This was all using ArrayRef<>s before which presents a problem
      when you want to serialize to or deserialize from an actual
      PDB stream.  An ArrayRef<> is really just a special case of
      what can be handled with StreamInterface though (e.g. by using
      a ByteStream), so changing this to use StreamInterface allows
      us to plug in a PDB stream and get all the record serialization
      and deserialization for free on a MappedBlockStream.
      
      Subsequent patches will try to remove TypeTableBuilder and
      TypeRecordBuilder in favor of class that operate on
      Streams as well, which should allow us to completely merge
      the reading and writing codepaths for both types and symbols.
      
      Differential Revision: https://reviews.llvm.org/D25831
      
      llvm-svn: 284762
      4d49eb9f
    • Richard Smith's avatar
      [c++1z] Fix assertion failure when using the wrong number of bindings for a · f70a906a
      Richard Smith authored
      struct with unnamed bitfields.
      
      llvm-svn: 284761
      f70a906a
    • Konstantin Zhuravlyov's avatar
      521e5ef4
    • Konstantin Zhuravlyov's avatar
      [AMDGPU] Emit constant address space data in .rodata section and use... · 08326b62
      Konstantin Zhuravlyov authored
      [AMDGPU] Emit constant address space data in .rodata section and use relocations instead of fixups (amdhsa only)
      
      Differential Revision: https://reviews.llvm.org/D25693
      
      llvm-svn: 284759
      08326b62
    • Rui Ueyama's avatar
      Remove unused #include. · e329a9fa
      Rui Ueyama authored
      llvm-svn: 284758
      e329a9fa
    • Dehao Chen's avatar
      Using branch probability to guide critical edge splitting. · f03f5155
      Dehao Chen authored
      Summary:
      The original heuristic to break critical edge during machine sink is relatively conservertive: when there is only one instruction sinkable to the critical edge, it is likely that the machine sink pass will not break the critical edge. This leads to many speculative instructions executed at runtime. However, with profile info, we could model the splitting benefits: if the critical edge has 50% taken rate, it would always be beneficial to split the critical edge to avoid the speculated runtime instructions. This patch uses profile to guide critical edge splitting in machine sink pass.
      
      The performance impact on speccpu2006 on Intel sandybridge machines:
      
      spec/2006/fp/C++/444.namd                  25.3  +0.26%
      spec/2006/fp/C++/447.dealII               45.96  -0.10%
      spec/2006/fp/C++/450.soplex               41.97  +1.49%
      spec/2006/fp/C++/453.povray               36.83  -0.96%
      spec/2006/fp/C/433.milc                   23.81  +0.32%
      spec/2006/fp/C/470.lbm                    41.17  +0.34%
      spec/2006/fp/C/482.sphinx3                48.13  +0.69%
      spec/2006/int/C++/471.omnetpp             22.45  +3.25%
      spec/2006/int/C++/473.astar               21.35  -2.06%
      spec/2006/int/C++/483.xalancbmk           36.02  -2.39%
      spec/2006/int/C/400.perlbench              33.7  -0.17%
      spec/2006/int/C/401.bzip2                  22.9  +0.52%
      spec/2006/int/C/403.gcc                   32.42  -0.54%
      spec/2006/int/C/429.mcf                   39.59  +0.19%
      spec/2006/int/C/445.gobmk                 26.98  -0.00%
      spec/2006/int/C/456.hmmer                 24.52  -0.18%
      spec/2006/int/C/458.sjeng                 28.26  +0.02%
      spec/2006/int/C/462.libquantum            55.44  +3.74%
      spec/2006/int/C/464.h264ref               46.67  -0.39%
      
      geometric mean                                   +0.20%
      
      Manually checked 473 and 471 to verify the diff is in the noise range.
      
      Reviewers: rengolin, davidxl
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D24818
      
      llvm-svn: 284757
      f03f5155
    • Chris Bieneman's avatar
      Re-landing a cleaned up implementation of r284550 · 53a78443
      Chris Bieneman authored
      This time it should actually work. The previous implementaiton was not
      getting the linker or compiler flag set correctly in all the right
      situations. By moving the check down and basing it of whether or not CXX
      is set I we can have the logic to add the flags exist only once for the
      linker and once for the compiler instead of duplicating it.
      
      llvm-svn: 284756
      53a78443
    • Simon Pilgrim's avatar
      [CostModel][X86] Fixed AVX1/AVX512 sdiv/udiv uniformconst costs for 256/512 bit integer vectors · 365be4f9
      Simon Pilgrim authored
      We weren't checking for uniform const costs before the general cost, resulting in very high estimates.
      
      llvm-svn: 284755
      365be4f9
    • Ekaterina Romanova's avatar
      Add more doxygen comments to emmintrin.h's intrinsics. · 493091fd
      Ekaterina Romanova authored
      With this patch, 75% of the intrinsics in this file will be documented now. The patches for the rest of the intrisics in this file will be send out later.
      
      The doxygen comments are automatically generated based on Sony's intrinsics document.
      
      I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. This patch was internally reviewed by Yunzhong Gao.
      
      llvm-svn: 284754
      493091fd
    • Richard Smith's avatar
      [c++1z] Teach composite pointer type computation how to compute the composite · 9c37e66c
      Richard Smith authored
      pointer type of two function pointers with different noexcept specifications.
      While I'm here, also teach it how to merge dynamic exception specifications.
      
      llvm-svn: 284753
      9c37e66c
    • Pirama Arumuga Nainar's avatar
      Fix *_EXTEND_VECTOR_INREG legalization · 05b0f93a
      Pirama Arumuga Nainar authored
      Summary:
      While promoting *_EXTEND_VECTOR_INREG nodes whose inputs are already
      promoted, perform the appropriate sign extension for the promoted node
      before doing the *_EXTEND_VECTOR_INREG operation.  If not, the undefined
      high-order bits of the promoted operand may (a) be garbage inc ase of
      zext) or (b) contribute the wrong sign-bit (in case of sext)
      
      Updated the promote-vec3.ll test after this change.  The diff shows
      explicit zeroing in case of zext and intermediate sign extension in case
      of sext.
      
      Reviewers: RKSimon
      
      Subscribers: llvm-commits, srhines
      
      Differential Revision: https://reviews.llvm.org/D25790
      
      llvm-svn: 284752
      05b0f93a
    • Simon Atanasyan's avatar
    • Simon Atanasyan's avatar
      [ELF][MIPS] Separate calculation of MIPS GOT index and offset of the... · f4415a3d
      Simon Atanasyan authored
      [ELF][MIPS] Separate calculation of MIPS GOT index and offset of the corresponding part of the GOT. NFC
      
      MIPS GOT consists of some parts: local, global, TLS entries. This change
      separates calculation of MIPS GOT index and offset of the corresponding
      part of the GOT. That makes code a bit clear and allow to extend number
      of parts in the future.
      
      llvm-svn: 284750
      f4415a3d
    • Renato Golin's avatar
      [clang-cl] Fix test that shouldn't be running on non-x86 · f46be191
      Renato Golin authored
      The clang-cl test required x86-registered-target but it defaulted to the
      host's triple and AArch64 still doesn't support COFF, so the test failed.
      
      The triple was "aarch64-pc-windows-msvc18.0.0" with ObjectFormat equals
      llvm::Triple::COFF, failing assertion:
      
      Assertion `(TT.isOSBinFormatELF() || TT.isOSBinFormatMachO()) &&
                "Only expect Darwin and ELF targets"
      
      in AArch64MCTargetDesc.cpp:78.
      
      Making the test only run on Windows hosts obviously fixes the problem.
      
      llvm-svn: 284749
      f46be191
    • Simon Pilgrim's avatar
      [CostModel][X86] Added tests for sdiv/udiv costs for uniform const and uniform const power-of-2 · 1388c0ac
      Simon Pilgrim authored
      Shows poor costings in AVX1/AVX512BW for certain vector types
      
      llvm-svn: 284748
      1388c0ac
    • Andrey Churbanov's avatar
      2e68768d
    • Sanjay Patel's avatar
      [Target] remove TargetRecip class; 2nd try · 0051efcf
      Sanjay Patel authored
      This is a retry of r284495 which was reverted at r284513 due to use-after-scope bugs
      caused by faulty usage of StringRef.
      
      This version also renames a pair of functions:
      getRecipEstimateDivEnabled()
      getRecipEstimateSqrtEnabled()
      as suggested by Eric Christopher.
      
      original commit msg:
      
      [Target] remove TargetRecip class; move reciprocal estimate isel functionality to TargetLowering
      
      This is a follow-up to https://reviews.llvm.org/D24816 - where we changed reciprocal estimates to be function attributes
      rather than TargetOptions.
      
      This patch is intended to be a structural, but not functional change. By moving all of the
      TargetRecip functionality into TargetLowering, we can remove all of the reciprocal estimate
      state, shield the callers from the string format implementation, and simplify/localize the
      logic needed for a target to enable this.
      
      If a function has a "reciprocal-estimates" attribute, those settings may override the target's
      default reciprocal preferences for whatever operation and data type we're trying to optimize.
      If there's no attribute string or specific setting for the op/type pair, just use the target
      default settings.
      
      As noted earlier, a better solution would be to move the reciprocal estimate settings to IR
      instructions and SDNodes rather than function attributes, but that's a multi-step job that
      requires infrastructure improvements. I intend to work on that, but it's not clear how long
      it will take to get all the pieces in place.
      
      Differential Revision: https://reviews.llvm.org/D25440
      
      llvm-svn: 284746
      0051efcf
    • Benjamin Kramer's avatar
      Put the move ctor for PassManager back for now, it breaks some builds. · d65ec2ce
      Benjamin Kramer authored
      For some reason using the default move ctor creates undefined references
      to it.
      
      llvm-svn: 284745
      d65ec2ce
    • Simon Pilgrim's avatar
      [CostModel][X86] Fixed AVX1/AVX512 sdiv/udiv general costs for 256/512 bit integer vectors · 025e26dd
      Simon Pilgrim authored
      We weren't accounting for legal types on every subtarget, meaning that many of the costs were using defaults.
      
      We still don't correctly cost (or test) the 512-bit sdiv/udiv by uniform const cases, nor the power-of-2 cases.
      
      llvm-svn: 284744
      025e26dd
    • Valery Pykhtin's avatar
      [AMDGPU] add fcopysign(f64, f32) pattern · e55fd41f
      Valery Pykhtin authored
      Differential revision: https://reviews.llvm.org/D25827
      
      llvm-svn: 284743
      e55fd41f
    • Malcolm Parsons's avatar
      [clang-tidy] Add check 'readability-redundant-member-init' · 5c24a114
      Malcolm Parsons authored
      Summary: The check emits a warning if a member-initializer calls the member's default constructor with no arguments.
      
      Reviewers: sbenza, alexfh, aaron.ballman
      
      Subscribers: modocache, mgorny, Eugene.Zelenko, etienneb, Prazek, hokein, cfe-commits, beanz
      
      Differential Revision: https://reviews.llvm.org/D24339
      
      llvm-svn: 284742
      5c24a114
    • Dimitar Vlahovski's avatar
      Minidump plugin: redesign the x86_64 register context · 039983b9
      Dimitar Vlahovski authored
      Summary:
      I misunderstood the format of the register context layout.
      I thought it was a dynamically changing structure, and that it's size
      depended on context_flags.
      It turned out that it always has the same fixed layout and size,
      and the context_flags says which fields of the
      struct have valid values.
      This required a minor redesign of the register context class.
      
      The layout inconsistency, however, was not a "problem" before (e.g. the plugin was working)
      because there also was a bug with checking context_flags - the code was
      parsing the entire struct regardless of context_flags.
      This bug is also fixed in this commit.
      
      Reviewers: labath, zturner
      
      Subscribers: lldb-commits, amccarth
      
      Differential Revision: https://reviews.llvm.org/D25677
      
      llvm-svn: 284741
      039983b9
  2. Oct 20, 2016