search for: visitgetelementptrinst

Displaying 12 results from an estimated 12 matches for "visitgetelementptrinst".

2019 Jan 20
3
(no subject)
...elementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* %8) %10 = load i32, i32* %4, align 4 ret i32 %10 } I think %8 will contain the address of argv[0], so %7 was storing a pointer to pointer to argv? I'm not sure of that. Considering that I can access the GenericValue set by visitGetElementPtrInst. How can I obtain the value of argv[0] at runtime using the Interpreter class? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190120/949253e7/attachment.html>
2019 Jan 27
2
(no subject)
.... > > Let's see: argc is %0 and argv == &argv[0] is %1. The latter is stored > in %5, which is loaded as %6. The GEP (%7) is a no-op, thus %6 == %7. > Finally, %8 is the value argv[0] of type char/i8. > > > Considering that I can access the GenericValue set by > > visitGetElementPtrInst. How can I obtain the value of argv[0] at runtime > > using the Interpreter class? > > Sorry can't help with that. I don't know the Interpreter class and I > guess "GenericValue" and "visitGetElementPtrInst" are somehow related to > it. > > > T...
2016 Aug 12
2
Check if getElementPtr Operand
Hello, consider the following IR code : %count4 = getelementptr inbounds %struct.r32, %struct.r32* %cur.087, i64 0, i32 4 How to check in the instruction, whether the operand is a structure or not if(isa<GetElementPtrInst>(instruction)) { GetElementPtrInst *getElementPtrInst=dyn_cast<GetElementPtrInst>(&instruction); //check if getElemetPtrInst operands structure or array. }
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
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. > > http://llvm.org/docs/doxygen/html/InstructionCombining_ > 8cpp_source.html#l01334 > > Hope I understood your question correctly. > > On Fri, Aug 12, 2016 at 6:34 AM, Bernard...
2006 May 10
2
[LLVMdev] SCCP
...to teach the instcombine pass to turn a > load from an invalid location (in this case, off the end of the array) > into an undef value. If you wanted to tackle this, it should be > straight-forward and would be a worthwhile addition to the LLVM > optimizer. In SCCPSolver::visitGetElementPtrInst, it would fall through to the final markConstant call at the end of the function. Someone should be doing a check with indexValid to see if instead it should be marking as undefined. I can try to produce such a patch. >> I thought this might be because the optimizer is being conservative &g...
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] =
2012 Apr 17
2
[LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass
...ction-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 problem mentioned in the above reference.   In the function "visitGetElementPtrInst" has a piece of code for handling bitcasts,    /// See if we can simplify:   ///   X = bitcast A* to B*   ///   Y = gep X, <...constant indices...> which when commented, does not give me problem.   The application uses a buffer.  This buffer is assigned to struct such as "FRAME_DAT...
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
2012 Apr 18
0
[LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass
...uction-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 problem mentioned in the above reference. In the function "visitGetElementPtrInst" has a piece of code for handling bitcasts,    /// See if we can simplify:   ///   X = bitcast A* to B*   ///   Y = gep X, <...constant indices...> which when commented, does not give me problem. The application uses a buffer.  This buffer is assigned to struct such as "FRAME_DATA...
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
2019 Dec 18
5
RFC: Opaque pointer status and future direction
...1 eliminateSwiftErrorArgument 1 TryToShrinkGlobalToBoolean 1 llvm::InstCombiner::visitGetElementPtrInst 1 rewriteGEPAsOffset 1 llvm::ConstantFoldExtractElementInstruction 1 canTailPredicateLoop...