[PATCH] D59785: [TargetLowering] Change getOptimalMemOpType to take a Function instead of a MachineFunction

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 16:10:06 PDT 2019


SjoerdMeijer added a comment.

Hi Florian, thanks for taking a look!

> I glanced over the implementations and it seems like they only use the function to check its attributes.

Yep, that's correct. Most implementations don't actually use it, but if they do, they query the function attributes.

> (requiring access to the function seems a bit odd to me, just to get the memory operation type)

The MachineFunction is definitely a bit odd.  I definitely don't mind passing just the function attributes, but thought that  passing the Function would not be totally unreasonable, as we keep our options more open just in case someone would like to use it (perhaps downstream users).


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

https://reviews.llvm.org/D59785





More information about the llvm-commits mailing list