Skip to content
  1. Mar 09, 2017
    • Peter Collingbourne's avatar
      WholeProgramDevirt: Implement importing for uniform ret val opt. · 0152c815
      Peter Collingbourne authored
      Differential Revision: https://reviews.llvm.org/D29854
      
      llvm-svn: 297350
      0152c815
    • Peter Collingbourne's avatar
      6d284fab
    • Teresa Johnson's avatar
      Perform symbol binding for .symver versioned symbols · d8204472
      Teresa Johnson authored
      Summary:
      In a .symver assembler directive like:
      .symver name, name2@@nodename
      "name2@@nodename" should get the same symbol binding as "name".
      
      While the ELF object writer is updating the symbol binding for .symver
      aliases before emitting the object file, not doing so when the module
      inline assembly is handled by the RecordStreamer is causing the wrong
      behavior in *LTO mode.
      
      E.g. when "name" is global, "name2@@nodename" must also be marked as
      global. Otherwise, the symbol is skipped when iterating over the LTO
      InputFile symbols (InputFile::Symbol::shouldSkip). So, for example,
      when performing any *LTO via the gold-plugin, the versioned symbol
      definition is not recorded by the plugin and passed back to the
      linker. If the object was in an archive, and there were no other symbols
      needed from that object, the object would not be included in the final
      link and references to the versioned symbol are undefined.
      
      The llvm-lto2 tests added will give an error about an unused symbol
      resolution without the fix.
      
      Reviewers: rafael, pcc
      
      Reviewed By: pcc
      
      Subscribers: mehdi_amini, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D30485
      
      llvm-svn: 297332
      d8204472
    • Evgeniy Stepanov's avatar
      Don't merge global constants with non-dbg metadata. · 8537d999
      Evgeniy Stepanov authored
      !type metadata can not be dropped. An alternative to this is adding
      !type metadata from the replaced globals to the replacement, but that
      may weaken type tests and make them slower at the same time.
      
      The merged global gets !dbg metadata from replaced globals, and can
      end up with multiple debug locations.
      
      llvm-svn: 297327
      8537d999
  2. Mar 07, 2017
  3. Mar 06, 2017
  4. Mar 04, 2017
  5. Mar 03, 2017
  6. Mar 02, 2017
  7. Feb 28, 2017
    • Dehao Chen's avatar
      Add function importing info from samplepgo profile to the module summary. · a60cdd38
      Dehao Chen authored
      Summary: For SamplePGO, the profile may contain cross-module inline stacks. As we need to make sure the profile annotation happens when all the hot inline stacks are expanded, we need to pass this info to the module importer so that it can import proper functions if necessary. This patch implemented this feature by emitting cross-module targets as part of function entry metadata. In the module-summary phase, the metadata is used to build call edges that points to functions need to be imported.
      
      Reviewers: mehdi_amini, tejohnson
      
      Reviewed By: tejohnson
      
      Subscribers: davidxl, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D30053
      
      llvm-svn: 296498
      a60cdd38
  8. Feb 24, 2017
  9. Feb 23, 2017
  10. Feb 18, 2017
    • Dehao Chen's avatar
      Increases full-unroll threshold. · 7d230325
      Dehao Chen authored
      Summary:
      The default threshold for fully unroll is too conservative. This patch doubles the full-unroll threshold
      
      This change will affect the following speccpu2006 benchmarks (performance numbers were collected from Intel Sandybridge):
      
      Performance:
      
      403	0.11%
      433	0.51%
      445	0.48%
      447	3.50%
      453	1.49%
      464	0.75%
      
      Code size:
      
      403	0.56%
      433	0.96%
      445	2.16%
      447	2.96%
      453	0.94%
      464	8.02%
      
      The compiler time overhead is similar with code size.
      
      Reviewers: davidxl, mkuper, mzolotukhin, hfinkel, chandlerc
      
      Reviewed By: hfinkel, chandlerc
      
      Subscribers: mehdi_amini, zzheng, efriedma, haicheng, hfinkel, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D28368
      
      llvm-svn: 295538
      7d230325
    • Justin Bogner's avatar
      OptDiag: Allow constructing DiagnosticLocation from DISubprograms · 7bc978b5
      Justin Bogner authored
      This avoids creating a DILocation just to represent a line number,
      since creating Metadata is expensive. Creating a DiagnosticLocation
      directly is much cheaper.
      
      llvm-svn: 295531
      7bc978b5
  11. Feb 17, 2017
  12. Feb 16, 2017
  13. Feb 15, 2017
  14. Feb 14, 2017
  15. Feb 13, 2017
  16. Feb 10, 2017
    • Chandler Carruth's avatar
      [PM] Port ArgumentPromotion to the new pass manager. · addcda48
      Chandler Carruth authored
      Now that the call graph supports efficient replacement of a function and
      spurious reference edges, we can port ArgumentPromotion to the new pass
      manager very easily.
      
      The old PM-specific bits are sunk into callbacks that the new PM simply
      doesn't use. Unlike the old PM, the new PM simply does argument
      promotion and afterward does the update to LCG reflecting the promoted
      function.
      
      Differential Revision: https://reviews.llvm.org/D29580
      
      llvm-svn: 294667
      addcda48
    • Peter Collingbourne's avatar
      WholeProgramDevirt: Check that VCP candidate functions are defined before evaluating them. · 17febdbb
      Peter Collingbourne authored
      This was crashing before.
      
      llvm-svn: 294666
      17febdbb
    • Chandler Carruth's avatar
      [PM/LCG] Teach the LazyCallGraph how to replace a function without · aaad9f84
      Chandler Carruth authored
      disturbing the graph or having to update edges.
      
      This is motivated by porting argument promotion to the new pass manager.
      Because of how LLVM IR Function objects work, in order to change their
      signature a new object needs to be created. This is efficient and
      straight forward in the IR but previously was very hard to implement in
      LCG. We could easily replace the function a node in the graph
      represents. The challenging part is how to handle updating the edges in
      the graph.
      
      LCG previously used an edge to a raw function to represent a node that
      had not yet been scanned for calls and references. This was the core
      of its laziness. However, that model causes this kind of update to be
      very hard:
      1) The keys to lookup an edge need to be `Function*`s that would all
         need to be updated when we update the node.
      2) There will be some unknown number of edges that haven't transitioned
         from `Function*` edges to `Node*` edges.
      
      All of this complexity isn't necessary. Instead, we can always build
      a node around any function, always pointing edges at it and always using
      it as the key to lookup an edge. To maintain the laziness, we need to
      sink the *edges* of a node into a secondary object and explicitly model
      transitioning a node from empty to populated by scanning the function.
      This design seems much cleaner in a number of ways, but importantly
      there is now exactly *one* place where the `Function*` has to be
      updated!
      
      Some other cleanups that fall out of this include having something to
      model the *entry* edges more accurately. Rather than hand rolling parts
      of the node in the graph itself, we have an explicit `EdgeSequence`
      object that gives us exactly the functionality needed. We also have
      a consistent place to define the edge iterators and can use them for
      both the entry edges and the internal edges of the graph.
      
      The API used to model the separation between a node and its edges is
      intentionally very thin as most clients are expected to deal with nodes
      that have populated edges. We model this exactly as an optional does
      with an additional method to populate the edges when that is
      a reasonable thing for a client to do. This is based on API design
      suggestions from Richard Smith and David Blaikie, credit goes to them
      for helping pick how to model this without it being either too explicit
      or too implicit.
      
      The patch is somewhat noisy due to shifting around iterator types and
      new syntax for walking the edges of a node, but most of the
      functionality change is in the `Edge`, `EdgeSequence`, and `Node` types.
      
      Differential Revision: https://reviews.llvm.org/D29577
      
      llvm-svn: 294653
      aaad9f84
    • Peter Collingbourne's avatar
      De-duplicate some code for creating an AARGetter suitable for the legacy PM. · cea1e4e7
      Peter Collingbourne authored
      I'm about to use this in a couple more places.
      
      Differential Revision: https://reviews.llvm.org/D29793
      
      llvm-svn: 294648
      cea1e4e7
  17. Feb 09, 2017
  18. Feb 08, 2017
  19. Feb 07, 2017
Loading