Skip to content
  1. Jun 23, 2015
    • Alexander Kornienko's avatar
      Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) · f00654e3
      Alexander Kornienko authored
      Apparently, the style needs to be agreed upon first.
      
      llvm-svn: 240390
      f00654e3
    • Yaron Keren's avatar
      Silence VC warning C4715: '`anonymous namespace'::getNativeVectorSizeForA VXABI' : · b76cb044
      Yaron Keren authored
      not all control paths return a value.
      
      llvm-svn: 240389
      b76cb044
    • Daniel Jasper's avatar
      Write output file to temp directory. The tests shouldn't assume that · 1758a9f1
      Daniel Jasper authored
      they can write to the current working directory.
      
      llvm-svn: 240388
      1758a9f1
    • NAKAMURA Takumi's avatar
      Tweak clang/test/Modules/modules-with-same-name.m to run with GnuWin32's... · 4a8917be
      NAKAMURA Takumi authored
      Tweak clang/test/Modules/modules-with-same-name.m to run with GnuWin32's find.exe on newer version of Windows.
      
      It seems "*.pcm" would be expanded with current directory by NTOS 6.x's msvcrt. GnuWin32 utils are affected.
      To avoid the issue, put an expression that msvcrt's glob won't match, like "*.pc[m]".
      
      llvm-svn: 240387
      4a8917be
    • Elena Demikhovsky's avatar
      AVX-512: Added all forms of VPABS instruction · 5e2f8c42
      Elena Demikhovsky authored
      Added all intrinsics, tests for encoding, tests for intrinsics.
      
      llvm-svn: 240386
      5e2f8c42
    • Justin Bogner's avatar
      MCExpr: Avoid UB by evaluating this shift as unsigned · c1602151
      Justin Bogner authored
      We hit undefined behaviour in some MCExpr tests when the LHS of a left
      shift is -1. Twos-complement semantics are completely reasonable here,
      so we should just do the shift in unsigned.
      
      llvm-svn: 240385
      c1602151
    • David Majnemer's avatar
      [MS ABI] Rework member pointer conversion · c1709d38
      David Majnemer authored
      Member pointers in the MS ABI are made complicated due to the following:
      - Virtual methods in the most derived class (MDC) might live in a
        vftable in a virtual base.
      - There are four different representations of member pointer: single
        inheritance, multiple inheritance, virtual inheritance and the "most
        general" representation.
      - Bases might have a *more* general representation than classes which
        derived from them, a most surprising result.
      
      We believed that we could treat all member pointers as-if they were a
      degenerate case of the multiple inheritance model.  This fell apart once
      we realized that implementing standard member pointers using this ABI
      requires referencing members with a non-zero vbindex.
      
      On a bright note, all but the virtual inheritance model operate rather
      similarly.  The virtual inheritance member pointer representation
      awkwardly requires a virtual base adjustment in order to refer to
      entities in the MDC.
      
      However, the first virtual base might be quite far from the start of the
      virtual base.  This means that we must add a negative non-virtual
      displacement.
      
      However, things get even more complicated.  The most general
      representation interprets vbindex zero differently from the virtual
      inheritance model: it doesn't reference the vbtable at all.
      
      It turns out that this complexity can increase for quite some time:
      consider a derived to base conversion from the most general model to the
      multiple inheritance model...
      
      To manage this complexity we introduce a concept of "normalized" member
      pointer which allows us to treat all three models as the most general
      model.  Then we try to figure out how to map this generalized member
      pointer onto the destination member pointer model.  I've done my best to
      furnish the code with comments explaining why each adjustment is
      performed.
      
      This fixes PR23878.
      
      llvm-svn: 240384
      c1709d38
    • David Majnemer's avatar
      [MS ABI] Refactor member pointer generation · 5ca193c3
      David Majnemer authored
      The MS ABI has very complicated member pointers.  Don't attempt to
      synthesize the final member pointer ab ovo usque ad mala in one go.
      
      Instead, start with a member pointer which points to the declaration in
      question as-if it's decl context was the target class.  Then, utilize
      our conversion logical to convert it to the target type.
      
      This allows us to simplify how we think about member pointers because we
      don't need to consider non-zero nv adjustments before we even generate
      the member pointer.  Furthermore, it gives our adjustment logic more
      exposure by utilizing it in a common path.
      
      llvm-svn: 240383
      5ca193c3
    • David Majnemer's avatar
      [CodeGen] Rename EmitMemberPointer to EmitMemberFunctionPointer · e2be95b5
      David Majnemer authored
      llvm-svn: 240382
      e2be95b5
    • Justin Bogner's avatar
      [mips] Fix some UB by shifting before sign-extending · 6499b5f0
      Justin Bogner authored
      Avoid shifting a negative value by sign-extending after the shift.
      
      Fixes a couple of tests that were failing under ubsan.
      
      llvm-svn: 240381
      6499b5f0
    • Justin Bogner's avatar
      test: Move target dependent test in their own folder for c API test · 47ab1fa6
      Justin Bogner authored
      Dissasembly tests depends on target. The problem is that it disable
      all tests if all targets are not compiled. This moves things around in
      order to get target specific code in a target specific folder.
      
      Patch by Amaury Sechet. Thanks!
      
      llvm-svn: 240380
      47ab1fa6
    • Frederic Riss's avatar
      [Sanitizers] Pass the correct arch to the symbolizer for x86_64h · 66c868ce
      Frederic Riss authored
      I have no idea how to directly test that as it depends on a particular
      (micro-)architecure of the host processor.
      Combined with llvm's r240339 this should fix issues people might have
      be seeing intermitently on Darwin haswell machines (the symbolizer
      would use the wrong slice of the binary, thus potentially resolving
      to the wrong symbol).
      
      llvm-svn: 240379
      66c868ce
    • Weiming Zhao's avatar
      Fix PR13851: Preserve metadata for the unswitched branch · f1abad57
      Weiming Zhao authored
      This patch copies the metadata of the unswitched branch to the newly
      crreated branch in loop unswitch pass.
      
      llvm-svn: 240378
      f1abad57
    • Alexey Bataev's avatar
      [OPENMP] Do not emit references to original variables in 'private' clause. · aac108a3
      Alexey Bataev authored
      Currently if the variable is captured in captured region, capture record for this region stores reference to this variable for future use. But we don't need to provide the reference to the original variable if it was explicitly marked as private in the 'private' clause of the OpenMP construct, this variable is replaced by private copy.
      Differential Revision: http://reviews.llvm.org/D9550
      
      llvm-svn: 240377
      aac108a3
    • Douglas Katzman's avatar
      Eliminate "enumeration value not handled in switch" warnings · 9ad0ec29
      Douglas Katzman authored
      (Caused by r240370)
      
      llvm-svn: 240376
      9ad0ec29
    • Rafael Espindola's avatar
      Remove broken banner. · 2b713897
      Rafael Espindola authored
      Thanks to Filipe Cabecinhas for noticing.
      
      llvm-svn: 240375
      2b713897
    • Rafael Espindola's avatar
      Add a test for the previous commit. · 14522db7
      Rafael Espindola authored
      This shows how two symbols at the same address are handled.
      
      llvm-svn: 240374
      14522db7
    • Jaydeep Patil's avatar
      [LLDB][MIPS] MIPS32 branch emulation and single-stepping · c60c9452
      Jaydeep Patil authored
          
          SUMMARY:
          This patch implements
            1. Emulation of MIPS32 branch instructions
            2. Enable single-stepping for MIPS32 instructions
            3. Correction in emulation of MIPS64 branch instructions with delay slot
            4. Adjust breakpoint address when breakpoint is hit in a forbidden slot of compact branch instruction
          
          Reviewers: clayborg
          Subscribers: mohit.bhakkad, sagar, bhushan, lldb-commits, emaste, nitesh.jain
          Differential Revision: http://reviews.llvm.org/D10596
      
      llvm-svn: 240373
      c60c9452
    • Rafael Espindola's avatar
      Handle multiple symbols having the same address. · 49943652
      Rafael Espindola authored
      I will add an explicit test in a second, but this fixes the bots.
      
      llvm-svn: 240372
      49943652
    • Chaoren Lin's avatar
      Revert "Reduced packet counts to the remote GDB server where possible." · 7a306080
      Chaoren Lin authored
      This reverts commit 0cc0745ea9c68d7fdcadc9904cee3f13c96dae60.
      
      Due to breakage on Linux build bot:
      
      http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/3436
      
      llvm-svn: 240371
      7a306080
    • Douglas Katzman's avatar
      Change some if/else chains to 'switch' statements. NFC · 7e37afb7
      Douglas Katzman authored
      Differential Revision: http://reviews.llvm.org/D10612
      
      llvm-svn: 240370
      7e37afb7
    • David Majnemer's avatar
      [InstCombine] Optimize subtract of selects into a select of a sub · 726901b6
      David Majnemer authored
      This came up when examining some code generated by clang's IRGen for
      certain member pointers.
      
      llvm-svn: 240369
      726901b6
    • Rafael Espindola's avatar
      Fix tests when X86 is not enabled. · aeef0618
      Rafael Espindola authored
      llvm-svn: 240368
      aeef0618
    • Rafael Espindola's avatar
      Compute correct symbol sizes for MachO and COFF. · a4a4093e
      Rafael Espindola authored
      Before this would dump from the symbol start to the end of the section.
      
      llvm-svn: 240367
      a4a4093e
    • Rafael Espindola's avatar
      Extract an utility for computing symbol sizes on MachO and COFF. · b109c032
      Rafael Espindola authored
      I will add a second user in the next commit.
      
      llvm-svn: 240366
      b109c032
    • Matt Arsenault's avatar
      AMDGPU: Use getAsInteger instead of atoi · 0b554ed3
      Matt Arsenault authored
      llvm-svn: 240365
      0b554ed3
    • Sanjoy Das's avatar
      [FaultMaps] Move FaultMapParser to Object/ · 9d95716c
      Sanjoy Das authored
      Summary:
      That way llvm-objdump can rely on it without adding an extra dependency
      on CodeGen.
      
      This change duplicates the FaultKind enum and the code that serializes
      it to a string.  I could not figure out a way to get around this without
      adding a new dependency to Object
      
      Reviewers: rafael, ab
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D10619
      
      llvm-svn: 240364
      9d95716c
    • Sanjoy Das's avatar
      Fix a typo in a comment in FaultMaps.h. NFC. · 3eb434ac
      Sanjoy Das authored
      llvm-svn: 240363
      3eb434ac
    • NAKAMURA Takumi's avatar
      75b26206
    • Sanjay Patel's avatar
      [x86] generalize reassociation optimization in machine combiner to 2 instructions · e79b43a0
      Sanjay Patel authored
      Currently ( D10321, http://reviews.llvm.org/rL239486 ), we can use the machine combiner pass
      to reassociate the following sequence to reduce the critical path:
      
      A = ? op ?
      B = A op X
      C = B op Y
      -->
      A = ? op ?
      B = X op Y
      C = A op B
      
      'op' is currently limited to x86 AVX scalar FP adds (with fast-math on), but in theory, it could
      be any associative math/logic op (see TODO in code comment).
      
      This patch generalizes the pattern match to ignore the instruction that defines 'A'. So instead of
      a sequence of 3 adds, we now only need to find 2 dependent adds and decide if it's worth
      reassociating them.
      
      This generalization has a compile-time cost because we can now match more instruction sequences
      and we rely more heavily on the machine combiner to discard sequences where reassociation doesn't
      improve the critical path.
      
      For example, in the new test case:
      
      A = M div N
      B = A add X
      C = B add Y
      
      We'll match 2 reassociation patterns, but this transform doesn't reduce the critical path:
      
      A = M div N
      B = A add Y
      C = B add X
      
      We need the combiner to reject that pattern but select this:
      
      A = M div N
      B = X add Y
      C = B add A
      
      Differential Revision: http://reviews.llvm.org/D10460
      
      llvm-svn: 240361
      e79b43a0
    • Justin Bogner's avatar
      Re-apply "InstrProf: When reading, copy the data instead of taking a reference. NFC" · 3a7d44cb
      Justin Bogner authored
      This version fixes a missing include that MSVC noticed and
      clarifies the ownership of the counter buffer that's passed to
      InstrProfRecord.
      
      This restores r240206, which was reverted in r240208.
      
      Patch by Betul Buyukkurt.
      
      llvm-svn: 240360
      3a7d44cb
    • Justin Bogner's avatar
      InstrProf: Add a test for multiple copies of the same with different hashes · 09829f44
      Justin Bogner authored
      This functionality wasn't being tested.
      
      Patch by Betul Buyukkurt.
      
      llvm-svn: 240359
      09829f44
    • Pete Cooper's avatar
      Create Value.def helper. NFC. · 70a7f340
      Pete Cooper authored
      This is similar to Metadata.def and Instructions.def but for Value's.
      
      It will be used in upcoming commits to devirtualize the Value class.
      
      Reviewed by Duncan Exon Smith.
      
      llvm-svn: 240358
      70a7f340
    • Evgeniy Stepanov's avatar
      Fix PR23914. · 9e0d41ab
      Evgeniy Stepanov authored
      r226830 moved the declaration of Buf to a nested scope, resulting
      in a dangling reference (in StringRef Name), and a use-after-free.
      
      llvm-svn: 240357
      9e0d41ab
    • Alexey Samsonov's avatar
      [CMake] Respect the value of -mmacosx-version-min flag. · c05dd074
      Alexey Samsonov authored
      Make sure that sanitizer runtimes target OS X version provided in
      -mmacosx-version-min= flag. Enforce that it should be at least 10.7.
      
      llvm-svn: 240356
      c05dd074
    • Logan Chien's avatar
      Code cleanup: Remove std::move() around xvalue (NFC) · 9d5891fd
      Logan Chien authored
      Remove std::move() around xvalue so that copy elision is eligible.
      In case that copy elision is not appliable, the c++ standard also
      guarantees the move semantics on xvalue.  Thus, it is not necessary
      to wrap Args with std::move.
      
      This also silence a warning since r240345.
      
      llvm-svn: 240355
      9d5891fd
    • Greg Clayton's avatar
      Reduced packet counts to the remote GDB server where possible. · ffb2d44a
      Greg Clayton authored
      We have been working on reducing the packet count that is sent between LLDB and the debugserver on MacOSX and iOS. Our approach to this was to reduce the packets required when debugging multiple threads. We currently make one qThreadStopInfoXXXX call (where XXXX is the thread ID in hex) per thread except the thread that stopped with a stop reply packet. In order to implement multiple thread infos in a single reply, we need to use structured data, which means JSON. The new jThreadsInfo packet will attempt to retrieve all thread infos in a single packet. The data is very similar to the stop reply packets, but packaged in JSON and uses JSON arrays where applicable. The JSON output looks like:
      
      
      [
        { "tid":1580681,
          "metype":6,
          "medata":[2,0],
          "reason":"exception",
          "qaddr":140735118423168,
          "registers": {
            "0":"8000000000000000",
            "1":"0000000000000000",
            "2":"20fabf5fff7f0000",
            "3":"e8f8bf5fff7f0000",
            "4":"0100000000000000",
            "5":"d8f8bf5fff7f0000",
            "6":"b0f8bf5fff7f0000",
            "7":"20f4bf5fff7f0000",
            "8":"8000000000000000",
            "9":"61a8db78a61500db",
            "10":"3200000000000000",
            "11":"4602000000000000",
            "12":"0000000000000000",
            "13":"0000000000000000",
            "14":"0000000000000000",
            "15":"0000000000000000",
            "16":"960b000001000000",
            "17":"0202000000000000",
            "18":"2b00000000000000",
            "19":"0000000000000000",
            "20":"0000000000000000"},
          "memory":[
            {"address":140734799804592,"bytes":"c8f8bf5fff7f0000c9a59e8cff7f0000"},
            {"address":140734799804616,"bytes":"00000000000000000100000000000000"}
          ]
        }
      ]
      
      It contains an array of dicitionaries with all of the key value pairs that are normally in the stop reply packet. Including the expedited registers. Notice that is also contains expedited memory in the "memory" key. Any values in this memory will get included in a new L1 cache in lldb_private::Process where if a memory read request is made and that memory request fits into one of the L1 memory cache blocks, it will use that memory data. If a memory request fails in the L1 cache, it will fall back to the L2 cache which is the same block sized caching we were using before these changes. This allows a process to expedite memory that you are likely to use and it reduces packet count. On MacOSX with debugserver, we expedite the frame pointer backchain for a thread (up to 256 entries) by reading 2 pointers worth of bytes at the frame pointer (for the previous FP and PC), and follow the backchain. Most backtraces on MacOSX and iOS now don't require us to read any memory!
      
      We will try these packets out and if successful, we should port these to lldb-server in the near future. 
      
      <rdar://problem/21494354>
      
      llvm-svn: 240354
      ffb2d44a
    • Alexander Kornienko's avatar
    • Adam Nemet's avatar
      [LoopDist] Improve variable names and comments in LoopVersioning class, NFC · f530b329
      Adam Nemet authored
      As with the previous patch, the goal is to turn the class into a general
      loop-versioning class.  This patch removes any references to loop
      distribution.
      
      llvm-svn: 240352
      f530b329
    • Greg Clayton's avatar
      Fix a crasher on the MacOSX test suite for Objective C. · 4b995262
      Greg Clayton authored
      llvm-svn: 240351
      4b995262
Loading