svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: John Criswell <criswell AT illinois.edu>
- To: Daniel Huang <dan.e.huang AT gmail.com>
- Cc: "<svadev AT cs.illinois.edu>" <svadev AT cs.illinois.edu>
- Subject: Re: [svadev] sva types
- Date: Tue, 27 Nov 2012 11:58:04 -0600
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev/>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois
|
On 11/27/12 11:21 AM, Daniel Huang
wrote:
Hi svadev,
I'm starting to hook the verified type-checker to the
SAFEcode compiler. As a rehash, I need LLVM bitcode decorated
with regions (its ok if all of the regions are global) and to
convert this LLVM bitcode into my AST. I'm open to suggestions,
but my current plan is to write an LLVM pass (using the Caml
interface) to translate the internal LLVM bitcode into my AST in
memory. I would appreciate pointers on how to get started on
this, such as which files/passes/APIs (e.g. how to query which
region a variable is in) to look at and where is the relevant
documentation. Hope everyone had a good Thanksgiving!
Hi Daniel. Regarding the OCaml interface to the LLVM API, I would ask about that on the llvmdev list. I haven't used it myself, so I'm not sure how to use it or what state it's in. You could also ask on the LLVM IRC channel. As for querying for the regions, I'm not sure if there's a really good way to do this currently. The automatic pool allocation pass does have methods for querying the pool handle to which an LLVM SSA register belongs, but that interface is deprecated since it makes the automatic pool allocation pass a combined transform/analysis pass (which the LLVM pass manager doesn't really support). It might work, but I would not expect it to work. Instead, what you could do is use the DSNodeEquivs pass (include/assistDS/DSNodeEquivs.h). This pass takes all the different DSGraphs for each function and matches up those DSNodes which refer to the same abstract memory location. What you need to do is to have your pass require the DSNodeEquivs pass and then have it use the DSNodeEquivs::getMemberForValue() method to find a DSNode for each value. That DSNode uniquely represents a global region. Using DSNodeEquivs will work if you just want to test your type checker on global regions. If you want to test functions that are region polymorphic, then more work will need to be done. One possibility would be to separate out of poolalloc the code that assigns regions to SSA values. Part of that code lives in the Heuristic analysis group, but some of it is still hard-coded into poolalloc itself. Does this help? -- John T. Regards,
Dan
On Wed, Nov 21, 2012 at 7:36 PM, Adve,
Vikram Sadanand <vadve AT illinois.edu>
wrote:
On Nov 21, 2012, at 1:02 PM, Daniel Huang <dan.e.huang AT gmail.com>
wrote:
An API call available within an LLVM pass. The
PoolAlloc transform allows you to query the pool
handle (region) for any given pointer-type variable in
scope in a function, including local (SSA) variables,
parameters and globals.
That makes sense.
--Vikram
On Nov 20, 2012, at 2:12 PM,
Daniel Huang <dan.e.huang AT gmail.com>
wrote:
_______________________________________________ svadev mailing list svadev AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/svadev |
- [svadev] sva types, Daniel Huang, 11/20/2012
- Re: [svadev] sva types, Adve, Vikram Sadanand, 11/20/2012
- Re: [svadev] sva types, Daniel Huang, 11/21/2012
- Re: [svadev] sva types, Adve, Vikram Sadanand, 11/21/2012
- Re: [svadev] sva types, Daniel Huang, 11/27/2012
- Re: [svadev] sva types, John Criswell, 11/27/2012
- Re: [svadev] sva types, Daniel Huang, 11/27/2012
- Re: [svadev] sva types, Daniel Huang, 11/29/2012
- Re: [svadev] sva types, John Criswell, 11/29/2012
- Re: [svadev] sva types, John Criswell, 11/30/2012
- Re: [svadev] sva types, Daniel Huang, 11/27/2012
- Re: [svadev] sva types, John Criswell, 11/27/2012
- Re: [svadev] sva types, Daniel Huang, 11/27/2012
- Re: [svadev] sva types, Adve, Vikram Sadanand, 11/21/2012
- Re: [svadev] sva types, Daniel Huang, 11/21/2012
- Re: [svadev] sva types, Adve, Vikram Sadanand, 11/20/2012
Archive powered by MHonArc 2.6.16.