What are those attributes?
I'm more familiar with them from the perspective of llvm's optimization internals, where they are called readnone/readonly/writeonly/etc. Compilers can deduce this too, and LTO is always your friend.