svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: Daniel Huang <dehuang AT fas.harvard.edu>
- To: John Criswell <criswell AT illinois.edu>
- Cc: svadev AT cs.illinois.edu
- Subject: Re: [svadev] safecode
- Date: Fri, 25 May 2012 16:39:44 -0400
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
The file shows up but is empty.
On Fri, May 25, 2012 at 2:50 PM, John Criswell <criswell AT illinois.edu> wrote:
On 5/25/12 1:35 PM, Daniel Huang wrote:It's morning somewhere, right?Ahh, ok. Thanks for all the help! Really appreciate it.
:)
Sorry that I forgot to do this in the morning. I've committed the change; if you svn up and try it again, you should get the bitcode in /tmp/pafile.bc.
If you need to test things in parallel, let me know; I could probably make the output filename configurable via an environment variable.
-- John T.
On Fri, May 25, 2012 at 12:33 AM, John Criswell <criswell AT illinois.edu> wrote:
On 5/24/12 11:04 PM, Daniel Huang wrote:The above two commands do not invoke the linker which is why you don't get any pool allocation.Ahh, forgot to reinstall the libLTO stuff, thanks. After reinstalling, I've tried running these 3 command line combinations ...
1) clang -flto -fmemsafety test.c -S -o test.llCompiles, but no pools.
2) clang -flto -fmemsafety -emit-llvm test.c -S -o test.llclang: warning: argument unused during compilation: '-flto'Compiles, but no pools.
I think the only way to do that is to add a BitcodeWriter pass after the pool allocation pass to write the output to a file. I can add that first thing tomorrow morning.
3) clang -flto -fmemsafety test.c -o test.oPool allocating 6 global nodes![main] 5 nodes pool allocatable
So it looks like the 3rd one works, but its not in a human readable form ... Is there any way to get safecode to output the pools in a human-readable form?
-- John T.
Thanks!
On Thu, May 24, 2012 at 7:04 PM, John Criswell <criswell AT illinois.edu> wrote:
On 5/24/12 5:56 PM, Daniel Huang wrote:Did you recompile the code? Did you reinstall the SAFECode libLTO after the recompile? Are you giving clang the proper command-line arguments to make it use libLTO?I added -DPOOLALLOC but still haven't been able to get any programs to emit poolalloc or poolinit instructions. Perhaps I misunderstood you, but I modified safecode's Makefile.common SC_FLAGS with -DPOOLALLOC.
Poolalloc is performed by libLTO. If you aren't using libLTO (or if you've installed it incorrectly), then the automatic pool allocation transform won't be run. You need to use the SAFECode libLTO; directions can be found in the SAFECode Install Guide and User's Guide on the SAFECode web page.With the SAFECode heuristic, pretty much any code with memory allocations will generate pool functions. You might want to try using code examples from the SAFECode or Poolalloc papers.
Also, do you have an example program which will cause the tool to emit these instructions?
I believe dynamically allocated pools are always created a function entry and destroyed at function exit.
I'm really curious to see where pools are created and destroyed. For example, can they be created in the middle of the function, or are they only ever created at the beginning of a function and destroyed at the end.
-- John T.
- Re: [svadev] safecode, (continued)
- Re: [svadev] safecode, John Criswell, 05/15/2012
- Re: [svadev] safecode, Daniel Huang, 05/15/2012
- Re: [svadev] safecode, John Criswell, 05/19/2012
- Re: [svadev] safecode, John Criswell, 05/21/2012
- Re: [svadev] safecode, Daniel Huang, 05/24/2012
- Re: [svadev] safecode, John Criswell, 05/24/2012
- Re: [svadev] safecode, Daniel Huang, 05/24/2012
- Re: [svadev] safecode, John Criswell, 05/24/2012
- Re: [svadev] safecode, Daniel Huang, 05/25/2012
- Re: [svadev] safecode, John Criswell, 05/25/2012
- Re: [svadev] safecode, Daniel Huang, 05/25/2012
- Re: [svadev] safecode, John Criswell, 05/25/2012
- Re: [svadev] safecode, Daniel Huang, 05/26/2012
- Re: [svadev] safecode, John Criswell, 05/24/2012
- Re: [svadev] safecode, Daniel Huang, 05/24/2012
- Re: [svadev] safecode, John Criswell, 05/21/2012
- Re: [svadev] safecode, John Criswell, 05/19/2012
- Re: [svadev] safecode, Daniel Huang, 05/15/2012
- Re: [svadev] safecode, John Criswell, 05/15/2012
Archive powered by MHonArc 2.6.16.