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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 15 13:44:29 PDT 2020


jdoerfert added a comment.

Cool! the test effect shows how important this can be! I am unsure about the effect on the intrinsic definition but I guess it's not the worst. See below.



================
Comment at: llvm/include/llvm/IR/Intrinsics.td:381
                             [IntrArgMemOnly, NoCapture<ArgIndex<1>>,
-                             NoCapture<ArgIndex<2>>]>;
+                             NoCapture<ArgIndex<2>>], "", [], 1>;
 
----------------
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?


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