search for: getkindasenum

Displaying 5 results from an estimated 5 matches for "getkindasenum".

2013 Jul 16
0
[LLVMdev] New Attribute Group broke bitcode compatibility
...support for the new attribute code produces unstable bitcode. The problem is in BitcodeWriter.cpp, where the new WriteAttributeGroupTable() writes out the attributes using this piece of code: if (Attr.isEnumAttribute()) { Record.push_back(0); Record.push_back(Attr.getKindAsEnum()); } else if (Attr.isAlignAttribute()) { Record.push_back(1); Record.push_back(Attr.getKindAsEnum()); Record.push_back(Attr.getValueAsInt()); getKindAsEnum() returns the actual value of the enum, which is then stored in the bitcode. This direct connectio...
2019 Mar 14
4
[RFC] We are running out of slots in the Attribute::AttrKind enum
I would like to add a target-dependent attribute to the LLVM IR, and the guidance in http://llvm.org/docs/HowToUseAttributes.html says that target-dependent attributes should not occupy a slot in the Attribute::AttrKind enum, but I have yet to find an attribute that is represented in the IR that does not also have a slot in the AttrKind enum. We are limited to 63 slots in the AttrKind enum
2014 Mar 13
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...()) RightAttrType = Align; > + else if (RA.isEnumAttribute()) RightAttrType = Enum; > + > + if (int Res = cmpNumbers(LeftAttrType, RightAttrType)) > + return Res; > + > + switch (LeftAttrType) { > + case Enum: > + if (int Res = cmpNumbers(LA.getKindAsEnum(), RA.getKindAsEnum())) > + return Res; > + break; > + case Align: > + if (int Res = cmpNumbers(LA.getValueAsInt(), RA.getValueAsInt())) > + return Res; > + break; > + case Other: > + if (int Res = cmpStrings(LA.getKind...
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...ceable attribute not supported in raw format"); } diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 1c54e9b..0f8f14c 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -759,6 +759,7 @@ void Verifier::VerifyAttributeTypes(AttributeSet Attrs, unsigned Idx, I->getKindAsEnum() == Attribute::StackProtect || I->getKindAsEnum() == Attribute::StackProtectReq || I->getKindAsEnum() == Attribute::StackProtectStrong || + I->getKindAsEnum() == Attribute::SafeStack || I->getKindAsEnum() == Attribute::NoRedZone || I->getKi...
2014 Feb 27
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi Nick, I tried to rework changes as you requested. One of patches (0004 with extra assertions) has been removed. > + bool isEquivalentType(Type *Ty1, Type *Ty2) const { > + return cmpType(Ty1, Ty2) == 0; > + } > > Why do we still need isEquivalentType? Can we nuke this? Yup. After applying all the patches isEquivalentType will be totally replaced with cmpType. All