<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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,Helvetica,sans-serif;" dir="ltr">
<p>The backslash option is not passed through.  <br>
</p>
<p><br>
</p>
<p>I'm asking about this mostly because I remember having to hack the driver to pass through specific options regarding fixed/free form, backslash, and default real/integer kinds in order to compile the specific apps I was testing with at the time.  I wasn't
 sure if this would be something useful to users in general or not.  I'm perfectly happy to keep using my hacked version when I need to if you don't think this would be a worthwhile addition to the code in general.</p>
<p><br>
</p>
<p>--Alexis<br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Steve Scalpone <sscalpone@nvidia.com><br>
<b>Sent:</b> Thursday, July 9, 2020 3:59 PM<br>
<b>To:</b> Perry-Holby, Alexis; Kiran Chandramohan; McCormick, Pat<br>
<b>Cc:</b> flang-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [flang-dev] [EXTERNAL] RFC: LLVM 11 branch</font>
<div> </div>
</div>
<div>
<div style="">
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;">The F18_FC compiler operates on the unparsed source, which is free-form, so -Mfixed should not be passed.</p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;">Is the backslash option passed through?  I’d guess that f18 handles backslash and produces a normalized form (but I didn’t look).</p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;">Probably don’t need -Mextend because the unparser probably handled that.</p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"><b><span style="font-size:12.0pt; color:black">From:
</span></b><span style="font-size:12.0pt; color:black">"Perry-Holby, Alexis" <aperry@lanl.gov><br>
<b>Date: </b>Thursday, July 9, 2020 at 2:34 PM<br>
<b>To: </b>Steve Scalpone <sscalpone@nvidia.com>, Kiran Chandramohan <Kiran.Chandramohan@arm.com>, pat <pat@lanl.gov><br>
<b>Cc: </b>flang-dev <flang-dev@lists.llvm.org><br>
<b>Subject: </b>Re: [flang-dev] [EXTERNAL] RFC: LLVM 11 branch</span></p>
</div>
<div>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
</div>
<table class="MsoNormalTable" style="margin-left:.5in; background:#FFEB9C" cellpadding="0" border="1">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"><b><span style="font-size:7.5pt; font-family:"Verdana",sans-serif; color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt; font-family:"Verdana",sans-serif; color:black">
</span></p>
</td>
</tr>
</tbody>
</table>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"> </p>
<div>
<div id="divtagdefaultwrapper">
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Thank you for the feedback Kiran and Steve.  I've extended the flags to include gfortran equivalents for everything beginning with -M and am now testing to see if the help message prints
 out nicely with my additions.  </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">One question... I noticed that most of the flags the flang throwaway driver understands don't get passed on to the F18_FC compiler.  Should I change this behavior?  It seems to me like
 they should, but I wanted to hear your opinions before including that change in my current patch.</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Thanks!</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">--Alexis</span></p>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-size:12.0pt; color:black"> </span></p>
