[PATCH] D36061: [MSP430] Implement multiplication by a constant

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 15:14:04 PDT 2017


efriedma added a comment.

> Can you please suggest where can I put this function? I've never heard about target-independent utilities.

For this particular function, if you just want to share the code between MSP430 and MIPS, probably makes sense to stick it into the SelectionDAG class

The alternative would be to make this a target-independent lowering in LegalizeDAG.

----

Do you need to worry about codesize here?  Lowering something like "a * 0x3333" to an inline sequence like this is going to generate a lot of code.


https://reviews.llvm.org/D36061





More information about the llvm-commits mailing list