Displaying 19 results from an estimated 19 matches for "isvectorty".
Did you mean:
isvector
2013 Jul 19
4
[LLVMdev] Disable vectorization for unaligned data
...rce to the
top of the stack and work from there. This is very costly, I rather get
scalar operations.
Then I tried to add:
unsigned getMemoryOpCost(unsigned Opcode, Type *Src,
unsigned Alignment,
unsigned AddressSpace) const {
if (Src->isVectorTy() && Alignment != 16)
return 10000; // <== high number to try to avoid unaligned load/store.
return TargetTransformInfo::getMemoryOpCost(Opcode, Src, Alignment,
AddressSpace);
}
Except that this doesn't work because Alignment will always be 4 even for
data like:
i...
2013 Jan 20
1
[LLVMdev] Get the value of a GlobalVariable
...MY_GLOBAL");
I want to know the value which was stored in this variable, I use the
following command, but it gives error:
APInt value = my_global->getValue();
Error is:
llvm/lib/IR/Constants.cpp:1257: llvm::Constant
*llvm::Constant::getSplatValue() const: Assertion
`this->getType()->isVectorTy() && "Only valid for vectors!"' failed.
I am new to LLVM, so a lot of nomenclature is still not very familiar to me
and I am trying to understand it as I go forward.
Thanks,
Varun Agrawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <ht...
2013 Jul 20
0
[LLVMdev] Disable vectorization for unaligned data
...d work from there. This is very costly, I rather get scalar operations.
>
> Then I tried to add:
> unsigned getMemoryOpCost(unsigned Opcode, Type *Src,
> unsigned Alignment,
> unsigned AddressSpace) const {
> if (Src->isVectorTy() && Alignment != 16)
> return 10000; // <== high number to try to avoid unaligned load/store.
> return TargetTransformInfo::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace);
> }
>
> Except that this doesn't work because Alignment will always be 4 eve...
2013 Jul 19
0
[LLVMdev] Disable vectorization for unaligned data
...rk from there. This is very costly, I rather get
> scalar operations.
>
> Then I tried to add:
> unsigned getMemoryOpCost(unsigned Opcode, Type *Src,
> unsigned Alignment,
> unsigned AddressSpace) const {
> if (Src->isVectorTy() && Alignment != 16)
> return 10000; // <== high number to try to avoid unaligned load/store.
> return TargetTransformInfo::getMemoryOpCost(Opcode, Src, Alignment,
> AddressSpace);
> }
>
> Except that this doesn't work because Alignment will always be 4...
2013 Jul 21
2
[LLVMdev] Disable vectorization for unaligned data
...stly, I rather get
> scalar operations.
> >
> > Then I tried to add:
> > unsigned getMemoryOpCost(unsigned Opcode, Type *Src,
> > unsigned Alignment,
> > unsigned AddressSpace) const {
> > if (Src->isVectorTy() && Alignment != 16)
> > return 10000; // <== high number to try to avoid unaligned
> load/store.
> > return TargetTransformInfo::getMemoryOpCost(Opcode, Src, Alignment,
> AddressSpace);
> > }
> >
> > Except that this doesn't work beca...
2010 Mar 29
0
[LLVMdev] Union types
...e Type::ArrayTyID:
case Type::VectorTyID:
return ConstantAggregateZero::get(Ty);
@@ -944,7 +945,8 @@
// Factory Function Implementation
ConstantAggregateZero* ConstantAggregateZero::get(const Type* Ty) {
- assert((Ty->isStructTy() || Ty->isArrayTy() || Ty->isVectorTy()) &&
+ assert((Ty->isStructTy() || Ty->isUnionTy()
+ || Ty->isArrayTy() || Ty->isVectorTy()) &&
"Cannot create an aggregate zero of non-aggregate type!");
LLVMContextImpl *pImpl = Ty->getContext().pImpl;
2010 Mar 29
6
[LLVMdev] Union types
Hi All,
I've noticed the union type in the language manual [1] but it seems
it's not used too much.
According to the manual, the code:
union {
int a;
double b;
} a;
Could be compiled to:
%union.anon = type union { i32, double }
@a = common global %union.anon zeroinitializer, align 8 ;
<%union.anon*> [#uses=0]
But when I try to assemble it, I get:
$ llvm-as union.ll
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...s(VectorBits, BB)) {
> + changed = true;
> + }
> + else {
> + break;
> + }
In general you should use '} else {'. Here braces are not needed at all.
> + static inline VectorType *getVecType(Type *iType) {
> + if (iType->isVectorTy()) {
> + unsigned numElem = cast<VectorType>(iType)->getNumElements();
> + return VectorType::get(iType->getScalarType(), numElem*2);
> + }
> + else {
> + return VectorType::get(iType, 2);
> + }
> + }
> +
> + // Note:...
2013 Jul 21
0
[LLVMdev] Disable vectorization for unaligned data
...ry costly, I rather get scalar operations.
> >
> > Then I tried to add:
> > unsigned getMemoryOpCost(unsigned Opcode, Type *Src,
> > unsigned Alignment,
> > unsigned AddressSpace) const {
> > if (Src->isVectorTy() && Alignment != 16)
> > return 10000; // <== high number to try to avoid unaligned load/store.
> > return TargetTransformInfo::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace);
> > }
> >
> > Except that this doesn't work because Alignm...
2017 Aug 29
2
vector instruction
Hello,
is there a good way to determine that the instruction is a vector
instruction? Or the only way like it's size is multiple of the operands
size?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170829/bbe6213b/attachment.html>
2019 Oct 21
2
How to create vector pointer type?
...dd
static bool isVectorPtr(Type *Ty) {
bool a = false;
if(Ty->isPointerTy() ){
PointerType *PointerTy = dyn_cast<PointerType>(Ty);
Type *vt = PointerTy->getElementType();
a = vt->isVectorTy();
}
return a;
}
Then meet the following error:
Assertion failed: ResultElementType == cast<PointerType>(getType()->getScalarType())->getElementType(), file D:\cygwin64\home\celine\clang-102\llvm\include\llvm/IR/Instructions.h, line 958
I wonder ho...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...= true;
> > + }
> > + else {
> > + break;
> > + }
>
> In general you should use '} else {'. Here braces are not needed at all.
>
> > + static inline VectorType *getVecType(Type *iType) {
> > + if (iType->isVectorTy()) {
> > + unsigned numElem = cast<VectorType>(iType)->getNumElements();
> > + return VectorType::get(iType->getScalarType(), numElem*2);
> > + }
> > + else {
> > + return VectorType::get(iType, 2);
> > + }
> >...
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
2011 Dec 02
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ovided type.
> + // If the provided type is already a vector, then its length is doubled.
> + static inline VectorType *getVecType(Type *VElemType) {
What about naming this getVecTypeForPair()?
I think ElemType is sufficient. No need for the 'V'.
> + if (VElemType->isVectorTy()) {
> + unsigned numElem = cast<VectorType>(VElemType)->getNumElements();
> + return VectorType::get(VElemType->getScalarType(), numElem*2);
> + } else {
> + return VectorType::get(VElemType, 2);
> + }
> + }
This can be:
if (VectorT...
2011 Dec 14
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ovided type is already a vector, then its length is doubled.
> > + static inline VectorType *getVecType(Type *VElemType) {
>
> What about naming this getVecTypeForPair()?
>
> I think ElemType is sufficient. No need for the 'V'.
>
> > + if (VElemType->isVectorTy()) {
> > + unsigned numElem = cast<VectorType>(VElemType)->getNumElements();
> > + return VectorType::get(VElemType->getScalarType(), numElem*2);
> > + } else {
> > + return VectorType::get(VElemType, 2);
> > + }
> > +...
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
2011 Dec 02
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ovided type is already a vector, then its length is doubled.
> > + static inline VectorType *getVecType(Type *VElemType) {
>
> What about naming this getVecTypeForPair()?
>
> I think ElemType is sufficient. No need for the 'V'.
>
> > + if (VElemType->isVectorTy()) {
> > + unsigned numElem = cast<VectorType>(VElemType)->getNumElements();
> > + return VectorType::get(VElemType->getScalarType(), numElem*2);
> > + } else {
> > + return VectorType::get(VElemType, 2);
> > + }
> > +...
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
>