<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 24, 2015 at 11:16 PM Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Aug 24, 2015, at 10:37 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 24, 2015 at 10:06 PM Steve King <<a href="mailto:steve@metrokings.com" target="_blank">steve@metrokings.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Aug 24, 2015 at 7:53 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br>
> Bike shed: how about pass the function around instead.<br>
<br>
Mehdi Amini advised to pass attributes instead of the function.<br></blockquote><div><br></div><div> Huh. I wonder why? My logic: ISel lowering in general is subtarget based so we're already doing a lot of function based things around this. Also it means that you have to explicitly ask for the attribute set (which you obviously didn't have in either place) rather than the single place. I'm not wedded to it, but curious :)</div><div><br></div></div></div></div></blockquote><br></div></div><div style="word-wrap:break-word"><div>Just general API design I guess, I’m less familiar with similar methods in the backend as you are, but if I see a method taking a Function I will wonder why it need to poke at the function. </div><div>The intent seem more clear to me if the argument can be more specific. For instance, I wouldn’t pass a Module as parameter to a function that needs to access the DataLayout.</div></div></blockquote><div><br></div><div>Sure, I can agree with that. I was thinking more the "hey, I'd like to inspect more about the function", but as I said, don't care that much, just curious about the logic here.</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>— </div></div><div style="word-wrap:break-word"><div>Mehdi</div><div><br></div></div></blockquote></div></div>