Skip to content
  1. Mar 26, 2015
    • Sanjoy Das's avatar
      [ADT][CMake][AutoConf] Fail-fast iterators for DenseMap · 8ce6499b
      Sanjoy Das authored
      Summary:
      This patch is an attempt at making `DenseMapIterator`s "fail-fast".
      Fail-fast iterators that have been invalidated due to insertion into
      the host `DenseMap` deterministically trip an assert (in debug mode)
      on access, instead of non-deterministically hitting memory corruption
      issues.
      
      Enabling fail-fast iterators breaks the LLVM C++ ABI, so they are
      predicated on `LLVM_ENABLE_ABI_BREAKING_CHECKS`.
      `LLVM_ENABLE_ABI_BREAKING_CHECKS` by default flips with
      `LLVM_ENABLE_ASSERTS`, but can be clamped to ON or OFF using the CMake /
      autoconf build system.
      
      Reviewers: chandlerc, dexonsmith, rnk, zturner
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8351
      
      llvm-svn: 233310
      8ce6499b
    • Justin Bogner's avatar
      [ARM] Fix some non-portable shell syntax in r233301's tests · 54dd7df1
      Justin Bogner authored
      The "|&" operator isn't POSIX, so it can fail depending on the host's
      default shell. Avoid it.
      
      There were also a couple of places that did "2>1", but this creates a
      file called "1". They clearly meant "2>&1".
      
      llvm-svn: 233309
      54dd7df1
    • Zachary Turner's avatar
      Fix the remaining two test failures caused by re-ordering of teardown. · 072964dc
      Zachary Turner authored
      Previously we were using teardown hooks in these two instances to
      shutdown processes.  TestBase already deletes all targets in its
      own teardown, which will kill processes, so these steps weren't
      necessary.
      
      llvm-svn: 233308
      072964dc
    • Paul Robinson's avatar
      Ignore compile_commands.json only at the root of the tree. · d8587b8b
      Paul Robinson authored
      Can avoid a problem if tools/clang/tools/extra is in the tree.
      
      Patch by Douglas Yung!
      
      llvm-svn: 233307
      d8587b8b
    • Zachary Turner's avatar
      Fix test failures caused by order of initialization. · 9581204c
      Zachary Turner authored
      tear down hooks run as part of Base.tearDown().  Some of these
      hooks rely on accessing the debugger instance.  So although it
      looks awkward, we need to call "del self.dbg" after calling
      Base.tearDown().
      
      llvm-svn: 233306
      9581204c
    • Andrew Kaylor's avatar
      Supress MSVC padding warning in alignment test · f8fea095
      Andrew Kaylor authored
      llvm-svn: 233305
      f8fea095
    • Daniel Jasper's avatar
      clang-format: Force line break in trailing calls after multline exprs. · 05cd9292
      Daniel Jasper authored
      Before:
        aaaaaaaa(aaaaaaaaaa,
                 bbbbbbbbbb).a();
      
      After:
        aaaaaaaa(aaaaaaaaaa,
                 bbbbbbbbbb)
            .a();
      
      llvm-svn: 233304
      05cd9292
    • Renato Golin's avatar
      Adds an option to disable ARM ld/st optim pass · 4c871396
      Renato Golin authored
      Enabled by default, but it's useful when debugging with llc.
      
      Patch by Ranjeet Singh.
      
      llvm-svn: 233303
      4c871396
    • Duncan P. N. Exon Smith's avatar
      Reapply "Linker: Drop function pointers for overridden subprograms" · c947892d
      Duncan P. N. Exon Smith authored
      This reverts commit r233254, effectively reapplying r233164 (and its
      successors), with an additional testcase for when subprograms match
      exactly.  This fixes PR22792 (again).
      
      I'm using the same approach, but I've moved up the call to
      `stripReplacedSubprograms()`.  The function pointers need to be dropped
      before mapping any metadata from the source module, or else this can
      drop the function from new subprograms that have merged (via Metadata
      uniquing) with the old ones.  Dropping the pointers first prevents them
      from merging.
      
      **** The original commit message follows. ****
      
      Linker: Drop function pointers for overridden subprograms
      
      Instead of dropping subprograms that have been overridden, just set
      their function pointers to `nullptr`.  This is a minor adjustment to the
      stop-gap fix for PR21910 committed in r224487, and fixes the crasher
      from PR22792.
      
      The problem that r224487 put a band-aid on: how do we find the canonical
      subprogram for a `Function`?  Since the backend currently relies on
      `DebugInfoFinder` (which does a naive in-order traversal of compile
      units and picks the first subprogram) for this, r224487 tried dropping
      non-canonical subprograms.
      
      Dropping subprograms fails because the backend *also* builds up a map
      from subprogram to compile unit (`DwarfDebug::SPMap`) based on the
      subprogram lists.  A missing subprogram causes segfaults later when an
      inlined reference (such as in this testcase) is created.
      
      Instead, just drop the `Function` pointer to `nullptr`, which nicely
      mirrors what happens when an already-inlined `Function` is optimized
      out.  We can't really be sure that it's the same definition anyway, as
      the testcase demonstrates.
      
      This still isn't completely satisfactory.  Two flaws at least that I can
      think of:
      
        - I still haven't found a straightforward way to make this symmetric
          in the IR.  (Interestingly, the DWARF output is already symmetric,
          and I've tested for that to be sure we don't regress.)
        - Using `DebugInfoFinder` to find the canonical subprogram for a
          function is kind of crazy.  We should just attach metadata to the
          function, like this:
      
              define weak i32 @foo(i32, i32) !dbg !MDSubprogram(...) {
      
      llvm-svn: 233302
      c947892d
    • Vladimir Sukharev's avatar
      [ARM] Add v8.1a "Rounding Double Multiply Add/Subtract" extension · 4b18c727
      Vladimir Sukharev authored
      Reviewers: t.p.northover
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8503
      
      llvm-svn: 233301
      4b18c727
    • Vladimir Sukharev's avatar
      [AArch64] Rename Pairs to Mappings in AArch64NamedImmMapper · edc71abe
      Vladimir Sukharev authored
      Third element is to be added soon to "struct AArch64NamedImmMapper::Mapping". So its instances are renamed from ...Pairs to ...Mappings
      
      Reviewers: jmolloy
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8582
      
      llvm-svn: 233300
      edc71abe
    • Ed Schouten's avatar
      Enable -ffunction-sections and -fdata-sections for CloudABI by default. · 6e57615a
      Ed Schouten authored
      Unlike most of the other platforms supported by Clang, CloudABI only
      supports static linkage, for the reason that global filesystem access is
      prohibited. Functions provided by dlfcn.h are not present. As we know
      that applications will not try to do any symbol lookups at run-time, we
      can garbage collect unused code quite aggressively. Because of this, it
      makes sense to enable -ffunction-sections and -fdata-sections by
      default.
      
      Object files will be a bit larger than usual, but the resulting binary
      will not be affected, as the sections are merged again. However, when
      --gc-sections is used, the linker is able to remove unused code far more
      more aggressively. It also has the advantage that transitive library
      dependencies only need to be provided to the linker in case that
      functionality is actually used.
      
      Differential Revision:	http://reviews.llvm.org/D8635
      Reviewed by:	echristo
      
      llvm-svn: 233299
      6e57615a
    • Stephane Sezer's avatar
      Add an assertion for frame[0] being valid in CommandObjectThread.cpp. · ca05ae2b
      Stephane Sezer authored
      Summary:
      This should always be true but sometimes is not, during platform bring
      up. As recommended by Jim Ingham, an assertion should be enough here to
      help.
      This addresses post commit comments in http://reviews.llvm.org/D8554.
      
      Test Plan: Run unit tests.
      
      Reviewers: jasonmolenda, emaste, jingham, clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D8574
      
      llvm-svn: 233298
      ca05ae2b
    • Vladimir Sukharev's avatar
      [AArch64] Move initializations of AArch64NamedImmMapper out of void AArch64Operand::print(...) · 017d10bb
      Vladimir Sukharev authored
      class AArch64NamedImmMapper is to become dependent of SubTargetFeatures, while class AArch64Operand don't have access to the latter. 
      
      So, AArch64NamedImmMapper constructor invocations are refactored away from methods of AArch64Operand.
      
      Reviewers: jmolloy
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8579
      
      llvm-svn: 233297
      017d10bb
    • Sanjoy Das's avatar
      [SCEV] Revert bailout added in r75511. · 14598830
      Sanjoy Das authored
      Summary:
      With the introduction of MarkPendingLoopPredicates in r157092, I don't
      think the bailout is needed anymore.
      
      Reviewers: atrick, nicholas
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8624
      
      llvm-svn: 233296
      14598830
    • Alexey Samsonov's avatar
      0781e98c
    • Sanjay Patel's avatar
      revert inadvertent change · 5b305d2d
      Sanjay Patel authored
      llvm-svn: 233294
      5b305d2d
    • Sanjay Patel's avatar
      comment cleanup; NFC · 4fa4a886
      Sanjay Patel authored
      llvm-svn: 233293
      4fa4a886
    • Benjamin Kramer's avatar
      Remove outdated README-SSE.txt entries. · 3d0031e0
      Benjamin Kramer authored
      llvm-svn: 233292
      3d0031e0
    • Benjamin Kramer's avatar
      InstCombine: fold (A << C) == (B << C) --> ((A^B) & (~0U >> C)) == 0 · 7fa8c430
      Benjamin Kramer authored
      Anding and comparing with zero can be done in a single instruction on
      most archs so this is a bit cheaper.
      
      llvm-svn: 233291
      7fa8c430
    • Vladimir Sukharev's avatar
      [AArch64, ARM] Add v8.1a architecture and generic cpu · c632cda8
      Vladimir Sukharev authored
      New architecture and cpu added, following http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development
      
      Reviewers: t.p.northover
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8505
      
      llvm-svn: 233290
      c632cda8
    • Sanjay Patel's avatar
      Use SDValue bool checks; NFC intended · cdf1e2e3
      Sanjay Patel authored
      llvm-svn: 233289
      cdf1e2e3
    • Sanjay Patel's avatar
      fix indent; NFC · d95dd9e5
      Sanjay Patel authored
      llvm-svn: 233288
      d95dd9e5
    • Adrian McCarthy's avatar
      Fixing typo in tutorial as test commit. · c7fd5ff7
      Adrian McCarthy authored
      llvm-svn: 233287
      c7fd5ff7
    • Jingyue Wu's avatar
      [SLSR] handle candidate form &B[i * S] · 177a8157
      Jingyue Wu authored
      Summary:
      This patch enhances SLSR to handle another candidate form &B[i * S]. If
      we found two candidates
      
      S1: X = &B[i * S]
      S2: Y = &B[i' * S]
      
      and S1 dominates S2, we can replace S2 with
      
      Y = &X[(i' - i) * S]
      
      Test Plan:
      slsr-gep.ll
      X86/no-slsr.ll: verify that we do not run SLSR on GEPs that already fit into
      an addressing mode
      
      Reviewers: eliben, atrick, meheff, hfinkel
      
      Reviewed By: hfinkel
      
      Subscribers: sanjoy, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D7459
      
      llvm-svn: 233286
      177a8157
    • Eric Fiselier's avatar
      Add tests for library version of is_convertible · 09b80854
      Eric Fiselier authored
      llvm-svn: 233285
      09b80854
    • Zachary Turner's avatar
      Tear down tests in reverse order from setting them up. · 65fe1eb5
      Zachary Turner authored
      Tests derive from TestBase, which derives from Base.  In the
      test setUp() methods, we always call TestBase.setUp() first and
      then call implementation-specific setup.  Tear down needs to do
      the reverse.
      
      This was causing over 20 failures on Windows, and was the culprit
      behind about 80% of the files not being cleaned up after test run.
      TestBase.tearDown() is responsible for deleting all targets created
      during the test run and without this step, on Windows files will
      be locked and cannot be deleted.  But TestBase.tearDown() was
      calling Base.tearDown() before its own cleanup (i.e. deleting the
      targets) and in some cases one of the teardown hooks would be to
      call make clean.  So make clean would be run before the targets
      had been deleted, and fail to remove the files, and subsequently
      result in a failed test as well.
      
      llvm-svn: 233284
      65fe1eb5
    • Zachary Turner's avatar
      Add a --all command option to "target delete". · aa4dabfd
      Zachary Turner authored
      llvm-svn: 233283
      aa4dabfd
    • Aaron Ballman's avatar
      Sometimes report_fatal_error is called when there is not a handler function... · 50af8d46
      Aaron Ballman authored
      Sometimes report_fatal_error is called when there is not a handler function used to fail gracefully. In that case, RunInterruptHandlers is called, which attempts to enter a critical section object. Ensure that the critical section is properly initialized so that this code functions properly, and tools like clang-tidy do not crash in Debug builds.
      
      llvm-svn: 233282
      50af8d46
    • Ed Maste's avatar
      Add FreeBSD/arm64 files to xcode build · 27b4ed09
      Ed Maste authored
      llvm-svn: 233281
      27b4ed09
    • Leny Kholodov's avatar
      [ARM] Fix PLT IFUNC symbol names in Release build · ab57d42d
      Leny Kholodov authored
      The fix is for r233277.
      This makes tests work.
      
      llvm-svn: 233280
      ab57d42d
    • Ilia K's avatar
      Fix RegisterCommandsTestCase and HelloWorldTestCase tests which hang on OS X... · 841e30ae
      Ilia K authored
      Fix RegisterCommandsTestCase and HelloWorldTestCase tests which hang on OS X after TestBase.tearDown()
      
      llvm-svn: 233279
      841e30ae
    • Ilia K's avatar
      Fix infinite loop when ^D was pressed (MI) · 5704347c
      Ilia K authored
      llvm-svn: 233278
      5704347c
    • Leny Kholodov's avatar
      [ARM] Implementation of PLT: handling of IFUNC calls (gnu_indirect_function) · 28074d6e
      Leny Kholodov authored
      This diff includes implementation of linking calls to ifunc functions.
      It provides ifunc entries in PLT and corresponding relocations (R_ARM_ALU_PC_G0_NC,
      R_ARM_ALU_PC_G1_NC, R_ARM_LDR_PC_G2 for link-time and R_ARM_IRELATIVE for run-time).
      
      Differential Revision: http://reviews.llvm.org/D7833
      
      llvm-svn: 233277
      28074d6e
    • Daniel Jasper's avatar
      clang-format: Fix merging of _T macros. · e99c72fc
      Daniel Jasper authored
      NewlinesBefore and HasUnescapedNewline were not properly propagated
      leading to llvm.org/PR23032.
      
      llvm-svn: 233276
      e99c72fc
    • Ed Schouten's avatar
      Make the presence of stdin and stdout optional. · f4ac884f
      Ed Schouten authored
      The idea behind Nuxi CloudABI is that it is targeted at (but not limited to)
      running networked services in a sandboxed environment. The model behind stdin,
      stdout and stderr is strongly focused on interactive tools in a command shell.
      CloudABI does not support the notion of stdin and stdout, as 'standard
      input/output' does not apply to services. The concept of stderr does makes
      sense though, as services do need some mechanism to log error messages in a
      uniform way.
      
      This patch extends libc++ in such a way that std::cin and std::cout and the
      associated <cstdio>/<cwchar> functions can be disabled through the flags
      _LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time
      it attempts to clean up src/iostream.cpp a bit. Instead of using a single array
      of mbstate_t objects and hardcoding the array indices, it creates separate
      objects that declared next to the iostream objects and their buffers. The code
      is also restructured by interleaving the construction and setup of c* and wc*
      objects. That way it is more obvious that this is done identically.
      
      The c* and wc* objects already have separate unit tests. Make use of this fact
      by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in
      both directions. If stdin or stdout is disabled, these tests will therefore
      test for the absence of c* and wc*.
      
      Differential Revision:	http://reviews.llvm.org/D8340
      
      llvm-svn: 233275
      f4ac884f
    • Ed Schouten's avatar
      Remove the state_types array. · 4d514293
      Ed Schouten authored
      If we want to add support for making std::cin and std::cout optional, it
      is impractical to have all of the mbstate_t objects in one array. This
      would mean that if std::cin and std::cout are omitted, the state_types
      array is only used partially.
      
      Solve this by using separate global variables. These are placed right
      next to the iostream object and the buffer, meaning we can easily #ifdef
      them away.
      
      Differential Revision:	http://reviews.llvm.org/D8359
      
      llvm-svn: 233274
      4d514293
    • Ed Maste's avatar
      Handle FreeBSD/arm64 core files · 7754d21a
      Ed Maste authored
      This is derived from FreeBSD/mips64 and Darwin and Linux arm64 support.
      
      Differential Revision:	http://reviews.llvm.org/D7835
      
      llvm-svn: 233273
      7754d21a
    • Ilia K's avatar
      Destroy the attached process in tearDown() to fix ProcessAttachTestCase tests on OS X · c235b168
      Ilia K authored
      This patch fixes the following:
      ```
      1: test_attach_to_process_by_id_with_dsym (TestProcessAttach.ProcessAttachTestCase)
         Test attach by process id ... ok
      2: test_attach_to_process_by_id_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
         Test attach by process id ... ok
      3: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase)
         Test attach by process name ... FAILURE
      4: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
         Test attach by process name ... FAILURE
      
      ======================================================================
      FAIL: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase)
         Test attach by process name
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 462, in wrapper
          return func(self, *args, **kwargs)
        File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 35, in test_attach_to_process_by_name_with_dsym
          self.process_attach_by_name()
        File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name
          self.runCmd("process attach -n s" + exe_name)
        File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd
          msg if msg else CMD_MSG(cmd))
      AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully
      Config=x86_64-clang
      ======================================================================
      FAIL: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
         Test attach by process name
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
          return func(self, *args, **kwargs)
        File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 41, in test_attach_to_process_by_name_with_dwarf
          self.process_attach_by_name()
        File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name
          self.runCmd("process attach -n s" + exe_name)
        File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd
          msg if msg else CMD_MSG(cmd))
      AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully
      Config=x86_64-clang
      ----------------------------------------------------------------------
      ```
      
      Failure-x86_64-clang-TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_name_with_dsym.log:
      ```
      [...]
      runCmd: process attach -n ProcessAttach
      runCmd failed!
      error: attach failed: more than one process named ProcessAttach:
      PID    PARENT USER       TRIPLE                   ARGUMENTS
      ====== ====== ========== ======================== ============================
      43752  43680  IliaK      x86_64-apple-macosx      /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach
      43663  1      IliaK      x86_64-apple-macosx      /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach
      [...]
      ```
      
      llvm-svn: 233272
      c235b168
    • Toma Tabacu's avatar
      [mips] Move the setATReg definition inside the MipsAssemblerOptions class. NFC. · 92dbbf17
      Toma Tabacu authored
      Summary: This groups all of the MipsAssemblerOptions functionality together, making it more reader-friendly.
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8445
      
      llvm-svn: 233271
      92dbbf17
Loading