Skip to content
  1. Jul 25, 2014
    • Hal Finkel's avatar
      Add code owner of scoped-noalias metadata · df14364f
      Hal Finkel authored
      Add myself as the code owner for the scoped-noalias metadata I've developed.
      
      llvm-svn: 213950
      df14364f
    • Hal Finkel's avatar
      Convert noalias parameter attributes into noalias metadata during inlining · ff0bcb60
      Hal Finkel authored
      This functionality is currently turned off by default.
      
      Part of the motivation for introducing scoped-noalias metadata is to enable the
      preservation of noalias parameter attribute information after inlining.
      Sometimes this can be inferred from the code in the caller after inlining, but
      often we simply lose valuable information.
      
      The overall process if fairly simple:
       1. Create a new unqiue scope domain.
       2. For each (used) noalias parameter, create a new alias scope.
       3. For each pointer, collect the underlying objects. Add a noalias scope for
          each noalias parameter from which we're not derived (and has not been
          captured prior to that point).
       4. Add an alias.scope for each noalias parameter from which we might be
          derived (or has been captured before that point).
      
      Note that the capture checks apply only if one of the underlying objects is not
      an identified function-local object.
      
      llvm-svn: 213949
      ff0bcb60
    • Hal Finkel's avatar
      Simplify and improve scoped-noalias metadata semantics · 029cde63
      Hal Finkel authored
      In the process of fixing the noalias parameter -> metadata conversion process
      that will take place during inlining (which will be committed soon, but not
      turned on by default), I have come to realize that the semantics provided by
      yesterday's commit are not really what we want. Here's why:
      
      void foo(noalias a, noalias b, noalias c, bool x) {
        *q = x ? a : b;
        *c = *q;
      }
      
      Generically, we know that *c does not alias with *a and with *b (so there is an
      'and' in what we know we're not), and we know that *q might be derived from *a
      or from *b (so there is an 'or' in what we know that we are). So we do not want
      the semantics currently, where any noalias scope matching any alias.scope
      causes a NoAlias return. What we want to know is that the noalias scopes form a
      superset of the alias.scope list (meaning that all the things we know we're not
      is a superset of all of things the other instruction might be).
      
      Making that change, however, introduces a composibility problem. If we inline
      once, adding the noalias metadata, and then inline again adding more, and we
      append new scopes onto the noalias and alias.scope lists each time. But, this
      means that we could change what was a NoAlias result previously into a MayAlias
      result because we appended an additional scope onto one of the alias.scope
      lists. So, instead of giving scopes the ability to have parents (which I had
      borrowed from the TBAA implementation, but seems increasingly unlikely to be
      useful in practice), I've given them domains. The subset/superset condition now
      applies within each domain independently, and we only need it to hold in one
      domain. Each time we inline, we add the new scopes in a new scope domain, and
      everything now composes nicely. In addition, this simplifies the
      implementation.
      
      llvm-svn: 213948
      029cde63
    • Duncan P. N. Exon Smith's avatar
      Try to fix a layering violation introduced by r213945 · 20a005f2
      Duncan P. N. Exon Smith authored
      The dragonegg buildbot (and others?) started failing after
      r213945/r213946 because `llvm-as` wasn't linking in the bitcode reader.
      I think moving the verify functions to the same file as the verify pass
      should fix the build.  Adding a command-line option for maintaining
      use-list order in assembly as a drive-by to prevent warnings about
      unused static functions.
      
      llvm-svn: 213947
      20a005f2
    • Duncan P. N. Exon Smith's avatar
      Fix -Werror build after r213945 · f62acab1
      Duncan P. N. Exon Smith authored
      llvm-svn: 213946
      f62acab1
    • Duncan P. N. Exon Smith's avatar
      IPO: Add use-list-order verifier · 6b6fdc99
      Duncan P. N. Exon Smith authored
      Add a -verify-use-list-order pass, which shuffles use-list order, writes
      to bitcode, reads back, and verifies that the (shuffled) order matches.
      
        - The utility functions live in lib/IR/UseListOrder.cpp.
      
        - Moved (and renamed) the command-line option to enable writing
          use-lists, so that this pass can return early if the use-list orders
          aren't being serialized.
      
      It's not clear that this pass is the right direction long-term (perhaps
      a separate tool instead?), but short-term it's a great way to test the
      use-list order prototype.  I've added an XFAIL-ed testcase that I'm
      hoping to get working pretty quickly.
      
      This is part of PR5680.
      
      llvm-svn: 213945
      6b6fdc99
    • Amara Emerson's avatar
      [ARM] Emit ABI_PCS_R9_use build attribute. · 115d2df8
      Amara Emerson authored
      Patch by Ben Foster!
      
      Differential Revision: http://reviews.llvm.org/D4657
      
      llvm-svn: 213944
      115d2df8
    • Benjamin Kramer's avatar
      Run sort_includes.py on the AArch64 backend. · 1f8930e3
      Benjamin Kramer authored
      No functionality change.
      
      llvm-svn: 213938
      1f8930e3
    • Chandler Carruth's avatar
      [cmake] Use the external project machinery for libcxxabi so that it can · da490d2e
      Chandler Carruth authored
      be disabled in CMake or relocated if desired.
      
      llvm-svn: 213936
      da490d2e
    • NAKAMURA Takumi's avatar
    • NAKAMURA Takumi's avatar
      llvm/test/CodeGen/ARM/inlineasm-global.ll: Avoid specifing source file on llc. · dd620a24
      NAKAMURA Takumi authored
      It sometimes confuses FileCheck. Consider the case that path contains 'stmib'. :)
      
      llvm-svn: 213932
      dd620a24
    • Chandler Carruth's avatar
      [SDAG] Enable the new assert for out-of-range result numbers in · 3de980d2
      Chandler Carruth authored
      SDValues, fixing the two bugs left in the regression suite.
      
      The key for both of these was the use a single value type rather than
      a VTList which caused an unintentionally single-result merge-value node.
      Fix this by getting the appropriate VTList in place.
      
      Doing this exposed that the comments in x86's code abouth how MUL_LOHI
      operands are handle is wrong. The bug with the use of out-of-range
      result numbers was hiding the bug about the order of operands here (as
      best i can tell). There are more places where the code appears to get
      this backwards still...
      
      llvm-svn: 213931
      3de980d2
    • Chandler Carruth's avatar
      [SDAG] Don't insert the VRBase into a mapping from SDValues when the def · eae2d28c
      Chandler Carruth authored
      doesn't actually correspond to an SDValue at all. Fixes most of the
      remaining asserts on out-of-range SDValue result numbers.
      
      llvm-svn: 213930
      eae2d28c
    • Matt Arsenault's avatar
      Store nodes only have 1 result. · 197a1e26
      Matt Arsenault authored
      llvm-svn: 213928
      197a1e26
    • Chandler Carruth's avatar
      [SDAG] Start plumbing an assert into SDValues that we don't form one · 94bd553e
      Chandler Carruth authored
      with a result number outside the range of results for the node.
      
      I don't know how we managed to not really check this very basic
      invariant for so long, but the code is *very* broken at this point.
      I have over 270 test failures with the assert enabled. I'm committing it
      disabled so that others can join in the cleanup effort and reproduce the
      issues. I've also included one of the obvious fixes that I already
      found. More fixes to come.
      
      llvm-svn: 213926
      94bd553e
    • Akira Hatanaka's avatar
      [ARM] In thumb mode, emit directive ".code 16" before file level inline · 16e47ff4
      Akira Hatanaka authored
      assembly instructions.
      
      This is necessary to ensure ARM assembler switches to Thumb mode before it
      starts assembling the file level inline assembly instructions at the beginning
      of a .s file.
      
      <rdar://problem/17757232>
      
      llvm-svn: 213924
      16e47ff4
    • Lang Hames's avatar
      [X86] Add comments to clarify some non-obvious lines in the stackmap-nops.ll · 98c3c0f3
      Lang Hames authored
      testcases.
      
      Based on code review from Philip Reames. Thanks Philip!
      
      llvm-svn: 213923
      98c3c0f3
    • David Majnemer's avatar
      llvm-vtabledump: use a std::map instead of a StringMap for VBTables · bf32f773
      David Majnemer authored
      StringMap doesn't guarantee any particular iteration order,
      this is suboptimal when comparing llvm-vtabledump's output for two
      object files.
      
      llvm-svn: 213921
      bf32f773
    • Ehsan Akhgari's avatar
      Fix a warning in CoverageMappingReader.cpp · 29b61ce7
      Ehsan Akhgari authored
      llvm-svn: 213920
      29b61ce7
    • Lang Hames's avatar
      [X86] Clarify some stackmap shadow optimization code as based on review · 5432649b
      Lang Hames authored
      feedback from Eric Christopher.
      
      No functional change.
      
      llvm-svn: 213917
      5432649b
    • Bill Schmidt's avatar
      [PATCH][PPC64LE] Correct little-endian usage of vmrgh* and vmrgl*. · c9fa5dd6
      Bill Schmidt authored
      Because the PowerPC vmrgh* and vmrgl* instructions have a built-in
      big-endian bias, it is necessary to swap their inputs in little-endian
      mode when using them to implement a vector shuffle.  This was
      previously missed in the vector LE implementation.
      
      There was already logic to distinguish between unary and "normal"
      vmrg* vector shuffles, so this patch extends that logic to use a third
      option:  "swapped" vmrg* vector shuffles that are used for little
      endian in place of the "normal" ones.
      
      I've updated the vec-shuffle-le.ll test to check for the expected
      register ordering on the generated instructions.
      
      This bug was discovered when testing the LE and ELFv2 patches for
      safety if they were backported to 3.4.  A different vectorization
      decision was made in 3.4 than on mainline trunk, and that exposed the
      problem.  I've verified this fix takes care of that issue.
      
      llvm-svn: 213915
      c9fa5dd6
    • Alex Lorenz's avatar
      Add code coverage mapping data, reader, and writer. · a20a5d50
      Alex Lorenz authored
      This patch implements the data structures, the reader and
      the writers for the new code coverage mapping system. 
      The new code coverage mapping system uses the instrumentation
      based profiling to provide code coverage analysis.
      
      llvm-svn: 213910
      a20a5d50
    • Alex Lorenz's avatar
      Add code coverage mapping data, reader, and writer. · 817e4854
      Alex Lorenz authored
      This patch implements the data structures, the reader and
      the writers for the new code coverage mapping system. 
      The new code coverage mapping system uses the instrumentation
      based profiling to provide code coverage analysis.
      
      llvm-svn: 213909
      817e4854
    • Kevin Enderby's avatar
      Add an implementation for llvm-nm’s -print-file-name option (aka -o and -A). · 08e1bbd6
      Kevin Enderby authored
      The -print-file-name option in llvm-nm is to precede each symbol
      with the object file it came from.  While code for the parsing of this
      option and its aliases existed there was no code to implement it.
      
      llvm-svn: 213906
      08e1bbd6
    • David Majnemer's avatar
      Opportunistically fix the builders · ab131e86
      David Majnemer authored
      A builder complained that it couldn't find llvm-vtabledump, this is
      probably because it wasn't a dependency of the 'test' target.
      
      llvm-svn: 213905
      ab131e86
    • David Majnemer's avatar
      llvm-vtabledump: A vtable dumper · 72ab1a5a
      David Majnemer authored
      This tool's job is to dump the vtables inside object files.  It is
      currently limited to MS ABI vf- and vb-tables but it will eventually
      support Itanium-style v-tables as well.
      
      Differential Revision: http://reviews.llvm.org/D4584
      
      llvm-svn: 213903
      72ab1a5a
    • Mark Heffernan's avatar
      After unrolling a loop with llvm.loop.unroll.count metadata (unroll factor · 8ec1474f
      Mark Heffernan authored
      hint) the loop unroller replaces the llvm.loop.unroll.count metadata with
      llvm.loop.unroll.disable metadata to prevent any subsequent unrolling
      passes from unrolling more than the hint indicates.  This patch fixes
      an issue where loop unrolling could be disabled for other loops as well which
      share the same llvm.loop metadata.
      
      llvm-svn: 213900
      8ec1474f
    • Joerg Sonnenberger's avatar
      Don't use 128bit functions on PPC32. · b5459e6e
      Joerg Sonnenberger authored
      llvm-svn: 213899
      b5459e6e
    • Chandler Carruth's avatar
      [SDAG] Introduce a combined set to the DAG combiner which tracks nodes · 9f4530b9
      Chandler Carruth authored
      which have successfully round-tripped through the combine phase, and use
      this to ensure all operands to DAG nodes are visited by the combiner,
      even if they are only added during the combine phase.
      
      This is critical to have the combiner reach nodes that are *introduced*
      during combining. Previously these would sometimes be visited and
      sometimes not be visited based on whether they happened to end up on the
      worklist or not. Now we always run them through the combiner.
      
      This fixes quite a few bad codegen test cases lurking in the suite while
      also being more principled. Among these, the TLS codegeneration is
      particularly exciting for programs that have this in the critical path
      like TSan-instrumented binaries (although I think they engineer to use
      a different TLS that is faster anyways).
      
      I've tried to check for compile-time regressions here by running llc
      over a merged (but not LTO-ed) clang bitcode file and observed at most
      a 3% slowdown in llc. Given that this is essentially a worst case (none
      of opt or clang are running at this phase) I think this is tolerable.
      The actual LTO case should be even less costly, and the cost in normal
      compilation should be negligible.
      
      With this combining logic, it is possible to re-legalize as we combine
      which is necessary to implement PSHUFB formation on x86 as
      a post-legalize DAG combine (my ultimate goal).
      
      Differential Revision: http://reviews.llvm.org/D4638
      
      llvm-svn: 213898
      9f4530b9
    • Chandler Carruth's avatar
      [x86] Make vector legalization of extloads work more like the "normal" · 80b86946
      Chandler Carruth authored
      vector operation legalization with support for custom target lowering
      and fallback to expand when it fails, and use this to implement sext and
      anyext load lowering for x86 in a more principled way.
      
      Previously, the x86 backend relied on a target DAG combine to "combine
      away" sextload and extload nodes prior to legalization, or would expand
      them during legalization with terrible code. This is particularly
      problematic because the DAG combine relies on running over non-canonical
      DAG nodes at just the right time to match several common and important
      patterns. It used a combine rather than lowering because we didn't have
      good lowering support, and to expose some tricks being employed to more
      combine phases.
      
      With this change it becomes a proper lowering operation, the backend
      marks that it can lower these nodes, and I've added support for handling
      the canonical forms that don't have direct legal representations such as
      sextload of a v4i8 -> v4i64 on AVX1. With this change, our test cases
      for this behavior continue to pass even after the DAG combiner beigns
      running more systematically over every node.
      
      There is some noise caused by this in the test suite where we actually
      use vector extends instead of subregister extraction. This doesn't
      really seem like the right thing to do, but is unlikely to be a critical
      regression. We do regress in one case where by lowering to the
      target-specific patterns early we were able to combine away extraneous
      legal math nodes. However, this regression is completely addressed by
      switching to a widening based legalization which is what I'm working
      toward anyways, so I've just switched the test to that mode.
      
      Differential Revision: http://reviews.llvm.org/D4654
      
      llvm-svn: 213897
      80b86946
    • Saleem Abdulrasool's avatar
      Target: invert condition for Windows · 8dc8fb18
      Saleem Abdulrasool authored
      The Microsoft ABI and MSVCRT are considered the canonical C runtime and ABI.
      The long double routines are not part of this environment.  However, cygwin and
      MinGW both provide supplementary implementations.  Change the condition to
      reflect this reality.
      
      llvm-svn: 213896
      8dc8fb18
  2. Jul 24, 2014
Loading