[PATCH] D31987: [SDAG] Teach Chain Analysis about BaseIndexOffset addressing.

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 11:58:21 PDT 2017


niravd added a comment.



In https://reviews.llvm.org/D31987#732435, @spatel wrote:

> I had not looked at this code before, so I'll need help reviewing. As part of trying to understand what this function is doing, I tried to improve it with some cleanups:
>  https://reviews.llvm.org/rL300850
>  https://reviews.llvm.org/rL300854
>  https://reviews.llvm.org/rL300860


Nice!

> This patch says that if BaseIndexOffset::match() returns matching base pointers, then we don't need to go through all of the checks below it. In that case, can we remove some/all of the code in findBaseOffset()?

Yes. This should fully encompass the Base check and we should be able to repoint the relevant additional checks for globals/constants and framepointers to the baseindex check. I have a follow up patch that should completely remove findBaseOffset and do the incremental checks for FramePointers etc. off of the BaseIndexOffset match which should be correct (though I need to do a more thorough check to be more sure). I kept if off here to make it clearer that this is just adding the BaseIndexOffset case analysis to our current BaseOffset check and not dropping any cases.


https://reviews.llvm.org/D31987





More information about the llvm-commits mailing list