<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 20, 2016, at 1:50 PM, Eric Christopher via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><br class="Apple-interchange-newline"><br class="">+def ProcVulcan  : SubtargetFeature<"vulcan", "ARMProcFamily", "Vulcan",<br class="">+                                   "Broadcom Vulcan processors", [<br class="">+                                   FeatureFPARMv8,<br class="">+                                   FeatureNEON,<br class="">+                                   FeatureCrypto,<br class="">+                                   FeatureCRC,<br class="">+                                   HasV8_1aOps]>;<br class="">+<br class=""></blockquote><div class=""><br class=""></div><div class="">So, why are all of the processors given as SubtargetFeatures as well as processors? This seems ... less than optimal. I.e. I can't come up with a reason I'd want to say "llc -mattr=+vulcan" rather than llc -mcpu=vulcan.</div></div></div></div></blockquote><div><br class=""></div><div>Yes the pattern is strange. But there is one problem today: We want to initialize a bunch of cost values. This is currently done in  Arch64::Subtarget::initializeProperties(). These costs are really per CPU so we need to set the ProcFamily enum per CPU. Initializing the cost values together with the processor definition in tablegen would have been nicer but is not sanely possible today.</div></div><div class="">(Using the SubtargetFeatures doesn't cut it, because I need 1 feature for each variable+value combination, the generated code always goes for the minimum in case the var is initialized multiple times while I sometimes want max, I shouldn't have boolean -mattrs for initializing cost values, etc.)</div><div class=""><br class=""></div><div class="">- Matthias</div></body></html>