[PATCH] D53554: [Argument Promotion] Only promote args when function attributes are compatible

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 18:53:51 PST 2018


tstellar added inline comments.


================
Comment at: lib/Transforms/IPO/ArgumentPromotion.cpp:813
+/// Test that there are no attribute conflicts between Caller and Callee
+static bool functionsHaveCompatibleAttributes(const CallSite &CS,
+                                              const TargetTransformInfo &TTI) {
----------------
echristo wrote:
> Seems like we should expose this on TTI and that way backends can override and keep a single copy between here and InlineCost.cpp.
These are the only callers of TTI.areInlineCompatible().  Should we just roll it into that or create something new like?  Also, eventually won't we want different call-backs for InlineCost and ArgumentPromotion?


Repository:
  rL LLVM

https://reviews.llvm.org/D53554





More information about the llvm-commits mailing list