Skip to content
  1. Aug 03, 2016
  2. Aug 02, 2016
    • Sean Silva's avatar
      CodeExtractor : Add ability to preserve profile data. · f801575f
      Sean Silva authored
      Added ability to estimate the entry count of the extracted function and
      the branch probabilities of the exit branches.
      
      Patch by River Riddle!
      
      Differential Revision: https://reviews.llvm.org/D22744
      
      llvm-svn: 277411
      f801575f
    • Tim Shen's avatar
      [ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to... · b44909ec
      Tim Shen authored
      [ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef
      
      Summary: By generalize the interface, users are able to inject more flexible Node token into the algorithm, for example, a pair of vector<Node>* and index integer. Currently I only migrated SCCIterator to use NodeRef, but more is coming. It's a NFC.
      
      Reviewers: dblaikie, chandlerc
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D22937
      
      llvm-svn: 277399
      b44909ec
    • Derek Schuff's avatar
      [WebAssembly] Support CFI for WebAssembly target · c64d7655
      Derek Schuff authored
      Summary: This patch implements CFI for WebAssembly. It modifies the
      LowerTypeTest pass to pre-assign table indexes to functions that are
      called indirectly, and lowers type checks to test against the
      appropriate table indexes. It also modifies the WebAssembly backend to
      support a special ".indidx" assembly directive that propagates the table
      index assignments out to the linker.
      
      Patch by Dominic Chen
      
      Differential Revision: https://reviews.llvm.org/D21768
      
      llvm-svn: 277398
      c64d7655
  3. Aug 01, 2016
  4. Jul 29, 2016
    • David Majnemer's avatar
      [ConstnatFolding] Teach the folder how to fold ConstantVector · d536f232
      David Majnemer authored
      A ConstantVector can have ConstantExpr operands and vice versa.
      However, the folder had no ability to fold ConstantVectors which, in
      some cases, was an optimization barrier.
      
      Instead, rephrase the folder in terms of Constants instead of
      ConstantExprs and teach callers how to deal with failure.
      
      llvm-svn: 277099
      d536f232
    • Piotr Padlewski's avatar
      Added ThinLTO inlining statistics · 84abc74f
      Piotr Padlewski authored
      Summary:
      copypasta doc of ImportedFunctionsInliningStatistics class
       \brief Calculate and dump ThinLTO specific inliner stats.
       The main statistics are:
       (1) Number of inlined imported functions,
       (2) Number of imported functions inlined into importing module (indirect),
       (3) Number of non imported functions inlined into importing module
       (indirect).
       The difference between first and the second is that first stat counts
       all performed inlines on imported functions, but the second one only the
       functions that have been eventually inlined to a function in the importing
       module (by a chain of inlines). Because llvm uses bottom-up inliner, it is
       possible to e.g. import function `A`, `B` and then inline `B` to `A`,
       and after this `A` might be too big to be inlined into some other function
       that calls it. It calculates this statistic by building graph, where
       the nodes are functions, and edges are performed inlines and then by marking
       the edges starting from not imported function.
      
       If `Verbose` is set to true, then it also dumps statistics
       per each inlined function, sorted by the greatest inlines count like
       - number of performed inlines
       - number of performed inlines to importing module
      
      Reviewers: eraman, tejohnson, mehdi_amini
      
      Subscribers: mehdi_amini, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D22491
      
      llvm-svn: 277089
      84abc74f
  5. Jul 28, 2016
  6. Jul 25, 2016
  7. Jul 23, 2016
  8. Jul 22, 2016
  9. Jul 21, 2016
  10. Jul 19, 2016
  11. Jul 18, 2016
  12. Jul 17, 2016
    • Teresa Johnson's avatar
      [ThinLTO] Perform profile-guided indirect call promotion · cd21a646
      Teresa Johnson authored
      Summary:
      To enable profile-guided indirect call promotion in ThinLTO mode, we
      simply add call graph edges for each profitable target from the profile
      to the summaries, then the summary-guided importing will consider the
      callee for importing as usual.
      
      Also we need to enable the indirect call promotion pass creation in the
      PassManagerBuilder when PerformThinLTO=true (we are in the ThinLTO
      backend), so that the newly imported functions are considered for
      promotion in the backends.
      
      The IC promotion profiles refer to callees by GUID, which required
      adding GUIDs to the per-module VST in bitcode (and assigning them
      valueIds similar to how they are assigned valueIds in the combined
      index).
      
      Reviewers: mehdi_amini, xur
      
      Subscribers: mehdi_amini, davidxl, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D21932
      
      llvm-svn: 275707
      cd21a646
  13. Jul 16, 2016
    • Hal Finkel's avatar
      Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute" · 660096b2
      Hal Finkel authored
      This reverts commit r275042; the initial commit triggered self-hosting failures
      on ARM/AArch64. James Molloy identified the problematic backend code, which has
      been disabled in r275677. Trying again...
      
      Original commit message:
      
      Let FuncAttrs infer the 'returned' argument attribute
      
      A function can have one argument with the 'returned' attribute, indicating that
      the associated argument is always the return value of the function. Add
      FuncAttrs inference logic.
      
      llvm-svn: 275678
      660096b2
  14. Jul 15, 2016
    • Rong Xu's avatar
      [PGO] IRPGO pre-cleanup pass changes · 96a19d35
      Rong Xu authored
      This patch adds a selected set of cleanup passes including a pre-inline pass
      before LLVM IR PGO instrumentation. The inline is only intended to apply those
      obvious/trivial ones before instrumentation so that much less instrumentation
      is needed to get better profiling information. This will drastically improve
      the instrumented code performance for large C++ applications. Another benefit
      is the context sensitive counts that can potentially improve the PGO
      optimization.
      
      Differential Revision: http://reviews.llvm.org/D21405
      
      llvm-svn: 275588
      96a19d35
    • Sebastian Pop's avatar
      code hoisting pass based on GVN · 4177480a
      Sebastian Pop authored
      This pass hoists duplicated computations in the program. The primary goal of
      gvn-hoist is to reduce the size of functions before inline heuristics to reduce
      the total cost of function inlining.
      
      Pass written by Sebastian Pop, Aditya Kumar, Xiaoyu Hu, and Brian Rzycki.
      Important algorithmic contributions by Daniel Berlin under the form of reviews.
      
      Differential Revision: http://reviews.llvm.org/D19338
      
      llvm-svn: 275561
      4177480a
  15. Jul 14, 2016
    • Nico Weber's avatar
      Revert r275401, it caused PR28551. · 755cd760
      Nico Weber authored
      llvm-svn: 275420
      755cd760
    • Sebastian Pop's avatar
      code hoisting pass based on GVN · 63847d04
      Sebastian Pop authored
      This pass hoists duplicated computations in the program. The primary goal of
      gvn-hoist is to reduce the size of functions before inline heuristics to reduce
      the total cost of function inlining.
      
      Pass written by Sebastian Pop, Aditya Kumar, Xiaoyu Hu, and Brian Rzycki.
      Important algorithmic contributions by Daniel Berlin under the form of reviews.
      
      Differential Revision: http://reviews.llvm.org/D19338
      
      llvm-svn: 275401
      63847d04
  16. Jul 12, 2016
  17. Jul 11, 2016
    • Davide Italiano's avatar
      [PM/IPO] Port LowerTypeTests to the new PassManager. · e8ae0b5e
      Davide Italiano authored
      There's a little bit of churn in this patch because the initialization
      mechanism is now shared between the old and the new PM. Other than
      that, it's just a pretty mechanical translation.
      
      llvm-svn: 275082
      e8ae0b5e
    • Davide Italiano's avatar
      [LowerTypeTests] Don't rely on doInitialization(). · 12a11568
      Davide Italiano authored
      In preparation for porting this pass to the new PM (which has no
      doInitialization()).
      
      Differential Revision:  http://reviews.llvm.org/D22223
      
      llvm-svn: 275074
      12a11568
    • Dehao Chen's avatar
      Implement callsite-hotness based inline cost for Sample-based PGO · 9232f982
      Dehao Chen authored
      Summary:
      For sample-based PGO, using BFI to calculate callsite count is sometime not accurate. This is because with sampling based approach, if a callsite resides in a hot loop deeply nested in a bunch of cold branches, the callsite's BFI frequency would be inaccurately calculated due to lack of samples in the cold branch.
      
      E.g.
      
      if (A1 && A2 && A3 && ..... && A10) {
        for (i=0; i < 100000000; i++) {
          callsite();
        }
      }
      
      Assume that A1 to A100 are all 100% taken, and callsite has 1000 samples and thus is considerred hot. Because the loop's trip count is huge, it's normal that all branches outside the loop has no sample at all. As a result, we can only use static branch probability to derive the the frequency of the loop header. Assuming that static heuristic thinks each branch is 50% taken, then the count calculated from BFI will be 1/(2^10) of the actual value.
      
      In order to get more accurate callsite count, we directly annotate the weight on the call instruction, and directly use it when checking callsite hotness.
      
      Note that this mechanism can also be shared by instrumentation based callsite hotness analysis. The side benefit is that it breaks the dependency from Inliner to BFI as call count is embedded in the IR.
      
      Reviewers: davidxl, eraman, dnovillo
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D22118
      
      llvm-svn: 275073
      9232f982
    • Dehao Chen's avatar
      Tune the weight propagation algorithm for sample profile. · 29d2641f
      Dehao Chen authored
      Summary: Handle the case when there is only one incoming/outgoing edge for a visited basic block: use the block weight to adjust edge weight even when the edge has been visited before. This can help reduce inaccuracies introduced by incorrect basic block profile, as shown in the updated unittest.
      
      Reviewers: davidxl, dnovillo
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D22180
      
      llvm-svn: 275072
      29d2641f
    • Hal Finkel's avatar
      Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute · 02012bcf
      Hal Finkel authored
      Reverting r275027 and r275033. These seem to cause miscompiles on the AArch64 buildbot.
      
      llvm-svn: 275042
      02012bcf
    • Hal Finkel's avatar
      Don't use a SmallSet for returned attribute inference · ce881a41
      Hal Finkel authored
      Suggested post-commit by David Majnemer on IRC (following-up on a pre-commit
      review comment).
      
      llvm-svn: 275033
      ce881a41
    • Hal Finkel's avatar
      Let FuncAttrs infer the 'returned' argument attribute · d66a7b05
      Hal Finkel authored
      A function can have one argument with the 'returned' attribute, indicating that
      the associated argument is always the return value of the function. Add
      FuncAttrs inference logic.
      
      Differential Revision: http://reviews.llvm.org/D22202
      
      llvm-svn: 275027
      d66a7b05
  18. Jul 09, 2016
  19. Jul 08, 2016
Loading