Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] how to dump a Instruction in gdb?"
2007 Nov 23
1
[LLVMdev] how to dump a Instruction in gdb?
On Nov 23, 2007 5:29 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi,
>
> > I want to know how to dump the a instruction in gdb. I can dump a
> Module
> > use M.dump(), also is there any such print function which can be used in
> gdb
> > for a single instruction and its operand?
>
> you can dump most things in LLVM the same way as for a module: if I
2008 Sep 18
2
[LLVMdev] store addrspace qualifier
Mon Ping,
Thanks for the tip, but I can't for the life of me seem to get the
Value from a StoreSDNode. From looking at the SelectionDAGNodes header
file, the only class that has the getValue function call is
SrcValueSDNode that returns a Value type. The only class that has
getType is a ConstantPoolSDNode. I don't think that ConstantPoolSDNode
is what I want and when I try to cast the
2008 Apr 23
0
[LLVMdev] how to dump DSA graph in gdb?
Tianwei wrote:
> On Wed, Apr 23, 2008 at 11:59 PM, John Criswell <criswell at cs.uiuc.edu<mailto:criswell at cs.uiuc.edu>> wrote:
> Dear Tianwei,
>
> You can use the -analyze option to the opt tool to tell the DSA passes
> to store their results in files. When you use the -analyze option, the
> DSA passes will create a separate file for each function (and possible
2010 Jul 21
1
[LLVMdev] How to recognize pointer variable & ordinary variable
Your last statement is correct. But still my stand does not change. I want
to differentiate ordinary local variable & pointer variables.
Let's have a program,
int a,b,c,*ptr;
I want to extract only the local variables. That's what my question was. I
think it is clear now. cast<PointerType>(A->getType()
>
> )->getElementType() is not working. I am also getting error
2009 Nov 05
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
On Nov 4, 2009, at 6:43 AM, Hans Wennborg wrote:
> Here is another change I'd like to suggest to the BasicAliasAnalysis.
>
> LLVM fails to remove the dead store in the following code:
>
> %t = type { i32 }
>
> define void @f(%t* noalias nocapture %stuff ) {
> %p = getelementptr inbounds %t* %stuff, i32 0, i32 0
>
> store i32 1, i32* %p; <-- This
2008 Apr 23
2
[LLVMdev] how to dump DSA graph in gdb?
On Wed, Apr 23, 2008 at 11:59 PM, John Criswell <criswell at cs.uiuc.edu>
wrote:
> Dear Tianwei,
>
> You can use the -analyze option to the opt tool to tell the DSA passes
> to store their results in files. When you use the -analyze option, the
> DSA passes will create a separate file for each function (and possible
> one file to hold the globals graph). For this reason,
2008 Nov 08
0
[LLVMdev] non-pointer gcroot
On Nov 7, 2008, at 15:29, Scott Graham wrote:
> I'm getting an assert in LowerIntrinsics::InsertRootInitializers
> because I'm gcroot'ing an alloca to a non-pointer.
>
> I was hoping to modify InsertRootInitializers to memset the
> structure in the case that it's not a pointer, but I'm not sure how
> to. Can anyone suggest what should go at "todo;
2013 Sep 01
0
[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable
Hi,
On 1 September 2013 15:47, Abhinash Jain <omnia at mailinator.com> wrote:
> Sorry I have actually edited the post.
This is primarily an e-mail list; the vast majority of us won't see
any edits (on some web mirror?).
> I did check its type by using
> isa<PointerType>(cast<AllocaInst>(instr->getOperand(1))->getAllocatedType())
> but it is only detecting
2008 Apr 23
0
[LLVMdev] how to dump DSA graph in gdb?
Dear Tianwei,
You can use the -analyze option to the opt tool to tell the DSA passes
to store their results in files. When you use the -analyze option, the
DSA passes will create a separate file for each function (and possible
one file to hold the globals graph). For this reason, I recommend
running opt in a special empty directory because DSA will generate *a
lot* of files.
Second, to
2008 Sep 17
0
[LLVMdev] store addrspace qualifier
The address qualifier is stored in the type of %result. From that
operand, you can get the Value and then call getType. The type for
result should be a PointerType which you cast to a PointerType and
get the getAddressSpace e.g. cast<PointerType>(Ty)->getAddressSpace()
-- Mon Ping
On Sep 17, 2008, at 1:06 PM, Villmow, Micah wrote:
> How do I access the address qualifier
2009 Nov 13
1
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
Hans Wennborg wrote:
> After discussing with Nick Lewycky in the IRC channel, here comes a less
> aggressive patch.
>
> We were worried that a constant pointer could alias with a GlobalValue.
> Also, if one pointer could be a GlobalValue and the other a GlobalAlias
> with the GlobalValue as aliasee.
> However, I was not able to produce a test where this happens wihout the
2010 Jul 21
0
[LLVMdev] How to recognize pointer variable & ordinary variable
Hi Soumya_Prasad_Ukil,
> How to recognize pointer variable & ordinary variable? I have tried with
> "isa<PointerType>(V->getType())", but failed.
I'm not sure what you are asking, but if you are asking whether an
alloca instruction A represents local memory of pointer type, you
can use A->getAllocatedType(). You can also use
2009 Nov 12
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
After discussing with Nick Lewycky in the IRC channel, here comes a less
aggressive patch.
We were worried that a constant pointer could alias with a GlobalValue.
Also, if one pointer could be a GlobalValue and the other a GlobalAlias
with the GlobalValue as aliasee.
However, I was not able to produce a test where this happens wihout the
getUnderlyingObject() returning the same value.
It
2009 Oct 20
0
[LLVMdev] Dereference PointerType?
2009/10/20 Daniel Waterworth <da.waterworth at googlemail.com>
> Hello,
>
> I'm wondering if it's possible to dereference a PointerType. I have an
> AllocaInst and although I can find the number of elements allocated, (using
> Instruction::getOperand(0)), I can't find a way to get the size of each
> element. What I'd like to do is:
>
> AllocaInst
2009 Nov 10
4
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
Dan Gohman wrote:
> On Nov 4, 2009, at 6:43 AM, Hans Wennborg wrote:
>
>> Here is another change I'd like to suggest to the BasicAliasAnalysis.
>>
>> LLVM fails to remove the dead store in the following code:
>>
>> %t = type { i32 }
>>
>> define void @f(%t* noalias nocapture %stuff ) {
>> %p = getelementptr inbounds %t* %stuff, i32 0,
2010 Apr 08
0
[LLVMdev] How to Load a Value?
Zheng Wang <jason.wangz at gmail.com> writes:
> I have a problem of generating a load instruction. The LLVM bytecode is:
>
> ------------------------
> entry:
> ...
> %2 = call i32 (...)* @atoi(i8*%1) nounwind
> /*<- Insertpos*/
> ...
>
> --
> bb1:
> ..
> %5 = icmp sgt i32 %2, %i.0
> ...
> -----------------
>
>
> Now I have
>
2008 Apr 23
2
[LLVMdev] how to dump DSA graph in gdb?
Hi, all:
Recently I am debugging the DSA and want to learn how it work, and now I
am checking the local datastructure analysis.
I use the following command to print the graph:
(gdb) p g.dump()
digraph DataStructures {
label="Function addG";
Node0xe1f3a0 [shape=record,shape=Mrecord,label="{ i32: MRE\n|{<g0>}}"];
Node0xe1f4d0
2008 Apr 04
2
[LLVMdev] InstCombine Question
I am confused by this bit of code in instcombine:
09789 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
09790 const Value *GEPI0 = GEPI->getOperand(0);
09791 // TODO: Consider a target hook for valid address spaces for this
xform.
09792 if (isa<ConstantPointerNull>(GEPI0) &&
09793
2009 Jan 09
2
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
Hi all,
Please review this patch. It's fixing PR3232 comment #8. Function bar
from 2008-03-24-BitFiled-And-Alloca.c compiles to:
%struct.Key = type { { i32, i32 } }
...
define i32 @bar(i64 %key_token2) nounwind {
entry:
%key_token2_addr = alloca i64 ; <i64*> [#uses=2]
%retval = alloca i32 ; <i32*> [#uses=2]
%iospec =
2011 Dec 14
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias,
I've attached an updated copy of the patch. I believe that I accounted
for all of your suggestions except for:
1. You said that I could make AA a member of the class and initialize it
for each basic block. I suppose that I'd need to make it a pointer, but
more generally, what is the thread-safely model that I should have in
mind for the analysis passes (will multiple threads