[llvm-dev] Advise on which copy to use.
Reid Kleckner via llvm-dev
llvm-dev at lists.llvm.org
Mon Jul 24 08:38:53 PDT 2017
I'd recommend storing the link parameter in memory and loading from it at
the first use in every basic block. This should give you the best variable
tracking debug info after optimization, because LLVM will insert
@llvm.dbg.value calls at the point of each load, and you won't have to do
On Sun, Jul 23, 2017 at 2:06 PM, Rodney M. Bates via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I am generating llvm code for nested procedures. Each one gets a static
> which I am passing as an internally added, first parameter. However, it
> to be stored in memory too, so a debugger can find it. So, when I need to
> the value, is it better to use the ssl parameter or load the memory copy?
> I can imagine the ssl value might avoid unnecessary fetches, but then, it
> might also sometimes result in storage of a second copy in a memory temp.
> Also, do I need to do something to prevent the unused copy from being
> eliminated altogether?
> Rodney Bates
> rodney.m.bates at acm.org
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev