Messages in this thread | | | Subject | Re: [RFC] LKMM: Add volatile_if() | From | Rasmus Villemoes <> | Date | Mon, 7 Jun 2021 01:44:59 +0200 |
| |
On 07/06/2021 01.39, Rasmus Villemoes wrote:
> memory". Replacing with a call to an extern function marked pure does > indeed cause gcc to cache the value of y*z, so in theory this should be > possible, if one could convince gcc to "trust me, this really is a pure > function".
Don't know why I didn't think to check before sending, but FWIW clang doesn't need convincing, it already takes the __pure at face value and caches y*z.
Rasmus
| |