Displaying 11 results from an estimated 11 matches for "arraytyid".
Did you mean:
arrayid
2008 Nov 13
0
[LLVMdev] Using isa with derived types
...ray, struct, etc.
>
> What am I missing?
Please see the doxygen: http://llvm.org/doxygen/classllvm_1_1Type.html
if (const PointerType *PTy = dyn_cast<PointerType>(...)) {
const Type *InnerTy = PTy->getElementType();
switch (InnerTy->getTypeID()) {
case Type::ArrayTyID:
...
case Type::FunctionTyID:
...
case Type::StructTyID:
...
case Type::IntegerTyID:
...
}
}
A switch on getTypeID() is equivalent to isa<>, but more efficient than
a chain of if's when doing multiple tests.
If you only c...
2008 Nov 13
3
[LLVMdev] Using isa with derived types
Hello,
I am writing an optimization pass which optimizes code based on an online
pointer analysis algorithm and need to detect pointers which are pointing to
derived types. I have not had any problem identifying pointers in general
using isa<PointerType>(...), but I can't seem to figure out how I can make
sure that the pointer is pointing to a scalar value and not a function,
array,
2004 Dec 09
1
[LLVMdev] Question about insert call func with pionter parameter
...w that the constantarry differ from sbyte pointer ( sbyte*), but I tried to change the code to
>Function *exFunc = M->getOrInsertFunction("stat_func", Type::VoidTy, Cstr->getType(),0);
or
>Function *exFunc = M->getOrInsertFunction("stat_func", Type::VoidTy, Type::ArrayTyID,0);
and once I run the pass, it is worse than the above. the error information is
" llvm::FunctionType::FunctionType(const llvm::Type*, const std::vector<const llvm::Type*, std::allocator<const llvm::Type::>>&,bool): Assertion ..............Function arguments must be value...
2012 Sep 04
2
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
...rray item being
initialized to be constant is incorrect. NVPTX does not crash anymore
and produces correct result with the following change:
--- NVPTXAsmPrinter.cpp 2012-09-03 15:14:00.000000000 +0200
+++ NVPTXAsmPrinter.cpp 2012-09-04 15:47:17.859398193 +0200
@@ -1890,17 +1890,15 @@
case Type::ArrayTyID:
case Type::VectorTyID:
case Type::StructTyID: {
- if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV) ||
- isa<ConstantStruct>(CPV)) {
+ if (isa<ConstantAggregateZero>(CPV))
+ aggBuffer->addZeros(Bytes);
+ else
+ {
int ElementSize...
2012 Sep 06
0
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
...be constant is incorrect. NVPTX does not crash anymore
> and produces correct result with the following change:
>
> --- NVPTXAsmPrinter.cpp 2012-09-03 15:14:00.000000000 +0200
> +++ NVPTXAsmPrinter.cpp 2012-09-04 15:47:17.859398193 +0200
> @@ -1890,17 +1890,15 @@
> case Type::ArrayTyID:
> case Type::VectorTyID:
> case Type::StructTyID: {
> - if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV) ||
> - isa<ConstantStruct>(CPV)) {
> + if (isa<ConstantAggregateZero>(CPV))
> + aggBuffer->addZeros(Bytes);
> +...
2008 Dec 08
1
[LLVMdev] Using isa with derived types
...wycky wrote:
>
> Please see the doxygen: http://llvm.org/doxygen/classllvm_1_1Type.html
>
> if (const PointerType *PTy = dyn_cast<PointerType>(...)) {
> const Type *InnerTy = PTy->getElementType();
> switch (InnerTy->getTypeID()) {
> case Type::ArrayTyID:
> ...
> case Type::FunctionTyID:
> ...
> case Type::StructTyID:
> ...
> case Type::IntegerTyID:
> ...
> }
> }
>
>
--
View this message in context: http://www.nabble.com/Using-isa-with-derived-type...
2010 Mar 29
0
[LLVMdev] Union types
...================================
--- lib/VMCore/Constants.cpp (revision 99809)
+++ lib/VMCore/Constants.cpp (working copy)
@@ -59,6 +59,7 @@
case Type::PointerTyID:
return ConstantPointerNull::get(cast<PointerType>(Ty));
case Type::StructTyID:
+ case Type::UnionTyID:
case 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()) &am...
2012 Sep 04
0
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
NVCC successfully handles the same IR, if we try to process the same
.cu file with clang+nvptx and nvcc:
CLANG/NVPTX:
=============
$ cat dayofweek.cu
__attribute__((device)) char yweek[7][4] = { "MON", "TUE", "WED",
"THU", "FRI", "SAT", "SUN" };
$ clang -cc1 -emit-llvm -fcuda-is-device dayofweek.cu -o dayofweek.ll
$ cat
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
2012 Sep 03
2
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
Dear all,
Looks like the NVPTX backend cannot handle array-of-arrays contant
(please see the reporocase below). Is it supposed to work? Any ideas
how to get it working? Important for our target applications.
Thanks,
- Dima.
$ cat test.ll
; ModuleID = '__kernelgen_main_module'
target datalayout =
2007 Jul 05
2
[LLVMdev] PATCH (rest of code changes) "bytecode" --> "bitcode"
Here is the bulk of the sanitizing.
My residual doubts center around the question
whether we still do/want to support (un)compressed *byte*code
in 2.0/2.1.
I need a definitive word on this to proceed.
My understanding is that bytecode is already gone, but there are
still some functions/enums that really deal with *byte*code
(instead of *bit*code).
I did not touch those areas, so the attached