<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>> same source?</p>
<p><br>
</p>
<p>I did this a while ago but yes I suspect so. I'll have to restart the experiment.</p>
<p><br>
</p>
<p> - Jay<br>
</p>
<p><br>
</p>
<div id="Signature"><br>
</div>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="width: 98%; display: inline-block;">
<div id="x_divRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b> M3devel <m3devel-bounces@elegosoft.com> on behalf of Rodney M. Bates <rodney_bates@lcwb.coop><br>
<b>Sent:</b> Saturday, March 11, 2017 10:12 PM<br>
<b>To:</b> m3devel@elegosoft.com<br>
<b>Subject:</b> Re: [M3devel] subtle IR differences for platforms that are really the same</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size: 10pt;">
<div class="PlainText">Hmm, looks like all reveal_opaque ops in a unit are are emitted at one time by<br>
Revelation.Declare. It uses a "Set" that has both a linear linked list and a<br>
hash table. The hash table sounds suspicious, but at a glance, I don't see<br>
anything other than all the reveal_opaque's being emitted here, with nothing<br>
interspersed. So that would only reorder multiple reveal_opaque's relative<br>
to each other, with nothing in between them.<br>
<br>
<br>
If there is only one, maybe something about the calls to Revelation.Declare in<br>
Module.CompileModule? The comment at :979:<br>
<br>
<br>
(**** moved below **** External.GenImports (t.externals); *)<br>
<br>
would change where the reveal_opaque's were relative to other things.<br>
Are both targets compiled using identical source code for Module.m3?<br>
<br>
<br>
On 03/11/2017 06:38 AM, Jay K wrote:<br>
> Trying to get back into things..not sure I sent this from a while ago..<br>
><br>
><br>
><br>
> This is both a question and an explanation<br>
> of hopefully an uncoming chnage, if I figure it out.<br>
><br>
><br>
> Most platforms are almost the same.<br>
><br>
> For example I386_FREEBSD and I386_NETBSD.<br>
><br>
> You want their IR to generally be the same, along<br>
> as they aren't printing their actual target name.<br>
><br>
> And they mostly are.<br>
><br>
> Here is a difference for example:<br>
><br>
> jair:libm3 jay$ diff -du I386_NETBSD/NullRd.mc.txt I386_FREEBSD/NullRd.mc.txt<br>
> --- I386_NETBSD/NullRd.mc.txt 2016-06-30 19:13:11.000000000 -0700<br>
> +++ I386_FREEBSD/NullRd.mc.txt 2016-06-30 19:13:23.000000000 -0700<br>
> @@ -44,7 +44,6 @@<br>
> declare_procedure NullRd__Length 1 Int.32 0 0 F * p.7<br>
> declare_param rd 4 4 Addr 34129018 F F 50 v.10<br>
> declare_local _result 4 4 Int.32 425470580 F F 50 v.11<br>
> - reveal_opaque 34129018 -885236436<br>
> declare_opaque 483796623 -1651526519<br>
> declare_proctype -2116580915 2 -915982019 2 0<br>
> declare_formal n -1746782238<br>
> @@ -85,6 +84,7 @@<br>
> declare_field closed 416 8 509158269<br>
> declare_field seekable 424 8 509158269<br>
> declare_field intermittent 432 8 509158269<br>
> + reveal_opaque 34129018 -885236436<br>
> # Init<br>
> -----LINE 22 -----<br>
> begin_procedure p.5<br>
><br>
><br>
> One line of the IR is moved.<br>
> The meaning is the same (the IR is somewhat order-independent, e.g. for type declarations).<br>
><br>
> What causes this?<br>
><br>
> Do we output sometimes in hash order?<br>
> And target affects that?<br>
><br>
> Or when buffers fill up, and target length can affect that?<br>
><br>
> I'd like to remove these differences.<br>
> If it is a buffer length matter, I might just expand the buffers,<br>
> as systems have far far more memory than when this was all written.<br>
><br>
><br>
> If it is hash ordering matter -- one should avoid outputting data<br>
> in hash order.<br>
><br>
> so:<br>
> 1. if anyone knows the difference, please tell me, before I debug it?<br>
> 2. Ok if I make changes to converge the IR, i.e. I386_LINUX/Darwin/Solaris/FreeBSD/NetBSD/OpenBSD/Interix should all<br>
> be the same, AMD64/ditto, SPARC32/ditto, SPARC64/ditto. Only variation should be endian and word size,<br>
> and maybe NT vs. Posix but probably not.<br>
><br>
> - Jay<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> M3devel mailing list<br>
> M3devel@elegosoft.com<br>
> <a id="LPlnk422571" href="https://m3lists.elegosoft.com/mailman/listinfo/m3devel" previewremoved="true">
https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a><br>
><br>
<br>
-- <br>
Rodney Bates<br>
rodney.m.bates@acm.org<br>
_______________________________________________<br>
M3devel mailing list<br>
M3devel@elegosoft.com<br>
<a id="LPlnk379143" href="https://m3lists.elegosoft.com/mailman/listinfo/m3devel" previewremoved="true">https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a><br>
</div>
</span></font></div>
</div>
</body>
</html>