[PATCH] D29200: [JumpThread] Enhance finding partial redundant loads by continuing scanning single predecessor

Z. Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 08:41:44 PST 2017


zzheng added inline comments.


================
Comment at: include/llvm/Analysis/Loads.h:89
+                                bool *IsLoadCSE = nullptr,
+                                unsigned *NumScanedInst = nullptr);
 
----------------
rengolin wrote:
> junbuml wrote:
> > zzheng wrote:
> > > Can we use 
> > > ```
> > > Optional<unsigned &> NumScannedInst
> > > ```
> > > here?
> > Honestly I don't have much idea about the Optional<>, but it looks okay to use it here. However, I believe we can make a separate patch to consider using the Optional for other parameters, not just for this parameter.  Please let me know if we have to use the Optional specifically in this parameter unlikely other parameters.  
> I agree this sounds like something for a different patch.
I agree with you guys. I was only looking at the new parameter and its usage and thought it's appropriate to use Optional<>.


https://reviews.llvm.org/D29200





More information about the llvm-commits mailing list