search for: voidty

Displaying 20 results from an estimated 66 matches for "voidty".

2012 May 07
0
[LLVMdev] Discussion of eliminating the void type
...particular. Of course front-ends (clang, dragonegg) need to produce something instead of void, and {} is an example of what they might produce, but they should not be obliged to use that. For example they could use [] or {{}} etc. > === Further Implementation Details === > > 1. Deleting VoidTyID Yes! > 2. Deleting LLVMVoidTypeKind (one-to-one relation between VoidTyID and > LLVMVoidTypeKind) Yes! > 3. Use StructTy* VoidTy instead of Type VoidTy No! This doesn't make any sense to me. Why would having a definition for VoidTy be needed or desirable? > VoidTy may...
2012 May 07
4
[LLVMdev] Discussion of eliminating the void type
Hello all, I am willing to do "eliminating the void type" project. Is there anyone working on it? === Overview === The general concept is to replaced void with {}. And 'ret void' is a synonym of 'ret {} {}.' === Further Implementation Details === 1. Deleting VoidTyID 2. Deleting LLVMVoidTypeKind (one-to-one relation between VoidTyID and LLVMVoidTypeKind) 3. Use StructTy* VoidTy instead of Type VoidTy VoidTy may be Identified struct. In addition to error occurs at test/Analysis/BasicAA/empty.ll because of using literal struct "{}" as VoidTy...
2012 May 07
1
[LLVMdev] Discussion of eliminating the void type
...ds (clang, dragonegg) need to produce > something instead of void, and {} is an example of what they might produce, but > they should not be obliged to use that. For example they could use [] or {{}} > etc. > >> === Further Implementation Details === >> >> 1. Deleting VoidTyID > Yes! > >> 2. Deleting LLVMVoidTypeKind (one-to-one relation between VoidTyID and >> LLVMVoidTypeKind) > Yes! > >> 3. Use StructTy* VoidTy instead of Type VoidTy > No! This doesn't make any sense to me. Why would having a definition for > VoidTy be neede...
2009 Aug 01
2
[LLVMdev] Inserting Instructions (pass)
Thank you Chris, for your hint, but I am still too stupid. I tried two versions asm_arguments.push_back(Type::VoidTy); FunctionType *asm_type = FunctionType::get(Type::VoidTy, asm_arguments, false); Alternatively FunctionType *asm_type = FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false); . Can you give me a snippet of example code, or somebody else? Thanks for help Michae...
2009 Aug 01
0
[LLVMdev] Inserting Instructions (pass)
On Jul 31, 2009, at 5:04 PM, Michael Graumann wrote: > Thank you Chris, > for your hint, but I am still too stupid. I tried two versions > > asm_arguments.push_back(Type::VoidTy); > FunctionType *asm_type = FunctionType::get(Type::VoidTy, > asm_arguments, false); > > Alternatively > > FunctionType *asm_type = FunctionType::get(Type::VoidTy, > std::vector<const Type*>(), false); > > . Can you give me a snippet of example code, or somebod...
2009 Aug 01
1
[LLVMdev] Inserting Instructions (pass)
Hi, both versions are working: FunctionType *asm_Ftype = FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false); InlineAsm* Iasm = InlineAsm::get(asm_Ftype,"isync","~{dirflag},~{fpsr},~{flags}",true); How can I insert this InlineAsm, because it is no instruction and this way it will not work: Instruction *pi = bi; pi->getParent()->...
2004 Dec 09
1
[LLVMdev] Question about insert call func with pionter parameter
...I am trying to insert a call function with pointer arguments. The function C proto-type is the following, void stat_func(char *); >ConstantArray *Cstr = dyn_cast<ConstantArray>(gI->getInitializer()); ...... >Function *exFunc = M->getOrInsertFunction("stat_func", Type::VoidTy, PointerType::get(Type::SByteTy),0); >std::vector<Value*> Args(1); >Args[0] = constantArray::get(Cstr->getAsString()); >CallInst *call = new CallInst(exFunc, Args,"",InsertPos); If the code look like the above, it could compile successfully. But once I run this pass, f...
2009 Jul 31
2
[LLVMdev] Inserting Instructions (pass)
..., I need a call instruction to insert the new produced InlineAsm? Thanks for help, Michael for (BasicBlock::iterator bi = i->begin(), be = i->end(); bi != be; ++bi){ std::vector<const Type*> asm_arguments; FunctionType *asm_type = FunctionType::get(Type::VoidTy, asm_arguments, false); InlineAsm* au = new InlineAsm(asm_type ???, "isync","~{dirflag},~{fpsr},~{flags}",true); //CallInst* ae = new CallInst(au ??); //Works fine AllocaInst* ai = new AllocaInst(Type::Int16Ty);...
2009 Jul 31
0
[LLVMdev] Inserting Instructions (pass)
...id()" into the InlineAsm ctor. -Chris > , > > Michael > > for (BasicBlock::iterator bi = i->begin(), be = i->end(); bi != be; + > +bi){ > std::vector<const Type*> asm_arguments; > FunctionType *asm_type = > FunctionType::get(Type::VoidTy, asm_arguments, false); > InlineAsm* au = new InlineAsm(asm_type ???, > "isync","~{dirflag},~{fpsr},~{flags}",true); > //CallInst* ae = new CallInst(au ??); > //Works fine > AllocaInst* ai = new AllocaInst(Ty...
2012 May 08
0
[LLVMdev] Discussion of eliminating the void type
Hello Duncan, There is a discussion with Chris Lattner: http://old.nabble.com/Eliminating-the-'void'-type-td33726468.html In the discussion, Chris Lattner suggest Type::getVoidTy() should still exist and return {} for API continuity. If VoidTy and isVoidTy() go away, how do deal with the isVoidTy() function call in LLVM source tree? Another issue is: What should ReturnInst constructor looks like with VoidTy or not? Thanks Mitnick
2009 May 21
3
[LLVMdev] Passing a pointer to a function
....org/HowTo:_Insert_a_function_call My question is, what do I pass as the argument type for P above? The following seems to work, as long as there are no floating point ops: PointerType::getUnqual(IntegerType::get(32)) So I tried using just a void pointer type, as in: PointerType::getUnqual(Type::VoidTy) But then Type.cpp throws this assertion. Assertion `ValueType != Type::VoidTy && "Pointer to void is not valid, use sbyte* instead!"' failed. I can try checking the type before building the function, as in: void visitLoadInst(LoadInst &I) { Value *P; P = I.getPoint...
2006 Mar 03
0
[LLVMdev] Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
...ng copy) @@ -795,14 +795,18 @@ void TreeToLLVM::EmitMemCpy(Value *DestP unsigned Align) { const Type *SBP = PointerType::get(Type::SByteTy); static Function *MemCpy = 0; - if (!MemCpy) - MemCpy = TheModule->getOrInsertFunction("llvm.memcpy", Type::VoidTy, SBP, - SBP, Type::UIntTy, Type::UIntTy, + const Type *IntPtr = TD.getIntPtrType(); + if (!MemCpy) { + const char *Name = IntPtr == Type::UIntTy ? + "llvm.memcpy.i32" : "llvm.memcpy.i64"; + MemCpy = TheMod...
2012 Apr 22
2
[LLVMdev] Eliminating the 'void' type
...ly allowed as the return value of functions and as the type of > instructions like store. It seems better (though also not particularly > high priority) to eliminate it to make the type system more consistent. > > -Chris > I also noticed a sentence "We can even make 'Type::VoidTy' be a pointer to '{}' " in notes. Is this idea conflict with replace void with {}? Mitnick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120422/c58b82dd/attachment.html>
2012 May 08
4
[LLVMdev] Discussion of eliminating the void type
Hi Dan, >> I am willing to do "eliminating the void type" project. > > Is this really a good idea? I'm not going to argue at length > about it, but it is worth thinking about. > > The only practical downsides of void are when newcomers take C's > syntax for functions with no arguments a little too literally, or > when they try to create pointers to
2009 May 21
0
[LLVMdev] Passing a pointer to a function
..._function_call > > My question is, what do I pass as the argument type for P above? The > following seems to work, as long as there are no floating point ops: I would suggest bit-casting p to an i8*. > So I tried using just a void pointer type, as in: > PointerType::getUnqual(Type::VoidTy) > > But then Type.cpp throws this assertion. > Assertion `ValueType != Type::VoidTy && "Pointer to void is not valid, > use sbyte* instead!"' failed. Yeah, void* in C == i8* in LLVM. VoidTy is only used for function return types. I'm not sure why you're...
2012 Apr 22
0
[LLVMdev] Eliminating the 'void' type
...s only allowed as the return value of functions and as the type of instructions like store. It seems better (though also not particularly high priority) to eliminate it to make the type system more consistent. > > -Chris > > I also noticed a sentence "We can even make 'Type::VoidTy' be a pointer to '{}' " in notes. Is > this idea conflict with replace void with {}? The wording is confusion, but I meant that the C++ value "VoidTy" (which doesn't even exist anymore) could be a C++ pointer to the IR type object for {}. VoidTy itself would be...
2006 Mar 02
4
[LLVMdev] Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
On Thu, 2 Mar 2006, Vladimir Prus wrote: >>> The instructions seem to have one path wrong. It says to get: >> >> I'll put together a tarball today. That will be easier than dealing with >> a patch, and it will include a bunch of bugfixes since the previous email. > Further into process, I get this error: > In file included from
2008 Feb 13
3
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
...ngConv.h" #include <iostream> #include <stdio.h> using namespace llvm; void bar(int i) { printf("the int is %i\n",i); } Function* createBarFunction(Module* M) { Function* pBarF = cast<Function>(M->getOrInsertFunction("bar", Type::VoidTy, Type::Int32Ty, NULL)); return pBarF; } Function* createFooFunction(Module* M) { Function* pBarF = createBarFunction(M), * pFooF; pFooF = cast<Function>(M->getOrInsertFunction("foo", Type::VoidTy, Type::Int32Ty, NULL)); BasicBlock* pBody...
2016 Oct 04
3
llvm-toolchain-3.8 on lower arm targets
...ool.h: In member function 'std::shared_future<void> llvm::ThreadPool::async(Function&&, Args&& ...)': /«PKGBUILDDIR»/include/llvm/Support/ThreadPool.h:78:77: error: return type 'class std::shared_future<void>' is incomplete inline std::shared_future<VoidTy> async(Function &&F, Args &&... ArgList) { ^ Any idea about this failure? For the Debian armel porters, we're switching to LLVM 3.8, so this failure (which happens on 3.8, 3.9 and llvm-toolchain-sn...
2005 Apr 11
2
[LLVMdev] JIT and array pointers
...0] = 1; // compile and execute code that will change buff[0] to 2 Value *c0 = ConstantUInt::get (Type::UIntTy, 0); Value *c2 = ConstantUInt::get (Type::UIntTy, 2); Module *m = new Module ("test_module"); Function *f = m->getOrInsertFunction ("test_function", Type::VoidTy, 0); BasicBlock *b = new BasicBlock ("entry_block", f); // Here is the problem. // I need to get the buff pointer into variable, which I can // pass to GetElementPtrInst // Value *pbuff = ?? // -> %pbuff = external global [4096 x uint] Value *ptr = new GetElementPtrInst...