search for: getsrcty

Displaying 16 results from an estimated 16 matches for "getsrcty".

Did you mean: getsrc
2009 Sep 28
0
[LLVMdev] Printing Function Arguments
...->op_end(); i != e; ++i) { } iterates over the operands of the instruction "I", which are as you said, *other* instructions. But if I want to get other information about the instruction, say the type of the operands, then I still need to figure out how to do that, e.g. via the I->getSrcTy() methods for say CastInst's instructions. My goal with this exercise was to write a small interpreter for the SSA IR, so I still need to associate some state with all the Instructions, for example, if I have a loop in the SSA, then the concrete values of the virtual registers (represented as...
2009 Sep 28
4
[LLVMdev] Printing Function Arguments
ivtm wrote: > Hey Oscar, > > I want to extract information from the instruction. > > Think writing a simple interpreter. > > I already have the CallInst instance (described above in the message). > > Via ci->getOperand(1) say I can get the 'i32 8' parameter and I can get the > 'i32' and '8' separately as Nick described. > > But I
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...e = dyn_cast<StoreInst>(I)) { isLdStr = Store->isSimple(); } > + > + // We can vectorize casts, but not casts of pointer types, etc. > + bool isCast = false; > + if (I->isCast()) { > + isCast = true; > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > + isCast = false; > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { > + isCast = false; > + } else if (cast<CastInst>(I)->getSrcTy()->isPointerTy()) { > + isCast = fal...
2009 Sep 28
0
[LLVMdev] Printing Function Arguments
...example, I am parsing the 'inttoptr' instruction. In that case the loop iterates only once, but then, I want to extract the values from which I am casting, _and_ the value to which I am casting. Somehow I need to extract the contents of the 'i'. For that, there are functions like getSrcTy() and getDstTy() I found them again by browsing the header files (which is not right :)... say for the inttoptr instruction. Btw, also the cout << I->getName() returns an empty string for some reason. I tried I->getName().c_str(), but still the same. Some simple example, say of parsi...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...sLdStr = Store->isSimple(); > } > > > + > > + // We can vectorize casts, but not casts of pointer types, etc. > > + bool isCast = false; > > + if (I->isCast()) { > > + isCast = true; > > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > > + isCast = false; > > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { > > + isCast = false; > > + } else if (cast<CastInst>(I)->getSrcTy()->isPointerTy()) { > &gt...
2011 Nov 16
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, et al., Attached is the my autovectorization pass. I've fixed a bug that appears when using -bb-vectorize-aligned-only, fixed some 80-col violations, etc., and at least on x86_64, all test cases pass except for a few; and all of these failures look like instruction-selection bugs. For example: MultiSource/Applications/ClamAV - fails to compile shared_sha256.c with an error: error in
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, I've attached the latest version of my autovectorization patch. I was able to add support for using the ScalarEvolution analysis for load/store pairing (thanks for your help!). This led to a modest performance increase and a modest compile-time increase. This version also has a cutoff as you suggested (although the default value is set high (4000 instructions between pairs) because
2008 Jul 21
2
[LLVMdev] Casting between address spaces and address space semantics
...with the address space + // changed. We can't simply use the source type, since the element type can be + // changed in the cast in addition to the address space. + const PointerType *DestTy = cast<PointerType>(CI.getDestTy()); + const PointerType *SrcTy = cast<PointerType>(CI.getSrcTy()); + const PointerType *NTy = PointerType::get(DestTy->getElementType(), SrcTy->getAddressSpace()); + + // Only propagate the address space when the source and dest address spaces + // are equivalent, or the source address space is a subset of the target + // address space. + Addrsp...
2011 Dec 02
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...S->isSimple() || NoMemOps) { IsSimpleLoadStore = false; return false; } } > + // We can vectorize casts, but not casts of pointer types, etc. > + bool IsCast = false; > + if (I->isCast()) { > + IsCast = true; > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > + IsCast = false; > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { > + IsCast = false; > + } else if (cast<CastInst>(I)->getSrcTy()->isPointerTy()) { > + IsCast = false; > +...
2011 Dec 14
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...LoadStore = false; > return false; > } > } > > > + // We can vectorize casts, but not casts of pointer types, etc. > > + bool IsCast = false; > > + if (I->isCast()) { > > + IsCast = true; > > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > > + IsCast = false; > > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { > > + IsCast = false; > > + } else if (cast<CastInst>(I)->getSrcTy()->isPointerTy()) { > > +...
2011 Nov 23
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 21:22 -0600, Hal Finkel wrote: > On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > > Tobias, > > > > I've attached an updated patch. It contains a few bug fixes and many > > (refactoring and coding-convention) changes inspired by your comments. > > > > I'm currently trying to fix the bug responsible for causing a compile
2008 Jul 21
0
[LLVMdev] Casting between address spaces and address space semantics
...; + // changed. We can't simply use the source type, since the > element type can be > + // changed in the cast in addition to the address space. > + const PointerType *DestTy = cast<PointerType>(CI.getDestTy()); > + const PointerType *SrcTy = cast<PointerType>(CI.getSrcTy()); > + const PointerType *NTy = PointerType::get(DestTy- > >getElementType(), SrcTy->getAddressSpace()); > + > + // Only propagate the address space when the source and dest > address spaces > + // are equivalent, or the source address space is a subset of the >...
2008 Jul 18
0
[LLVMdev] Casting between address spaces and address space semantics
Hi Eli, Mon Ping, > In ISO/IEC WG14 n1169 on the C extensions to support embedded > processors, any two address spaces must be disjoint, must be > equivalent, or must be nested. Ah, that standard is a lot clearer on this subject than the DSP-C one I read was. > As Eli indicated, the actual relationship is platform specific depending on > what makes the most sense for
2011 Dec 02
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...LoadStore = false; > return false; > } > } > > > + // We can vectorize casts, but not casts of pointer types, etc. > > + bool IsCast = false; > > + if (I->isCast()) { > > + IsCast = true; > > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > > + IsCast = false; > > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { > > + IsCast = false; > > + } else if (cast<CastInst>(I)->getSrcTy()->isPointerTy()) { > > +...
2011 Nov 22
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > Tobias, > > I've attached an updated patch. It contains a few bug fixes and many > (refactoring and coding-convention) changes inspired by your comments. > > I'm currently trying to fix the bug responsible for causing a compile > failure when compiling >
2008 Jul 17
4
[LLVMdev] Casting between address spaces and address space semantics
In ISO/IEC WG14 n1169 on the C extensions to support embedded processors, any two address spaces must be disjoint, must be equivalent, or must be nested. As Eli indicated, the actual relationship is platform specific depending on what makes the most sense for your hardware and how the program will behave will depend on that relationship. -- Mon Ping On Jul 17, 2008, at 7:25 AM, Eli