[PATCH] D62699: [InlineCost] Add support for UnaryOperator

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 15:00:05 PDT 2019


cameron.mcinally accepted this revision.
cameron.mcinally added a comment.
This revision is now accepted and ready to land.

LGTM.

I'm not that familiar with InlineCost, but I see that almost all of this is copied from `visitBinaryOperator(...)`, so I'm pretty confident in the review.

> I was able to test the increased fp cost. The included test case will report a cost of 100 before this patch and 125 after this patch. I based this on an earlier arm test case in the test file and just changed an fmul by constant to an fneg. I can pre-commit this test but wanted opinions on if this test needs changes.

FMul seems like a good first attempt. Maybe a cost of XOR by constant is better, but they're probably pretty similar anyway.


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

https://reviews.llvm.org/D62699





More information about the llvm-commits mailing list