search for: arrayboundchecks

Displaying 13 results from an estimated 13 matches for "arrayboundchecks".

2015 Jun 22
2
[LLVMdev] How to Obtain a DataLayout Reference Given a Function & F
I’ve been debugging SAFECode source code files, and line 170 in ArrayBoundCheckLocal.cpp has been causing the following compilation error: In file included from /Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/lib/ArrayBoundChecks/ArrayBoundCheckLocal.cpp:18: In file included from /Users/peterfinn/Desktop/build/projects/safecode/../../../llvm_trunk_2/projects/safecode/include/safecode/ArrayBoundsCheck.h:17: In file included from /Users/peterfinn/Desktop/build/projects/safecode/../../../llvm_trunk_2/projects/safecode/include/...
2016 Apr 27
3
ArrayBoundChecks in SafeCode-llvm37
Hi, I am wondering if anyone could run ArrayBoundChecks located in SafeCode-llvm37 (https://github.com/jtcriswell/safecode-llvm37) on llvm-3.8? Thanks. Syed -- Rafi
2007 Dec 03
1
[LLVMdev] Using Function Passes from Module Passes
...t llvm::DominatorTree&)': /home/vadve/criswell/src/llvm22/include/llvm/Analysis/Dominators.h:659: note: synthesized method 'llvm::FunctionPass& llvm::FunctionPass::operator=(const llvm::FunctionPass&)' first required here /home/vadve/criswell/src/llvm22/projects/safecode/lib/ArrayBoundChecks/ArrayBoundCheck.cpp: In member function 'virtual bool llvm::ABC::ArrayBoundsCheck::runOnModule(llvm::Module&)': /home/vadve/criswell/src/llvm22/projects/safecode/lib/ArrayBoundChecks/ArrayBoundCheck.cpp:905: note: synthesized method 'llvm::DominatorTree& llvm::DominatorTree::ope...
2011 Aug 28
0
[LLVMdev] How to break/iterate over nested instructions.
Dear Manish, First, in answer to your original question: yes, there is a pass that will convert constant expression GEPs used within LLVM instructions into GEP instructions. SAFECode has a pass called BreakConstantGEPs in safecode/trunk/lib/ArrayBoundChecks/BreakConstantGEPs.cpp (http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/ArrayBoundChecks/BreakConstantGEPs.cpp?view=log). It works with LLVM 2.7; updating it to LLVM mainline should be trivial. Second, to reiterate what others have said, you need to determine whether doing this conversio...
2011 Aug 27
4
[LLVMdev] How to break/iterate over nested instructions.
Hi Duncan, Why to break? I wish to analyse all the operands of getelemetptr instructions. For which I iterate over the code and get the instruction of interest by getopcode == getelementptr. But the getelementptrs in this form as in my last mail are getting away from my pass. So i wish to break it. I have a work around if breaking is not possible, but I think it may be a common requirement by
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 22
0
[LLVMdev] Pointers in Load and Store
On 1/21/2011 10:46 PM, Surinder wrote: > 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<<
2013 Sep 28
1
[LLVMdev] Promote constant expressions to registers
Hello, Is there a way to generate LLVM IR without constant expressions by promoting constant expressions to registers? e.g.: %tmp1 = tail call i8* @foo(i8* bitcast (i32* @x to i8*), i8* %tmp, i64 4) #1 would be converted to: %tmp1 = bitcast i32* @x to i8* %tmp2 = tail call i8* @foo(i8* %tmp1, i8* %tmp, i64 4) #1 I find quite inconvenient and redundant to maintain constant expressions when
2011 Aug 19
1
[LLVMdev] Break operands into multiple instructions
Hi All, I am creating an instrumentation pass using LLVM libraries. I am using clang++ (version 2.9) to compile cpp code into LLVM bit code. When I generate the llvm bit code using clang++ using -O3, I get many instances of instructions that look like the following. br i1 icmp ne (i8* bitcast (i32 (i32)* @pthread_cancel to i8*), i8* null), label %bb23, label %bb25 Here three LLVM instructions
2011 Jan 23
1
[LLVMdev] Pointers in Load and Store
John, I have looked at the real code (instead of the obsolete one) and it appears to be easy to find if an operand is a getelementptr instruction. if (ConstantExpr * CE = dyn_cast<ConstantExpr>(I.getOperand(0))) { Out<< "*** operand 0 is a constant Expr******"; if (CE->getOpcode() == Instruction::GetElementPtr) { Out<< "*** operand 0 is
2011 Jan 21
0
[LLVMdev] Pointers in Load and Store
On 1/20/2011 10:02 PM, Surinder wrote: > When I compile C programs into llvm, it produces load instructions in > two different flavours. > > (1) %8 = load i8** %bp, align 8 > > (2) %1 = load i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, > i64 0), align 1 > > I know that %bp in first case and the entire "getelementptr inbounds > ([4 x i8]* @.str, i64
2015 Oct 16
3
Break nested instructions?
Is there any pass that breaks an expression out of an instruction's operand into its own instruction, so that such nested instructions become explicit and are thus easier to work with in? e.g Following|call|instruction contains a|GEP|instruction as its first operand. Is there any pass which allows me to break up this: | %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4
2011 Jan 21
2
[LLVMdev] Pointers in Load and Store
When I compile C programs into llvm, it produces load instructions in two different flavours. (1) %8 = load i8** %bp, align 8 (2) %1 = load i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), align 1 I know that %bp in first case and the entire "getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0)" in second case can be obtained by dump'ing I.getOperand(0)