Displaying 3 results from an estimated 3 matches for "breakconstgep".
2011 Jan 22
0
[LLVMdev] Pointers in Load and Store
....cpp. This
file contains the InsertPoolChecks pass which, in mainline SAFECode, is
responsible for inserting array bounds checks and indirect function call
checks. In particular, you want to look at the addGetElementPtrChecks()
method.
As for Constant Expression GEPs, you want to look at the BreakConstGEP
pass, located in lib/ArrayBoundsChecks/BreakConstantGEPs.cpp.
The BreakConstantGEP pass is run first. All it does is find
instructions that use constant expression GEPs and replaces the Constant
Expression GEP with a GEP instruction. All of the other SAFECode passes
that worry about array bo...
2011 Jan 22
2
[LLVMdev] Pointers in Load and Store
John,
I have looked at the SAFECode and thought following sould work
if (isa<Constant>(I.getOperand(0)))
{ Out << "*** operand 0 is a constant ******";
if (Instruction *operandI = dyn_cast<Instruction>(I.getOperand(0)))
{ Out << "********operand is an instruction ****";
if (GetElementPtrInst *gepI =
2011 Jan 23
1
[LLVMdev] Pointers in Load and Store
...tains the
> InsertPoolChecks pass which, in mainline SAFECode, is responsible for
> inserting array bounds checks and indirect function call checks. In
> particular, you want to look at the addGetElementPtrChecks() method.
>
> As for Constant Expression GEPs, you want to look at the BreakConstGEP pass,
> located in lib/ArrayBoundsChecks/BreakConstantGEPs.cpp.
>
> The BreakConstantGEP pass is run first. All it does is find instructions
> that use constant expression GEPs and replaces the Constant Expression GEP
> with a GEP instruction. All of the other SAFECode passes that...