1. Jul 29, 2016
    • George Rimar's avatar
      [ELF] - Linkerscript: Implemented SORT command. · 0702c4e8
      George Rimar authored
      When the SORT keyword is used, the linker will sort the files or sections into ascending order by name before placing them in the output file.
      It is used in FreeBSD script:
      https://svnweb.freebsd.org/base/head/sys/conf/ldscript.amd64?revision=284870&view=markup#l139
      
      This is PR28689.
      
      Differential revision: https://reviews.llvm.org/D22749
      
      llvm-svn: 277153
      0702c4e8
    • Nirav Dave's avatar
      b20c34ed
    • Krzysztof Parzyszek's avatar
      [Hexagon] Improve balancing of address calculation · 0006e1af
      Krzysztof Parzyszek authored
      Rebalances address calculation trees and applies Hexagon-specific
      optimizations to the trees to improve instruction selection.
      
      Patch by Tobias Edler von Koch.
      
      llvm-svn: 277151
      0006e1af
    • George Rimar's avatar
      c3cb884c
    • Nirav Dave's avatar
      Fix inline-comment-2.ll triple · 3853f608
      Nirav Dave authored
      llvm-svn: 277149
      3853f608
    • David L Kreitzer's avatar
      Avoid unnecessary 32-bit to 64-bit zero extensions following · 8b959e5c
      David L Kreitzer authored
      32-bit CMOV instructions on x86_64. The 32-bit CMOV implicitly
      zero extends.
      
      Differential Revision: https://reviews.llvm.org/D22941
      
      llvm-svn: 277148
      8b959e5c
    • George Rimar's avatar
      [ELF] - Update comment. NFC. · eaee2af5
      George Rimar authored
      llvm-svn: 277147
      eaee2af5
    • Nirav Dave's avatar
      8b3dc876
    • Krzysztof Parzyszek's avatar
      Fix license information in the file header · 22ae7df6
      Krzysztof Parzyszek authored
      llvm-svn: 277145
      22ae7df6
    • Krzysztof Parzyszek's avatar
      Add missing files to r277143 · 0005a728
      Krzysztof Parzyszek authored
      llvm-svn: 277144
      0005a728
    • Krzysztof Parzyszek's avatar
      [Hexagon] Implement DFA based hazard recognizer · e95e9552
      Krzysztof Parzyszek authored
      The post register allocator scheduler can generate poor schedules
      because the scoreboard hazard recognizer is unable to identify
      hazards for Hexagon precisely. Instead, Hexagon should use a DFA
      based hazard recognizer.
      
      Patch by Brendon Cahoon.
      
      llvm-svn: 277143
      e95e9552
    • Haojian Wu's avatar
      [ASTMatcher] Add hasTemplateArgument/hasAnyTemplateArgument support in functionDecl. · d898b098
      Haojian Wu authored
      Reviewers: klimek
      
      Subscribers: klimek, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D22957
      
      llvm-svn: 277142
      d898b098
    • Daniel Jasper's avatar
      Add missing '-no-canonical-prefixes' in test. · fbbd9f96
      Daniel Jasper authored
      llvm-svn: 277141
      fbbd9f96
    • Dimitar Vlahovski's avatar
      Add/fix support for i386 elf core files · 023dd64f
      Dimitar Vlahovski authored
      Summary:
      There were places in the code, assuming(hardcoding) offsets
      and types that were only valid for the x86_64 elf core file format.
      
      The NT_PRSTATUS and NT_PRPSINFO structures are with the 64 bit layout.
      I have reused them and parse i386 files manually, and fill them in the
      same struct.
      
      Also added some error handling during parsing that checks if the
      available bytes in the buffer are enough to fill the structures.
      
      The i386 core file test case now passes.
      
      For reference on the structures layout, I generally used the
      source of binutils (bfd, readelf)
      
      Bug: https://llvm.org/bugs/show_bug.cgi?id=26947
      
      Reviewers: labath
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D22917
      
      llvm-svn: 277140
      023dd64f
    • Pavel Labath's avatar
      Rewrite gdb-remote's SendContinuePacketAndWaitForResponse · e768c4b8
      Pavel Labath authored
      SendContinuePacketAndWaitForResponse was huge function with very complex interactions with
      several other functions (SendAsyncSignal, SendInterrupt, SendPacket). This meant that making any
      changes to how packet sending functions and threads interact was very difficult and error-prone.
      
      This change does not add any functionality yet, it merely paves the way for future changes. In a
      follow-up, I plan to add the ability to have multiple query packets in flight (i.e.,
      request,request,response,response instead of the usual request,response sequences) and use that
      to speed up qModuleInfo packet processing.
      
      Here, I introduce two special kinds of locks: ContinueLock, which is used by the continue thread,
      and Lock, which is used by everyone else. ContinueLock (atomically) sends a continue packet, and
      blocks any other async threads from accessing the connection. Other threads create an instance of
      the Lock object when they want to access the connection. This object, while in scope prevents the
      continue from being send. Optionally, it can also interrupt the process to gain access to the
      connection for async processing.
      
      Most of the syncrhonization logic is encapsulated within these two classes. Some of it still
      had to bleed over into the SendContinuePacketAndWaitForResponse, but the function is still much
      more manageable than before -- partly because of most of the work is done in the ContinueLock
      class, and partly because I have factored out a lot of the packet processing code separate
      functions (this also makes the functionality more easily testable). Most importantly, there is
      none of syncrhonization code in the async thread users -- as far as they are concerned, they just
      need to declare a Lock object, and they are good to go (SendPacketAndWaitForResponse is now a
      very thin wrapper around the NoLock version of the function, whereas previously it had over 100
      lines of synchronization code).  This will make my follow up changes there easy.
      
      I have written a number of unit tests for the new code and I have ran the test suite on linux and
      osx with no regressions.
      
      Subscribers: tberghammer
      
      Differential Revision: https://reviews.llvm.org/D22629
      
      llvm-svn: 277139
      e768c4b8
    • Benjamin Kramer's avatar
      Make test not fail on hosts where the default omp library is gomp. · b37fb4d2
      Benjamin Kramer authored
      This is the case on some linuxes, just force libomp so we get the
      desired results.
      
      llvm-svn: 277138
      b37fb4d2
    • Adhemerval Zanella's avatar
      tsan: Enable 48-bit VMA support on aarch64 · 4f9de1e7
      Adhemerval Zanella authored
      This patch adds 48-bits VMA support for tsan on aarch64.  As current
      mappings for aarch64, 48-bit VMA also supports PIE executable.  This
      limits the mapping mechanism because the PIE address bits
      (usually 0aaaaXXXXXXXX) makes it harder to create a mask/xor value
      to include all memory regions.  I think it is possible to create a
      large application VAM range by either dropping PIE support or tune
      current range.
      
      It also changes slight the way addresses are packed in SyncVar structure:
      previously it assumes x86_64 as the maximum VMA range.  Since ID is 14 bits
      wide, shifting 48 bits should be ok.
      
      Tested on x86_64, ppc64le and aarch64 (39 and 48 bits VMA).
      
      llvm-svn: 277137
      4f9de1e7
    • Daniel Sanders's avatar
      Re-commit: [mips][fastisel] Handle 0-4 arguments without SelectionDAG. · cbaca42a
      Daniel Sanders authored
      Summary:
      Implements fastLowerArguments() to avoid the need to fall back on
      SelectionDAG for 0-4 argument functions that don't do tricky things like
      passing double in a pair of i32's.
      
      This allows us to move all except one test to -fast-isel-abort=3. The
      remaining one has function prototypes of the form 'i32 (i32, double, double)'
      which requires floats to be passed in GPR's.
      
      The previous commit had an uninitialized variable that caused the incoming
      argument region to have undefined size. This has been fixed.
      
      Reviewers: sdardis
      
      Subscribers: dsanders, llvm-commits, sdardis
      
      Differential Revision: https://reviews.llvm.org/D22680
      
      llvm-svn: 277136
      cbaca42a
    • Nirav Dave's avatar
      Cleanup TransferDbgValues · 563d6f86
      Nirav Dave authored
      [DAG] Check debug values for invalidation before transferring and mark
      old debug values invalid when transferring to another SDValue.
      
      This fixes PR28613.
      
      Reviewers: jyknight, hans, dblaikie, echristo
      
      Subscribers: yaron.keren, ismail, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D22858
      
      llvm-svn: 277135
      563d6f86
    • Andrey Bokhanko's avatar
      [GCC] Support for __final specifier · 276055bb
      Andrey Bokhanko authored
      As reported in bug 28473, GCC supports "final" functionality in pre-C++11 code using the __final keyword. Clang currently supports the "final" keyword in accordance with the C++11 specification, however it ALSO supports it in pre-C++11 mode, with a warning.
      
      This patch adds the "__final" keyword for compatibility with GCC in GCC Keywords mode (so it is enabled with existing flags), and issues a warning on its usage (suggesting switching to the C++11 keyword). This patch also adds a regression test for the functionality described. I believe this patch has minimal impact, as it simply adds a new keyword for existing behavior.
      
      This has been validated with check-clang to avoid regressions. Patch is created in reference to revisions 276665.
      
      Patch by Erich Keane.
      
      Differential Revision: https://reviews.llvm.org/D22919
      
      llvm-svn: 277134
      276055bb
    • Pavel Labath's avatar
      Fixup r277011 - wrong use of infinite timeout · 12fc6752
      Pavel Labath authored
      The commit accidentally switched a timed wait on a condition variable into an infinite timeout.
      Change that back. Android tests were timeing out without this.
      
      llvm-svn: 277133
      12fc6752
    • Simon Pilgrim's avatar
      [X86][SSE] Optimize the truncation of vector comparison results with PACKSS · cb780b32
      Simon Pilgrim authored
      We currently default to using either generic shuffles or MASK+PACKUS/PACKSS to truncate all integer vectors. For vector comparisons, we know that the result will be either all or zero bits in every element, which can be efficiently truncated by directly using PACKSS to repeatedly halve the size of each element.
      
      Due to the limited input values (-1 or 0) we don't need to account for vector element size, so for simplicity we just use the PACKSS(vXi16,vXi16) implementation in all cases. Additionally for AVX2 PACKSS of 256bit data we must perform a PERMQ shuffle to reorder the data into the correct order. I did investigate performing a single shuffle after all the PACKSS calls but the need to cross 128bit lanes makes this difficult to achieve efficiently.
      
      We avoid performing this on AVX512 as it should have better alternative truncation instructions.
      
      Differential Revision: https://reviews.llvm.org/D22814
      
      llvm-svn: 277132
      cb780b32
    • Kirill Bobyrev's avatar
      [clang-rename] speedup RenamingAction · 83d5d568
      Kirill Bobyrev authored
      The complexity of renaming a USR is O(N) [N stands for number of nodes in
      Translation Unit]. In some cases there are more than one USR for a single symbol
      (see overridden functions and ctor/dtor handling), which means that the
      complexity of finding all of the corresponding USRs is O(N * M) [M stands for
      number of USRs corresponding to the symbols, which may be not quite small]. With
      a simple tweak we can make it O(N * log(M)) by passing whole list of USRs
      corresponding to the symbol to USRLocFinder.
      
      llvm-svn: 277131
      83d5d568
    • Simon Pilgrim's avatar
      Fixed MSVC out of range shift warning · 0aaf6ba2
      Simon Pilgrim authored
      llvm-svn: 277130
      0aaf6ba2
    • Sjoerd Meijer's avatar
      Fix for commit rL277126 that broke a build. · a3de1262
      Sjoerd Meijer authored
      llvm-svn: 277129
      a3de1262
    • Prakhar Bahuguna's avatar
      [Thumb] Emit Thumb move in both Thumb modes for struct_byval predicates · d1233e85
      Prakhar Bahuguna authored
      Summary:
      The MOV/MOVT instructions being chosen for struct_byval predicates was
      conditional only on Thumb2, resulting in an ARM MOV/MOVT instruction
      being incorrectly emitted in Thumb1 mode. This is especially apparent
      with v8-m.base targets. This patch ensures that Thumb instructions are
      emitted in both Thumb modes.
      
      Reviewers: rengolin, t.p.northover
      
      Subscribers: llvm-commits, aemerson, rengolin
      
      Differential Revision: https://reviews.llvm.org/D22865
      
      llvm-svn: 277128
      d1233e85
    • Jacques Pienaar's avatar
      da704adc
    • Sjoerd Meijer's avatar
      TargetInstrInfo: add virtual function getInstSizeInBytes · 0eb96ed0
      Sjoerd Meijer authored
      This adds a target hook getInstSizeInBytes to TargetInstrInfo that a lot of
      subclasses already implement.
      
      Differential Revision: https://reviews.llvm.org/D22885
      
      llvm-svn: 277126
      0eb96ed0
    • Abhishek Aggarwal's avatar
      Improve code of loading plugins that provide cmnds · f605c198
      Abhishek Aggarwal authored
      
      
      Summary:
       - Modified code that enables writing new user-defined commands
         and use them through LLDB CLI. Modifications are:
      
        -- Define the 'syntax' for each user-defined command
          --- Added an argument in SBCommandInterpreter::AddCommand()
              and SBCommand::AddCommand() API
          --- Allow passing syntax for each user-defined command
          --- Earlier, only 'help' could be defined and passed for commands
      
        -- Passed 'number of arguments' entered on CLI for user-defined commands
          --- Added an argument (number of options) in SBCommandPluginInterface::DoExecute()
              API to know the number of arguments passed for commands
      
        -- In CommandPluginInterfaceImplementation class:
          --- Make the data member m_backend a shared_ptr
          --- Avoids memory leaks of dynamically allocated SBCommandPluginInterface instances
              created in lldb::PluginInitialize() API
      
      Signed-off-by: default avatarAbhishek Aggarwal <abhishek.a.aggarwal@intel.com>
      
      Reviewers: jingham, granata.enrico, clayborg
      
      Subscribers: labath, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D22863
      
      llvm-svn: 277125
      f605c198
    • Dean Michael Berris's avatar
      [compiler-rt][XRay] Address follow-up comments to initial interface and initialisation code · 17a586e6
      Dean Michael Berris authored
      This addresses some comments from D21612, which contains the following changes:
      
      - Update __xray_patch() and __xray_unpatch() API documentation to not imply asynchrony.
      - Introduce a scope cleanup mechanism to make sure we can roll-back changes to the XRayPatching global atomic.
      - Introduce a few more comments for potential extension points for other platforms (for the implementation details of patching and un-patching).
      
      Reviewers: eugenis, rnk, kcc, echristo, majnemer
      
      Subscribers: llvm-commits, mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D22911
      
      llvm-svn: 277124
      17a586e6
    • Jason Molenda's avatar
      PlatformDarwinKernel maintains a list of kexts and kernels · 8129255e
      Jason Molenda authored
      that it finds on the local computer in "well known" locations
      when we start up the darwin-kernel platform.  It did not 
      distinguish between kexts/kernels with dSYMs from others -
      when it needed a kernel/kext with a given UUID, it would grab
      the first one it finds.
      
      This change separates these into two vectors -- a collection
      of kexts and kernels with dSYMs next t othem, and a collection
      of kexts and kernels without dSYMs.  When we have a bundle ID
      and uuid to search for, we first try the collections with
      dSYMs, and if that fails, then we try the collections that
      did not have dSYMs next to them.
      
      Often times we'll have a situation where a kext will be 
      installed in multiple locations on a system, but only one
      of them will have a dSYM next to it, where the dev just copied
      it to a local directory.  This fixes that problem, giving
      precedence to those binaries with debug information.
      
      llvm-svn: 277123
      8129255e
    • Rui Ueyama's avatar
      Remove `continue` at end of a for-loop. · ed942713
      Rui Ueyama authored
      llvm-svn: 277122
      ed942713
    • Rui Ueyama's avatar
      Split readOutputSectionDescription. · f71caa2b
      Rui Ueyama authored
      llvm-svn: 277121
      f71caa2b
    • Craig Topper's avatar
      e4f868ea
    • Craig Topper's avatar
      [AVX512] Copy the patterns that recognize scalar arimetic operations inserting... · 5625d249
      Craig Topper authored
      [AVX512] Copy the patterns that recognize scalar arimetic operations inserting into the lower element of a packed vector from AVX/SSE so that we can use EVEX encoded instructions.
      
      llvm-svn: 277119
      5625d249
    • Craig Topper's avatar
      [AVX512] Add AVX512 run lines to some tests for scalar fma/add/sub/mul/div and... · 07aa3703
      Craig Topper authored
      [AVX512] Add AVX512 run lines to some tests for scalar fma/add/sub/mul/div and regenerate. Follow up commits will bring AVX512 code up to the same quality as AVX/SSE.
      
      llvm-svn: 277118
      07aa3703
    • Ilia K's avatar
      Fix -break-insert not working when using absolute paths (MI) · 5659a285
      Ilia K authored
      Summary:
      When trying to parse the -break-insert arguments as a named location, the string parsing was not configured to allow directory paths. This patch adds a constructor to allow the parsing of string as directory path along with the other parameters.
      
      This fixes https://llvm.org/bugs/show_bug.cgi?id=28709
      
      Patch from malaperle@gmail.com
      Reviewers: clayborg, ki.stfu
      Subscribers: lldb-commits, ki.stfu
      Differential Revision: https://reviews.llvm.org/D22902
      
      llvm-svn: 277117
      5659a285
    • Rui Ueyama's avatar
      Add comments. · 20204243
      Rui Ueyama authored
      llvm-svn: 277116
      20204243
    • Rui Ueyama's avatar
      Remove `Ignore` flag from SymbolAssignment class. · 8d083e6a
      Rui Ueyama authored
      Previously, Ignore flag is set if we don't want to assign
      a value to symbols. It happens if a symbol assingment is in
      PROVIDE() and there's already a symbol with the same name.
      
      The previous code had a subtle but that we assume that the
      existing symbol is an absolute symbol even if it is not.
      This patch fixes the issue by always overwriting an absolute
      symbol.
      
      llvm-svn: 277115
      8d083e6a
    • David Majnemer's avatar
      [EarlyCSE] Correctly handle simplified, but live, instructions · 130b9f99
      David Majnemer authored
      Some instructions may have their uses replaced with a symbolic constant.
      However, the instruction may still have side effects which percludes it
      from being removed from the function.  EarlyCSE treated such an
      instruction as if it were removed, resulting in PR28763.
      
      llvm-svn: 277114
      130b9f99