[PATCH] D47816: [InstCombine] Don't sink instructions across inlined function call.
Renlin Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 6 07:53:32 PDT 2018
renlin added a comment.
I agree that, generally it is not a good idea to sink across function call. I am a little bit consecutive on this change.
Thank you for your suggestion. I checked the document about TTI::isLoweredToCall.
IIUIC, it seems to me this backend information is still not strong enough.
- If the backend returns false for a function, it will get expanded by some passes somewhere in the optimization pipeline. This might complicated the CFG, similar as the inlined function cases.
- If the backend returns true for a function, it is an real function call. This will extend the live-range of related variables.
Should we just stop sinking instructions across any type of function call?
Normally, InstCombine will be called multiple time, if a function got expanded, we still have opportunities to sink instructions when it is beneficial.
Repository:
rL LLVM
https://reviews.llvm.org/D47816
More information about the llvm-commits
mailing list