Skip to content
  1. Sep 06, 2016
    • Eric Fiselier's avatar
      Add missing <cstdlib> include. Sorry about the bot breakage · b0b17469
      Eric Fiselier authored
      llvm-svn: 280745
      b0b17469
    • Tom Stellard's avatar
      AMDGPU/SI: Teach SIInstrInfo::FoldImmediate() to fold immediates into copies · 2add8a11
      Tom Stellard authored
      Summary:
      I put this code here, because I want to re-use it in a few other places.
      This supersedes some of the immediate folding code we have in SIFoldOperands.
      I think the peephole optimizers is probably a better place for folding
      immediates into copies, since it does some register coalescing in the same time.
      
      This will also make it easier to transition SIFoldOperands into a smarter pass,
      where it looks at all uses of instruction at once to determine the optimal way to
      fold operands.  Right now, the pass just considers one operand at a time.
      
      Reviewers: arsenm
      
      Subscribers: wdng, nhaehnle, arsenm, llvm-commits, kzhuravl
      
      Differential Revision: https://reviews.llvm.org/D23402
      
      llvm-svn: 280744
      2add8a11
    • Eric Fiselier's avatar
      36103e86
    • Wei Ding's avatar
      AMDGPU : Add XNACK feature to GPUs that support it. · 5e832e86
      Wei Ding authored
      Differential Revision: http://reviews.llvm.org/D24276
      
      llvm-svn: 280742
      5e832e86
    • Eugene Zelenko's avatar
      [include-fixer] Fix some Clang-tidy modernize-use-override and Include What... · 1a14e473
      Eugene Zelenko authored
      [include-fixer] Fix some Clang-tidy modernize-use-override and Include What You Use warnings; other minor fixes.
      
      Differential revision: https://reviews.llvm.org/D24179
      
      llvm-svn: 280741
      1a14e473
    • Reid Kleckner's avatar
      Fix ItaniumDemangle.cpp build with MSVC 2013 · b2881f1f
      Reid Kleckner authored
      llvm-svn: 280740
      b2881f1f
    • Ying Yi's avatar
      [llvm-cov] Add the "Go to first unexecuted line" feature. · d36b47c4
      Ying Yi authored
      This patch provides easy navigation to find the zero count lines, especially useful when the source file is very large.
      
      Differential Revision: https://reviews.llvm.org/D23277
      
      llvm-svn: 280739
      d36b47c4
    • Jason Henline's avatar
      [SE] Rename PlatformInterfaces to PlatformDevice · 19eeb37b
      Jason Henline authored
      Summary:
      The only interface that we ever plan to have in this file is
      PlatformDevice, so it makes sense to rename the file to reflect that.
      
      Reviewers: jprice
      
      Subscribers: parallel_libs-commits
      
      Differential Revision: https://reviews.llvm.org/D24269
      
      llvm-svn: 280737
      19eeb37b
    • Evandro Menezes's avatar
      [AArch64] Adjust the scheduling model for Exynos M1. · 405c90e6
      Evandro Menezes authored
      Further refine the model for branches.
      
      llvm-svn: 280736
      405c90e6
    • Evandro Menezes's avatar
      [AArch64] Adjust the scheduling model for Exynos M1. · 77e6b5d4
      Evandro Menezes authored
      Further refine the model for stores.
      
      llvm-svn: 280735
      77e6b5d4
    • Evandro Menezes's avatar
      [AArch64] Adjust the scheduling model for Exynos M1. · 199cad4f
      Evandro Menezes authored
      Further refine the model for loads.
      
      llvm-svn: 280734
      199cad4f
    • Rafael Espindola's avatar
      Use the demangler in llvm. · d1942133
      Rafael Espindola authored
      llvm-svn: 280733
      d1942133
    • Rafael Espindola's avatar
      Add an c++ itanium demangler to llvm. · b940b66c
      Rafael Espindola authored
      This adds a copy of the demangler in libcxxabi.
      
      The code also has no dependencies on anything else in LLVM. To enforce
      that I added it as another library. That way a BUILD_SHARED_LIBS will
      fail if anyone adds an use of StringRef for example.
      
      The no llvm dependency combined with the fact that this has to build
      on linux, OS X and Windows required a few changes to the code. In
      particular:
      
          No constexpr.
          No alignas
      
      On OS X at least this library has only one global symbol:
      __ZN4llvm16itanium_demangleEPKcPcPmPi
      
      My current plan is:
      
          Commit something like this
          Change lld to use it
          Change lldb to use it as the fallback
      
          Add a few #ifdefs so that exactly the same file can be used in
          libcxxabi to export abi::__cxa_demangle.
      
      Once the fast demangler in lldb can handle any names this
      implementation can be replaced with it and we will have the one true
      demangler.
      
      llvm-svn: 280732
      b940b66c
    • Martin Probst's avatar
      clang-format: [JS] whitespace required between ! and as. · 34ecf42b
      Martin Probst authored
      Summary:
      Before:
          x!as string
      After:
          x! as string
      
      Reviewers: djasper
      
      Subscribers: klimek, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D24272
      
      llvm-svn: 280731
      34ecf42b
    • Martin Probst's avatar
      clang-format: [JS] ignore comments when wrapping returns. · 56ff7aaa
      Martin Probst authored
      Summary:
      When code contains a comment between `return` and the value:
      
          return /* lengthy comment here */ (
              lengthyValueComesHere);
      
      Do not wrap before the comment, as that'd break the code through JS' automatic
      semicolon insertion.
      
      Reviewers: djasper
      
      Subscribers: klimek, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D24257
      
      llvm-svn: 280730
      56ff7aaa
    • Petr Hosek's avatar
      [ELF] Add support for -no-gc-sections flag · 5baa1c76
      Petr Hosek authored
      This flag is supported by both BFD ld and gold and is occasionally
      used to negate the effect of -gc-sections flag.
      
      Differential Revision: https://reviews.llvm.org/D24270
      
      llvm-svn: 280729
      5baa1c76
    • Manman Ren's avatar
      Modules: Fix an assertion in DeclContext::buildLookup. · c748359c
      Manman Ren authored
      When calling getMostRecentDecl, we can pull in more definitions from
      a module. We call getPrimaryContext afterwards to make sure that
      we buildLookup on a primary context.
      
      rdar://27926200
      
      llvm-svn: 280728
      c748359c
    • Sanjay Patel's avatar
      fix formatting; NFC · 4e463b4a
      Sanjay Patel authored
      llvm-svn: 280727
      4e463b4a
    • Davide Italiano's avatar
      [MCTargetDesc] Delete dead code. Found by GCC7 -Wunused-function. · 5715012b
      Davide Italiano authored
      Also unbreak newer gcc build with -Werror.
      
      llvm-svn: 280726
      5715012b
    • Eugene Zelenko's avatar
      [Release notes] Fix links. · 31c96213
      Eugene Zelenko authored
      Differential revision: https://reviews.llvm.org/D24201
      
      llvm-svn: 280725
      31c96213
    • Rui Ueyama's avatar
      Add a comment. · 25150e8b
      Rui Ueyama authored
      llvm-svn: 280724
      25150e8b
    • Victor Leschuk's avatar
      Fix comment formatting for DebugInfoFlags.def · a2cd4131
      Victor Leschuk authored
      llvm-svn: 280722
      a2cd4131
    • Kate Stone's avatar
      Updated .clang-format rules so bring LLDB in line with LLVM standards. · e5a5104e
      Kate Stone authored
      llvm-svn: 280721
      e5a5104e
    • Justin Bogner's avatar
      bugpoint: Return Errors instead of passing around strings · 1c039155
      Justin Bogner authored
      This replaces the threading of `std::string &Error` through all of
      these APIs with checked Error returns instead. There are very few
      places here that actually emit any errors right now, but threading the
      APIs through will allow us to replace a bunch of exit(1)'s that are
      scattered through this code with proper error handling.
      
      This is more or less NFC, but does move around where a couple of error
      messages are printed out.
      
      llvm-svn: 280720
      1c039155
    • Jason Henline's avatar
      [SE] Remove Platform*Handle classes · 18ea094d
      Jason Henline authored
      Summary:
      As pointed out by jprice, these classes don't serve a purpose. Instead,
      we stay consistent with the way memory is managed and let the Stream and
      Kernel classes directly hold opaque handles to device Stream and Kernel
      instances, respectively.
      
      Reviewers: jprice, jlebar
      
      Subscribers: parallel_libs-commits
      
      Differential Revision: https://reviews.llvm.org/D24213
      
      llvm-svn: 280719
      18ea094d
    • Leny Kholodov's avatar
      Formatting with clang-format patch r280701 · df050fd5
      Leny Kholodov authored
      llvm-svn: 280718
      df050fd5
    • Krzysztof Parzyszek's avatar
      [RDF] Ignore undef use operands · 7c9b0126
      Krzysztof Parzyszek authored
      llvm-svn: 280717
      7c9b0126
    • Leny Kholodov's avatar
      Formatting with clang-format patch r280700 · 40c6235b
      Leny Kholodov authored
      llvm-svn: 280716
      40c6235b
    • Simon Pilgrim's avatar
      [SelectionDAG] Simplify extract_subvector( insert_subvector ( Vec, In, Idx ), Idx ) -> In · 1b4462b7
      Simon Pilgrim authored
      If we are extracting a subvector that has just been inserted then we should just use the original inserted subvector.
      
      This has come up in certain several x86 shuffle lowering cases where we are crossing 128-bit lanes.
      
      Differential Revision: https://reviews.llvm.org/D24254
      
      llvm-svn: 280715
      1b4462b7
    • Krzysztof Parzyszek's avatar
      6e2e0e8b
    • Adam Nemet's avatar
      [JumpThreading] Only write back branch-weight MDs for blocks that originally had PGO info · c520822d
      Adam Nemet authored
      Currently the pass updates branch weights in the IR if the function has
      any PGO info (entry frequency is set).  However we could still have
      regions of the CFG that does not have branch weights collected (e.g. a
      cold region).  In this case we'd use static estimates.  Since static
      estimates for branches are determined independently, they are
      inconsistent.  Updating them can "randomly" inflate block frequencies.
      
      I've run into this in a completely cold loop of h264ref from
      SPEC.  -Rpass-with-hotness showed the loop to be completely cold during
      inlining (before JT) but completely hot during vectorization (after JT).
      
      The new testcase demonstrate the problem.  We check array elements
      against 1, 2 and 3 in a loop.  The check against 3 is the loop-exiting
      check.  The block names should be self-explanatory.
      
      In this example, jump threading incorrectly updates the weight of the
      loop-exiting branch to 0, drastically inflating the frequency of the
      loop (in the range of billions).
      
      There is no run-time profile info for edges inside the loop, so branch
      probabilities are estimated.  These are the resulting branch and block
      frequencies for the loop body:
      
                      check_1 (16)
                  (8) /  |
                  eq_1   | (8)
                      \  |
                      check_2 (16)
                  (8) /  |
                  eq_2   | (8)
                      \  |
                      check_3 (16)
                  (1) /  |
             (loop exit) | (15)
                         |
                    (back edge)
      
      First we thread eq_1 -> check_2 to check_3.  Frequencies are updated to
      remove the frequency of eq_1 from check_2 and then from the false edge
      leaving check_2.  Changed frequencies are highlighted with * *:
      
                      check_1 (16)
                  (8) /  |
                 eq_1~   | (8)
                 /       |
                /     check_2 (*8*)
               /  (8) /  |
               \  eq_2   | (*0*)
                \     \  |
                 ` --- check_3 (16)
                  (1) /  |
             (loop exit) | (15)
                         |
                    (back edge)
      
      Next we thread eq_1 -> check_3 and eq_2 -> check_3 to check_1 as new
      back edges.  Frequencies are updated to remove the frequency of eq_1 and
      eq_3 from check_3 and then the false edge leaving check_3 (changed
      frequencies are highlighted with * *):
      
                        check_1 (16)
                    (8) /  |
                   eq_1~   | (8)
                   /       |
                  /     check_2 (*8*)
                 /  (8) /  |
                /-- eq_2~  | (*0*)
        (back edge)        |
                        check_3 (*0*)
                  (*0*) /  |
               (loop exit) | (*0*)
                           |
                      (back edge)
      
      As a result, the loop exit edge ends up with 0 frequency which in turn makes
      the loop header to have maximum frequency.
      
      There are a few potential problems here:
      
      1. The profile data seems odd.  There is a single profile sample of the
      loop being entered.  On the other hand, there are no weights inside the
      loop.
      
      2. Based on static estimation we shouldn't set edges to "extreme"
      values, i.e. extremely likely or unlikely.
      
      3. We shouldn't create profile metadata that is calculated from static
      estimation.  I am not sure what policy is but it seems to make sense to
      treat profile metadata as something that is known to originate from
      profiling.  Estimated probabilities should only be reflected in BPI/BFI.
      
      Any one of these would probably fix the immediate problem.  I went for 3
      because I think it's a good policy to have and added a FIXME about 2.
      
      Differential Revision: https://reviews.llvm.org/D24118
      
      llvm-svn: 280713
      c520822d
    • Leny Kholodov's avatar
      Fix for Bindings/Go/go.test after patch r280700 · dabff7d8
      Leny Kholodov authored
      llvm-svn: 280711
      dabff7d8
    • Chris Dewhurst's avatar
      [Sparc][Leon] Corrected supported atomics size for processors supporting Leon... · 92cac932
      Chris Dewhurst authored
      [Sparc][Leon] Corrected supported atomics size for processors supporting Leon CASA instruction back to 32 bits.
      
      This was erroneously checked-in for 64 bits while trying to find if there was a way to get 64 bit atomicity in Leon processors. There is not and this change should not have been checked-in. There is no unit test for this as the existing unit tests test for behaviour to 32 bits, which was the original intention of the code.
      
      llvm-svn: 280710
      92cac932
    • Rafael Espindola's avatar
      Mark R_GOTREL_FROM_END as a relative expression. · 719f55d3
      Rafael Espindola authored
      Fixes pr30282.
      
      llvm-svn: 280709
      719f55d3
    • George Rimar's avatar
      [ELF] - Linkerscript: implemented FILL command as alias for =fillexpr · ff1f29e0
      George Rimar authored
      Patch implements FILL just as alias for =fillexpr. 
      This allows to make implementation much shorted and simpler than D24186.
      
      Differential revision: https://reviews.llvm.org/D24227
      
      llvm-svn: 280708
      ff1f29e0
    • Dimitar Vlahovski's avatar
      Fixing an MSVC error from rL280692 · e3950574
      Dimitar Vlahovski authored
      MSVC emits an error when one uses a const variable in a lambda without
      capturing it.
      
      gcc and clang don't emit an error in this scenario.
      
      llvm-svn: 280707
      e3950574
    • Simon Dardis's avatar
      [mips] Tighten FastISel restrictions · b432a3ed
      Simon Dardis authored
      LLVM PR/29052 highlighted that FastISel for MIPS attempted to lower
      arguments assuming that it was using the paired 32bit registers to
      perform operations for f64. This mode of operation is not supported
      for MIPSR6.
      
      This patch resolves the reported issue by adding additional checks
      for unsupported floating point unit configuration.
      
      Thanks to mike.k for reporting this issue!
      
      Reviewers: seanbruno, vkalintiris
      
      Differential Review: https://reviews.llvm.org/D23795
      
      llvm-svn: 280706
      b432a3ed
    • Krzysztof Parzyszek's avatar
      [PPC] Claim stack frame before storing into it, if no red zone is present · 020ec299
      Krzysztof Parzyszek authored
      Unlike PPC64, PPC32/SVRV4 does not have red zone. In the absence of it 
      there is no guarantee that this part of the stack will not be modified 
      by any interrupt. To avoid this, make sure to claim the stack frame first
      before storing into it.
      
      This fixes https://llvm.org/bugs/show_bug.cgi?id=26519.
      
      Differential Revision: https://reviews.llvm.org/D24093
      
      llvm-svn: 280705
      020ec299
    • Pavel Labath's avatar
      Second round of fixups for r280692 · de970cfb
      Pavel Labath authored
      Android targets don't have std::to_string and std::stoul. Use llvm::to_string and strtoul
      instead.
      
      llvm-svn: 280704
      de970cfb
    • Dimitar Vlahovski's avatar
      Revert "Intel(R) Memory Protection Extensions (Intel(R) MPX) support." · ee44a92d
      Dimitar Vlahovski authored
      This reverts commit rL280668 because the register tests fail on i386
      Linux.
      
      I investigated a little bit what causes the failure - there are missing
      registers when running 'register read -a'.
      This is the output I got at the bottom:
      """
      ...
      Memory Protection Extensions:
            bnd0 = {0x0000000000000000 0x0000000000000000}
            bnd1 = {0x0000000000000000 0x0000000000000000}
            bnd2 = {0x0000000000000000 0x0000000000000000}
            bnd3 = {0x0000000000000000 0x0000000000000000}
      
      unknown:
      2 registers were unavailable.
      """
      
      Also looking at the packets exchanged between the client and server:
      """
      ...
      history[308] tid=0x7338 <  19> send packet: $qRegisterInfo4a#d7
      history[309] tid=0x7338 < 130> read packet:
      $name:bnd0;bitsize:128;offset:1032;encoding:vector;format:vector-uint64;set:Memory
      Protection Extensions;ehframe:101;dwarf:101;#48
      history[310] tid=0x7338 <  19> send packet: $qRegisterInfo4b#d8
      history[311] tid=0x7338 < 130> read packet:
      $name:bnd1;bitsize:128;offset:1048;encoding:vector;format:vector-uint64;set:Memory
      Protection Extensions;ehframe:102;dwarf:102;#52
      history[312] tid=0x7338 <  19> send packet: $qRegisterInfo4c#d9
      history[313] tid=0x7338 < 130> read packet:
      $name:bnd2;bitsize:128;offset:1064;encoding:vector;format:vector-uint64;set:Memory
      Protection Extensions;ehframe:103;dwarf:103;#53
      history[314] tid=0x7338 <  19> send packet: $qRegisterInfo4d#da
      history[315] tid=0x7338 < 130> read packet:
      $name:bnd3;bitsize:128;offset:1080;encoding:vector;format:vector-uint64;set:Memory
      Protection Extensions;ehframe:104;dwarf:104;#54
      history[316] tid=0x7338 <  19> send packet: $qRegisterInfo4e#db
      history[317] tid=0x7338 <  76> read packet:
      $name:bndcfgu;bitsize:64;offset:1096;encoding:vector;format:vector-uint8;#99
      history[318] tid=0x7338 <  19> send packet: $qRegisterInfo4f#dc
      history[319] tid=0x7338 <  78> read packet:
      $name:bndstatus;bitsize:64;offset:1104;encoding:vector;format:vector-uint8;#8e
      ...
      """
      
      The bndcfgu and bndstatus registers don't have the 'Memory Protections
      Extension' set. I looked at the code and it seems that that is set
      correctly.
      
      So I'm not sure what's the problem or where does it come from.
      
      Also there is a second failure related to something like this in the
      tests:
      """
      registerSet.GetName().lower()
      """
      
      For some reason the registerSet.GetName() returns None.
      
      llvm-svn: 280703
      ee44a92d
Loading