For the avoidance of doubt...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

For the avoidance of doubt...

Sarah Thompson-2
... can *any* instruction(s) other than load and store cause memory
reads or writes?

This is pretty important, because I need to be able to track (at least)
writes, and ideally also reads in order to be able to make
explicit-state model checking work efficiently.

(I don't really care about reads or writes to spilled registers added by
the code generator).


Sarah
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: For the avoidance of doubt...

Chandler Carruth
Sarah Thompson wrote:
> ... can *any* instruction(s) other than load and store cause memory
> reads or writes?

Not that I know of, but some intrinsic functions do.

>
> This is pretty important, because I need to be able to track (at least)
> writes, and ideally also reads in order to be able to make
> explicit-state model checking work efficiently.

I specifically know that the atomic intrinsic functions I am adding will
write to memory by definition. There may be others that I am not fully
aware of. The LangRef.html has been updated with fairly detailed
information about these intrinsics, but please let me know if there are
unanswered questions.

-Chandler Carruth

>
> (I don't really care about reads or writes to spilled registers added by
> the code generator).
>
>
> Sarah
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: For the avoidance of doubt...

Chris Lattner
In reply to this post by Sarah Thompson-2
On Mon, 30 Jul 2007, Sarah Thompson wrote:
> ... can *any* instruction(s) other than load and store cause memory
> reads or writes?

Functions calls can (transitively), intrinsics can, and the vaarg
instruction can (it updates the pointed to list to point to the next
argument).

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: For the avoidance of doubt...

Sarah Thompson-2
Chris Lattner wrote:
> On Mon, 30 Jul 2007, Sarah Thompson wrote:
>  
>> ... can *any* instruction(s) other than load and store cause memory
>> reads or writes?
>>    
>
> Functions calls can (transitively),
This isn't a problem because I'll be picking up those reads and writes
as the function executes anyway.
> intrinsics can,
Would it be feasible to lower all intrinsics (other than, say, debugging
intrinsics) as an opt pass, in a similar way to the intrinsic lowering
that was in the non-JITted interpreter? I don't really care too much
about the performance hit that this would cause because of the added
'correctness' it would give, if you see what I mean.
> and the vaarg
> instruction can (it updates the pointed to list to point to the next
> argument).
>  
Useful to know. Thanks.

Sarah
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: For the avoidance of doubt...

Sarah Thompson-2
In reply to this post by Chandler Carruth
Hi Chandler,
> I specifically know that the atomic intrinsic functions I am adding will
> write to memory by definition. There may be others that I am not fully
> aware of. The LangRef.html has been updated with fairly detailed
> information about these intrinsics, but please let me know if there are
> unanswered questions.
>  

Are these new intrinsics subclasses of MemIntrinsic like the existing
memmove/memcpy/etc. intrinsics?

[s]
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: For the avoidance of doubt...

Chris Lattner
In reply to this post by Sarah Thompson-2
On Mon, 30 Jul 2007, Sarah Thompson wrote:
> Would it be feasible to lower all intrinsics (other than, say, debugging
> intrinsics) as an opt pass, in a similar way to the intrinsic lowering
> that was in the non-JITted interpreter? I don't really care too much
> about the performance hit that this would cause because of the added
> 'correctness' it would give, if you see what I mean.

Check out the IntrinsicLowering class.  It can lower some of them (e.g.
popcount to individual operations, llvm.memset to memset), but it does not
lower all of them IIRC.  It is used by the C backend and the interpreter
implicitly I think.

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev