search for: srcvaluesdnode

Displaying 10 results from an estimated 10 matches for "srcvaluesdnode".

2009 Dec 04
2
[LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue
hi, i am building selectionDAG by my own code, but got a assertion fail said "SrcValue is not a pointer?". but since the comment above the SrcValueSDNode said: "SrcValueSDNode - An SDNode that holds an arbitrary LLVM IR Value." why the llvm value of SrcValueSDNode must be with PointerType? is that assertion necessary? thanks a lots. regards --ether
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 getBasePtr().Val of the StoreSDNode to a SrcValueSDNode it asserts on: Assertion failed: isa<X>(Val) && "cast&l...
2009 Dec 04
0
[LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue
...7:45:42 PM > Subject: [LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue > > hi, > > i am building selectionDAG by my own code, but got a assertion fail > said "SrcValue is not a pointer?". > > but since the comment above the SrcValueSDNode said: "SrcValueSDNode - > An SDNode that holds an arbitrary LLVM IR Value." why the llvm value > of SrcValueSDNode must be with PointerType? is that assertion > necessary? thanks a lots. > > regards > --ether > _______________________________________________ > LLV...
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
2008 Sep 17
2
[LLVMdev] store addrspace qualifier
How do I access the address qualifier from the store instruction. Given the following code: define void @test_unary_op_anegate(float %x, float addrspace(11)* %result) nounwind { entry: %neg = sub float -0.000000e+000, %x ; <float> [#uses=1] store float %neg, float addrspace(11)* %result ret void } When I attempt to generate this code, I'm
2007 Jul 18
2
[LLVMdev] How to access llvm Types from the codegen?
...ld be passed on registers and {i64, i64, i64} goes on the stack. The problem is that when looking at (for example) FORMAL_ARGUMENTS, the only thing that is present is the type of the pointer itself (i64 for example). I can see three options to solve the problem: 1) Make FORMAL_ARGUMENTS have one SrcValueSDNode per argument in addition to the flags and make CALL use SrcValueSDNode for the arguments. The calling convention functions (CC_X86_64_C) can then be modified to take a Type as an additional argument. 2) Implement part of the ABI on the DAG construction. In this approach a struct that should be pas...
2007 Jul 26
0
[LLVMdev] How to access llvm Types from the codegen?
...64, i64} goes on the stack. > > The problem is that when looking at (for example) FORMAL_ARGUMENTS, > the only thing that is present is the type of the pointer itself (i64 > for example). > > I can see three options to solve the problem: > > 1) Make FORMAL_ARGUMENTS have one SrcValueSDNode per argument in > addition to the flags and make CALL use SrcValueSDNode for the > arguments. The calling convention functions (CC_X86_64_C) can then be > modified to take a Type as an additional argument. > > 2) Implement part of the ABI on the DAG construction. In this approach &gt...
2009 May 21
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On Wed, May 20, 2009 at 4:55 PM, Dan Gohman <gohman at apple.com> wrote: > Can you explain why you chose the approach of using a new pass? > I pictured removing LegalizeDAG's type legalization code would > mostly consist of finding all the places that use TLI.getTypeAction > and just deleting code for handling its Expand and Promote. Are you > anticipating something more
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On May 20, 2009, at 1:34 PM, Eli Friedman wrote: > On Wed, May 20, 2009 at 1:19 PM, Eli Friedman > <eli.friedman at gmail.com> wrote: > >> Per subject, this patch adding an additional pass to handle vector >> >> operations; the idea is that this allows removing the code from >> >> LegalizeDAG that handles illegal types, which should be a significant
2009 May 21
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...- Tmp2 = Node->getOperand(1); // Get the pointer. - if (TLI.getOperationAction(ISD::VAARG, VT) == TargetLowering::Custom) { - Tmp3 = DAG.getVAArg(VT, dl, Tmp1, Tmp2, Node->getOperand(2)); - Result = TLI.LowerOperation(Tmp3, DAG); - } else { - const Value *V = cast<SrcValueSDNode>(Node->getOperand(2))->getValue(); - SDValue VAList = DAG.getLoad(TLI.getPointerTy(), dl, Tmp1, Tmp2, V, 0); - // Increment the pointer, VAList, to the next vaarg - Tmp3 = DAG.getNode(ISD::ADD, dl, TLI.getPointerTy(), VAList, - DAG.getConstant(VT.getS...