[PATCH] D43027: [ThinLTO] Skip BlockAddresses while replacing uses in function import

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 15:10:15 PST 2018


Generally we write them by hand. Is there anything in particular that you
are having trouble with?

Peter

On Wed, Feb 7, 2018 at 2:47 PM, <dmitry.mikulin at sony.com> wrote:

> How do I generate yams summary file?
> Tests for -lowertypetests-write-summary always read an input summary.
> How do I generate the input?
>
> > On Feb 7, 2018, at 12:17 PM, Peter Collingbourne via Phabricator <
> reviews at reviews.llvm.org> wrote:
> >
> > pcc added a comment.
> >
> > In https://reviews.llvm.org/D43027#1000808, @tejohnson wrote:
> >
> >> I'd like @pcc to comment. I noticed there are a number of other places
> in this file where we will still be calling replaceAllUsesWith on a
> Function. How do we know which should use which method?
> >
> >
> > We need to use `replaceUsesExceptBlockAddr` if the function that we are
> replacing is a function definition. As far as I can tell, in all other
> cases we are replacing function declarations.
> >
> >
> >
> > ================
> > Comment at: llvm/test/ThinLTO/X86/blockaddr-import.ll:2
> > +; RUN: opt -thinlto-bc %s -o %t1.bc
> > +; RUN: llvm-lto2 run %t1.bc -r=%t1.bc,o,x -r=%t1.bc,l,plx
> -r=%t1.bc,m,plx -r=%t1.bc,d,plx -o %t2
> > +
> > ----------------
> > Can this be written as an IR-level test of the pass? See for example
> `llvm/test/Transforms/LowerTypeTests/import-icall.ll`.
> >
> >
> > https://reviews.llvm.org/D43027
> >
> >
> >
>
>


-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180207/0bd8b1e9/attachment.html>


More information about the llvm-commits mailing list