[llvm-dev] Attribute for a invariant function ?
Joerg Sonnenberger via llvm-dev
llvm-dev at lists.llvm.org
Sat Jan 9 08:12:25 PST 2016
On Sat, Jan 09, 2016 at 04:22:46PM +0100, Nat! via llvm-dev wrote:
> The last sentence is what I am after. :) Unfortunately at least in clang 3.7
> it does not seem to do anything.
The problem is the intermediate call. That can invalidate the result of
a pure function. A function that returns the current value of some
global value is pure, but not const. If you call another global
function or modify some global memory, the value can have changed.
Essentially, there is an area between pure and const, that's currently
not handled well.
Joerg
More information about the llvm-dev
mailing list