Skip to content
  1. Jan 24, 2015
    • Daniel Sanders's avatar
      [mips] Fix 'jumpy' debug line info around calls. · 9a4f2c55
      Daniel Sanders authored
      Summary:
      At the moment, address calculation is taking the debug line info from the
      address node (e.g. TargetGlobalAddress). When a function is called multiple
      times, this results in output of the form:
      
        .loc $first_call_location
        .. address calculation ..
        .. function call ..
        .. address calculation ..
        .loc $second_call_location
        .. function call ..
        .loc $first_call_location
        .. address calculation ..
        .loc $third_call_location
        .. function call ..
      
      This patch makes address calculations for function calls take the debug line
      info for the call node and results in output of the form:
        .loc $first_call_location
        .. address calculation ..
        .. function call ..
        .loc $second_call_location
        .. address calculation ..
        .. function call ..
        .loc $third_call_location
        .. address calculation ..
        .. function call ..
      
      All other address calculations continue to use the address node.
      
      Test Plan: Fixes test/DebugInfo/multiline.ll on a mips host.
      
      Subscribers: dblaikie, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D7050
      
      llvm-svn: 227005
      9a4f2c55
    • Sylvestre Ledru's avatar
      450f97dc
    • Daniel Sanders's avatar
      [mips] Fix assertion on i128 addition/subtraction on MIPS64 · 5a9225b2
      Daniel Sanders authored
      Summary:
      In addition to the included tests, this fixes
      test/CodeGen/Generic/i128-addsub.ll on a mips64 host.
      
      Reviewers: atanasyan, sagar, vmedic
      
      Reviewed By: vmedic
      
      Subscribers: sdkie, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D6610
      
      llvm-svn: 227003
      5a9225b2
    • Andrea Di Biagio's avatar
      [DAG] Fix wrong canonicalization performed on shuffle nodes. · 8381475a
      Andrea Di Biagio authored
      This fixes a regression introduced by r226816.
      When replacing a splat shuffle node with a constant build_vector,
      make sure that the new build_vector has a valid number of elements.
      
      Thanks to Patrik Hagglund for reporting this problem and providing a
      small reproducible.
      
      llvm-svn: 227002
      8381475a
    • Chandler Carruth's avatar
      [PM] General doxygen and comment cleanup for this pass. · 9dea5cdb
      Chandler Carruth authored
      llvm-svn: 227001
      9dea5cdb
    • Chandler Carruth's avatar
      [PM] Reformat this code with clang-format so that I can use clang-format · 7253bba4
      Chandler Carruth authored
      when refactoring for the new pass manager without introducing too many
      formatting changes into meaning full diffs.
      
      llvm-svn: 227000
      7253bba4
    • Chandler Carruth's avatar
      [PM] Port LowerExpectIntrinsic to the new pass manager. · 43e590e5
      Chandler Carruth authored
      This just lifts the logic into a static helper function, sinks the
      legacy pass to be a trivial wrapper of that helper fuction, and adds
      a trivial wrapper for the new PM as well. Not much to see here.
      
      I switched a test case to run in both modes, but we have to strip the
      dead prototypes separately as that pass isn't in the new pass manager
      (yet).
      
      llvm-svn: 226999
      43e590e5
    • Chandler Carruth's avatar
      [PM] Change LowerExpectIntrinsic to actually return true when it has · c3bf5bd8
      Chandler Carruth authored
      changed the IR. This is particularly easy as we can just look for the
      existence of any expect intrinsic at all to know whether we've changed
      the IR.
      
      llvm-svn: 226998
      c3bf5bd8
    • Chandler Carruth's avatar
      [PM] Use a more appropriate name for the statistics variable in · 6eb60eb5
      Chandler Carruth authored
      lower-expect, as we don't have 'if's in the IR and we use it for
      switches as well.
      
      llvm-svn: 226997
      6eb60eb5
    • Chandler Carruth's avatar
      [PM] Switch tihs code to use a range based for loop over the function. · d12741e0
      Chandler Carruth authored
      We can't switch the loop over the instructions because it needs to
      early-increment the iterator.
      
      llvm-svn: 226996
      d12741e0
    • Chandler Carruth's avatar
      [PM] Use a SmallVector instead of std::vector to avoid heap allocations · 3f5e7b1f
      Chandler Carruth authored
      for small switches, and avoid using a complex loop to set up the
      weights.
      
      We know what the baseline weights will be so we can just resize the
      vector to contain all that value and clobber the one slot that is
      likely. This seems much more direct than the previous code that tested
      at every iteration, and started off by zeroing the vector.
      
      llvm-svn: 226995
      3f5e7b1f
    • Chandler Carruth's avatar
      [PM] Pull the two helpers for this pass into static functions. There are · 0012c778
      Chandler Carruth authored
      no members for them to use.
      
      Also, make them accept references as there is no possibility of a null
      pointer.
      
      llvm-svn: 226994
      0012c778
    • Chandler Carruth's avatar
      [PM] Add a basic doxygen comment for this pass. · 579c5c45
      Chandler Carruth authored
      llvm-svn: 226993
      579c5c45
    • Chandler Carruth's avatar
      [PM] Clean up the formatting of the LowerExpectIntrinsic pass prior to · 0ea746bf
      Chandler Carruth authored
      refactoring its code.
      
      llvm-svn: 226992
      0ea746bf
    • Chandler Carruth's avatar
      [PM] Move the LowerExpectIntrinsic pass to the Scalar library. · 72793727
      Chandler Carruth authored
      It was already in the Scalar header and referenced extensively as being
      in this library, the source file was just in the utils directory for
      some reason. No actual functionality changed. I noticed as it didn't
      make sense to add a pass header to the utils headers.
      
      llvm-svn: 226991
      72793727
    • Yunzhong Gao's avatar
      If we see UTF-8 BOM sequence at the beginning of a response file, we shall · a8cf495a
      Yunzhong Gao authored
      remove these bytes before parsing.
      
      Phabricator Revision: http://reviews.llvm.org/D7156
      
      llvm-svn: 226988
      a8cf495a
    • Chandler Carruth's avatar
      [PM] Port instcombine to the new pass manager! · 83ba269e
      Chandler Carruth authored
      This is exciting as this is a much more involved port. This is
      a complex, existing transformation pass. All of the core logic is shared
      between both old and new pass managers. Only the access to the analyses
      is separate because the actual techniques are separate. This also uses
      a bunch of different and interesting analyses and is the first time
      where we need to use an analysis across an IR layer.
      
      This also paves the way to expose instcombine utility functions. I've
      got a static function that implements the core pass logic over
      a function which might be mildly interesting, but more interesting is
      likely exposing a routine which just uses instructions *already in* the
      worklist and combines until empty.
      
      I've switched one of my favorite instcombine tests to run with both as
      well to make sure this keeps working.
      
      llvm-svn: 226987
      83ba269e
    • Filipe Cabecinhas's avatar
      [Bitcode] Diagnose errors instead of asserting from bad input · de968ecb
      Filipe Cabecinhas authored
      Eventually we can make some of these pass the error along to the caller.
      
      Reports a fatal error if:
      We find an invalid abbrev record
      We try to get an invalid abbrev number
      We can't fill the current word due to an EOF
      
      Fixed an invalid bitcode test to check for output with FileCheck
      
      Bugs found with afl-fuzz
      
      llvm-svn: 226986
      de968ecb
    • Chandler Carruth's avatar
      [PM] Rework how the TargetLibraryInfo pass integrates with the new pass · c0291865
      Chandler Carruth authored
      manager to support the actual uses of it. =]
      
      When I ported instcombine to the new pass manager I discover that it
      didn't work because TLI wasn't available in the right places. This is
      a somewhat surprising and/or subtle aspect of the new pass manager
      design that came up before but I think is useful to be reminded of:
      
      While the new pass manager *allows* a function pass to query a module
      analysis, it requires that the module analysis is already run and cached
      prior to the function pass manager starting up, possibly with
      a 'require<foo>' style utility in the pass pipeline. This is an
      intentional hurdle because using a module analysis from a function pass
      *requires* that the module analysis is run prior to entering the
      function pass manager. Otherwise the other functions in the module could
      be in who-knows-what state, etc.
      
      A somewhat surprising consequence of this design decision (at least to
      me) is that you have to design a function pass that leverages
      a module analysis to do so as an optional feature. Even if that means
      your function pass does no work in the absence of the module analysis,
      you have to handle that possibility and remain conservatively correct.
      This is a natural consequence of things being able to invalidate the
      module analysis and us being unable to re-run it. And it's a generally
      good thing because it lets us reorder passes arbitrarily without
      breaking correctness, etc.
      
      This ends up causing problems in one case. What if we have a module
      analysis that is *definitionally* impossible to invalidate. In the
      places this might come up, the analysis is usually also definitionally
      trivial to run even while other transformation passes run on the module,
      regardless of the state of anything. And so, it follows that it is
      natural to have a hard requirement on such analyses from a function
      pass.
      
      It turns out, that TargetLibraryInfo is just such an analysis, and
      InstCombine has a hard requirement on it.
      
      The approach I've taken here is to produce an analysis that models this
      flexibility by making it both a module and a function analysis. This
      exposes the fact that it is in fact safe to compute at any point. We can
      even make it a valid CGSCC analysis at some point if that is useful.
      However, we don't want to have a copy of the actual target library info
      state for each function! This state is specific to the triple. The
      somewhat direct and blunt approach here is to turn TLI into a pimpl,
      with the state and mutators in the implementation class and the query
      routines primarily in the wrapper. Then the analysis can lazily
      construct and cache the implementations, keyed on the triple, and
      on-demand produce wrappers of them for each function.
      
      One minor annoyance is that we will end up with a wrapper for each
      function in the module. While this is a bit wasteful (one pointer per
      function) it seems tolerable. And it has the advantage of ensuring that
      we pay the absolute minimum synchronization cost to access this
      information should we end up with a nice parallel function pass manager
      in the future. We could look into trying to mark when analysis results
      are especially cheap to recompute and more eagerly GC-ing the cached
      results, or we could look at supporting a variant of analyses whose
      results are specifically *not* cached and expected to just be used and
      discarded by the consumer. Either way, these seem like incremental
      enhancements that should happen when we start profiling the memory and
      CPU usage of the new pass manager and not before.
      
      The other minor annoyance is that if we end up using the TLI in both
      a module pass and a function pass, those will be produced by two
      separate analyses, and thus will point to separate copies of the
      implementation state. While a minor issue, I dislike this and would like
      to find a way to cleanly allow a single analysis instance to be used
      across multiple IR unit managers. But I don't have a good solution to
      this today, and I don't want to hold up all of the work waiting to come
      up with one. This too seems like a reasonable thing to incrementally
      improve later.
      
      llvm-svn: 226981
      c0291865
    • Richard Smith's avatar
      Bring the modules buildbot back to life after r226940. · baa128ea
      Richard Smith authored
      llvm-svn: 226980
      baa128ea
    • Kuba Brecka's avatar
      Reverting r226937: lit: Make MCJIT's supported arch check case insensitive · a62bbcca
      Kuba Brecka authored
      The r226937 commit causes ASan lit tests to be all skipped on OS X.
      
      llvm-svn: 226979
      a62bbcca
    • Quentin Colombet's avatar
      [AArch64][LoadStoreOptimizer] Form LDPSW when possible. · 29f55339
      Quentin Colombet authored
      This patch adds the missing LD[U]RSW variants to the load store optimizer, so
      that we generate LDPSW when possible.
      
      <rdar://problem/19583480>
      
      llvm-svn: 226978
      29f55339
    • Lang Hames's avatar
      [Orc] Add some missing headers to the CompileOnDemandLayer.h · f4ff3435
      Lang Hames authored
      llvm-svn: 226975
      f4ff3435
    • Bruno Cardoso Lopes's avatar
      [x86] Fix a comment · ddcc2e31
      Bruno Cardoso Lopes authored
      llvm-svn: 226974
      ddcc2e31
    • Lang Hames's avatar
      [Orc] Add orcjit to the dependencies list in the Makefile for lli. · 17e6caee
      Lang Hames authored
      This should fix a few more broken bots.
      
      llvm-svn: 226973
      17e6caee
    • Tom Stellard's avatar
      R600/SI: Emit .hsa.version section for amdhsa OS · edd188c4
      Tom Stellard authored
      llvm-svn: 226970
      edd188c4
    • Reid Kleckner's avatar
      Fix assertion when C++ EH filters are present in functions using SEH · 3d4638b3
      Reid Kleckner authored
      Should fix PR22305.
      
      llvm-svn: 226969
      3d4638b3
    • Adrian Prantl's avatar
      Address more review comments for DIExpression::iterator. · 70f2a736
      Adrian Prantl authored
      - input_iterator
      - define an operator->
      - make constructors private were possible
      
      llvm-svn: 226967
      70f2a736
    • Justin Bogner's avatar
      InstrProf: debug dumps should go to dbgs(), not outs() · cf3063b4
      Justin Bogner authored
      llvm-svn: 226964
      cf3063b4
    • Justin Bogner's avatar
      llvm-cov: Don't use llvm::outs() in library code · 0b9858dc
      Justin Bogner authored
      Nothing in lib/ should be using llvm::outs() directly. Thread it in
      from the caller instead.
      
      llvm-svn: 226961
      0b9858dc
  2. Jan 23, 2015
Loading