<div>
<div style="text-align: center; margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;" align="center">
<span style="font-size:12.0pt; color:black">
<hr width="100%" size="0" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"><b><span style="color:black">From:</span></b><span style="color:black"> Steve Scalpone <sscalpone@nvidia.com><br>
<b>Sent:</b> Thursday, July 9, 2020 1:41 PM<br>
<b>To:</b> Kiran Chandramohan; McCormick, Pat; Perry-Holby, Alexis<br>
<b>Cc:</b> flang-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [flang-dev] [EXTERNAL] RFC: LLVM 11 branch</span><span style="font-size:12.0pt; color:black">
</span></p>
<div>
<p style="margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
</div>
<div>
<div>
<p style="margin-left:.5in"><span style="color:black">+1 for extending the flags to include gcc equivalents.</span></p>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p style="margin-left:.5in"><b><span style="font-size:12.0pt; color:black">From: </span>
</b><span style="font-size:12.0pt; color:black">Kiran Chandramohan <Kiran.Chandramohan@arm.com><br>
<b>Date: </b>Thursday, July 9, 2020 at 12:31 PM<br>
<b>To: </b>Steve Scalpone <sscalpone@nvidia.com>, pat <pat@lanl.gov>, "Perry-Holby, Alexis" <aperry@lanl.gov><br>
<b>Cc: </b>flang-dev <flang-dev@lists.llvm.org><br>
<b>Subject: </b>Re: [flang-dev] [EXTERNAL] RFC: LLVM 11 branch</span><span style="color:black"></span></p>
</div>
<div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
</div>
<table class="MsoNormalTable" style="margin-left:1.0in; background:#FFEB9C" cellpadding="0" border="1">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p><b><span style="font-size:7.5pt; font-family:"Verdana",sans-serif; color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt; font-family:"Verdana",sans-serif; color:black">
</span></p>
</td>
</tr>
</tbody>
</table>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<div>
<div>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Thanks Alexis for submitting this patch.<br>
<br>
Most of the flags (Mfixed, Mfree, Mextend etc) accepted by the current driver are based on pgfortran. And the default compiler is pgfortran, this makes it possible to use llvm/flang as a replacement for the pgfortran compiler in an existing build flow.<br>
If we make gfortran the default compiler then this results in a mismatch between options accepted by llvm/flang driver and the default gfortran compiler. And this results in a situation where llvm/flang cannot be used as a replacement for any compiler.</span><span style="color:black"></span></p>
</div>
<div>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">I think if we are making gfortran the default then we should also change the driver flags to gfortran equivalent ones or add the gfortran flags as aliases of existing pgfortran flags. <br>
<br>
--Kiran</span><span style="color:black"></span></p>
</div>
<div style="text-align: center; margin: 0in; font-size: 11pt; font-family: "Calibri", sans-serif;" align="center">
<span style="color:black">
<hr width="100%" size="0" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p style="margin-left:.5in"><b><span style="color:black">From:</span></b><span style="color:black"> flang-dev <flang-dev-bounces@lists.llvm.org> on behalf of Perry-Holby, Alexis via flang-dev <flang-dev@lists.llvm.org><br>
<b>Sent:</b> 09 July 2020 17:20<br>
<b>To:</b> Steve Scalpone <sscalpone@nvidia.com>; McCormick, Pat <pat@lanl.gov><br>
<b>Cc:</b> flang-dev@lists.llvm.org <flang-dev@lists.llvm.org><br>
<b>Subject:</b> Re: [flang-dev] [EXTERNAL] RFC: LLVM 11 branch </span></p>
<div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
</div>
</div>
<div>
<div>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">If F18_FC is not set, the current throwaway driver does give an error, but it’s not all that helpful unless you know a thing or two about the driver (</span><span style="font-size:10.5pt; font-family:Menlo; color:black">execvp(pgf90)
 failed: No such file or directory</span><span style="font-size:12.0pt; color:black">).  Basically, it looks for pgf90 by default.  I submitted a patch (<a href="https://reviews.llvm.org/D83488" style="color: blue; text-decoration: underline;" id="LPlnk811024" previewremoved="true">https://reviews.llvm.org/D83488</a>)
 that changes the default behavior to look for gfortran instead and uses more generic variable names where appropriate.  Reviews are appreciated.</span><span style="font-size:10.5pt; font-family:Menlo; color:black"></span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span><span style="font-size:10.5pt; font-family:Menlo; color:black"></span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Thanks!</span><span style="color:black"></span></p>
<div>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">-- Alexis</span><span style="color:black"></span></p>
</div>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span><span style="color:black"></span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span><span style="color:black"></span></p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p style="margin-left:.5in"><b><span style="font-size:12.0pt; color:black">From: </span>
</b><span style="font-size:12.0pt; color:black">flang-dev <flang-dev-bounces@lists.llvm.org> on behalf of Steve Scalpone via flang-dev <flang-dev@lists.llvm.org><br>
<b>Reply-To: </b>Stephen Scalpone <sscalpone@nvidia.com><br>
<b>Date: </b>Wednesday, July 8, 2020 at 5:36 PM<br>
<b>To: </b>"McCormick, Pat" <pat@lanl.gov><br>
<b>Cc: </b>"flang-dev@lists.llvm.org" <flang-dev@lists.llvm.org><br>
<b>Subject: </b>Re: [flang-dev] [EXTERNAL] RFC: LLVM 11 branch</span><span style="color:black"></span></p>
</div>
<div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
</div>
<p style="margin-left:.5in"><span style="color:black">The existing throwaway driver uses an environment variable F18_FC to specify the target compiler.  That works well for me with pgf90 and gfortran.</span></p>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<p style="margin-left:.5in"><span style="color:black">A command-line option is a little more difficult to use with CMake, but not by much.  You’d have to say:</span></p>
<p style="margin-left:.5in"><span style="color:black">FC=”f18 -fc gfortran” cmake …</span></p>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<p style="margin-left:.5in"><span style="color:black">The reason that the environment variable is F18_FC instead of FC is because typically FC would be set to f18:</span></p>
<p style="margin-left:.5in"><span style="color:black">F18_FC=gfortran FC=f18 cmake …</span></p>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<p style="margin-left:.5in"><span style="color:black">If F18_FC is not set, it might be nice for the throwaway driver to issue an error message if it is asked to link a program.</span></p>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<p style="margin-left:.5in"><span style="color:black">- Steve</span></p>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p style="margin-left:.5in"><b><span style="font-size:12.0pt; color:black">From: </span>
</b><span style="font-size:12.0pt; color:black">pat <pat@lanl.gov><br>
<b>Date: </b>Wednesday, July 8, 2020 at 4:00 PM<br>
<b>To: </b>Steve Scalpone <sscalpone@nvidia.com><br>
<b>Cc: </b>Hal Finkel <hfinkel@anl.gov>, David Truby <David.Truby@arm.com>, flang-dev <flang-dev@lists.llvm.org><br>
<b>Subject: </b>Re: [EXTERNAL] [flang-dev] RFC: LLVM 11 branch</span><span style="color:black"></span></p>
</div>
<div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
</div>
<table class="MsoNormalTable" style="margin-left:1.5in; background:#FFEB9C" cellpadding="0" border="1">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p><b><span style="font-size:7.5pt; font-family:"Verdana",sans-serif; color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt; font-family:"Verdana",sans-serif; color:black">
</span></p>
</td>
</tr>
</tbody>
</table>
<p style="margin-left:.5in"><span style="color:white"> </span><span style="color:black"></span></p>
<div>
<p style="margin-left:.5in"><span style="color:black">Somewhere I have a version of the “dummy” driver that allows you to specify the target compiler to hand off to.  I can try and track that code down (as I recall it was pretty simple patch as it used an environment
 variable).   It should be quick to fix in the latest code base and we could potentially also consider making it a CMake settings/parameter if that is an easier (more user friendly) path for use cases we have across the community. 
</span></p>
<div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
</div>
<div>
<p style="margin-left:.5in"><span style="color:black">Thoughts?    </span></p>
<div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<div>
<div>
<p style="margin-left:.5in"><span style="font-size:10.5pt; font-family:"Trebuchet MS",sans-serif; color:black">—Pat</span><span style="color:black"></span></p>
</div>
</div>
<div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<p style="margin-left:.5in"><span style="color:black">On Jul 8, 2020, at 4:54 PM, Steve Scalpone via flang-dev <<a href="mailto:flang-dev@lists.llvm.org" style="color: blue; text-decoration: underline;">flang-dev@lists.llvm.org</a>> wrote:</span></p>
</div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
<div>
<div>
<p style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in"><span style="color:black">No objections to removing the dependencies on pgf90; however, I agree that the existing FC mechanism should preserve the ability to use other compilers to generate
 code.  Camille Coti post a patch to enable linking with additional libraries, but it's not integrated anywhere that I know of.  David, if you are going to undertake this change, let me know & I'll fwd the email to you.<br>
<br>
- Steve<br>
<br>
On 7/8/20, 11:46 AM, "flang-dev on behalf of Hal Finkel via flang-dev" <<a href="mailto:flang-dev-bounces@lists.llvm.org" style="color: blue; text-decoration: underline;">flang-dev-bounces@lists.llvm.org</a> on behalf of
<a href="mailto:flang-dev@lists.llvm.org" style="color: blue; text-decoration: underline;">
flang-dev@lists.llvm.org</a>> wrote:<br>
<br>
   External email: Use caution opening links or attachments<br>
<br>
<br>
   On 7/8/20 3:58 AM, David Truby via flang-dev wrote:</span></p>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p style="margin-left:.5in"><span style="color:black">Hi all,<br>
<br>
The LLVM 11 branch is happening soon so we should have a discussion<br>
about what we want Flang to look like in that branch.<br>
<br>
<br>
tldr; I see a couple of issues currently that we should discuss for the<br>
release:<br>
<br>
* Flang defaults to calling a proprietary compiler (pgfortran)<br>
* Flang enables Werror by default<br>
* Shared library builds don't work<br>
<br>
Does anyone else see any other things we should consider that I haven't<br>
listed here?<br>
<br>
To elaborate on my issues list:<br>
<br>
I think it's reasonable for us to leave flang in the release,</span></p>
</blockquote>
<p style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in"><span style="color:black"><br>
<br>
   Yes, we should make clear that this is essentially in a developer-only<br>
   mode (excepting any specific tests that we want to ask people to run).<br>
<br>
<br>
</span></p>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p style="margin-left:.5in"><span style="color:black"> rather<br>
than for example removing it, and add info in the Release Notes about<br>
the state of Flang (e.g. that it fully parses and semantically analyses<br>
Fortran 2018 code but then calls out to another compiler to build it).<br>
<br>
The biggest issue I see with this is that currently flang defaults to<br>
calling out to a proprietary compiler that many people in an open<br>
source community like LLVM are unlikely to have installed. I would<br>
propose that we either add a CMake flag to select the default compiler<br>
to call out to, or that we rely on the existing mechanism of defining<br>
FC, but that either way we should default to gfortran if no other<br>
compiler is specified. That way we would be calling out to a compiler<br>
that almost anyone interested in Fortran is likely to have installed,<br>
and if not it is at least easily available.</span></p>
</blockquote>
<p style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in"><span style="color:black"><br>
<br>
   +1<br>
<br>
<br>
</span></p>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p style="margin-left:.5in"><span style="color:black"><br>
The other major issue I forsee is that we currently enable Werror by<br>
default in flang. This is likely to break the release for people<br>
building it with as-yet-unreleased compilers, with downstream<br>
proprietary compilers we haven't tested with, or other unforseen<br>
circumstances. I think there are too many potential issues for Werror<br>
by default to go into a release version of LLVM.</span></p>
</blockquote>
<p style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in"><span style="color:black"><br>
<br>
   +1<br>
<br>
   I thought that we had consensus to change this.<br>
<br>
<br>
</span></p>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p style="margin-left:.5in"><span style="color:black"><br>
Shared library builds also don't currently work due to a circular<br>
dependency between two libraries. I think it's farily uncontroversial<br>
to say that this should be fixed, and I am happy to start working on it<br>
personally.</span></p>
</blockquote>
<p style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in"><span style="color:black"><br>
<br>
   Yes, shared-library builds should work.<br>
<br>
   We can also discuss these on Monday's call.<br>
<br>
     -Hal<br>
<br>
<br>
</span></p>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p style="margin-left:.5in"><span style="color:black"><br>
<br>
Does anyone have any thoughts on this?<br>
<br>
Thanks<br>
David Truby<br>
_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org" style="color: blue; text-decoration: underline;">flang-dev@lists.llvm.org</a><br>
https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</span></p>
</blockquote>
<p style="margin-left:.5in"><span style="color:black"><br>
   --<br>
   Hal Finkel<br>
   Lead, Compiler Technology and Programming Languages<br>
   Leadership Computing Facility<br>
   Argonne National Laboratory<br>
<br>
   _______________________________________________<br>
   flang-dev mailing list<br>
   <a href="mailto:flang-dev@lists.llvm.org" style="color: blue; text-decoration: underline;">flang-dev@lists.llvm.org</a><br>
   <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev" style="color: blue; text-decoration: underline;">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a><br>
<br>
_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org" style="color: blue; text-decoration: underline;">flang-dev@lists.llvm.org</a><br>
https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</span></p>
</div>
</div>
</blockquote>
</div>
<p style="margin-left:.5in"><span style="color:black"> </span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>