<div dir="ltr">The rationale is performance. The more things you can fit inside caches the better. It's also used as a building block for type safe unions of 2, 3 and 4 pointers that take up space for one pointer.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Mar 8, 2014 at 6:22 AM, kwadwo amankwa <span dir="ltr"><<a href="mailto:que@lunarblack.com" target="_blank">que@lunarblack.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi ,<br>
I'm studying the llvm/clang source I came accross this line ;<br>
<br>
97 mutable llvm::PointerIntPair<const llvm::MemoryBuffer *, 2> Buffer;<br>
<br>
<br>
in SourceManager.h and I am curious as to the rationale behind using the PointerPair data structure ?I read the documentation about bit mangling and I would be greatful if someone could provide an explanation for the rationale behind this technique.<br>
<br>
<br>
thanks ,<br>
que<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>