1. Jul 26, 2016
    • Marshall Clow's avatar
    • Krzysztof Parzyszek's avatar
      [Hexagon] Update store offset when not packetizing it with allocframe · 3b4682f6
      Krzysztof Parzyszek authored
      When the packetizer wants to put a store to a stack slot in the same
      packet with an allocframe, it updates the store offset to reflect the
      value of SP before it is updated by allocframe. If the store cannot
      be packetized with the allocframe after all, the offset needs to be
      updated back to the previous value.
      
      llvm-svn: 276749
      3b4682f6
    • Oliver Stannard's avatar
      [ARM] Improve error messages for .arch_extension directive · 1c6e5914
      Oliver Stannard authored
      - More informative message when extension name is not an identifier token.
      - Stop parsing directive if extension is unknown (avoid duplicate error
        messages).
      - Report unsupported extensions with a source location, rather than
        report_fatal_error.
      
      Differential Revision: https://reviews.llvm.org/D22806
      
      llvm-svn: 276748
      1c6e5914
    • Oliver Stannard's avatar
      [ARM] Implement -mimplicit-it assembler option · 2171828a
      Oliver Stannard authored
      This option, compatible with gas's -mimplicit-it, controls the
      generation/checking of implicit IT blocks in ARM/Thumb assembly.
      
      This option allows two behaviours that were not possible before:
      - When in ARM mode, emit a warning when assembling a conditional
        instruction that is not in an IT block. This is enabled with
        -mimplicit-it=never and -mimplicit-it=thumb.
      - When in Thumb mode, automatically generate IT instructions when an
        instruction with a condition code appears outside of an IT block. This
        is enabled with -mimplicit-it=thumb and -mimplicit-it=always.
      
      The default option is -mimplicit-it=arm, which matches the existing
      behaviour (allow conditional ARM instructions outside IT blocks without
      warning, and error if a conditional Thumb instruction is outside an IT
      block).
      
      The general strategy for generating IT blocks in Thumb mode is to keep a
      small list of instructions which should be in the IT block, and only
      emit them when we encounter something in the input which means we cannot
      continue the block.  This could be caused by:
      - A non-predicable instruction
      - An instruction with a condition not compatible with the IT block
      - The IT block already contains 4 instructions
      - A branch-like instruction (including ALU instructions with the PC as
        the destination), which cannot appear in the middle of an IT block
      - A label (branching into an IT block is not legal)
      - A change of section, architecture, ISA, etc
      - The end of the assembly file.
      
      Some of these, such as change of section and end of file, are parsed
      outside of the ARM asm parser, so I've added a new virtual function to
      AsmParser to ensure any previously-parsed instructions have been
      emitted. The ARM implementation of this flushes the currently pending IT
      block.
      
      We now have to try instruction matching up to 3 times, because we cannot
      know if the current IT block is valid before matching, and instruction
      matching changes depending on the IT block state (due to the 16-bit ALU
      instructions, which set the flags iff not in an IT block). In the common
      case of not having an open implicit IT block and the instruction being
      matched not needing one, we still only have to run the matcher once.
      
      I've removed the ITState.FirstCond variable, because it does not store
      any information that isn't already represented by CurPosition. I've also
      updated the comment on CurPosition to accurately describe it's meaning
      (which this patch doesn't change).
      
      Differential Revision: https://reviews.llvm.org/D22760
      
      llvm-svn: 276747
      2171828a
    • Martin Bohme's avatar
      Test commit -- adding a newline · 5d18c427
      Martin Bohme authored
      llvm-svn: 276746
      5d18c427
    • George Rimar's avatar
      [ELF] Linkerscript: simplify DATA_SEGMENT_ALIGN evaluation · 528e0bfa
      George Rimar authored
      We can simplify the evaluation of DATA_SEGMENT_ALIGN
      just to simple align(). That way it will work exactly like we have in non-script case.
      
      Change was suggested by Rafael Ávila de Espíndola
      
      Differential revision: https://reviews.llvm.org/D22807
      
      llvm-svn: 276745
      528e0bfa
    • Daniel Sanders's avatar
      6151699b
    • Simon Pilgrim's avatar
      [X86][SSE] Added extra memory folding tests for cvtsd2ss intrinsic · 0280959c
      Simon Pilgrim authored
      SSE only fold partial reg update instructions when optsize is enabled
      
      llvm-svn: 276743
      0280959c
    • Rafael Espindola's avatar
      Disable test on windows. · cc83ad18
      Rafael Espindola authored
      llvm-svn: 276742
      cc83ad18
    • George Rimar's avatar
      [ELF] - Fixed possible iterator overflow. · bfc4a4b7
      George Rimar authored
      We can have Opt.Commands size greater then Sections.size().
      For example if we have next script:
      
      SECTIONS { 
      .aaa : { *(.aaa) }           
      .bbb : { *(.bbb) }   
      .ccc : { *(.ccc) }   
      }
      
      and next code:
      
      .global _start
      _start:
       nop
      
      .section .aaa,"a"
       .quad 0
      
      Then amount of sections is less than amound of Opt.Commands
      and if we for example have all commands NoConstraint,
      that overflowed the iterator used.
      
      llvm-svn: 276741
      bfc4a4b7
    • Simon Pilgrim's avatar
      [X86][SSE] Fixed issue with memory folding of (v)cvtsd2ss intrinsics · 019e1024
      Simon Pilgrim authored
      Fixed typo in the intrinsic definitions of (v)cvtsd2ss with memory folding.
      
      This was only unearthed when rL276102 started using the intrinsic again.....
      
      llvm-svn: 276740
      019e1024
    • Simon Dardis's avatar
      [mips] MIPS64R6 compact branch support · 68a204dd
      Simon Dardis authored
      MIPS64R6 compact branch support. As the MIPS LLVM backend uses distinct
      MachineInstrs for certain 32 and 64 bit instructions (e.g. BEQ & BEQ64) that
      map to the same instruction, extend compact branch support for the
      corresponding 64bit branches.
      
      Reviewers: dsanders
      
      Differential Revision: https://reviews.llvm.org/D20164
      
      llvm-svn: 276739
      68a204dd
    • Simon Pilgrim's avatar
      Fixed spelling in comment · 28c7d709
      Simon Pilgrim authored
      llvm-svn: 276738
      28c7d709
    • Benjamin Kramer's avatar
      [tblgen] Compare const char * with strcmp instead of creating StringRef. · 729d3618
      Benjamin Kramer authored
      Avoids a call to strlen on both strings which always reads the entire
      string. strcmp can use early exit.
      
      llvm-svn: 276737
      729d3618
    • Simon Dardis's avatar
      [mips] sgtu, s[rl]l, sra, dnegu, neg instruction aliases · 273fc26b
      Simon Dardis authored
      Add the instruction alias sgtu (register form only), two operand forms of
      s[rl]l and sra, and missing single/two operand forms of dnegu/neg.
      
      Reviewers: dsanders
      
      Differential Revision: https://reviews.llvm.org/D22752
      
      llvm-svn: 276736
      273fc26b
    • Pavel Labath's avatar
      Fix incorrect form test in SymbolFileDWARF · 57d05351
      Pavel Labath authored
      Summary:
      We were checking whether an attribute is in block form by getting the block data pointer, which
      was not correct as the pointer be null even if the attribute is in block form. Other places in
      the file already use the correct test.
      
      To make this work, I've needed to add DW_FORM_exprlock to the list of "block" forms, which seems
      correct as that is how we are parsing it.
      
      Reviewers: clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D22756
      
      llvm-svn: 276735
      57d05351
    • Pavel Labath's avatar
      Fix DataExtractor::PeekData for zero length peeks · f7e7fdd5
      Pavel Labath authored
      Summary:
      The function was returning the null pointer for peeks of size zero, which seems like a sensible
      thing to do, but is actually pretty easy to get bitten by that if you are extracting a variable
      length field which happens to be of zero length and then doing pointer arithmetic on that (which
      SymbolFileDWARF does, and ended up crashing in case of empty DW_AT_location).
      
      This changes the function to return a null pointer only when it gets queried for data which is
      outside of the range of the extractor, which is more c++-y, as one can still do reasonable things
      with pointers to data of size zero (think, end() iterators).
      
      I also add a test and fix some signedness warnings in the existing data extractor tests.
      
      Reviewers: clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D22755
      
      llvm-svn: 276734
      f7e7fdd5
    • Craig Topper's avatar
      [X86] Remove isCommutable=1 from instructions that also load. Commuting such... · 79011a66
      Craig Topper authored
      [X86] Remove isCommutable=1 from instructions that also load. Commuting such instruction isn't useful as it would unfold the load. The exception being FMA3 instructions.
      
      llvm-svn: 276733
      79011a66
    • Craig Topper's avatar
      [AVX512] Don't mark ADDSSZr_Int or MULSSZr_Int as commutable. The intrinsics... · 26000f8d
      Craig Topper authored
      [AVX512] Don't mark ADDSSZr_Int or MULSSZr_Int as commutable. The intrinsics have one of their arguments indicated as passing through the high bits and we can't commute that.
      
      llvm-svn: 276732
      26000f8d
    • Eugene Leviant's avatar
    • Dimitry Andric's avatar
      Remove obsolete XFAIL for a test that used to sometimes miscompile under · fae1cf40
      Dimitry Andric authored
      FreeBSD with gcc 4.2.1, a long time ago (see r113824).  Noticed by Pete
      Cooper.
      
      llvm-svn: 276730
      fae1cf40
    • Jason Molenda's avatar
      Add support for an additional dictionary in the per-arch plists · 46202863
      Jason Molenda authored
      that may be embedded in the Contents/Resources subdir of a dSYM
      bundle.  These allow for the specification of a build-time path
      to debug-time path remapping for source files.  Files may be built
      in /BuildDirectory/sources/project-100 but when the debugger is
      run, they're actually found via ~sources/project-100 - this plist
      allows for that remapping through the DBGBuildSourcePath and
      DBGSourcePath keys.
      
      This patch adds support for a new DBGSourcePathRemapping
      dictionary in the plist where the keys are the build-time paths
      and the values are the debug-time paths that they should be
      remapped to.  There are instances were we have multiple possible
      build-time paths that need to be included, so the dictionary was
      required.
      
      <rdar://problem/26725174> 
      
      llvm-svn: 276729
      46202863
    • David Majnemer's avatar
      Update for LLVM changes · 12b9e76b
      David Majnemer authored
      InstSimplify has gained the ability to remove needless bitcasts which
      perturbed some clang codegen tests.
      
      llvm-svn: 276728
      12b9e76b
    • David Majnemer's avatar
      Reapply: [InstSimplify] Add support for bitcasts" · a90a621d
      David Majnemer authored
      This reverts commit r276700 and reapplies r276698.
      The relevant clang tests have been updated.
      
      llvm-svn: 276727
      a90a621d
    • Kelvin Li's avatar
      [OpenMP] diagnose orphaned teams construct · 2b51f728
      Kelvin Li authored
      The OpenMP spec mandates that 'a teams construct must be contained within a 
      target construct'. Currently, this scenario is not diagnosed. This patch is 
      to add check for orphaned teams construct and issue an error message.
      
      Differential Revision: https://reviews.llvm.org/D22785
      
      llvm-svn: 276726
      2b51f728
    • Amaury Sechet's avatar
      Propery format doccomment in lto.h . NFC · 06ac2f4a
      Amaury Sechet authored
      llvm-svn: 276725
      06ac2f4a
    • Matthias Braun's avatar
      LiveIntervalAnalysis: Fix handleMoveDown() problem · 3865b1d3
      Matthias Braun authored
      If we move a last-use register read to a later position we may skip
      intermediate segments. This may require us to not only extend the
      segment before the NewIdx, but also extend the segment live-in to
      OldIdx.
      
      This switches LiveIntervalTest to use AMDGPU so we can test subregister
      liveness.
      
      llvm-svn: 276724
      3865b1d3
    • Tim Northover's avatar
      GlobalISel: remove redundant ';'s. NFC · 884b47ec
      Tim Northover authored
      llvm-svn: 276723
      884b47ec
    • Jason Molenda's avatar
      DynamicLoaderDarwinKernel will look in four addresses for the kernel · 57086ed7
      Jason Molenda authored
      load address on 64-bit devices; it only needs to look in three.
      
      <rdar://problem/27061405> 
      
      llvm-svn: 276721
      57086ed7
    • Peter Collingbourne's avatar
      Add qualification to fix MSVC build. · 76681d6a
      Peter Collingbourne authored
      llvm-svn: 276720
      76681d6a
    • Peter Collingbourne's avatar
      COFF: Implement /linkrepro flag. · feee2103
      Peter Collingbourne authored
      This flag is implemented similarly to --reproduce in the ELF linker.
      
      This patch implements /linkrepro by moving the cpio writer and associated
      utility functions to lldCore, and using that implementation in both linkers.
      
      One COFF-specific detail is that we store the object file from which the
      resource files were created in our reproducer, rather than the resource
      files themselves. This allows the reproducer to be used on non-Windows
      systems for example.
      
      Differential Revision: https://reviews.llvm.org/D22418
      
      llvm-svn: 276719
      feee2103
    • Chris Bieneman's avatar
      [CMake] Updating Xcode Toolchain creation to support Xcode 7 · f3091323
      Chris Bieneman authored
      Recent changes to Xcode have changed the structure of Xcode toolchains. This patch makes the xcode-toolchain goop construct a new-format Xcode toolchain that is compatible with Xcode 7.
      
      The new format has a compatibility version key, so when a new format comes out we can support multiple formats in parallel.
      
      llvm-svn: 276718
      f3091323
    • Rui Ueyama's avatar
      Split getPhdrsIndices. NFC. · 29c5a2a9
      Rui Ueyama authored
      llvm-svn: 276717
      29c5a2a9
    • Vedant Kumar's avatar
      [Coverage] Do not write out coverage mappings with zero entries · efd319a2
      Vedant Kumar authored
      After r275121, we stopped mapping regions from system headers. Lambdas
      declared in regions belonging to system headers started producing empty
      coverage mappings, since the files corresponding to their spelling locs
      were being ignored.
      
      The coverage reader doesn't know what to do with these empty mappings.
      This commit makes sure that we don't produce them and adds a test. I'll
      make the reader stricter in a follow-up commit.
      
      llvm-svn: 276716
      efd319a2
    • Rui Ueyama's avatar
      Replace std::find_if with plain for loop. NFC. · f510fa6b
      Rui Ueyama authored
      llvm-svn: 276715
      f510fa6b
    • Sebastian Pop's avatar
      GVN-hoist: use a DFS numbering of instructions (PR28670) · 91d4a301
      Sebastian Pop authored
      Instead of DFS numbering basic blocks we now DFS number instructions that avoids
      the costly operation of which instruction comes first in a basic block.
      
      Patch mostly written by Daniel Berlin.
      
      Differential Revision: https://reviews.llvm.org/D22777
      
      llvm-svn: 276714
      91d4a301
    • Sebastian Pop's avatar
      GVN-hoist: limit hoisting depth (PR28670) · 38422b13
      Sebastian Pop authored
      This patch adds an option to specify the maximum depth in a BB at which to
      consider hoisting instructions.  Hoisting instructions from a deeper level is
      not profitable as it increases register pressure and compilation time.
      
      Differential Revision: https://reviews.llvm.org/D22772
      
      llvm-svn: 276713
      38422b13
    • Evgeniy Stepanov's avatar
      [safestack] Fix stack guard live range. · 906f6fb5
      Evgeniy Stepanov authored
      Stack guard slot is live throughout the function.
      
      llvm-svn: 276712
      906f6fb5
    • Chris Bieneman's avatar
      [CMake] Pass DYLD_LIBRARY_PATH as CMake variable instead of as envar · d052efc3
      Chris Bieneman authored
      On OS X 10.11 System Integrity Protection prevents the DYLD environment variables from being set on system binaries. To work around this r276710 accepts DYLD_LIBRARY_PATH as a CMake variable and sets it directly on the archiver commands.
      
      To make this work with bootstrapping we need to set DYLD_LIBRARY_PATH to the current stage's library directory and pass that into the next stage's configuration.
      
      llvm-svn: 276711
      d052efc3
    • Chris Bieneman's avatar
      [CMake] Support feeding DYLD_LIBRARY_PATH into archiver calls · f4a56a7d
      Chris Bieneman authored
      OS X 10.11 has a feature named System Integrity Protection. The goal of the feature is to make system binaries immutable (even as root). One part of this is that protected binaries do not receive DYLD_* environment variables because the kernel scrubs them before process launch.
      
      This causes problems for LTO bootstrap builds on Darwin that try to use the just-built libLTO with the host ar, ranlib, or libtool.
      
      This patch addresses two problems.
      
      (1) The tools themselves aren't protected binaries but the shim tools installed at / are, so we need to call xcrun -find to find libtool instead of using the one CMake finds.
      
      (2) Some build tools (ninja and make) use /bin/sh to invoke their subprocesses. Since /bin/sh is a system binary, the kernel scrubs the DYLD envars from their environment. To work around this we need to set the environment variables as part of the archiver commands, so the envars are set by the shell process instead of on the shell process.
      
      llvm-svn: 276710
      f4a56a7d