<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I don’t have a strong opinion on that.<div>This matches what x86 does and to some extend what ARM does for non darwin target.</div><div><br></div><div>What would you suggest?</div><div>Emit an error?</div><div>Should we rationalize that for all targets?</div><div><br></div><div>Thanks,<br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-Quentin</div>

</div>
<br><div><div>On Apr 15, 2014, at 6:25 PM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><div><br class="Apple-interchange-newline">On Apr 14, 2014, at 5:37 PM, Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I’ve changed the default to generic in r206228.</div></blockquote><div><br></div>FWIW, I don’t think this makes any sense. I don’t think we should generate “generic” arm64 code unless someone explicitly requests it. Otherwise, we’re just hiding a user error or driver bug.</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;">-Andy</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>Thanks,</div><div><div apple-content-edited="true"><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">-Quentin</div></div><br><div><div>On Apr 14, 2014, at 3:16 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Let's go with the "generic" x86 model. It looks like ARM64 does have a<br>definition for that.<br><br>-eric<br><br>On Mon, Apr 14, 2014 at 3:13 PM, Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>> wrote:<br><blockquote type="cite">Well, in fact, I am not sure what is the best approach here.<br><br>ARM and X86 already seem to duplicate this logic somehow, see below.<br><br>So if we are about to duplicate something I’d prefer to keep it minimal like<br>in the current patch.<br><br>What do you think?<br><br>** X86 **<br><br>— X86Subtarget.cpp:<br>void X86Subtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {<br> std::string CPUName = CPU;<br> if (CPUName.empty())<br>   CPUName = "generic";<br><br>— X86MCTargetDesc.cpp:<br>MCSubtargetInfo *X86_MC::createX86MCSubtargetInfo(StringRef TT, StringRef<br>CPU,<br>                                                 StringRef FS) {<br>[…]<br> std::string CPUName = CPU;<br> if (CPUName.empty()) {<br>#if defined(i386) || defined(__i386__) || defined(__x86__) ||<br>defined(_M_IX86)\<br>   || defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64)<br>   CPUName = sys::getHostCPUName();<br>#else<br>   CPUName = "generic";<br>#endif<br> }<br><br><br>** ARM **<br><br>— ARMSubtarget.cpp:<br>void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {<br> if (CPUString.empty()) {<br>   if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s"))<br>     // Default to the Swift CPU when targeting armv7s/thumbv7s.<br>     CPUString = "swift";<br>   else<br>     CPUString = "generic";<br> }<br><br>— ARMMCTargetDesc.cpp:<br>std::string ARM_MC::ParseARMTriple(StringRef TT, StringRef CPU) {<br>[...]<br> bool NoCPU = CPU == "generic" || CPU.empty();<br> std::string ARMArchFeature;<br> if (Idx) {<br>   unsigned SubVer = TT[Idx];<br>   if (SubVer == '8') {<br>     if (NoCPU)<br>       // v8a: FeatureDB, FeatureFPARMv8, FeatureNEON, FeatureDSPThumb2,<br>       //      FeatureMP, FeatureHWDiv, FeatureHWDivARM, FeatureTrustZone,<br>       //      FeatureT2XtPk, FeatureCrypto, FeatureCRC<br>       ARMArchFeature =<br>"+v8,+db,+fp-armv8,+neon,+t2dsp,+mp,+hwdiv,+hwdiv-arm,"<br>                        "+trustzone,+t2xtpk,+crypto,+crc";<br>     else<br>       // Use CPU to figure out the exact features<br>       ARMArchFeature = "+v8”;<br>[…]<br><br>-Quentin<br><br>On Apr 14, 2014, at 3:02 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br><br>Thanks!<br><br>I'd probably see the ARM one as closer... it doesn't cope well if<br>there's no cpu given it doesn't look like :)<br><br>-eric<br><br>On Mon, Apr 14, 2014 at 3:00 PM, Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>><br>wrote:<br><br>Sorry, I thought I was doing the same thing as X86 here.<br>I’ve been misled by this sequence:<br>MCSubtargetInfo *X86_MC::createX86MCSubtargetInfo(StringRef TT, StringRef<br>CPU,<br>                                                StringRef FS) {<br>[...]<br>std::string CPUName = CPU;<br>if (CPUName.empty()) {<br>#if defined(i386) || defined(__i386__) || defined(__x86__) ||<br>defined(_M_IX86)\<br>  || defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64)<br>  CPUName = sys::getHostCPUName();<br>#else<br>  CPUName = "generic";<br>#endif<br>}<br><br>Let me rework my copy then!<br><br>-Quentin<br><br>On Apr 14, 2014, at 2:42 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br><br>Uh, what?<br><br>How about taking the same code from the ARM or X86 backends? Or something<br>else?<br><br>-eric<br><br>On Mon, Apr 14, 2014 at 2:25 PM, Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>><br>wrote:<br><br>Author: qcolombet<br>Date: Mon Apr 14 16:25:53 2014<br>New Revision: 206211<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=206211&view=rev">http://llvm.org/viewvc/llvm-project?rev=206211&view=rev</a><br>Log:<br>[ARM64][MC] Set the default CPU to cyclone when initilizating the MC layer.<br>This matches that ARM64Subtarget does for now.<br><br>This is related to <<a href="rdar://problem/16573920">rdar://problem/16573920</a>><br><br>Modified:<br> llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64MCTargetDesc.cpp<br><br>Modified: llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64MCTargetDesc.cpp<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64MCTargetDesc.cpp?rev=206211&r1=206210&r2=206211&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64MCTargetDesc.cpp?rev=206211&r1=206210&r2=206211&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64MCTargetDesc.cpp<br>(original)<br>+++ llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64MCTargetDesc.cpp Mon Apr<br>14 16:25:53 2014<br>@@ -43,6 +43,12 @@ static MCInstrInfo *createARM64MCInstrIn<br>static MCSubtargetInfo *createARM64MCSubtargetInfo(StringRef TT, StringRef<br>CPU,<br>                                                 StringRef FS) {<br>MCSubtargetInfo *X = new MCSubtargetInfo();<br>+<br>+  // FIXME: Make this darwin-only.<br>+  if (CPU.empty())<br>+    // We default to Cyclone for now, on Darwin.<br>+    CPU = "cyclone";<br>+<br>InitARM64MCSubtargetInfo(X, TT, CPU, FS);<br>return X;<br>}<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br><br><br><br></blockquote></blockquote></div><br></div></div>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></blockquote></div><br></div></body></html>