[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
Tue Nov 13 19:09:06 PST 2018


tstellar added inline comments.


================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:533
+    return areInlineCompatible(Caller, Callee) &&
+           AttributeFuncs::areInlineCompatible(*Caller, *Callee);
+  }
----------------
chandlerc wrote:
> While this may be sufficient, it isn't necessary and seems a but of a conflation...
> 
> I'd much rather this be sunk into the codegen layers basic TTI impl so that targets can override it cleanly.
> 
> Also, I don't think byval and normal arguments have the same constraints.
> 
> Also, I'd really like to ensure that basic integers that are valid to promote across subtargets still get promoted even when inlining wouldn't be valid.
Ok, so are you suggesting that I move this function definition into BasicTTIImplBase and re-implement it to handle the simple case of basic integers?  Anything else?






Repository:
  rL LLVM

https://reviews.llvm.org/D53554





More information about the llvm-commits mailing list