svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: John Criswell <criswell AT illinois.edu>
- To: Ryan Taylor <ryta1203 AT gmail.com>
- Cc: Will Dietz <w AT wdtz.org>, svadev AT cs.uiuc.edu
- Subject: Re: [svadev] ConstantExpr in GEP, inttoptr?
- Date: Fri, 21 Sep 2012 14:03:07 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev/>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois
On 9/21/12 1:53 PM, Ryan Taylor wrote:
Will,You are correct. Looks like the code is easily converted though to be able to break up any instruction that has any ConstantExpr. More accurately, the BreakConstantGEPs pass has code to convert a number of ConstantExpr's into instructions because it will convert any instruction operand that is a) a constant _expression_; and b) contains a ConstantExpr GEP into a set of instructions so that other parts of SAFECode can instrument the GEP. It would be fairly straightforward to modify BreakConstantGEPs into a pass that converts pretty much any ConstantExpr into an instruction (except those used in Global Variable initializers, I think). It would just require adding code to handle other types of constant expressions and changing the name of the pass to something more suitable. :) As an aside, SAFECode is currently not using the BreakConstantGEP pass. Merely converting ConstantExpr GEPs to GEP instructions hurts performance, and I didn't bother to get this functionality working again when I integrated the SAFECode passes into Clang. Older versions of SAFECode used it because the instrumentation code wasn't smart enough to instrument ConstantExpr GEPs and because the RewriteOOB pass only works on GEP instructions. Finding ways to eliminate the need to change ConstantExpr GEPs would be quite beneficial. -- John T. Thanks. On Thu, Sep 20, 2012 at 7:01 PM, Will
Dietz <w AT wdtz.org>
wrote:
I believe the pass is intended to convert constexpr GEP's (which are used as operands to other instructions, and are not instructions themselves) into separate GEP instructions. This is done to facilitate the SAFECode instrumentation by creating a code point between the GEP and its use. In other words it breaks up geps that are constexpr's, not constexpr's used in geps (what your code is). Hope this helps, ~Will On Sep 20, 2012 8:55 PM, "Ryan Taylor"
<ryta1203 AT gmail.com>
wrote:
Is the BreakGEPs pass suppose to break the constant
expr of GEPs up? For example, I have this instruction:
%uglygep296 = getelementptr i8* inttoptr (i32 4 to i8*), i32 %tmp243 After using the Break GEPs pass, I'm curious as to why it's not getting rid of the inttoptr call here? I'm assuming that it is not suppose to break up inttoptr? Thanks. svadev mailing list svadev AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/svadev _______________________________________________ svadev mailing list svadev AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/svadev |
- [svadev] ConstantExpr in GEP, inttoptr?, Ryan Taylor, 09/20/2012
- Re: [svadev] ConstantExpr in GEP, inttoptr?, Will Dietz, 09/20/2012
- Re: [svadev] ConstantExpr in GEP, inttoptr?, Ryan Taylor, 09/21/2012
- Re: [svadev] ConstantExpr in GEP, inttoptr?, John Criswell, 09/21/2012
- Re: [svadev] ConstantExpr in GEP, inttoptr?, Ryan Taylor, 09/21/2012
- Re: [svadev] ConstantExpr in GEP, inttoptr?, John Criswell, 09/21/2012
- Re: [svadev] ConstantExpr in GEP, inttoptr?, Ryan Taylor, 09/21/2012
- Re: [svadev] ConstantExpr in GEP, inttoptr?, Will Dietz, 09/20/2012
Archive powered by MHonArc 2.6.16.