Skip to content
  1. Dec 27, 2016
  2. Dec 26, 2016
  3. Dec 25, 2016
  4. Dec 24, 2016
  5. Dec 23, 2016
  6. Dec 22, 2016
    • Evgeniy Stepanov's avatar
      [cfi] Emit jump tables as a function-level inline asm. · 27d4c9b7
      Evgeniy Stepanov authored
      Use a dummy private function with inline asm calls instead of module
      level asm blocks for CFI jumptables.
      
      The main advantage is that now jumptable codegen can be affected by
      the function attributes (like target_cpu on ARM). Module level asm
      gets the default subtarget based on the target triple, which is often
      not good enough.
      
      This change also uses asm constraints/arguments to reference
      jumptable targets and aliases directly. We no longer do asm name
      mangling in an IR pass.
      
      Differential Revision: https://reviews.llvm.org/D28012
      
      llvm-svn: 290384
      27d4c9b7
    • Davide Italiano's avatar
      [GVN] Initial check-in of a new global value numbering algorithm. · 7e274e02
      Davide Italiano authored
      The code have been developed by Daniel Berlin over the years, and
      the new implementation goal is that of addressing shortcomings of
      the current GVN infrastructure, i.e. long compile time for large
      testcases, lack of phi predication, no load/store value numbering
      etc...
      
      The current code just implements the "core" GVN algorithm, although
      other pieces (load coercion, phi handling, predicate system) are
      already implemented in a branch out of tree. Once the core is stable,
      we'll start adding pieces on top of the base framework.
      The test currently living in test/Transform/NewGVN are a copy
      of the ones in GVN, with proper `XFAIL` (missing features in NewGVN).
      A flag will be added in a future commit to enable NewGVN, so that
      interested parties can exercise this code easily.
      
      Differential Revision:  https://reviews.llvm.org/D26224
      
      llvm-svn: 290346
      7e274e02
    • Chandler Carruth's avatar
      [PM] Introduce a reasonable port of the main per-module pass pipeline · e3f5064b
      Chandler Carruth authored
      from the old pass manager in the new one.
      
      I'm not trying to support (initially) the numerous options that are
      currently available to customize the pass pipeline. If we end up really
      wanting them, we can add them later, but I suspect many are no longer
      interesting. The simplicity of omitting them will help a lot as we sort
      out what the pipeline should look like in the new PM.
      
      I've also documented to the best of my ability *why* each pass or group
      of passes is used so that reading the pipeline is more helpful. In many
      cases I think we have some questionable choices of ordering and I've
      left FIXME comments in place so we know what to come back and revisit
      going forward. But for now, I've left it as similar to the current
      pipeline as I could.
      
      Lastly, I've had to comment out several places where passes are not
      ported to the new pass manager or where the loop pass infrastructure is
      not yet ready. I did at least fix a few bugs in the loop pass
      infrastructure uncovered by running the full pipeline, but I didn't want
      to go too far in this patch -- I'll come back and re-enable these as the
      infrastructure comes online. But I'd like to keep the comments in place
      because I don't want to lose track of which passes need to be enabled
      and where they go.
      
      One thing that seemed like a significant API improvement was to require
      that we don't build pipelines for O0. It seems to have no real benefit.
      
      I've also switched back to returning pass managers by value as at this
      API layer it feels much more natural to me for composition. But if
      others disagree, I'm happy to go back to an output parameter.
      
      I'm not 100% happy with the testing strategy currently, but it seems at
      least OK. I may come back and try to refactor or otherwise improve this
      in subsequent patches but I wanted to at least get a good starting point
      in place.
      
      Differential Revision: https://reviews.llvm.org/D28042
      
      llvm-svn: 290325
      e3f5064b
    • Adrian Prantl's avatar
      Refactor the DIExpression fragment query interface (NFC) · 49797ca6
      Adrian Prantl authored
      ... so it becomes available to DIExpressionCursor.
      
      llvm-svn: 290322
      49797ca6
    • Easwaran Raman's avatar
      Pass GetAssumptionCache to InlineFunctionInfo constructor · 180bd9f6
      Easwaran Raman authored
      Differential revision: https://reviews.llvm.org/D28038
      
      llvm-svn: 290295
      180bd9f6
  7. Dec 21, 2016
    • David Majnemer's avatar
      Revert "[InstCombine] New opportunities for FoldAndOfICmp and FoldXorOfICmp" · b0761a0c
      David Majnemer authored
      This reverts commit r289813, it caused PR31449.
      
      llvm-svn: 290266
      b0761a0c
    • Adam Nemet's avatar
      [LDist] Match behavior between invoking via optimization pipeline or opt -loop-distribute · 32e6a34c
      Adam Nemet authored
      In r267672, where the loop distribution pragma was introduced, I tried
      it hard to keep the old behavior for opt: when opt is invoked
      with -loop-distribute, it should distribute the loop (it's off by
      default when ran via the optimization pipeline).
      
      As MichaelZ has discovered this has the unintended consequence of
      breaking a very common developer work-flow to reproduce compilations
      using opt: First you print the pass pipeline of clang
      with -debug-pass=Arguments and then invoking opt with the returned
      arguments.
      
      clang -debug-pass will include -loop-distribute but the pass is invoked
      with default=off so nothing happens unless the loop carries the pragma.
      While through opt (default=on) we will try to distribute all loops.
      
      This changes opt's default to off as well to match clang.  The tests are
      modified to explicitly enable the transformation.
      
      llvm-svn: 290235
      32e6a34c
    • Peter Collingbourne's avatar
      IPO: Remove the ModuleSummary argument to the FunctionImport pass. NFCI. · 598bd2a2
      Peter Collingbourne authored
      No existing client is passing a non-null value here. This will come back
      in a slightly different form as part of the type identifier summary work.
      
      Differential Revision: https://reviews.llvm.org/D28006
      
      llvm-svn: 290222
      598bd2a2
    • George Burgess IV's avatar
      [Analysis] Centralize objectsize lowering logic. · 3f08914e
      George Burgess IV authored
      We're currently doing nearly the same thing for @llvm.objectsize in
      three different places: two of them are missing checks for overflow,
      and one of them could subtly break if InstCombine gets much smarter
      about removing alloc sites. Seems like a good idea to not do that.
      
      llvm-svn: 290214
      3f08914e
  8. Dec 20, 2016
    • Haicheng Wu's avatar
      [LoopUnroll] Modify a comment to clarify the usage of TripCount. NFC. · b29dd010
      Haicheng Wu authored
      Make it clear that TripCount is the upper bound of the iteration on which
      control exits LatchBlock.
      
      Differential Revision: https://reviews.llvm.org/D26675
      
      llvm-svn: 290199
      b29dd010
    • Chandler Carruth's avatar
      [PM] Provide an initial, minimal port of the inliner to the new pass manager. · 1d963114
      Chandler Carruth authored
      This doesn't implement *every* feature of the existing inliner, but
      tries to implement the most important ones for building a functional
      optimization pipeline and beginning to sort out bugs, regressions, and
      other problems.
      
      Notable, but intentional omissions:
      - No alloca merging support. Why? Because it isn't clear we want to do
        this at all. Active discussion and investigation is going on to remove
        it, so for simplicity I omitted it.
      - No support for trying to iterate on "internally" devirtualized calls.
        Why? Because it adds what I suspect is inappropriate coupling for
        little or no benefit. We will have an outer iteration system that
        tracks devirtualization including that from function passes and
        iterates already. We should improve that rather than approximate it
        here.
      - Optimization remarks. Why? Purely to make the patch smaller, no other
        reason at all.
      
      The last one I'll probably work on almost immediately. But I wanted to
      skip it in the initial patch to try to focus the change as much as
      possible as there is already a lot of code moving around and both of
      these *could* be skipped without really disrupting the core logic.
      
      A summary of the different things happening here:
      
      1) Adding the usual new PM class and rigging.
      
      2) Fixing minor underlying assumptions in the inline cost analysis or
         inline logic that don't generally hold in the new PM world.
      
      3) Adding the core pass logic which is in essence a loop over the calls
         in the nodes in the call graph. This is a bit duplicated from the old
         inliner, but only a handful of lines could realistically be shared.
         (I tried at first, and it really didn't help anything.) All told,
         this is only about 100 lines of code, and most of that is the
         mechanics of wiring up analyses from the new PM world.
      
      4) Updating the LazyCallGraph (in the new PM) based on the *newly
         inlined* calls and references. This is very minimal because we cannot
         form cycles.
      
      5) When inlining removes the last use of a function, eagerly nuking the
         body of the function so that any "one use remaining" inline cost
         heuristics are immediately refined, and queuing these functions to be
         completely deleted once inlining is complete and the call graph
         updated to reflect that they have become dead.
      
      6) After all the inlining for a particular function, updating the
         LazyCallGraph and the CGSCC pass manager to reflect the
         function-local simplifications that are done immediately and
         internally by the inline utilties. These are the exact same
         fundamental set of CG updates done by arbitrary function passes.
      
      7) Adding a bunch of test cases to specifically target CGSCC and other
         subtle aspects in the new PM world.
      
      Many thanks to the careful review from Easwaran and Sanjoy and others!
      
      Differential Revision: https://reviews.llvm.org/D24226
      
      llvm-svn: 290161
      1d963114
    • Adrian Prantl's avatar
      [IR] Remove the DIExpression field from DIGlobalVariable. · bceaaa96
      Adrian Prantl authored
      This patch implements PR31013 by introducing a
      DIGlobalVariableExpression that holds a pair of DIGlobalVariable and
      DIExpression.
      
      Currently, DIGlobalVariables holds a DIExpression. This is not the
      best way to model this:
      
      (1) The DIGlobalVariable should describe the source level variable,
          not how to get to its location.
      
      (2) It makes it unsafe/hard to update the expressions when we call
          replaceExpression on the DIGLobalVariable.
      
      (3) It makes it impossible to represent a global variable that is in
          more than one location (e.g., a variable with multiple
          DW_OP_LLVM_fragment-s).  We also moved away from attaching the
          DIExpression to DILocalVariable for the same reasons.
      
      This reapplies r289902 with additional testcase upgrades and a change
      to the Bitcode record for DIGlobalVariable, that makes upgrading the
      old format unambiguous also for variables without DIExpressions.
      
      <rdar://problem/29250149>
      https://llvm.org/bugs/show_bug.cgi?id=31013
      Differential Revision: https://reviews.llvm.org/D26769
      
      llvm-svn: 290153
      bceaaa96
  9. Dec 19, 2016
Loading