[PATCH] D27518: Moving isComplex decision to TTI
    Ayal Zaks via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Dec  9 13:30:08 PST 2016
    
    
  
Ayal added a comment.
In https://reviews.llvm.org/D27518#616355, @mkuper wrote:
> I have some comments on the patch, but on a higher level, I'm not sure this is the right way to do this.
>  The only place that'll call this new TTI hook will be isLikelyComplexAddressComputation(), and the only thing we do with the result of isLikelyComplexAddressComputation() is feed it into a different TTI hook - TTI.getAddressComputationCost().
>
> Perhaps we can enhance getAddressComputationCost() instead of adding another hook?
Yes we can, by passing it the (possibly Optional<>) APStrideVal instead of the current boolean "IsComplexComputation", and folding the "how expensive are certain stride values" logic from isLikelyComplexAddressComputation() down to getAddressComputationCost(). In any case this logic should best be target dependent, right?
https://reviews.llvm.org/D27518
    
    
More information about the llvm-commits
mailing list