Displaying 20 results from an estimated 1002 matches for "getoperand".
2007 Mar 30
1
[LLVMdev] Cleanups in ROTL/ROTR DAG combiner code
...==================================================================
--- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (.../trunk) (revision 2118)
+++ lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (.../branches/llvm-spu) (revision 2118)
@@ -2683,10 +2683,24 @@
case ISD::ROTR:
Tmp1 = LegalizeOp(Node->getOperand(0)); // LHS
Tmp2 = LegalizeOp(Node->getOperand(1)); // RHS
-
- assert(TLI.isOperationLegal(Node->getOpcode(), Node->getValueType(0)) &&
- "Cannot handle this yet!");
Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2);
+ switch (TLI.getOp...
2013 Jan 11
1
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hi Óscar,
But if I do "I1->getOperand(0)->getOperand(0)" I get " ‘class llvm::Value’
has no member named ‘getOperand’ ". getOperand() I think it's only defined
for Instruction class. Do you know any equivalent method for Value?
On Fri, Jan 11, 2013 at 12:07 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
>...
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
...ed i64; without
+ // SSE, we're stuck with a fistpll.
+ setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Custom);
}
// TODO: when we have SSE, these could be more efficient, by using movd/movq.
@@ -4608,8 +4612,14 @@
SDValue Chain = DAG.getStore(DAG.getEntryNode(), dl, Op.getOperand(0),
StackSlot,
PseudoSourceValue::getFixedStack(SSFI), 0);
+ return BuildFILD(Op, SrcVT, Chain, StackSlot, DAG);
+}
+SDValue X86TargetLowering::BuildFILD(SDValue Op, MVT SrcVT, SDValue Chain,
+ SD...
2013 Jan 11
2
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hi Duncan,
Thank you for your response! Now it works.
But I have another problem: Do you know how can I iterate through a Value*?
For instance, I have :
Instruction *I1; // I take only I1 that are ICmp
errs()<<"\n "<<*I1->getOperand(0)<<" \n";
// %3 = load i32* %c, align 4
As expected. Now I want to get %c from the previous to use "%c" in
comparisons. I tried :
for (llvm::Value::use_iterator VI=(*I1->getOperand(0)).use_begin(),
VE=(*I1->getOperand(0)).use_end(); VI != VE ; ++VI)
{
errs(...
2013 Jan 28
5
[LLVMdev] Value* to Instruction*/LoadInst* casting
Hello everyone,
Can you please tell me if it is possible in LLVM to cast a `Value*` to an
`Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true?
In my particular piece of code:
Value* V1 = icmpInstrArray[i]->getOperand(0);
Value* V2 = icmpInstrArray[i]->getOperand(1);
if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){
...
if(isa<LoadInst>(icmpInstrArray[i]->getOperand(0)))
LoadInst *LD100 = cast<LoadInst>(icmpInstrArray[i]->getOperand(0));
Value *C100...
2013 Jan 11
0
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
...ndru Ionut Diaconescu <alexandruionutdiaconescu at gmail.com> writes:
> But I have another problem: Do you know how can I iterate through a Value*?
> For instance, I have :
>
> Instruction *I1; // I take only I1 that are ICmp
>
> errs()<<"\n "<<*I1->getOperand(0)<<" \n";
> // %3 = load i32* %c, align 4
>
> As expected. Now I want to get %c from the previous to use "%c" in
> comparisons. I tried :
>
> for (llvm::Value::use_iterator VI=(*I1->getOperand(0)).use_begin(),
> VE=(*I1->getOperand(0)).use_end()...
2013 Jan 10
2
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
...= last->getPrevNode();
ok=1;
}
I want to get the operands of previous, which is of type Instruction*. Due
tests based on getNumOperands, ICMP has 2 (as normal).
if ( ok && ((previous->getNumOperands())>=2) )
errs()<<"\nTTTTT "<<previous->getOperand(0)->getName()<<" | "
<<previous->getOperand(0)->getValueName()<<" | "
<<previous->getOperand(0)->getValueID()<<" | "
<<previous->getOperand(0)->getNumUses()<<" TTTTT\n&quo...
2013 Jan 11
3
[LLVMdev] llvm get Value* iterators
Hello everyone !
In my LLVM pass, there is `Intruction* I1`. All the used "I1"s are ICMP
instructions. *I1->getOperand(0) returns a `Value*` type. From
errs()<<"\n"<<*I1->getOperand(0)<<"\n";
//printed : %3 = load i32* %c, align 4
Printed as expected. But I want to use %c. Do you know how I can get %c ? I
need to use the value %c in some computations.
First, I trie...
2011 Oct 17
2
[LLVMdev] Variable name from metadata
Hi All,
Can we extract name of variable name from "MDNode" ?
1. Neither temp_MDNode->getName() nor temp_MDNode->getValueName() give me "global_int" which is name of a variable.
2. I tried below ways as well.
DIVariable DV(mdnode1);
Value *v = mdnode1->getOperand(0);//gives add 0x69
3. I have written below code to reach till variable name.
LLVMIname is
const CallInst *CI = dyn_cast<CallInst>(Insn);
const Value* LLVMIValue = cast<CallInst>(Insn)->getCalledValue();
const Function *LLVMIFun...
2012 Jan 25
0
[LLVMdev] [PATCH] TLS support for Windows 32+64bit
On Thu, Jan 19, 2012 at 9:24 AM, Kai <kai at redstar.de> wrote:
> Hi!
>
> I added 2 more tests and also refined an assert statement. Applies cleanly
> to r148473 now. Are there more comments on the code? Thank you!!
+ assert(Inst.getOperand(0).isReg() &&
+ (Inst.getOperand(ImmOp).isImm() ||
+ (Inst.getOperand(ImmOp).isExpr() &&
+ Inst.getOperand(ImmOp).getExpr()->getKind() == MCExpr::SymbolRef) &&
+ static_cast<const
MCSymbolRefExpr*>(Inst.getOperand(ImmOp).getExpr())->getKind() ==
MCSy...
2013 Jan 10
0
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
...}
> |
>
> I want to get the operands of previous, which is of type Instruction*. Due tests
> based on getNumOperands, ICMP has 2 (as normal).
>
> |if ( ok && ((previous->getNumOperands())>=2) )
>
> errs()<<"\nTTTTT "<<previous->getOperand(0)->getName()<<" | "
> <<previous->getOperand(0)->getValueName()<<" | "
> <<previous->getOperand(0)->getValueID()<<" | "
> <<previous->getOperand(0)->getNumUses()<<...
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
...at gmail.com> wrote:
> Hello everyone,
>
> Can you please tell me if it is possible in LLVM to cast a `Value*` to an
> `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true?
> In my particular piece of code:
>
> Value* V1 = icmpInstrArray[i]->getOperand(0);
> Value* V2 = icmpInstrArray[i]->getOperand(1);
> if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){
> ...
> if(isa<LoadInst>(icmpInstrArray[i]->getOperand(0)))
> LoadInst *LD100 = cast<LoadInst>(icmpInstrArray[i]->getOperand(0))...
2013 Jan 28
1
[LLVMdev] Value* to Instruction*/LoadInst* casting
...;> Hello everyone,
>>
>> Can you please tell me if it is possible in LLVM to cast a `Value*` to an
>> `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true?
>> In my particular piece of code:
>>
>> Value* V1 = icmpInstrArray[i]->getOperand(0);
>> Value* V2 = icmpInstrArray[i]->getOperand(1);
>> if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){
>> ...
>> if(isa<LoadInst>(icmpInstrArray[i]->getOperand(0)))
>> LoadInst *LD100 = cast<LoadInst>(icmpInstrArray[i...
2012 Jan 19
2
[LLVMdev] [PATCH] TLS support for Windows 32+64bit
Hi!
I added 2 more tests and also refined an assert statement. Applies
cleanly to r148473 now. Are there more comments on the code? Thank you!!
Regards
Kai
On 01.01.2012 22:01, Eli Friedman wrote:
> On Sun, Jan 1, 2012 at 10:44 AM, Kai<kai at redstar.de> wrote:
>> Happy new year to all!
>>
>> The attached patch adds TLS support for x86_64-pc-win32 and x86-pc-win32.
2011 Jun 22
1
[LLVMdev] Mips backend -- Incorrect globaladdr/constpool address generation when bit 15 of address is set?
...ding from constant pools, load the lower address part in
// the instruction itself. Example, instead of:
// lui $2, %hi($CPI1_0)
// addiu $2, $2, %lo($CPI1_0)
// lwc1 $f0, 0($2)
// Generate:
// lui $2, %hi($CPI1_0)
// lwc1 $f0, %lo($CPI1_0)($2)
if ((Addr.getOperand(0).getOpcode() == MipsISD::Hi ||
Addr.getOperand(0).getOpcode() == ISD::LOAD) &&
Addr.getOperand(1).getOpcode() == MipsISD::Lo) {
SDValue LoVal = Addr.getOperand(1);
if (dyn_cast<ConstantPoolSDNode>(LoVal.getOperand(0))) {
Base = Addr.getOpera...
2011 Oct 17
0
[LLVMdev] Variable name from metadata
...I could do following, to get the required information.
const CallInst *CI = dyn_cast<CallInst>(Insn);
int numoperands = CI->getNumArgOperands();
for( unsigned i = 0; i != numoperands; ++i)
{
Value *v = CI->getOperand(i);
MDNode *temp = (MDNode *)CI->getOperand(1) ;
DIVariable DV(temp);//TO CHECK. remove later
StringRef varName = DV.getName();
const char *tmpvarname = varName.data();
if( i == 1) //points to metadata for...
2015 Mar 09
2
[LLVMdev] LLVM Backend DAGToDAGISel INTRINSIC
...y to pass it with four arguments and a return
register it fails the assertion `ResNo < NumValues && "Illegal result
number!"'.
More specifically I am doing something like:
EVT ReturnValueVT = Node->getValueType(0) ;
SDValue ChainIn = Node->getOperand(0);
SDValue Zero = CurDAG->getCopyFromReg(ChainIn, DL,
Mips::ZERO, MVT::i32);
SDValue op0 = Node->getOperand(2);
SDValue op1 = Node->getOperand(3);
SDValue op2= Node->getOperand(4);
SDValue op3 = Node->getOperand(...
2013 Jan 11
0
[LLVMdev] llvm get Value* iterators
If I1->getOperand(0) is the load, then %c is its pointer argument available
with:
LoadInst *LD = cast<LoadInst>(I1->getOperand(0));
Value *C = LD->getPointerOperand();
On Fri, Jan 11, 2013 at 7:19 AM, Alexandru Ionut Diaconescu <
alexandruionutdiaconescu at gmail.com> wrote:
> Hello everyon...