[PATCH] D132966: [TTI] Allow passing ArrayRef of context instructions (NFC).

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 01:01:31 PDT 2022


dmgreen added a comment.

This seems to mess up the interface to TTI quite a lot. Are there any other cases than the SLP vectorizer where se would pass a vector of Instructions?

The CxtI only has to be a context. It gets a bit fuzzy, but could we just pass the first instruction if it is similar enough to the other instructions in the TreeEntry? It looks like the first item is already passed in at the moment.

Also, on a conceptual level - mul's are expensive, addition is relatively cheap. Would it make sense to try and mark the fadd as cheap by looking at the operands? (When I've tried in the past the performance wasn't great).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132966/new/

https://reviews.llvm.org/D132966



More information about the llvm-commits mailing list