[PATCH] D86021: [IR] Make nosync, nofree and willreturn default for intrinsics.

Stefan Stipanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 01:58:16 PDT 2020


sstefan1 added inline comments.


================
Comment at: llvm/include/llvm/IR/Intrinsics.td:381
                             [IntrArgMemOnly, NoCapture<ArgIndex<1>>,
-                             NoCapture<ArgIndex<2>>]>;
+                             NoCapture<ArgIndex<2>>], "", [], 1>;
 
----------------
jdoerfert wrote:
> jdoerfert wrote:
> > sstefan1 wrote:
> > > jdoerfert wrote:
> > > > Can we define a variable with value 1 to replace the trailing `1` here?
> > > > Like: `DisableDefaultAttributes`.
> > > > At least we should have a comment.
> > > > 
> > > > We could also have a new IntrinsicClass that opts out, or one that opts in?
> > > > ```
> > > > class DefaultIntrinsic<list<LLVMType> ret_types,
> > > >                 list<LLVMType> param_types = [],
> > > >                 list<IntrinsicProperty> intr_properties = [],
> > > >                 string name = "",
> > > >                 list<SDNodeProperty> sd_properties = []
> > > >                 > : Intrinsic<ret_types, param_types, ..., /* disable_default_attributes */ 1> {}
> > > > ```
> > > > 
> > > > WDYT?
> > > I had few other things in mind, but having a new Intrinsic class looks cleanest. Also it doesn't affect the parent patch.
> > > 
> > > Do others have any opinions/objections?
> > No objections. And any solution that makes it clean and easy to opt-out is fine with me.
> These should be default intrinsics now?
Yes, forgot to update them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86021



More information about the llvm-commits mailing list