[PATCH] D33220: [PartialInlining] Replace delete with unique_ptr in computeCallsiteToProfCountMap
    Vedant Kumar via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue May 16 07:29:18 PDT 2017
    
    
  
vsk added inline comments.
================
Comment at: lib/Transforms/IPO/PartialInlining.cpp:576
       }
   };
 
----------------
IMHO the code that uses the BFI should be moved into a separate function which accepts a BFI reference. On the "!GetBFI" path, you'd `make_unique` a BFI and pass it into a helper. Else, you'd pass in "&(*GetBFI)(*Caller)".
(On an unrelated note, I find "&(*GetBFI)(*Caller)" pretty hard to read...)
https://reviews.llvm.org/D33220
    
    
More information about the llvm-commits
mailing list