similar to: Check if getElementPtr Operand

Displaying 16 results from an estimated 16 matches similar to: "Check if getElementPtr Operand"

2016 Aug 31
2
Check if getElementPtr Operand
Thanks Ryan, I'm able to retrieved the type using the following code: Type *type=getElementPtrInst->getSourceElementType(); On Fri, Aug 12, 2016 at 7:00 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Take a look at visitGetElementPtrInst in InstructionCombining.cpp for some > examples about how to iterate over GEP and check for type. > >
2018 Jan 09
2
Passing Array base address/pointer to runtime function in LLVM IR
Hello LLVM, I am a beginner in LLVM My Goal is to initialize array element with random values. llvm::Type *i32_type = llvm::IntegerType::getInt32Ty(allocaInst->getContext()); llvm::Value *value = llvm::ConstantInt::get(i32_type, numberOfElement); args.push_back(getElementPtrInst->getPointerOperand()); args.push_back(value); callInst =
2019 Jan 20
3
(no subject)
Hi all, I have the following C code: #include<stdio.h> int main(int argc, char *argv[]) { printf("%s\n", argv[0]); return argc; } that generates the following IR for the main function: ; Function Attrs: noinline nounwind optnone uwtable define i32 @main(i32, i8**) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 %5 = alloca i8**, align 8 store i32 0, i32*
2018 Jan 09
0
Passing Array base address/pointer to runtime function in LLVM IR
Hi Bernard, On 9 January 2018 at 07:08, Bernard Nongpoh via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Tried the above code but no luck .. I'm afraid there's not enough context here to answer the question. The code you posted looks like it could work, but a lot would depend on the definitions you omitted: getElementPtrInst especially, though a dump of the whole Module as it
2019 Jan 27
2
(no subject)
Hi, All good points and jokes in your email :) My final goal is the get the value of %8 at runtime. So considering the program is called argv I would like to execute something like ./argv 22 and get the value of argv[0]. Is it possible? So far I have the address where the parameter at position 0 in store but I'd like to read the value and print it. I hope it is clear now Thanks again On
2019 Nov 06
2
RFC: On non 8-bit bytes and the target for it
On Nov 4, 2019, at 4:00 PM, James Molloy via llvm-dev <llvm-dev at lists.llvm.org> wrote: > We'd be keen to help out what the community decides to do here. I personally feel it's reasonable that: > - LangRef/DataLayout is updated with semantically coherent changes. > - The midend optimizer is updated by someone who cares about those changes and tests are added that use
2006 May 10
0
[LLVMdev] SCCP
On Wed, 10 May 2006, Nick Lewycky wrote: >> Then just run the SCCP pass, and check to see if any operands satisfy >> the predicate "isa<UndefValue>(V)". LLVM explicitly represents >> undefined values. > > I have a case where it doesn't, but perhaps the SCCP pass isn't to blame: > > extern void write_char(int); > > const char foo[4] =
2006 May 10
2
[LLVMdev] SCCP
Chris Lattner wrote: > On Tue, 9 May 2006, Nick Lewycky wrote: > >>> You could do that, but SCCPSolver isn't really useful to mainline LLVM >>> for anything other than SCCP and IPSCCP, so we don't need it in a public >>> header. Out of curiosity, what are you looking to use the latice values >>> for? Why not just run SCCP and then look at the
2007 Oct 19
0
calculating power of log rank test
hie Im trying to calculate the power of the logrank test for different values of rho .I was just wandering whether the following programme would do it. any suggestions are welcome s=50 number=1 count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count7=0; count8=0;count9=0 while(s!=0){ n=20 n1=n/2
2008 Feb 14
0
help in simplyfiying programme
my program given below can some one make it presentable. I trying to simulate survival data and calculate the power. I think i could have done better. s=10 number=0 count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count8=0; count9=0; count11=0;count22=0;count33=0;count44=0;count55=0;count66=0;count77=0; count88=0;count99=0; while(s!=0){ n=100 n1=n/2 n2=n/4
2012 Apr 17
2
[LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass
With reference to the previous query, I think, i miscalculated the offset, just recalculating. 1. without instruction combining coupling member variable, is at:   %struct._FRAME_DATA* %2, i32 0, i32 5   where "%2" is defined as:   %arrayidx3 = getelementptr inbounds i16* %Data, i32 1024, !dbg !446   %2 = bitcast i16* %arrayidx3 to %struct._FRAME_DATA*, !dbg !446 i.e. at 5 offset in
2006 May 10
2
[LLVMdev] SCCP
Chris Lattner wrote: > On Wed, 10 May 2006, Nick Lewycky wrote: > >>> Then just run the SCCP pass, and check to see if any operands satisfy >>> the predicate "isa<UndefValue>(V)". LLVM explicitly represents >>> undefined values. >> >> >> I have a case where it doesn't, but perhaps the SCCP pass isn't to blame: >>
2012 Apr 17
2
[LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass
Hi All,   I have been having this issue, when I am enable Instruction Combining pass, for an application. I have read similar post ealier, http://old.nabble.com/Instruction-Combining-Pass-*Breaking*-Struct-Reads--td24253572.html With reference to the above case, my target data layout is defined as: DataLayout("e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-a:32:32") Thus I don't see
2012 Apr 18
0
[LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass
Hi All,   Further exploring the problem I could find that, there is a address offset calculation problem, with the GEP bitcast handling code in instruction combining. Below is table which shows address offset calculation for the struct elements (described earlier).   Type Variable Actual Size(in bytes) pass fail llvm2.9 Address(pass) Size-pass (in bytes) Address (fail) Size -fail (in bytes) with
2019 Dec 18
5
RFC: Opaque pointer status and future direction
Hi all, At the dev meeting I promised to update everyone on where my work with opaque pointers is right now. It's taken me a while, but at least it's the same year! Current Status ============== I've put two branches up at https://github.com/TNorthover/llvm-project: "opaque-ptr" which has most of the real work so far; and "opaque-ptr-always" that additionally has
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