<div dir="ltr"><div>Hey list,</div><div><br></div><div>I'm currently porting our HPC# Burst compiler over from the legacy pass manager to the new pass manager. While nearly everything went fine, I've hit one major hiccup that I can't seem to workaround - how can we have a custom `InlineAdvisor` for Burst without modifying tip LLVM.</div><div><br></div><div>At present I've managed to completely bodge this locally by getting access to the `OwnedAdvisor` member of `InlinerPass` through very UB means (make a class of the same layout, casteroo, assign the field). Now this works in that I don't have codegen regressions anymore, but obviously this isn't the solution I want to ship!</div><div><br></div><div>I was wondering if the list would object to us either:</div><div><ol><li>Making the `OwnedAdvisor` field of `InlinerPass` protected, so I could derive from `InlinerPass` and set the advisor.</li><li>I could make the `getAdvisor` virtual, and assign it that way.</li><li>Probably the 'best' fix would be to make `InlineAdvisorAnalysis` somehow able to take a user-provided `InlineAdvisor` - although I'd rather not use the static option `UseInlineAdvisor` to set this. I don't really know how this solution would look if I'm honest.</li></ol><div>Thoughts from anyone? This is a blocker for us in the LLVM 13 timeframe when we hope to enable the new pass manager as the default.</div><div><br></div><div>Cheers,</div><div>-Neil.<br></div></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><table style="border-collapse:collapse;border-spacing:0px;color:rgb(90,90,91);font-size:13px;margin:0px 0px 20px;padding:0px" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td style="border-collapse:collapse;font-size:0px;line-height:1.5em;padding:0px 0px 20px;vertical-align:top" align="left"><table style="border-collapse:collapse;border-spacing:0px;margin:0px;padding:0px" cellspacing="0" cellpadding="0" border="0" align="left"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td style="border-collapse:collapse;font-size:1.12em;line-height:1.5em;padding:0px;vertical-align:top;width:64px"><img style="border:medium none currentcolor;border-radius:0px;display:block;font-size:13px;height:auto;line-height:100%;margin:0px;max-width:100%;outline-style:none;outline-width:medium;padding:20px 0px 0px;width:100%" alt="" src="https://unity3d.com/profiles/unity3d/themes/unity/images/ui/other/unity-logo-dark-email.png" width="64" height="auto"></td></tr></tbody></table></td></tr><tr style="margin:0px;padding:0px"><td style="border-collapse:collapse;font-size:0px;line-height:1.5em;padding:0px;vertical-align:top" align="left"><div style="color:rgb(0,0,0);font-family:Roboto,Arial;font-size:14px;font-weight:600;line-height:15px;margin:0px;padding:0px">Neil Henning</div></td></tr><tr style="margin:0px;padding:0px"><td style="border-collapse:collapse;font-size:0px;line-height:1.5em;padding:0px;vertical-align:top" align="left"><div style="color:rgb(0,0,0);font-family:Roboto,Arial;font-size:14px;line-height:15px;margin:0px;padding:0px 0px 10px">Senior Software Engineer Compiler</div></td></tr><tr style="margin:0px;padding:0px"><td style="border-collapse:collapse;font-size:0px;line-height:1.5em;padding:0px;vertical-align:top" align="left"><div style="color:rgb(0,0,0);font-family:Roboto,Arial;font-size:12px;line-height:15px;margin:0px;padding:0px"><a href="http://unity.com" target="_blank">unity.com</a></div></td></tr></tbody></table></div></div></div></div>