[llvm-dev] [AVR] [MSP430] Code gen improvements for 8 bit and 16 bit targets

Joan Lluch via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 8 23:33:21 PDT 2019

Hi Paul,

TargetTransformInfo hooks are fine, as are the TargetLowering ones, to customise backend code. They would certainly add flexibility compared with relying on instruction Legality alone, and I would up-vote them along with the addition of the missing legality checks in DAGCombine.  However, we shouldn’t apply any target specific code to the frontend optimisations, because frontend code is supposed to be mostly target-independent, and strong dependence on targets is not desirable. This is why I proposed it the way I did.


> On 8 Oct 2019, at 16:43, paul.robinson at sony.com wrote:
> An option is certainly one way to get this effect; another would be to
> add some sort of target-specific query, which would drive the same choices
> in the IR transforms.  TargetTransformInfo appears to be full of these
> sorts of queries.
> —paulr

More information about the llvm-dev mailing list