search for: hny71v

Displaying 2 results from an estimated 2 matches for "hny71v".

Did you mean: hny7
2020 Aug 13
3
Deterministic function return attribute
Hi! I'm interested in what attributes in LLVM mean, specifically how to say that the result is always the same for the given input parameters. The main thing would be to merge two calls with the same parameters when the function is declared but not defined. (just like two stores). I'll call this property mergability. %1 := call @test(%0) %2 := call @test(%0) and the optimization would
2020 Aug 14
2
Fwd: Deterministic function return attribute
...>> >> same input -> same output; this is basically an implication of >> `readnone`, or `readonly` without intermediate modifications. >> It is already happening as you would expect it to, I think in inst >> combine but I didn't check: https://godbolt.org/z/hnY71v >> >> `speculatable` means it is `readnone` and doesn't cause UB. As a >> consequence it is allowed to eagerly execute the function. `readnone` >> (aka `__attribute__((const))`) is not sufficient because of things like >> this: `int pure_div(int a, int b) { re...