[llvm-commits] Patch to add flag in llvm-extract for including aliases in the extraction.

Chandler Carruth chandlerc at google.com
Fri Sep 28 14:07:27 PDT 2012


On Fri, Sep 28, 2012 at 2:04 PM, Jan Sjodin <jan_sjodin at yahoo.com> wrote:

> I don't see any complaints from anyone, so I will go ahead and commit this
> by the end of today, or tomorrow.
>

That is *not* how commit-after-approval works. You need to get an actual
review and explicit OK for your patches. Please don't abuse our development
process...


>
> - Jan
>
>   ------------------------------
> *From:* Jan Sjodin <jan_sjodin at yahoo.com>
> *To:* "Villmow, Micah" <Micah.Villmow at amd.com>; Duncan Sands <
> baldrick at free.fr>; "llvm-commits at cs.uiuc.edu" <llvm-commits at cs.uiuc.edu>
> *Sent:* Tuesday, September 25, 2012 1:48 PM
>
> *Subject:* Re: [llvm-commits] Patch to add flag in llvm-extract for
> including aliases in the extraction.
>
> I tried that, but eraseFromParent makes the alias_iterator fail, since the
> underlying data structure is modified.
>
>
> - Jan
>
>
>
> ----- Original Message -----
> > From: "Villmow, Micah" <Micah.Villmow at amd.com>
> > To: Jan Sjodin <jan_sjodin at yahoo.com>; Duncan Sands <baldrick at free.fr>;
> "llvm-commits at cs.uiuc.edu" <llvm-commits at cs.uiuc.edu>
> > Cc:
> > Sent: Tuesday, September 25, 2012 11:34 AM
> > Subject: RE: [llvm-commits] Patch to add flag in llvm-extract for
> including aliases in the extraction.
> >
> > So, the patch itself looks fine in its current form, however is there
> not a way
> > to delete the alias's without requiring to store them first?
> > Maybe something like this would work?
> > +static void extractAliases(Module* M,
> > +                           SetVector<GlobalValue *> &GVs) {+
> > +  // Find aliases to be erased
> > +  for (Module::alias_iterator I = M->alias_begin(), E = M->alias_end();
> > +       I != E; ) {
> > +    GlobalAlias *GA = I++;
> > +    GlobalValue *GV =
> > +      const_cast<GlobalValue*>((GA).resolveAliasedGlobal(false));
> > +    if ((GVs.count(GV) != 0) == DeleteFn)
> > +      GA->eraseFromParent();
> > +  }
> > +}
> >
> >>  -----Original Message-----
> >>  From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> >>  bounces at cs.uiuc.edu] On Behalf Of Jan Sjodin
> >>  Sent: Tuesday, September 25, 2012 6:23 AM
> >>  To: Duncan Sands; llvm-commits at cs.uiuc.edu
> >>  Subject: Re: [llvm-commits] Patch to add flag in llvm-extract for
> >>  including aliases in the extraction.
> >>
> >>  Ok. Re-ping-ping with patch!
> >>
> >>  - Jan
> >>
> >>  >________________________________
> >>  > From: Duncan Sands <baldrick at free.fr>
> >>  >To: llvm-commits at cs.uiuc.edu
> >>  >Sent: Saturday, September 22, 2012 6:06 AM
> >>  >Subject: Re: [llvm-commits] Patch to add flag in llvm-extract for
> >>  including aliases in the extraction.
> >>  >
> >>  >On 21/09/12 17:36, Jan Sjodin wrote:
> >>  >>
> >>  >> Ping! Ping!
> >>  >
> >>  >Please supply the patch when you ping.
> >>  >
> >>  >Ciao, Duncan.
> >>  >_______________________________________________
> >>  >llvm-commits mailing list
> >>  >llvm-commits at cs.uiuc.edu
> >>  >http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>  >
> >>  >
> >>  >
> >
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120928/1e17db82/attachment.html>


More information about the llvm-commits mailing list