<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi, Charles,<br>
<br>
<div class="moz-cite-prefix">On 6/13/19 11:48 PM, via llvm-dev
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:F157B4A50F7AB243B6F3848BEC0A34B1E01B5E@USCULXMSG15.am.sony.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style class="darkreader darkreader--fallback" media="screen"></style>
<style class="darkreader darkreader--text" media="screen"></style>
<style class="darkreader darkreader--invert" media="screen"></style>
<style class="darkreader darkreader--inline" media="screen">[data-darkreader-inline-bgcolor] {
background-color: var(--darkreader-inline-bgcolor) !important;
}
[data-darkreader-inline-bgimage] {
background-image: var(--darkreader-inline-bgimage) !important;
}
[data-darkreader-inline-border] {
border-color: var(--darkreader-inline-border) !important;
}
[data-darkreader-inline-border-bottom] {
border-bottom-color: var(--darkreader-inline-border-bottom) !important;
}
[data-darkreader-inline-border-left] {
border-left-color: var(--darkreader-inline-border-left) !important;
}
[data-darkreader-inline-border-right] {
border-right-color: var(--darkreader-inline-border-right) !important;
}
[data-darkreader-inline-border-top] {
border-top-color: var(--darkreader-inline-border-top) !important;
}
[data-darkreader-inline-boxshadow] {
box-shadow: var(--darkreader-inline-boxshadow) !important;
}
[data-darkreader-inline-color] {
color: var(--darkreader-inline-color) !important;
}
[data-darkreader-inline-fill] {
fill: var(--darkreader-inline-fill) !important;
}
[data-darkreader-inline-stroke] {
stroke: var(--darkreader-inline-stroke) !important;
}
[data-darkreader-inline-outline] {
outline-color: var(--darkreader-inline-outline) !important;
}</style>
<style class="darkreader darkreader--user-agent" media="screen">input, textarea, select, button {
background-color: #ffffd8;
}
html, body, input, textarea, select, button {
border-color: #5c5240;
color: #000000;
}
a {
color: #584e3d;
}
table {
border-color: #9d8c6d;
}
::placeholder {
color: #d1ba91;
}
::selection {
background-color: #665b47;
color: #ffffd8;
}
::-moz-selection {
background-color: #665b47;
color: #ffffd8;
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
background-color: #fff3bd !important;
color: #000000 !important;
}
::-webkit-scrollbar {
background-color: #ffffcd;
color: #756851;
}
::-webkit-scrollbar-thumb {
background-color: #eed4a5;
}
::-webkit-scrollbar-thumb:hover {
background-color: #cdb78e;
}
::-webkit-scrollbar-thumb:active {
background-color: #756851;
}
::-webkit-scrollbar-corner {
background-color: #ffffd8;
}
* {
scrollbar-color: #eed4a5 #ffffcd;
}</style>
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
<style class="darkreader darkreader--sync" media="screen"></style>
<style class="darkreader darkreader--override" media="screen">.jfk-bubble {
background-color: #ffffef !important;
}
.vimvixen-hint {
background-color: #ffffc7 !important;
border-color: #c6b089 !important;
color: #302b21 !important;
}</style>
<style class="darkreader darkreader--sync" media="screen"></style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div>Hi,</div>
<div><br>
</div>
<div>I am looking into potentially porting CodeGen and some of
the passes to using the new pass manager. Two questions:</div>
<div><br>
</div>
<div>1. Has anybody made an attempt in this direction already?
Maybe I am missing a branch out there that has started on this
already. From what I can tell, there is no work in-tree in
CodeGen that is aware of the new pass manager besides some
assembly utilities in BackendUtils.cpp. </div>
</div>
</blockquote>
You are right, there is no activity in-tree in that direction to the
best of my knowledge.<br>
And every time I was asking on LLVM devmtg if anybody working on
that the answer was - "nay".<br>
<blockquote type="cite"
cite="mid:F157B4A50F7AB243B6F3848BEC0A34B1E01B5E@USCULXMSG15.am.sony.com">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div>My initial thoughts in this direction were that there would
need to be some new pass manager machinery, for example,
things like FunctionToMachineFunctionPassAdaptor that handles
what MachineFunctionPass::runOnFunction used to do, along with
the associated AnalysisManager plumbing to understand units of
MIR.<br>
</div>
</div>
</blockquote>
Generally, what you describe is indeed a proper first step towards
getting CodeGen on New-PM rails:<br>
- introduce IRUnits for Machine IR<br>
- provide generic handling for those new units everywhere in New-PM
framework<br>
<br>
The next step would be to start moving at least one backend towards
it, and thats where the initiative kinda stalls.<br>
I believe people working on CodeGen just do not find enough
incentive to start that work.<br>
<br>
<blockquote type="cite"
cite="mid:F157B4A50F7AB243B6F3848BEC0A34B1E01B5E@USCULXMSG15.am.sony.com">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div>
</div>
<div><br>
</div>
<div>2. Are there any compile time improvements expected from
porting CodeGen passes in the first place? As far as I can
tell, the llc pass pipeline seems to be fairly well fixed in
terms of phase ordering, and all the analyses are thrown out
from opt anyway.</div>
</div>
</blockquote>
I would expect real savings just by reusing non-Machine-IR analyses.<br>
As soon as you use the same llvm state/module/etc for both Opt and
CodeGen purposes <br>
(thats what I believe many do, at least our JIT compiler does that).
That will allow you<br>
to reuse analysis manager and thus keep every cached analysis there.<br>
<br>
I would love to see Opt and CodeGen using the same pass manager (as
my downstream project has already switched to NewPM in Opt).<br>
<br>
Said that, perhaps analyses are not a current performance bottleneck
in CodeGen (I bet instruction selection will always trump anything
else).<br>
So this is more about overall consistency of operations rather than
crazy performance gains.<br>
<br>
regards,<br>
Fedor.<br>
<br>
<blockquote type="cite"
cite="mid:F157B4A50F7AB243B6F3848BEC0A34B1E01B5E@USCULXMSG15.am.sony.com">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div>
</div>
<div>Thanks,<br>
</div>
<div>Charles<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>