Displaying 20 results from an estimated 39 matches for "isvoidty".
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
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
2010 Jun 07
2
[LLVMdev] IntrinsicLowering and several related problems
Dear all,
I'm using IntrinsicLowering class to remove all intrinsics in LLVM byte-code.
Unfortunately, I meet several problems:
1. Why I can not get the type of CallInst *CI?
!CI->getType()->isVoidTy() is not working and how to solve it?
This type information has some impacts with intrinsics such as flt_rounds.
2. Why Intrinsic::vastart and Intrinsic::powi are excluded from
IntrinsicLowering function?
There are no way to lower them at the byte-code level?
Best regards,
--
Hao Shen
2010 Jun 07
0
[LLVMdev] IntrinsicLowering and several related problems
Hi Hao Shen,
> 1. Why I can not get the type of CallInst *CI?
> !CI->getType()->isVoidTy() is not working and how to solve it?
what does "not working" mean? It should work.
> 2. Why Intrinsic::vastart and Intrinsic::powi are excluded from
> IntrinsicLowering function?
> There are no way to lower them at the byte-code level?
For vastart, it probably isn't poss...
2014 Jul 07
2
[LLVMdev] Return Type of Call Function with nested bitcast
Hi All,
I am facing an issue with CallInst with nested bitcast instruction. I want
to check if the return type of a call is void or non-void the below line
works well for CallInst without bit cast.
*cast<CallInst>(I)->getCalledFunction()->getReturnType()->isVoidTy()*
But for Call instructions like
*call void bitcast (void (%struct.jpeg_compress_struct.131*, i32)*
@jinit_c_master_control to void (%struct.jpeg_compress_struct.109*,
i32)*)(%struct.jpeg_compress_struct.109* %0, i32 0)*
getCalledFuncion returns null and the pass crashes.
Thanks!
Manish
-------...
2016 Mar 01
2
Insert CallInst within a function passing same parameters of the calling function.
...ctionName + "__swordomp__", &F.getEntryBlock().front());
}
but I am getting the following error:
void llvm::Value::setNameImpl(const llvm::Twine&): Assertion `!getType()->isVoidTy() && "Cannot assign a name to void values!"' failed.
How should I fix it?
Thanks.
Best,
Simone
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...emTy) {
>> + return ElemTy->getTypeID() != VoidTyID && ElemTy->getTypeID() !=
>> LabelTyID &&
>> + ElemTy->getTypeID() != MetadataTyID &&
>> !isa<FunctionType>(ElemTy);
>> +}
>>
>> Please use "!ElemTy->isVoidTy()" etc.
>>
>> --- lib/VMCore/ConstantsContext.h (revision 93451)
>>
>> +template<>
>> +struct ConstantKeyData<ConstantUnion> {
>> + typedef Constant* ValType;
>> + static ValType getValType(ConstantUnion *CS) {
>>
>> CU...
2010 Feb 10
0
[LLVMdev] [patch] Union Types - work in progress
...t for unions");
+}
+
Still not implemented?
+UnionType *UnionType::get(const Type *type, ...) {
+ va_list ap;
+ std::vector<const llvm::Type*> UnionFields;
+ va_start(ap, type);
Please use smallvector.
+bool UnionType::isValidElementType(const Type *ElemTy) {
+ return !ElemTy->isVoidTy() && !ElemTy->isLabelTy() &&
+ !ElemTy->isMetadataTy() && !isa<FunctionType>(ElemTy);
+}
Isn't there a better predicate somewhere?
+LLVMTypeRef LLVMUnionTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes,
+ unsigned...
2012 May 07
4
[LLVMdev] Discussion of eliminating the void type
...VMVoidTypeKind (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
4. Re-implement isVoidTy().
Test whether the address of the type equals Type::getVoidTy()
=== Request For Command ===
The constructor form of ReturnInst
Any suggestion is welcomed.
Thanks a lot
Mitnick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/piperma...
2010 Jan 09
0
[LLVMdev] [PATCH] - Union types, attempt 2
...uot;'{' expected after 'union'");
+ }
Please use:
if (ParseToken(lltok::lbrace, "'{' expected after 'union'")) return true;
+ EltTyLoc = Lex.getLoc();
+ if (ParseTypeRec(Result)) return true;
+ ParamsList.push_back(Result);
+
+ if (Result->isVoidTy())
+ return Error(EltTyLoc, "union element can not have void type");
+ if (!UnionType::isValidElementType(Result))
+ return Error(EltTyLoc, "invalid element type for union");
+
+ while (EatIfPresent(lltok::comma)) {
+ EltTyLoc = Lex.getLoc();
+ if (ParseTypeRec(Res...
2012 May 07
0
[LLVMdev] Discussion of eliminating the void type
...n't make any sense to me. Why would having a definition for
VoidTy be needed or desirable?
> VoidTy may be Identified struct. In addition to error occurs at
> test/Analysis/BasicAA/empty.ll
> because of using literal struct "{}" as VoidTy
>
> 4. Re-implement isVoidTy().
No! Just delete void type, don't try to create a canonical replacement for it.
Ciao, Duncan.
> Test whether the address of the type equals Type::getVoidTy()
>
> === Request For Command ===
>
> The constructor form of ReturnInst
>
> Any suggestion is welcomed.
&g...
2013 Jul 31
1
[LLVMdev] Problem to remove successors
...>setUnconditionalDest(TI->getSuccessor(1-SuccNum));
} else { // Otherwise convert to a return
instruction...
Value *RetVal = 0;
// Create a value to return... if the function doesn't return null...
if (!(BB->getParent()->getReturnType())->isVoidTy())
RetVal = Constant::getNullValue(BB->getParent()->getReturnType());
// Create the return...
NewTI = 0;
}
break;
case Instruction::Invoke: // Should convert to call
case Instruction::Switch: // Should remove entry
default:
case Instruction::Re...
2012 May 07
1
[LLVMdev] Discussion of eliminating the void type
...Why would having a definition for
> VoidTy be needed or desirable?
>
>> VoidTy may be Identified struct. In addition to error occurs at
>> test/Analysis/BasicAA/empty.ll
>> because of using literal struct "{}" as VoidTy
>>
>> 4. Re-implement isVoidTy().
> No! Just delete void type, don't try to create a canonical replacement for it.
The value of still having something like a VoidTy in the API is that it
would reduce the amount of code that needs to change. Much of our code
at Illinois uses void type; I imagine lots of other LLVM cod...
2016 Aug 24
2
LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
Hi Félix,
Sanjoy Das wrote:
> Félix Cloutier via llvm-dev wrote:
> > Assuming that this is a bug, what are the next steps?
>
> Looks like you already have a very small test case -- have you tried
> sticking it in a debugger to see why SCCP thinks removing the call is
> okay?
>
> Alternatively, file a bug at llvm.org/bugs and someone will get to it.
The third
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...ronym.
+bool UnionType::isValidElementType(const Type *ElemTy) {
+ return ElemTy->getTypeID() != VoidTyID && ElemTy->getTypeID() !=
LabelTyID &&
+ ElemTy->getTypeID() != MetadataTyID && !
isa<FunctionType>(ElemTy);
+}
Please use "!ElemTy->isVoidTy()" etc.
--- lib/VMCore/ConstantsContext.h (revision 93451)
+template<>
+struct ConstantKeyData<ConstantUnion> {
+ typedef Constant* ValType;
+ static ValType getValType(ConstantUnion *CS) {
CU not CS.
LLParser.cpp:
In LLParser::ParseUnionType, you can use SmallVector instea...
2010 Jan 06
3
[LLVMdev] [PATCH] - Union types, attempt 2
This patch adds a UnionType to DerivedTypes.h. It also adds code to the
bitcode reader / writer and the assembly parser for the new type, as well as
a tiny .ll test file in test/Assembler. It does not contain any code related
to code generation or type layout - I wanted to see if this much was
acceptable before I proceeded any further.
Unlike my previous patch, in which the Union type was
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
...//////////////////////////////////////////////////////////////////
Value *Load = new llvm::LoadInst(Globals, "globalsret", RI);
/////////////////////////////////////////////////////////////////////////////////////
// Return type is void
if ( RetTy->isVoidTy() ) {
// ReturnInst::Create(Load, 0, RI); // Return void
ReturnInst::Create(F.getContext(), 0, RI); // Return void
RI->getParent()->getInstList().erase(RI);
} else {
// Start with an empty struct.
Value...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...idElementType(const Type *ElemTy) {
> + return ElemTy->getTypeID() != VoidTyID && ElemTy->getTypeID() !=
> LabelTyID &&
> + ElemTy->getTypeID() != MetadataTyID &&
> !isa<FunctionType>(ElemTy);
> +}
>
> Please use "!ElemTy->isVoidTy()" etc.
>
> --- lib/VMCore/ConstantsContext.h (revision 93451)
>
> +template<>
> +struct ConstantKeyData<ConstantUnion> {
> + typedef Constant* ValType;
> + static ValType getValType(ConstantUnion *CS) {
>
> CU not CS.
>
>
> LLParser.cpp:...
2009 Nov 05
5
[LLVMdev] llvm-gcc-4.2-2.6 build failed,
...ree_node*)’:
../../llvm-gcc-4.2/gcc/llvm-backend.cpp:1171: error: ‘getInt8PtrTy’ is not a member of ‘llvm::Type’
../../llvm-gcc-4.2/gcc/llvm-backend.cpp: In function ‘void make_decl_llvm(tree_node*)’:
../../llvm-gcc-4.2/gcc/llvm-backend.cpp:1635: error: ‘const class llvm::Type’ has no member named ‘isVoidTy’
make[3]: *** [llvm-backend.o] Error 1
make[3]: Leaving directory `/home/ts/llvm/llvm-gcc-4.2-obj/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/ts/llvm/llvm-gcc-4.2-obj'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/ts/llvm/llvm-gcc-4....
2011 Sep 16
0
[LLVMdev] How to duplicate a function?
...//////////////////////////////////////////////////////////////////
Value *Load = new llvm::LoadInst(Globals, "globalsret", RI);
/////////////////////////////////////////////////////////////////////////////////////
// Return type is void
if ( RetTy->isVoidTy() ) {
// ReturnInst::Create(Load, 0, RI); // Return void
ReturnInst::Create(F.getContext(), 0, RI); // Return void
RI->getParent()->getInstList().erase(RI);
} else {
// Start with an empty struct.
Value...