1. Nov 06, 2015
    • Dan Gohman's avatar
      [WebAssembly] Rename Immediate instructions to Const. · da7f428a
      Dan Gohman authored
      This more closely reflects the naming convention in the spec.
      
      llvm-svn: 252204
      da7f428a
    • Dan Gohman's avatar
      [WebAssembly] Add AsmString strings for most instructions. · af29bd4f
      Dan Gohman authored
      Mangling type information into MachineInstr opcode names was a temporary
      measure, and it's starting to get hairy. At the same time, the MC instruction
      printer wants to use AsmString strings for printing. This patch takes the
      first step, starting the process of adding AsmStrings for instructions.
      
      llvm-svn: 252203
      af29bd4f
    • Dan Gohman's avatar
      [WebAssembly] Update wasm builtin functions to match spec changes. · d7ffb919
      Dan Gohman authored
      The page_size operator has been removed from the spec, and the resize_memory
      operator has been changed to grow_memory.
      
      llvm-svn: 252202
      d7ffb919
    • Dan Gohman's avatar
      [WebAssembly] Update wasm builtin functions to match spec changes. · 24f0a08c
      Dan Gohman authored
      The page_size operator has been removed from the spec, and the resize_memory
      operator has been changed to grow_memory.
      
      llvm-svn: 252201
      24f0a08c
    • Tobias Grosser's avatar
      ScopInfo: Allocate globally unique memory access identifiers · f1bfd752
      Tobias Grosser authored
      Before this commit memory reference identifiers have only been unique per
      basic block, but not per (non-affine) ScopStmt. This commit now uses the
      MemoryAccess base pointer to uniquely identify each Memory access.
      
      llvm-svn: 252200
      f1bfd752
    • Marshall Clow's avatar
      Mark LWG issue #2234. We already do this; no code change needed · 6a11b039
      Marshall Clow authored
      llvm-svn: 252199
      6a11b039
    • Sean Callanan's avatar
      Better validation when we think a directory might be Xcode.app. · a95b131c
      Sean Callanan authored
      LLDB could otherwise get confused if it is (for example) in a
      root that is meant to install into an Xcode.app but hasn't
      been installed yet.  That way Xcode can fall back to the real
      Xcode.app rather than trying to look for resources inside the
      root.
      
      llvm-svn: 252198
      a95b131c
    • Tobias Grosser's avatar
      RunTimeDebugBuilder: Allocate memory _after_ knowing how much is needed · 4bf262a0
      Tobias Grosser authored
      This fixes a memory corruption issue, where we accessed more memory than
      actually allocated.
      
      llvm-svn: 252197
      4bf262a0
    • Sanjay Patel's avatar
      replace MachineCombinerPattern namespace and enum with enum class; NFCI · 387e66e7
      Sanjay Patel authored
      Also, remove an enum hack where enum values were used as indexes into an array.
      
      We may want to make this a real class to allow pattern-based queries/customization (D13417).
      
      llvm-svn: 252196
      387e66e7
    • Marshall Clow's avatar
      Implement P0092R1 for C++1z · 2cd0d6d6
      Marshall Clow authored
      llvm-svn: 252195
      2cd0d6d6
    • Dan Gohman's avatar
      [WebAssembly] Add WebAssemblyMCInstLower.cpp. · e9361d58
      Dan Gohman authored
      This isn't used yet; it's just a start towards eventually using MC to
      do instruction printing, and eventually binary encoding.
      
      llvm-svn: 252194
      e9361d58
    • Kevin Enderby's avatar
      These are the matching changes needed to the lld project for the changes to llvm · 35dfc95e
      Kevin Enderby authored
      in r252192 that changed the Archive and Child interfaces in libObject. These include
      Rafael Espindola’s many suggested updates.
      
      llvm-svn: 252193
      35dfc95e
    • Kevin Enderby's avatar
      Reapply r250906 with many suggested updates from Rafael Espindola. · 7a96942a
      Kevin Enderby authored
      The needed lld matching changes to be submitted immediately next,
      but this revision will cause lld failures with this alone which is expected.
      
      This removes the eating of the error in Archive::Child::getSize() when the characters
      in the size field in the archive header for the member is not a number.  To do this we
      have all of the needed methods return ErrorOr to push them up until we get out of lib.
      Then the tools and can handle the error in whatever way is appropriate for that tool.
      
      So the solution is to plumb all the ErrorOr stuff through everything that touches archives.
      This include its iterators as one can create an Archive object but the first or any other
      Child object may fail to be created due to a bad size field in its header.
      
      Thanks to Lang Hames on the changes making child_iterator contain an
      ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add
      operator overloading for * and -> .
      
      We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash”
      and using report_fatal_error() to move the error checking will cause the program to
      stop, neither of which are really correct in library code. There are still some uses of
      these that should be cleaned up in this library code for other than the size field.
      
      The test cases use archives with text files so one can see the non-digit character,
      in this case a ‘%’, in the size field.
      
      These changes will require corresponding changes to the lld project.  That will be
      committed immediately after this change.  But this revision will cause lld failures
      with this alone which is expected.
      
      llvm-svn: 252192
      7a96942a
    • Zachary Turner's avatar
      Python 3 - Turn on absolute imports, and fix existing imports. · c1b7cd72
      Zachary Turner authored
      Absolute imports were introduced in Python 2.5 as a feature
      (e.g. from __future__ import absolute_import), and made default
      in Python 3.
      
      When absolute imports are enabled, the import system changes in
      a couple of ways:
      
      1) The `import foo` syntax will *only* search sys.path.  If `foo`
         isn't in sys.path, it won't be found.  Period.  Without absolute
         imports, the import system will also search the same directory
         that the importing file resides in, so that you can easily
         import from the same folder.
      
      2) From inside a package, you can use a dot syntax to refer to higher
         levels of the current package.  For example, if you are in the
         package lldbsuite.test.utility, then ..foo refers to
         lldbsuite.test.foo.  You can use this notation with the
         `from X import Y` syntax to write intra-package references.  For
         example, using the previous locationa s a starting point, writing
         `from ..support import seven` would import lldbsuite.support.seven
      
      Since this is now the default behavior in Python 3, this means that
      importing from the same directory with `import foo` *no longer works*.
      As a result, the only way to have portable code is to force absolute
      imports for all versions of Python.
      
      See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more
      information about absolute and relative imports.
      
      Differential Revision: http://reviews.llvm.org/D14342
      Reviewed By: Todd Fiala
      
      llvm-svn: 252191
      c1b7cd72
    • Zachary Turner's avatar
      Fix build on platforms that don't have dlfcn.h · 185a7aad
      Zachary Turner authored
      llvm-svn: 252190
      185a7aad
    • Zachary Turner's avatar
      Python 3 - Fix usage of `unicode` in unittest2. · 71d468be
      Zachary Turner authored
      llvm-svn: 252189
      71d468be
    • Jim Ingham's avatar
      Add a comment explaining TypeImpl. · 56584698
      Jim Ingham authored
      llvm-svn: 252188
      56584698
    • John McCall's avatar
      fbe5ed78
    • Davide Italiano's avatar
      [SimplifyLibCalls] Use hasFloatVersion(). NFCI. · a345877c
      Davide Italiano authored
      llvm-svn: 252186
      a345877c
    • Devin Coughlin's avatar
      [analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegions · e949add6
      Devin Coughlin authored
      Update RegionStoreManager::getBinding() to return UnknownVal when trying to get
      the binding for a BlockDataRegion. Previously, getBinding() would try to cast the
      BlockDataRegion to a TypedValueRegion and crash. This happened when a block
      was passed as a parameter to an inlined function for which
      StackHintGeneratorForSymbol::getMessage() tried to generate a stack hint message.
      
      rdar://problem/21291971
      
      llvm-svn: 252185
      e949add6
    • Jim Ingham's avatar
      Remove Copy and Paste error in a comment. · 6192d1c0
      Jim Ingham authored
      llvm-svn: 252184
      6192d1c0
    • Chaoren Lin's avatar
      Use lldb::pid_t instead of pid_t. · edd0e263
      Chaoren Lin authored
      Reviewers: granata.enrico
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D14388
      
      llvm-svn: 252183
      edd0e263
    • Chaoren Lin's avatar
      Revert "Do not build any of the simulator material on non-Darwin" · 803cf14e
      Chaoren Lin authored
      This breaks the cmake build on all non-darwin platforms.
      
      This reverts commit ff6cc332dd6654620e3408d06f8f49a0c9b3cd41.
      
      rL252179
      
      llvm-svn: 252182
      803cf14e
    • Zachary Turner's avatar
      Python 3 - Apply 2to3 `filter` fixer to unittest2. · cc8aa4f6
      Zachary Turner authored
      llvm-svn: 252181
      cc8aa4f6
    • Sergey Dmitrouk's avatar
      [compiler-rt][aarch64] New tests for 128-bit floating-point builtins, fixes of tests and __fixuint · 195f3a15
      Sergey Dmitrouk authored
      Summary:
      The following tests for 128-bit floating-point type behaved in a strange way, thought it were bugs, but seem to be mistakes in tests:
      
       * `fixtfsi` test checked for `0x80000001` as a value returned for number less than can be represented, while `LONG_MIN` should be returned on saturation;
       * `fixunstfdi` wasn't enabled for AArch64, only for PPC, but there is nothing PPC specific in that test;
       * `multf3` tried to underflow multiplication by producing result with 16383 exponent, while there are still 112 bits of fraction plus implicit bit, so resultant exponent should be 16497.
      
      Tests for some other builtins didn't exist:
      
       * `fixtfdi`
       * `fixtfti`
       * `fixunstfti`
      
      They were made by copying similar files and adjusting for wider types and adding/removing some reasonable/extra checks.
      
      Also `__fixuint` seems to have off by one error, updated tests to catch this case.
      
      Reviewers: rengolin, zatrazz, howard.hinnant, t.p.northover, jmolloy, enefaim
      
      Subscribers: aemerson, llvm-commits, rengolin
      
      Differential Revision: http://reviews.llvm.org/D14187
      
      llvm-svn: 252180
      195f3a15
    • Enrico Granata's avatar
      Do not build any of the simulator material on non-Darwin · daf1c8bf
      Enrico Granata authored
      llvm-svn: 252179
      daf1c8bf
    • Rui Ueyama's avatar
      Remove redundant namespace specifiers. · 7f20fb90
      Rui Ueyama authored
      llvm-svn: 252178
      7f20fb90
    • Oleg Ranevskyy's avatar
      [DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268. · 057c5a6b
      Oleg Ranevskyy authored
      Summary:
      This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a couple of issues with it.
      
      D11268 is quite old and has merge conflicts against the current trunk.
      This request 
       - rebases D11268 onto the new trunk;
       - resolves the merge conflicts;
       - fixes the prologue_end tests, which do not pass due to the subprogram definitions not marked as distinct.
      
      Reviewers: echristo, rengolin, kubabrecka
      
      Subscribers: aemerson, rengolin, jyknight, dsanders, llvm-commits, asl
      
      Differential Revision: http://reviews.llvm.org/D14338
      
      llvm-svn: 252177
      057c5a6b
    • Petar Jovanovic's avatar
      Add cfi instr for CFA calculation when movpc is expanded to call and pop · 99fba3c1
      Petar Jovanovic authored
      This fixes the issue of wrong CFA calculation in the following case:
      
      0x08048400 <+0>:	push   %ebx
      0x08048401 <+1>:	sub    $0x8,%esp
      0x08048404 <+4>:	**call   0x8048409 <test+9>**
      0x08048409 <+9>:	**pop    %eax**
      0x0804840a <+10>:	add    $0x1bf7,%eax
      0x08048410 <+16>:	mov    %eax,%ebx
      0x08048412 <+18>:	call   0x80483f0 <bar>
      0x08048417 <+23>:	add    $0x8,%esp
      0x0804841a <+26>:	pop    %ebx
      0x0804841b <+27>:	ret
      
      The highlighted instructions are a product of movpc instruction. The call
      instruction changes the stack pointer, and pop instruction restores its
      value. However, the rule for computing CFA is not updated and is wrong on
      the pop instruction. So, e.g. backtrace in gdb does not work when on the pop
      instruction. This adds cfi instructions for both call and pop instructions.
      
      cfi_adjust_cfa_offset** instruction is used with the appropriate offset for
      setting the rules to calculate CFA correctly.
      
      Patch by Violeta Vukobrat.
      
      Differential Revision: http://reviews.llvm.org/D14021
      
      llvm-svn: 252176
      99fba3c1
    • Alexandros Lamprineas's avatar
      [ARM] Clang gives unintended warning message for 'mthumb' + M-profiles: · f6ecf963
      Alexandros Lamprineas authored
      $ clang --target=armv7m-none-eabi -mthumb -march=armv7-m -c test.c
      clang-3.8: warning: argument unused during compilation: '-mthumb'
      
      Differential Revision: http://reviews.llvm.org/D14384
      
      llvm-svn: 252175
      f6ecf963
    • Derek Schuff's avatar
      [WebAssembly] Rename ior operator to or to match the spec · 8a76b04a
      Derek Schuff authored
      Summary: The spec uses "or" for inclusive-or and "xor" for exclusive-or
      
      Reviewers: sunfish
      
      Subscribers: jfb, llvm-commits, dschuff
      
      Differential Revision: http://reviews.llvm.org/D14362
      
      llvm-svn: 252174
      8a76b04a
    • Jonathan Peyton's avatar
      Improve OMPT initialization code · 95246e7d
      Jonathan Peyton authored
      Use of #ifdef OMPT_DEBUG was causing messages to be generated under normal
      operation when the OpenMP library was compiled with KMP_DEBUG enabled.
      Elsewhere, KMP_DEBUG evaluates assertions, but never produces messages during
      normal operation. To avoid this inconsistency, set OMPT_DEBUG using a cmake
      variable LIBOMP_OMPT_DEBUG.
      
      While I was editing the associated ompt-specific.h and ompt-general.c files,
      make the spacing and comments consistent.
      
      Patch by John Mellor-Crummey
      
      Differential Revision: http://reviews.llvm.org/D14355
      
      llvm-svn: 252173
      95246e7d
    • Michael Kruse's avatar
      Use per-BB value maps for non-exit BBs · 27149cf3
      Michael Kruse authored
      For generating scalar writes of non-affine subregions, all except phi
      writes are generated in the exit block. The phi writes are generated in
      the incoming block for which we errornously used the same BBMap. This
      can conflict if a value for one block is synthesized, and then reused
      for another block which is not dominated by the first block. This is
      fixed by using block-specific BBMaps for phi writes.
      
      llvm-svn: 252172
      27149cf3
  2. Nov 05, 2015