<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;">Hi Ahmed,<div><br><div><div>On Nov 16, 2013, at 7:41 PM, Ahmed Bougacha <<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="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;">On Tue, Nov 12, 2013 at 9:59 AM, Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>> wrote:<br><blockquote type="cite">Hi Ahmed,<br><br>The code looks fine to me, but the additional documentation is a bit too<br>short.<br><br>+TableGen will also generate an enumeration consisting of all named Operand<br>+types defined in the backend, in the llvm::XXX::OpTypes namespace.<br>+<br><br>Indeed, I am not sure that it is clear that "types defined in the backend"<br>are the derived types in the backend. In my opinion the proposed phrasing<br>would suffix if and only if there is an example to illustrate it.<br>Unfortunately, you cannot reuse the XNORrr example as it does not have such<br>types. You have to add one.<br></blockquote><br>Yup, added a subsubsection (with drive-by consistency changes) to demonstrate.<br></div></blockquote>Thanks.</div><div><br><blockquote type="cite"><div style="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">Out of curiosity, for your mapping how the “regular” types are mapped?<br></blockquote><br>I assume you're talking about the immediate Operand types defined in<br>Target.td (i8imm, i32imm, ..): they are members of the namespace, just<br>like target-defined types. </div></blockquote>Yes, I was talking about those :).</div><div><br><blockquote type="cite"><div style="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;">Added a sentence to the doc paragraph.<br></div></blockquote><div>Great!</div><br><blockquote type="cite"><div style="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;">We can move them to a common namespace should the need arise (it did not).<br></div></blockquote>Agreed.</div><div><br></div><div>-Quentin<br><blockquote type="cite"><div style="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>Attached updated patch, thanks Quentin & Sean!<br><br>- Ahmed<br><br><blockquote type="cite">Cheers,<br>-Quentin<br><br>On Nov 11, 2013, at 1:42 PM, Ahmed Bougacha <<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>><br>wrote:<br><br>Hi Quentin, all,<br><br>Here's the next patch I had waiting for review.<br>In some situations it's very useful to have access to an enum of all<br>operand types (that is, instances of Operand in the target's tablegen<br>files).<br>My use for this is associating MI/SD-pattern level operands with the<br>underlying list of MC operand, and keeping track of that association.<br>I also sent a nice-to-have feature implemented in another email<br>(complete machine operand printing) that was very helpful for<br>debugging and testing.<br><br>Thanks!<br>- Ahmed<br><br>---<br>docs/WritingAnLLVMBackend.rst       |  3 +++<br>utils/TableGen/InstrInfoEmitter.cpp | 31 +++++++++++++++++++++++++++++++<br>2 files changed, 34 insertions(+)<br><0001-TableGen-Generate-an-enum-for-all-named-Operand-type.patch><br><br></blockquote><span><Updated-doc_0001-TableGen-Generate-an-enum-for-all-named-Operand-type.patch></span></div></blockquote></div><br></div></body></html>