search for: assume_fn

Displaying 3 results from an estimated 3 matches for "assume_fn".

2019 Dec 16
7
[RFC] How to manifest information in LLVM-IR, or, revisiting llvm.assume
...look something like this: `__builtin_assume(foo(i) == bar(j));` will cause us to generate ``` /// Must return true! static bool llvm.assume.expression_#27(int i, int j) { return foo(i) == bar(j); } ``` and a `llvm.assume` call like this: `llvm.assume() ["assume_fn"(@llvm.assume.expression_#27, %i, %j))] So we generate the expression in a new function which we (only) tie to the `llvm.assume()` through the "assume_fn" operand bundle. This will make sure we do not accidentally evaluate the code, or assume it is evaluated and produced side...
2019 Dec 18
2
[RFC] How to manifest information in LLVM-IR, or, revisiting llvm.assume
...se us to generate > > ``` > > /// Must return true! > > static bool llvm.assume.expression_#27(int i, int j) { > > return foo(i) == bar(j); > > } > > ``` > > and a `llvm.assume` call like this: > > `llvm.assume() ["assume_fn"(@llvm.assume.expression_#27, %i, %j))] > > So we generate the expression in a new function which we (only) tie to > > the `llvm.assume()` through the "assume_fn" operand bundle. This will > > make sure we do not accidentally evaluate the code, or assume it is...
2019 Dec 18
2
[RFC] How to manifest information in LLVM-IR, or, revisiting llvm.assume
.../// Must return true! > >>> static bool llvm.assume.expression_#27(int i, int j) { > >>> return foo(i) == bar(j); > >>> } > >>> ``` > >>> and a `llvm.assume` call like this: > >>> `llvm.assume() ["assume_fn"(@llvm.assume.expression_#27, %i, %j))] > >>> So we generate the expression in a new function which we (only) tie to > >>> the `llvm.assume()` through the "assume_fn" operand bundle. This will > >>> make sure we do not accidentally evaluate t...