[PATCH] D72475: [WIP] Build assume from call

Tyker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 14:56:30 PST 2020


Tyker added inline comments.


================
Comment at: llvm/test/Transforms/Util/assume-builder.ll:55
+  ret void
+}
----------------
jdoerfert wrote:
> Tyker wrote:
> > jdoerfert wrote:
> > > Why is the address space explicit here?
> > > 
> > > ---
> > > 
> > > I'm unsure if we need to preserve function (scope) attributes, at least until we get scoped assumes that actually scope the information, e.g. after inlining.
> > > Why is the address space explicit here?
> > 
> > i think it is because the llvm.assume are not inserted but printed as if they where. so the printing option may be different.
> > 
> > > I'm unsure if we need to preserve function (scope) attributes, at least until we get scoped assumes that actually scope the information, e.g. after inlining.
> > 
> > by `function (scope) attributes` do you mean attributes on the argument of the declaration of a function ?
> > if so i think they can give us information about the call site. but if we can assume they are always propagated to the callsite we can skip them.
> > 
> Yes the function declaration attributes, e.g., nounwind. 
> 
> The use case I have in mind would be to create an `llvm.assume` if you are about to move/delete/modify the call.
> Having information about the arguments helps then, having information about the function does not, except if we would have a scope in which we know the information is good. I mean, if you inline a call site with an attribute XYZ but these attributes are all "scoped". Knowing XYZ holds at a single location is not helpful, at least I can't think of many function attributes for which this would be helpful in a non-scoped case. 
i think most function attributes aren't useful. but some are for example cold if we hit a call to a function marked cold, this is useful.
and we can't differentiate between useful and useless ones.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72475/new/

https://reviews.llvm.org/D72475





More information about the llvm-commits mailing list