search for: hasattribute

Displaying 20 results from an estimated 33 matches for "hasattribute".

2016 Nov 20
3
uninitialized values in Attributes.cpp
.../home/regehr/llvm/test/Analysis/BasicAA/pr18573.ll -O2 -S | /home/regehr/llvm/build-vg/./bin/FileCheck /home/regehr/llvm/test/Analysis/BasicAA/pr18573.ll -- Exit Code: 123 Command Output (stderr): -- ==29299== Conditional jump or move depends on uninitialised value(s) ==29299== at 0x13FCF12: hasAttribute (Attributes.cpp:421) ==29299== by 0x13FCF12: hasAttribute (Attributes.cpp:186) ==29299== by 0x13FCF12: operator() (Attributes.cpp:627) ==29299== by 0x13FCF12: operator()<const std::pair<unsigned int, llvm::Attribute> *> (predefined_ops.h:234) ==29299== by 0x13FCF12: __find_...
2016 Nov 20
3
uninitialized values in Attributes.cpp
...gehr/llvm/build-vg/./bin/FileCheck >> /home/regehr/llvm/test/Analysis/BasicAA/pr18573.ll >> -- >> Exit Code: 123 >> >> Command Output (stderr): >> -- >> ==29299== Conditional jump or move depends on uninitialised value(s) >> ==29299== at 0x13FCF12: hasAttribute (Attributes.cpp:421) >> ==29299== by 0x13FCF12: hasAttribute (Attributes.cpp:186) >> ==29299== by 0x13FCF12: operator() (Attributes.cpp:627) >> ==29299== by 0x13FCF12: operator()<const std::pair<unsigned int, >> llvm::Attribute> *> (predefined_ops.h:234)...
2007 Jan 22
11
getElementsBySelector broken in IE
Hi all: getElementsBySelector appears to be broken in 1.5 final on IE. getElementsBySelector works as expected in FF 1.5 final and also it works correctly in IE in 1.5 RC2. Here''s my simple code fragment: var els = element.getElementsBySelector(''[recnum]''); The variable els is undefined in 1.5 final on IE. --~--~---------~--~----~------------~-------~--~----~ You
2012 Nov 20
0
[LLVMdev] [RFC] Passing Options to Different Parts of the Compiler Using Attributes
...ttributes are attached to the function. It's therefore trivial to access > the attributes within the middle- and the back-ends. Here's an example of how > attributes are queried: > > Attributes &A = F.getAttributes(); > > // Target-independent attribute query. > A.hasAttribute(Attributes::NoInline); > > // Target-dependent attribute query. > A.hasAttribute("no-sse"); > > // Retrieving value of a target-independent attribute. > int Alignment = A.getIntValue(Attributes::Alignment); > > // Retrieving value of a target-dependent attribute...
2012 Nov 13
9
[LLVMdev] [RFC] Passing Options to Different Parts of the Compiler Using Attributes
...files. Querying -------- The attributes are attached to the function. It's therefore trivial to access the attributes within the middle- and the back-ends. Here's an example of how attributes are queried: Attributes &A = F.getAttributes(); // Target-independent attribute query. A.hasAttribute(Attributes::NoInline); // Target-dependent attribute query. A.hasAttribute("no-sse"); // Retrieving value of a target-independent attribute. int Alignment = A.getIntValue(Attributes::Alignment); // Retrieving value of a target-dependent attribute. StringRef CPU = A.getStringValue...
2018 Dec 15
4
Disabling LLVM_ATTRIBUTE_ALWAYS_INLINE for development?
...ly instantiates a StringRef, I get 'error: Couldn't lookup symbols: __ZN4llvm9StringRefC1EPKc'. As an example, most recently this happened to me when playing around with llvm::AttributeSet, having attached lldb to an opt built with -DCMAKE_BUILD_TYPE="Debug": (lldb) e $AS.hasAttribute("myattr") error: Couldn't lookup symbols: __ZN4llvm9StringRefC1EPKc Despite having built in a "Debug" configuration, LLVM_ATTRIBUTE_ALWAYS_INLINE makes it very difficult to debug LLVM. How do you all deal with or work around this problem? Is there a good way to do...
2019 Apr 04
2
[RFC] Proposed update to convert two 64-bit attribute bitmasks to std::bitset
...cts. Here are the details for this proposed change: llvm/lib/IR/AttributeImpl.h<https://sdocc.itg.ti.com/ui#file:review=11893/version=393846>: - Define AvailableAttrs and AvailableFunctionAttrs with type std::bitset<AttributeEndAttrKinds> instead of uint64_t - Update AttributeSetNode::hasAttribute() to use the std::bitset test function on AvailableAttrs to check if an enum attribute is present - Update AttributeListImpl::hasFnAttribute() to use the std::bitset test function on AvailableFunctionAttrs to check if an enum attribute is present llvm/lib/IR/Attributes.cpp<https://sdocc.itg.ti....
2013 Mar 25
3
[LLVMdev] llvm2cpp attributes handling
...de generation (which means that the previous attribute list should be added to the AttrKind enum of the Attribute class)? Cheers, -- Harris Bakiras llc: CPPBackend.cpp:521: void {anonymous}::CppWriter::printAttributes(const llvm::AttributeSet&, const string&): Assertion `!attrs.hasAttributes() && "Unhandled attribute!"' failed. 0 llc 0x00000000010edc22 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 llc 0x00000000010ed049 2 libpthread.so.0 0x00007f9701addcb0 3 libc.so.6 0x00007f9700d2f425 gsignal + 53 4 libc.so.6 0x00007f97...
2006 Mar 17
10
good javascript xml parser
Anyone know of a javascript function that will take an xml document and turn it into an associative array? Basically it would take something like this: <body> <item> <id>1</id> <name>Bob</name> </item> <item> <id>2</id> <name>John</name> </item> </body> And turn it into something like this: {
2013 Mar 25
0
[LLVMdev] llvm2cpp attributes handling
...require handling specific attributes explicitly, though I may be wrong. - David > > Cheers, > > -- > > Harris Bakiras > > llc: CPPBackend.cpp:521: void > {anonymous}::CppWriter::printAttributes(const llvm::AttributeSet&, const > string&): Assertion `!attrs.hasAttributes() && "Unhandled attribute!"' > failed. > 0 llc 0x00000000010edc22 llvm::sys::PrintStackTrace(_IO_FILE*) > + 34 > 1 llc 0x00000000010ed049 > 2 libpthread.so.0 0x00007f9701addcb0 > 3 libc.so.6 0x00007f9700d2f425 gsignal + 53 &...
2018 Dec 16
3
Disabling LLVM_ATTRIBUTE_ALWAYS_INLINE for development?
...symbols: > > __ZN4llvm9StringRefC1EPKc'. > > > > As an example, most recently this happened to me when playing around > > with llvm::AttributeSet, having attached lldb to an opt built with > > -DCMAKE_BUILD_TYPE="Debug": > > > > (lldb) e $AS.hasAttribute("myattr") > > error: Couldn't lookup symbols: > > __ZN4llvm9StringRefC1EPKc > > > > Despite having built in a "Debug" configuration, > > LLVM_ATTRIBUTE_ALWAYS_INLINE makes it very difficult to debug LLVM. > > > > How do you all...
2012 Nov 13
0
[LLVMdev] [RFC] Passing Options to Different Parts of the Compiler Using Attributes
...re attached to the function. It's therefore trivial to > access > the attributes within the middle- and the back-ends. Here's an example of > how > attributes are queried: > > Attributes &A = F.getAttributes(); > > // Target-independent attribute query. > A.hasAttribute(Attributes::NoInline); > > // Target-dependent attribute query. > A.hasAttribute("no-sse"); > > // Retrieving value of a target-independent attribute. > int Alignment = A.getIntValue(Attributes::Alignment); > > // Retrieving value of a target-dependent attribu...
2012 Nov 21
1
[LLVMdev] [RFC] Passing Options to Different Parts of the Compiler Using Attributes
...the function. It's therefore trivial to access >> the attributes within the middle- and the back-ends. Here's an example of how >> attributes are queried: >> >> Attributes &A = F.getAttributes(); >> >> // Target-independent attribute query. >> A.hasAttribute(Attributes::NoInline); >> >> // Target-dependent attribute query. >> A.hasAttribute("no-sse"); >> >> // Retrieving value of a target-independent attribute. >> int Alignment = A.getIntValue(Attributes::Alignment); >> >> // Retrieving value of...
2012 Nov 06
1
[LLVMdev] Adding function attributes
...ule->begin(); functionIter != module->end(); functionIter++) { if (functionIter->isDeclaration()) continue; Attributes attributes = functionIter->getFnAttributes(); if (!attributes.hasAttribute(Attributes::AlwaysInline)) { functionIter->addFnAttr(llvm::Attributes::AlwaysInline); errs() << "AlwaysInline NOT detected\n"; modified = true; } else...
2013 Mar 13
0
[LLVMdev] attributes helper functions - please review
...f Kind) { + setAttributes( + AttributeSets.addAttribute(getContext(), + AttributeSet::FunctionIndex, Kind)); + } + /// \brief Return true if the function has the attribute. bool hasFnAttribute(Attribute::AttrKind Kind) const { return AttributeSets.hasAttribute(AttributeSet::FunctionIndex, Kind); Index: include/llvm/IR/Attributes.h =================================================================== --- include/llvm/IR/Attributes.h (revision 176874) +++ include/llvm/IR/Attributes.h (working copy) @@ -247,6 +247,11 @@ AttributeSet addAttribute(LLVMContex...
2018 Dec 17
2
Disabling LLVM_ATTRIBUTE_ALWAYS_INLINE for development?
...;> > > >> > > As an example, most recently this happened to me when playing around >> > > with llvm::AttributeSet, having attached lldb to an opt built with >> > > -DCMAKE_BUILD_TYPE="Debug": >> > > >> > > (lldb) e $AS.hasAttribute("myattr") >> > > error: Couldn't lookup symbols: >> > > __ZN4llvm9StringRefC1EPKc >> > > >> > > Despite having built in a "Debug" configuration, >> > > LLVM_ATTRIBUTE_ALWAYS_INLINE makes it very difficult to d...
2012 Nov 26
3
[LLVMdev] [RFC] Passing Options to Different Parts of the Compiler Using Attributes
...e function. It's therefore trivial to access >> the attributes within the middle- and the back-ends. Here's an example of how >> attributes are queried: >> >> Attributes &A = F.getAttributes(); >> >> // Target-independent attribute query. >> A.hasAttribute(Attributes::NoInline); >> >> // Target-dependent attribute query. >> A.hasAttribute("no-sse"); >> >> // Retrieving value of a target-independent attribute. >> int Alignment = A.getIntValue(Attributes::Alignment); >> >> // Retrieving value...
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo, On 05/11/12 10:02, Arnaldo wrote: > Hi Duncan, thanks for the quick answer. > > Yes I'm sure the runOnModule is being called, and when I dump the functions > before exiting the method I can see the AlwaysInline attribute. > > I'll check InlineAlways.cpp and will reimplement as last resource but I still > wonder why this is not working. if you want more
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...M) { + return new SafeStack(TM); +} diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index 04545ea..89bd83b 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -237,6 +237,8 @@ std::string Attribute::getAsString(bool InAttrGrp) const { return "sspreq"; if (hasAttribute(Attribute::StackProtectStrong)) return "sspstrong"; + if (hasAttribute(Attribute::SafeStack)) + return "safestack"; if (hasAttribute(Attribute::StructRet)) return "sret"; if (hasAttribute(Attribute::SanitizeThread)) @@ -426,6 +428,7 @@ uint64_t Attr...
2015 Feb 24
2
[LLVMdev] [RFC] Storing default function attributes on the module
...t; - Storing a bit on each attribute (Akira's proposal) handles > more cases. Nothing needs to be done in `lib/Linker` > (`llc` is able to override the output of `llvm-link`), > and it doesn't have a disconnect between `hasFnAttribute()` > and `getAttributes().hasAttribute(FunctionIndex)`. > > Awkwardly, having written that out, I'm kind of leaning toward > it myself right now (maybe I'm fickle?) -- it seems to have > fewer limitations. The main thing I prefer about my proposal > is that it's easier to change the default attributes when &g...