Can someone remind me why ScalarTargetTransformInfo and VectorTargetTransformInfo are separate?

I remember this being discussed, and may have even supported it, but I’m looking at cleaning up some of how the target transform info works, and it would be a lot less duplicate boiler-plate code to only have one.

Having a narrower interface doesn’t seem to make a lot of sense in this case because for the users, there is no real cost, and for the implementors, they always have to implement both and do so in the same location.

If not shout out with a compelling reason why they should be separate, I’ll merge them really soon… It will simplify quite a few things.

I remember this being discussed, and may have even supported it, but I'm looking at cleaning up some of how the target transform info works, and it would be a lot less duplicate boiler-plate code to only have one.

The original idea was that different transformations would have different interfaces. For example the vectorizers would use the VectorTTI, the LSR would use the Scalar TTI, etc. We did not want to create yet another TargetLowering interface with lots of functions in it.

Having a narrower interface doesn't seem to make a lot of sense in this case because for the users, there is no real cost, and for the implementors, they always have to implement both and do so in the same location.

If not shout out with a compelling reason why they should be separate, I'll merge them really soon... It will simplify quite a few things.

I don't object merging the two interfaces. if at some point in the future we need to add a new interface (for example for exposing register information) then we can add the new interface.