<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Hi,</div><div><br class=""></div><div>TL;DR I realize my comments are not super helpful and in a nutshell I think we would better define good API for describing how function arguments are lowered than adding new dbg instructions for that so that other tools can benefit from it. Now, I am so far from debug information generation, that I wouldn’t be upset if you choose to just ignore me :).</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></blockquote>On Feb 25, 2019, at 3:51 PM, Adrian Prantl via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>On Feb 22, 2019, at 2:49 AM, Nikola Prica <<a href="mailto:nikola.prica@rt-rk.com" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;">nikola.prica@rt-rk.com</a>> wrote:<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><font color="#12c00e" class=""><span style="caret-color: rgb(18, 192, 14);" class=""><br class=""></span></font><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>Hi,<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><font color="#12c00e" class=""><span style="caret-color: rgb(18, 192, 14);" class=""><br class=""></span></font><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>We have done some investigation. Please find my comment inlined bellow.<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><font color="#12c00e" class=""><span style="caret-color: rgb(18, 192, 14);" class=""><br class=""></span></font><blockquote type="cite" class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>On 14.02.2019. 20:20, Quentin Colombet wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>Hi all,<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>As much as possible I would rather we avoid any kind of metadata in MIR<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>to express the semantic of instructions.<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>Instead I would prefer that each back provides a way to interpret what<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>an instruction is doing. What I have in mind is something that would<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>generalize what we do in the peephole optimizer for instance (look for<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>isRegSequenceLike/getRegSequenceInputs and co.) or what we have for<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>analyzing branches.<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>One way we could do that and that was discussed in the past would be to<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>describe each instruction in terms of the generic mir operations.<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>Ultimately we could get a lot of this semantic information automatically<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>populated by TableGen using the ISel patterns, like dagger does<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>(<a href="https://github.com/repzret/dagger" class="">https://github.com/repzret/dagger</a>).<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;">Anyway, for the most part, I believe we could implement the<br class=""></blockquote><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>“interpreter” for just a handful of instruction and get 90% of the<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>information right.<br class=""><br class=""></blockquote><br class=""></blockquote></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>[...]<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>Here's a proposal for how we could proceed:<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>1. Decide whether to add (a) DBG_CALLSITEPARAM vs. (b) augment MIR to<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>recognize LEA semantics and implement an analysis<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>2. Land above MIR support for call site parameters<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>3. if (a), land support for introducing DBG_CALLSITEPARAM either in<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>calling convention lowering or post-ISEL<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>4. if that isn't good enough discuss whether IR call site parameters<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>are the best solution<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>let me know if that makes sense.<br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote><br class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"></blockquote>Thanks,<br class="">adrian<br class=""></blockquote><br class=""></blockquote></blockquote><font color="#12c00e" class=""><span style="caret-color: rgb(18, 192, 14);" class=""><br class=""></span></font><blockquote type="cite" class=""></blockquote><font color="#12c00e" class=""><span style="caret-color: rgb(18, 192, 14);" class=""><br class=""></span></font><blockquote type="cite" class=""></blockquote>In order to use calling convention lowering at MIR pass level, for<br class=""><blockquote type="cite" class=""></blockquote>recognizing instructions that forward function arguments, we would need<br class=""><blockquote type="cite" class=""></blockquote>to implement calling convention interpreter. Only recognizing<br class=""><blockquote type="cite" class=""></blockquote>instructions and trying to see whether it is part of calling sequence,<br class=""><blockquote type="cite" class=""></blockquote>would not be enough. For example, we will not be able to properly handle<br class=""><blockquote type="cite" class=""></blockquote>cases when one 64bit argument is split on two 32bit registers. This<br class=""><blockquote type="cite" class=""></blockquote>could be handled if we know number and sizes of arguments of called<br class=""><blockquote type="cite" class=""></blockquote>function, but then we would end up calling similar process as one from<br class=""><blockquote type="cite" class=""></blockquote>ISEL phase. We can only know number and sizes of arguments for direct<br class=""><blockquote type="cite" class=""></blockquote>calls since we can find IR function declaration for it and extract such<br class=""><blockquote type="cite" class=""></blockquote>information. For indirect calls, we would not be able to perform such<br class=""><blockquote type="cite" class=""></blockquote>analysis since we cannot fetch function’s declaration. This means that<br class=""><blockquote type="cite" class=""></blockquote>we will not be able to support indirect calls (not without some trickery).<br class=""></blockquote></div></blockquote><div><br class=""></div><div>Technically, you can guess what is lay down as function parameters by looking at what register are live-ins of your functions, which stack location and so on. That wouldn’t help you with the number and size of the arguments indeed but you know that at compile time, so I don’t know why we would need to explicit those.</div><div><br class=""></div><div>Anyway, what I am saying is to me the DBG_CALLSITEPARAM is redundant with what the backend already knows about the function call. The way I see it is this pseudo is a kind of cached information that can be otherwise computed and what worries me is what happens when we do changes that break this “cache”.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""><blockquote type="cite" class=""></blockquote><font color="#12c00e" class=""><span style="caret-color: rgb(18, 192, 14);" class=""><br class=""></span></font><blockquote type="cite" class=""></blockquote>If everybody agrees with stated, this might be the technical reason to<br class=""><blockquote type="cite" class=""></blockquote>give up with MIR pass that would collect call site parameter debug info.<br class=""><blockquote type="cite" class=""></blockquote>If we are wrong with our analysis, please advise us. Otherwise, we can<br class=""><blockquote type="cite" class=""></blockquote>go with approach with introducing DBG_CALLSITEPARAM and producing it<br class=""><blockquote type="cite" class=""></blockquote>from ISEL phase (with dispatched IR part).<br class=""><blockquote type="cite" class=""></blockquote><font color="#12c00e" class=""><span style="caret-color: rgb(18, 192, 14);" class=""><br class=""></span></font><blockquote type="cite" class=""></blockquote>Thanks,<br class="">Nikola<br class=""></blockquote><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>If we want to avoid adding new MIR metadata as Quentin suggests, it sounds like we have really two problems to solve here:<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>1. At the call site determine which registers / stack slots contain (source-level) function arguments. The really interesting case to handle here is that of a small struct whose elements are passed in registers, or a struct return value.<br class=""></div></blockquote><div><br class=""></div><div>I am really ignorant of how LLVM’s debug information works, but I would have expected we could generate this information directly when we lower the ABI, then refine, in particular until we executed the prologue.</div><div>My DWARF is rusty but I would expect we can describe the location of the arguments as registers and CFA at the function entry (fct_symbol+0).</div><div>Since this information must be correct at the ABI boundaries, what’s left to describe is what happen next and that I don’t see how we can get away without an interpreter of MIR at this point.</div><div><br class=""></div><div>E.g., let say we have:</div><div>void foo(int a)</div><div><br class=""></div><div>At foo+0: a is in say r0</div><div>foo+4: r3 = copy r0</div><div>...</div><div>foo+0x30 store r3, fp</div><div><br class=""></div><div>In foo, maybe r0 will be optimized out, but at foo+0, a has to be here.</div><div>Then you would describe a’s location as being available in r3 from [4, 0x30], then stored at some CFA offsets from (0x30,onward).</div><div><br class=""></div><div>I feel the DBG_CALLSITEPARAM stuff only captures the foo+0 location and essentially I don’t see why we need to have it around in MIR. Now, I agree that a pass interpreting how a value is moved around would need to query where the information is at the being of the function but that doesn’t need to be materialized in MIR.</div><br class=""><blockquote type="cite" class=""><div class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>The information about the callee's function signature is only available at the IR level. If we can match up a call site in MIR with the call site in IR (not sure if that is generally possible) we could introduce new API that returns the calling convention's location for each source-level function argument. Having such an API would be good to have; LLDB for example would really like to know this, too.<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>That said, I would not want to loose the ability to model indirect function calls. In Swift, for example, indirect function calls are extremely common, as are virtual methods in C++.<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>2. Backwards-analyze a safe location (caller-saved register, stack slot, constant) for those function arguments.<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>This is where additional semantic information would be necessary.<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>Quentin, do you see a way of making (1) work without having the instruction selector lower function argument information into MIR as extra debug info metadata?</div></blockquote><div><br class=""></div><div>In theory, yes, I believe we could directly generate it while lowering the ABI. That said, this information is not super useful.</div><div>Now, IIRC, the debug info generation all happen at the end, so in that respect we need a way to convey the information down to that pass and there is probably not a way around some information attached somewhere.</div><div>Ideally, we don’t have to store this information anywhere, but instead, like you said, we could have proper API that tells you what goes where and you would have your "foo+0” location without carrying extra information around.</div><br class=""><blockquote type="cite" class=""><div class=""> I'm asking because if we have to add extra debug info metadata to deliver (1) anyway then we might as well use it instead of implementing an analysis for (2).<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><font color="#00afcd" class=""><span style="caret-color: rgb(0, 175, 205);" class=""><br class=""></span></font><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>what do you think?<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>-- adrian<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>_______________________________________________<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote>LLVM Developers mailing list<br class=""><blockquote type="cite" style="text-align: start; text-indent: 0px;" class=""></blockquote><a href="mailto:llvm-dev@lists.llvm.org" class="" style="text-decoration: none;">llvm-dev@lists.llvm.org</a><br class=""><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></div></blockquote></div><br class=""></body></html>