1. Apr 04, 2014
  2. Apr 03, 2014
    • Tim Northover's avatar
      ARM: tell LLVM about zext properties of ldrexb/ldrexh · 01b4aa94
      Tim Northover authored
      Implementing this via ComputeMaskedBits has two advantages:
        + It actually works. DAGISel doesn't deal with the chains properly
          in the previous pattern-based solution, so they never trigger.
        + The information can be used in other DAG combines, as well as the
          trivial "get rid of truncs". For example if the trunc is in a
          different basic block.
      
      rdar://problem/16227836
      
      llvm-svn: 205540
      01b4aa94
    • Ed Maste's avatar
      Add explict dependencies on swig .i files for cmake builds · 0dcccf7b
      Ed Maste authored
      llvm.org/pr19316
      
      llvm-svn: 205539
      0dcccf7b
    • Daniel Sanders's avatar
      [mips] Add negative tests confirm that supported ISA's don't allow... · a934837e
      Daniel Sanders authored
      [mips] Add negative tests confirm that supported ISA's don't allow instructions added in later ISA's
      
      Summary:
      test/MC/Mips/<isa1>/invalid-<isa2>.s
          Test that <isa1> does not support <isa2>'s instructions.
      test/MC/Mips/<isa1>/invalid-<isa2>-xfail.s
          Things that should be invalid but currently aren't. Will XPASS if any
          become invalid.
      
      Reviewers: matheusalmeida
      
      Reviewed By: matheusalmeida
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D3262
      
      llvm-svn: 205538
      a934837e
    • Daniel Sanders's avatar
      [mips] Implement ehb, ssnop, and pause in assembler · 442f1a12
      Daniel Sanders authored
      Summary: Add negative tests for pause
      
      Reviewers: matheusalmeida
      
      Reviewed By: matheusalmeida
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D3246
      
      llvm-svn: 205537
      442f1a12
    • Logan Chien's avatar
      Code cleanup (re-indent) · 749763ea
      Logan Chien authored
      llvm-svn: 205536
      749763ea
    • Tim Northover's avatar
      ARM: skip cmpxchg failure barrier if ordering is monotonic. · 70450c59
      Tim Northover authored
      The terminal barrier of a cmpxchg expansion will be either Acquire or
      SequentiallyConsistent. In either case it can be skipped if the
      operation has Monotonic requirements on failure.
      
      rdar://problem/15996804
      
      llvm-svn: 205535
      70450c59
    • Alexey Samsonov's avatar
      [TSan] Fix a rare deadlock on multithreaded fork. · 425314a6
      Alexey Samsonov authored
      If a multi-threaded program calls fork(), TSan ignores all memory accesses
      in the child to prevent deadlocks in TSan runtime. This is OK, as child is
      probably going to call exec() as soon as possible. However, a rare deadlocks
      could be caused by ThreadIgnoreBegin() function itself.
      
      ThreadIgnoreBegin() remembers the current stack trace and puts it into the
      StackDepot to report a warning later if a thread exited with ignores enabled.
      Using StackDepotPut in a child process is dangerous: it locks a mutex on
      a slow path, which could be already locked in a parent process.
      
      The fix is simple: just don't put current stack traces to StackDepot in
      ThreadIgnoreBegin() and ThreadIgnoreSyncBegin() functions if we're
      running after a multithreaded fork. We will not report any
      "thread exited with ignores enabled" errors in this case anyway.
      
      Submitting this without a testcase, as I believe the standalone reproducer
      is pretty hard to construct.
      
      llvm-svn: 205534
      425314a6
    • Samuel Benzaquen's avatar
      Revert "Add support for named values in the parser." · 5548eadb
      Samuel Benzaquen authored
      This was submitted before it was ready.
      
      This reverts commit 62060a01e095cf35eb9ca42a333752d12714f35c.
      
      llvm-svn: 205533
      5548eadb
    • Zoran Jovanovic's avatar
      Implementation of 16-bit microMIPS instructions MFHI and MFLO. · cabf0f41
      Zoran Jovanovic authored
      Differential Revision: http://llvm-reviews.chandlerc.com/D3141
      
      llvm-svn: 205532
      cabf0f41
    • Alexey Samsonov's avatar
      [TSan] Fix a typo ThreadIgnoreSyncEnd. Found by inspection · b4525218
      Alexey Samsonov authored
      llvm-svn: 205531
      b4525218
    • Daniel Sanders's avatar
      [mips] Add initial (experimental) MIPS-IV support. · f7b32291
      Daniel Sanders authored
      Summary:
      Adds the 'mips4' processor and a simple test of the ELF e_flags.
      
      Patch by David Chisnall
      His work was sponsored by: DARPA, AFRL
      
      I made one small change to the testcase so that it uses
      mips64-unknown-linux instead of mips4-unknown-linux.
      
      This patch indirectly adds FeatureCondMov to FeatureMips64. This is ok
      because it's supposed to be there anyway and it turns out that
      FeatureCondMov is not a predicate of any instructions at the moment
      (this is a bug that hasn't been noticed because there are no targets
      without the conditional move instructions yet).
      
      CC: theraven
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D3244
      
      llvm-svn: 205530
      f7b32291
    • Eric Christopher's avatar
      Fix for PR 19261: · bfb38bad
      Eric Christopher authored
      llc doesn't generate nodes for unconditional fall-through branches for targets
      without FastISel implementation (X86 has it, but can be disabled by
      "-fast-isel=false") in SelectionDAGBuilder::visitBr().
      
      So for line 4 in the following testcase
      
      1: void foo(int i){
      2:   switch(i){
      3:   default:
      4:     break;
      5:   }
      6:   return;
      7: }
      
      there is no corresponding line in .debug_line section, and a debugger
      cannot set a breakpoint at line 4.
      
      Fix this by always emitting a branch when we're not optimizing and add a
      testcase to ensure that there's code on every line we'd want to break.
      
      Patch by Daniil Fukalov.
      
      llvm-svn: 205529
      bfb38bad
    • Zoran Jovanovic's avatar
      MicroMIPS specific little endian fixup data byte ordering. · 842f20ef
      Zoran Jovanovic authored
      Differential Revision: http://llvm-reviews.chandlerc.com/D3245
      
      llvm-svn: 205528
      842f20ef
    • Daniel Jasper's avatar
      clang-format: Prefer an additional line-break over hanging indent. · 5c33265c
      Daniel Jasper authored
      Don't allow the RHS of an operator to be split over multiple
      lines unless there is a line-break right after the operator.
      
      Before:
        if (aaaa && bbbbb || // break
                        cccc) {
        }
      
      After:
        if (aaaa &&
            bbbbb || // break
                cccc) {
        }
      
      In most cases, this seems to increase readability.
      
      llvm-svn: 205527
      5c33265c
    • Daniel Jasper's avatar
      x · 2b7556ec
      Daniel Jasper authored
      llvm-svn: 205526
      2b7556ec
    • Tim Northover's avatar
      ARM: expand atomic ldrex/strex loops in IR · c882eb07
      Tim Northover authored
      The previous situation where ATOMIC_LOAD_WHATEVER nodes were expanded
      at MachineInstr emission time had grown to be extremely large and
      involved, to account for the subtly different code needed for the
      various flavours (8/16/32/64 bit, cmpxchg/add/minmax).
      
      Moving this transformation into the IR clears up the code
      substantially, and makes future optimisations much easier:
      
      1. an atomicrmw followed by using the *new* value can be more
         efficient. As an IR pass, simple CSE could handle this
         efficiently.
      2. Making use of cmpxchg success/failure orderings only has to be done
         in one (simpler) place.
      3. The common "cmpxchg; did we store?" idiom can be exposed to
         optimisation.
      
      I intend to gradually improve this situation within the ARM backend
      and make sure there are no hidden issues before moving the code out
      into CodeGen to be shared with (at least ARM64/AArch64, though I think
      PPC & Mips could benefit too).
      
      llvm-svn: 205525
      c882eb07
    • Stepan Dyatkovskiy's avatar
      PR19320: · 6207a4da
      Stepan Dyatkovskiy authored
      The trouble as in ARMAsmParser, in ParseInstruction method. It assumes that ARM::R12 + 1 == ARM::SP.
      It is wrong, since ARM::<Register> codes are generated by tablegen and actually could be any random numbers.
      
      llvm-svn: 205524
      6207a4da