[PATCH] D20116: Add nosideeffects function attribute
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 14:10:25 PDT 2016
arsenm added inline comments.
================
Comment at: docs/LangRef.rst:1404
@@ +1403,3 @@
+ This function attribute indicates that the function does not modify any
+ state that isn't accessbile from the IR (e.g. floating-point exception
+ registers). Functions with the nosideeffects attribute can be safely
----------------
mehdi_amini wrote:
> tstellarAMD wrote:
> > With my original definition, I was trying to match what we already have in the .td files for intrinsics. I've updated the definition in this patch to be:
> >
> > > nosideeffects tells the optimizer that the function does not modify any
> > > state that isn't accessible from the IR (e.g. floating-point exception
> > > registers).
> >
> > I'm not sure if this is what you were thinking, but hopefully this gives us a better starting point for discussion.
> >
> >
> >
> Typo `accessbile`
>
> Also it isn't clear how it interacts with memory. Are we only considering "non-memory" effects with this attribute? What are the side effects we want to track and what will they be used for?
> Is it just about "this won't not trap or exit"?
I kind of think it should be renamed speculatable, since the intention is any kind of operation that would prevent speculating
http://reviews.llvm.org/D20116
More information about the llvm-commits
mailing list