<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: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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {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">A "purer" object-oriented language would likely be a better starting point than C++, which is too much in thrall to its past.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></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""> cfe-dev [mailto:cfe-dev-bounces@lists.llvm.org]
<b>On Behalf Of </b>Edward Givelberg via cfe-dev<br>
<b>Sent:</b> Wednesday, November 28, 2018 6:50 PM<br>
<b>To:</b> oleg@cohesity.com<br>
<b>Cc:</b> cfe-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [cfe-dev] parallel C++<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Yes, I agree. The new language is what C++ should be, a parallel language,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">and in my opinion what it will inevitably become with hardware evolution.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Nov 28, 2018 at 6:45 PM Oleg Smolsky <<a href="mailto:oleg@cohesity.com">oleg@cohesity.com</a>> wrote:<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">
<div>
<p>Ed, it sounds like you have an idea for a new language with a new execution model and a special object representation. I was merely trying to point out that these ideas have little to do with what C++ compilers do today.
<o:p></o:p></p>
<p>Oleg.<o:p></o:p></p>
<div>
<p class="MsoNormal">On 2018-11-28 15:28, Edward Givelberg wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Oleg,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">May be I am misunderstanding what you're saying... <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Since I am proposing a different framework for execution,<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">the architecture which has an abstract machine <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">and a memory model will have to change. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Since I'd like to have remote objects,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">which are native to C++, unlike the existing objects, which are all local,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I am proposing this IOR layer. Access to objects will have to change.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">An object access will not longer be a memory access, unless some<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">compiler optimization determines that the object is local.<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">So this probably means that it requires changes to the LLVM IR?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">As I said, I don't know enough about the current LLVM architecture<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">to make a detailed plan, but I think it is an interesting problem.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Ed<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Nov 28, 2018 at 5:42 PM Oleg Smolsky <<a href="mailto:oleg@cohesity.com" target="_blank">oleg@cohesity.com</a>> wrote:<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" style="margin-bottom:12.0pt">On 2018-11-28 13:14, Edward Givelberg via cfe-dev wrote:<br>
><br>
> [...]<br>
> Naively, it seems to me that LLVM is a sequential VM, so perhaps its <br>
> architecture needs be extended.<br>
> I am proposing an intermediate representation which encodes object <br>
> operations,<br>
> let's call it IOR. IOR is translated to interconnect hardware <br>
> instructions, as well as LLVM's IR.<br>
> I am proposing a dedicated back end to generate code for the <br>
> interconnect fabric.<br>
<br>
Edward, it sounds to me like you are trying to reinvent Smalltalk. Its <br>
core is really about message passing and perhaps people have made <br>
attempts to make it parallel already.<br>
<br>
On a more serious and specific note, I think you are ignoring the <br>
"abstract C machine" on which both C and C++ languages are built. <br>
Fundamentally, objects are laid out in memory (let's ignore the stack <br>
for now) and are built off primitive and user-defined types. These types <br>
are known (and stable) throughout the compilation process of a single <br>
program and so are the offsets of various fields that comprise the <br>
objects. All these objects (and often their sub-objects) can be read and <br>
written anywhere in a single-threaded program. Multi-threaded programs <br>
must be data-race-free, but essentially follow the same model.<br>
<br>
The point I am trying to make is that the whole model is built on memory <br>
accesses that are eventually lowered to the ISA. There is no rigid <br>
protocol for invoking a member function or reading a member variable - <br>
things just happen in the program's address space. And then there is <br>
code optimizer. The memory accesses (expressed via LLVM IR, for example) <br>
go through various techniques that reduce and eliminate pointless <br>
work... at which point you have the target's ISA and absolutely no <br>
notion of a "method" or "object" (as a well-formed program cannot tell <br>
that the code has been re-arranged, reduced, reordered etc).<br>
<br>
I suggest that you take a look at <a href="https://godbolt.org" target="_blank">https://godbolt.org</a> and see what the
<br>
compiler emits with -O3 for a few short class/function templates as well <br>
as normal procedural code.<br>
<br>
Oleg.<o:p></o:p></p>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>