<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 12, 2013, at 2:51 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">At some point something more than magic numbers would be good. Maybe<br>an enum or something at least with some accompanying documentation as<br>to how the magic numbers were gotten. :)<br><br></div></blockquote><div><br></div></div>Hi Eric, <div><br></div><div>The BasicTargetTransformInfo needs to implement heuristics for estimating the costs of instructions.  For example, it needs to estimate the cost of instructions that the different backends mark as 'legal' or 'custom'.  At the moment the magic numbers in the code are accompanied by a comment.  I don't think that grouping all of these numbers into a single table/enum would make them more readable. Do you think that we should do something similar to InlineCost.h ? It has fewer parameters but the idea is the same.</div><div> </div><div>Thanks,</div><div>Nadav</div><div><br></div></body></html>