Add a new target hook for shouldLocalize so that
targets can customize the logic.
Details
Details
- Reviewers
qcolombet aemerson arsenm aditya_nandakumar
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The change itself is ok but is there any way to have more granular overriding of this behavior, instead of overriding the whole shouldLocalize()?
Comment Actions
We can have two functions (one for checking the opcode and another one for the cost), but this doesn't allow targets to localize target specific instruction. That's why I decided move the whole thing to TargetLowering. Do you think having two targets hooks would be better?
Comment Actions
I suppose this is fine, overriding implementations can just call this base class version if the opcode is something they don't want to override.