<div dir="ltr">Hi Peter,<div><br></div><div>I have a few concerns and questions so far:</div><div><br></div><div> - Supported C++ compilers: It looks like nothing too recent has been used to test? And the flang page still has version 7 listed as the "latest llvm".</div><div> - "It will be closely aligned with LLVM best practices and written in the style of LLVM and clang":</div><div> - The directory structure is quite different from clang's directory structure.</div><div> - IR generation still appears to be text string based?</div><div> - I didn't see a single reference to ADT or any of llvm's libraries on a cursory look through the f18 directory (grep -ri ADT and grep -ri llvm)</div><div> - It looks like flang is a C based project and f18 is C++? Looking at the flang directory itself for IR generation is quite confusing and while named C++ in some places is actually just C with few abstractions?<br><br>I haven't done a full reading of the code, this is just a starting point for discussion and review.</div><div><br></div><div>Mostly it seems I have a lot of questions and so getting an updated idea of what you expect to merge, what the sources are, and more would be a first start I think. If some of my concerns hold through discussion I can't see this being merged as-is.</div><div><br></div><div>Thanks!</div><div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 17, 2019 at 1:31 PM Peter Waller via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi All,<br>
<br>
The flang project (a Fortran compiler) is getting ready to join the <br>
monorepo. We intend to preserve the existing history by rewriting the <br>
existing commits as a linear series of commits on top of llvm-project.<br>
<br>
I understand the flang community would like to do this before the LLVM <br>
10 branch in due in mid January, so please speak up soon if you see <br>
anything needing fixing in what I write below.<br>
<br>
I've taken into account the discussion raised during the MLIR landing <br>
discussion found at <br>
<a href="http://lists.llvm.org/pipermail/llvm-dev/2019-November/136813.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2019-November/136813.html</a>. As <br>
with MLIR, we rewrite the commits so that flang's work all appears to <br>
happen in the flang directory, starting with llvm-project master as it <br>
appears today. The topology of the f18 history was fairly interesting, <br>
which is why I ended up writing a new program to rewrite it rather than <br>
using an existing one.<br>
<br>
=== Key links<br>
<br>
* Resulting tree of the rewrite:<br>
<a href="https://github.com/peterwaller-arm/f18/tree/rewritten-history-v2-llvm-project-merge" rel="noreferrer" target="_blank">https://github.com/peterwaller-arm/f18/tree/rewritten-history-v2-llvm-project-merge</a><br>
<br>
* Rewritten history, with flang commits applied on top of llvm-project <br>
master:<br>
<a href="https://github.com/peterwaller-arm/f18/commits/rewritten-history-v2-llvm-project-merge" rel="noreferrer" target="_blank">https://github.com/peterwaller-arm/f18/commits/rewritten-history-v2-llvm-project-merge</a><br>
<br>
* The history rewriting program is published here:<br>
<a href="https://github.com/flang-compiler/f18/pull/854" rel="noreferrer" target="_blank">https://github.com/flang-compiler/f18/pull/854</a><br>
<br>
* Latest mailing list discussion of rewrite on flang-dev:<br>
<a href="http://lists.llvm.org/pipermail/flang-dev/2019-December/000122.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/flang-dev/2019-December/000122.html</a><br>
<br>
=== Additional considerations<br>
<br>
* Existing references to pull request and issue numbers are rewritten so <br>
that they point at the originals as, e.g. flang-compiler/f18#123. This <br>
prevents those patches from generating bogus references to Issues/PRs of <br>
llvm-project if/when those appear in the llvm-project repository.<br>
<br>
* Developers using the llvm-project repo, when they pull after this <br>
push, will see 2,700ish commits appear on the tip. These will follow on <br>
as normal commits from wherever master is at the time of the push. The <br>
fetch takes 40s and I see my ".git" directory grow by approximately <br>
90MiB when I simulate this.<br>
<br>
* Rewriting and validating the rewritten f18 history is sufficiently <br>
fast that I don't think it will be necessary to pause commits to LLVM. <br>
The script runs in a few seconds. Before this is done though, I think <br>
new commits should no longer be accepted on the original repository.<br>
<br>
* You can simulate the experience of the fresh merge with `git remote <br>
add peterwaller-arm <a href="https://github.com/peterwaller-arm/f18" rel="noreferrer" target="_blank">https://github.com/peterwaller-arm/f18</a> && time git <br>
fetch peterwaller-arm rewritten-history-v2-llvm-project-merge`, and then <br>
look at the peterwaller-arm/rewritten-history-v2-llvm-project-merge <br>
branch with git log.<br>
<br>
* Remember that you can restrict the "git log" output to what you are <br>
interested in by specifying a directory, e.g. `git log clang/`.<br>
<br>
That's all for now. Season's greetings!<br>
<br>
- Peter<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>