<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I thought exactly the same thing somehow. </span><span style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> llvm-commits-bounces@cs.uiuc.edu [mailto:llvm-commits-bounces@cs.uiuc.edu] <b>On Behalf Of </b>Chandler Carruth<br><b>Sent:</b> Friday, March 29, 2013 5:15 PM<br><b>To:</b> Eric Christopher<br><b>Cc:</b> Commit Messages and Patches for LLVM<br><b>Subject:</b> Re: [llvm] r178366 - Use 12 as the magic number for our abbreviation data and our<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Mar 29, 2013 at 1:23 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<o:p></o:p></p><div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Author: echristo<br>Date: Fri Mar 29 15:23:06 2013<br>New Revision: 178366<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=178366&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=178366&view=rev</a><br>Log:<br>Use 12 as the magic number<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>of inline elements in the small vectors<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>for our abbreviation data and our<br>die values. A lot of DIEs have 10 attributes in C++ code (example<br>clang), none had more than 12. Seems like a good default. <o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>There, fixed that commit log for ya. ;] Seriously, i thought you were writing "12" into the debug output at first.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Also, should this maybe be a constant with a name somewhere for the day when we need it to be 16?<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal><br>Modified:<br> llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp<br> llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h<br> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br><br>Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=178366&r1=178365&r2=178366&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=178366&r1=178365&r2=178366&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original)<br>+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Fri Mar 29 15:23:06 2013<br>@@ -144,7 +144,7 @@ void DIE::print(raw_ostream &O, unsigned<br> O << "Size: " << Size << "\n";<br> }<br><br>- const SmallVector<DIEAbbrevData, 8> &Data = Abbrev.getData();<br>+ const SmallVector<DIEAbbrevData, 12> &Data = Abbrev.getData();<br><br> IndentCount += 2;<br> for (unsigned i = 0, N = Data.size(); i < N; ++i) {<br>@@ -324,7 +324,7 @@ void DIEEntry::print(raw_ostream &O) {<br> ///<br> unsigned DIEBlock::ComputeSize(AsmPrinter *AP) {<br> if (!Size) {<br>- const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev.getData();<br>+ const SmallVector<DIEAbbrevData, 12> &AbbrevData = Abbrev.getData();<br> for (unsigned i = 0, N = Values.size(); i < N; ++i)<br> Size += Values[i]->SizeOf(AP, AbbrevData[i].getForm());<br> }<br>@@ -343,7 +343,7 @@ void DIEBlock::EmitValue(AsmPrinter *Asm<br> case dwarf::DW_FORM_block: Asm->EmitULEB128(Size); break;<br> }<br><br>- const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev.getData();<br>+ const SmallVector<DIEAbbrevData, 12> &AbbrevData = Abbrev.getData();<br> for (unsigned i = 0, N = Values.size(); i < N; ++i)<br> Values[i]->EmitValue(Asm, AbbrevData[i].getForm());<br> }<br><br>Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h?rev=178366&r1=178365&r2=178366&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h?rev=178366&r1=178365&r2=178366&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h (original)<br>+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h Fri Mar 29 15:23:06 2013<br>@@ -66,7 +66,7 @@ namespace llvm {<br><br> /// Data - Raw data bytes for abbreviation.<br> ///<br>- SmallVector<DIEAbbrevData, 8> Data;<br>+ SmallVector<DIEAbbrevData, 12> Data;<br><br> public:<br> DIEAbbrev(uint16_t T, uint16_t C) : Tag(T), ChildrenFlag(C), Data() {}<br>@@ -75,7 +75,7 @@ namespace llvm {<br> uint16_t getTag() const { return Tag; }<br> unsigned getNumber() const { return Number; }<br> uint16_t getChildrenFlag() const { return ChildrenFlag; }<br>- const SmallVector<DIEAbbrevData, 8> &getData() const { return Data; }<br>+ const SmallVector<DIEAbbrevData, 12> &getData() const { return Data; }<br> void setTag(uint16_t T) { Tag = T; }<br> void setChildrenFlag(uint16_t CF) { ChildrenFlag = CF; }<br> void setNumber(unsigned N) { Number = N; }<br>@@ -133,7 +133,7 @@ namespace llvm {<br><br> /// Attribute values.<br> ///<br>- SmallVector<DIEValue*, 32> Values;<br>+ SmallVector<DIEValue*, 12> Values;<br><br> // Private data for print()<br> mutable unsigned IndentCount;<br>@@ -150,7 +150,7 @@ namespace llvm {<br> unsigned getOffset() const { return Offset; }<br> unsigned getSize() const { return Size; }<br> const std::vector<DIE *> &getChildren() const { return Children; }<br>- const SmallVector<DIEValue*, 32> &getValues() const { return Values; }<br>+ const SmallVector<DIEValue*, 12> &getValues() const { return Values; }<br> DIE *getParent() const { return Parent; }<br> /// Climb up the parent chain to get the compile unit DIE this DIE belongs<br> /// to.<br><br>Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=178366&r1=178365&r2=178366&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=178366&r1=178365&r2=178366&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Mar 29 15:23:06 2013<br>@@ -1672,8 +1672,8 @@ DwarfUnits::computeSizeAndOffset(DIE *Di<br> // Start the size with the size of abbreviation code.<br> Offset += MCAsmInfo::getULEB128Size(AbbrevNumber);<br><br>- const SmallVector<DIEValue*, 32> &Values = Die->getValues();<br>- const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev->getData();<br>+ const SmallVector<DIEValue*, 12> &Values = Die->getValues();<br>+ const SmallVector<DIEAbbrevData, 12> &AbbrevData = Abbrev->getData();<br><br> // Size the DIE attribute values.<br> for (unsigned i = 0, N = Values.size(); i < N; ++i)<br>@@ -1767,8 +1767,8 @@ void DwarfDebug::emitDIE(DIE *Die, std::<br> dwarf::TagString(Abbrev->getTag()));<br> Asm->EmitULEB128(AbbrevNumber);<br><br>- const SmallVector<DIEValue*, 32> &Values = Die->getValues();<br>- const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev->getData();<br>+ const SmallVector<DIEValue*, 12> &Values = Die->getValues();<br>+ const SmallVector<DIEAbbrevData, 12> &AbbrevData = Abbrev->getData();<br><br> // Emit the DIE attribute values.<br> for (unsigned i = 0, N = Values.size(); i < N; ++i) {<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" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></body></html>