1. Jan 03, 2019
  2. Jan 02, 2019
    • Philip Pfaffe's avatar
      Extend Module::getOrInsertGlobal to control the construction of the · 6bc98ad7
      Philip Pfaffe authored
      GlobalVariable
      
      Summary:
      Extend Module::getOrInsertGlobal to accept a callback for creating a new
      GlobalVariable if necessary instead of calling the GV constructor
      directly using default arguments. Additionally overload
      getOrInsertGlobal for the previous default behavior.
      
      Reviewers: chandlerc
      
      Subscribers: hiraditya, llvm-commits, bollu
      
      Differential Revision: https://reviews.llvm.org/D56130
      
      llvm-svn: 350219
      6bc98ad7
    • Andrea Di Biagio's avatar
      [MCA] Minor refactoring of method DefaultResourceStrategy::select. NFCI · 0682afba
      Andrea Di Biagio authored
      Common code used by the default resource strategy to select pipeline resources
      has been moved to an helper function.
      
      The new selection logic has been slightly rewritten to get rid of a redundant
      zero check on the `ReadyMask` value. Before this patch, method select internally
      called function `PowerOf2Floor` to compute the next ready pipeline resource.
      However, `PowerOf2Floor` forces an implicit (redundant) zero check on the input
      value. By construction, `ReadyMask` can never be zero. This patch replaces the
      call to `PowerOf2Floor` with an equivalent block of code which avoids the
      redundant zero check. This gives a minor 3-3.5% speedup on a release build.
      
      No functional change intended.
      
      llvm-svn: 350218
      0682afba