search for: attributeset

Displaying 20 results from an estimated 79 matches for "attributeset".

2013 Feb 09
3
[LLVMdev] Using the New Attributes Classes
..., you will need to convert any code which does treat them as a bit mask to use the new query methods on the Attribute class. This should be straight forward. If there is missing functionality on the Attribute class, which you feel should be there, please let me know about it. The next class is the AttributeSet class. This replaces the old AttributeList class. The AttributeSet stores a collection of Attribute objects for each kind of object that may have an attribute associated with it: the function as a whole, the return type, or the function's parameters. A function's attributes are at index &qu...
2013 Mar 13
0
[LLVMdev] attributes helper functions - please review
...---------- next part -------------- Index: include/llvm/IR/Function.h =================================================================== --- include/llvm/IR/Function.h (revision 176874) +++ include/llvm/IR/Function.h (working copy) @@ -181,6 +181,14 @@ AttributeSet::FunctionIndex, N)); } + /// addFnAttr - Add function attributes to this function. + /// + void addFnAttr(StringRef Kind) { + setAttributes( + AttributeSets.addAttribute(getContext(), + AttributeSet::FunctionIndex, Kind)); + } + /// \brief Return...
2013 Jan 31
3
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
Hi, I recently upgraded to the latest LLVM build and encountered a problem where the API for Argument::addAttr has changed. Previously it was Argument::addAttr(Attribute A) and I was able to work with this. The latest build has changed the method addAttr so that it requires an AttributeSet argument (Argument::addAttr(AttributeSet AS). I'm not sure how to adjust to this change. The AttributeSet object seems to store an array of Attribute(s) to construct an AttributeSet argument for addAttr I need to know the index of the Argument in the function? I can follow the lead of this co...
2013 Feb 09
0
[LLVMdev] Using the New Attributes Classes
...e which does treat them as a bit mask to use the new query > methods on the Attribute class. This should be straight forward. If there > is > missing functionality on the Attribute class, which you feel should be > there, > please let me know about it. > > The next class is the AttributeSet class. This replaces the old > AttributeList > class. The AttributeSet stores a collection of Attribute objects for each > kind > of object that may have an attribute associated with it: the function as a > whole, the return type, or the function's parameters. A function's &g...
2013 Feb 05
0
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...gt; I recently upgraded to the latest LLVM build and encountered a problem where the API for Argument::addAttr has changed. > > Previously it was Argument::addAttr(Attribute A) and I was able to work with this. > > The latest build has changed the method addAttr so that it requires an AttributeSet argument (Argument::addAttr(AttributeSet AS). > Yes. > I'm not sure how to adjust to this change. The AttributeSet object seems to store an array of Attribute(s) to construct an AttributeSet argument for addAttr I need to know the index of the Argument in the function? > That's...
2013 Sep 03
2
[LLVMdev] AttributeSet from Modules
Hello! clang defines some AttributeSet, for example: attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false&quo...
2017 Mar 20
4
[RFC] Attribute overhaul 2
LLVM's Attribute APIs need an overhaul. Current problems ================ First, testing for an attribute on an Argument is slow. llvm::AttributeSet::getAttributes(int) consumed 2% of cycles while optimizing llc during LTO. Our mid-level optimizations are constantly asking if a given argument has some attribute (nonnull, dereferencable, etc), and this is currently linear in the size of the function prototype. This should be constant time. Add...
2013 Jul 05
0
[LLVMdev] Building function parameter AttributeSets quickly
Hi all, Is there an efficient way to construct an AttributeSet for the purpose of constructing a Function? The only (public) way I've found to designate the parameter index of attributes is via the addAttribute methods of the Function class or the AttributeSet. This is quite inefficient as a new AttributeSet is constructed every time. In fact, it...
2013 Sep 03
0
[LLVMdev] AttributeSet from Modules
On Sep 3, 2013, at 9:04 AM, Raul Fernandes Herbster <raulherbster at gmail.com> wrote: > Hello! > > clang defines some AttributeSet, for example: > > attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"=&quot...
2013 Feb 08
1
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
On Feb 7, 2013, at 6:23 PM, 陳韋任 (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw> wrote: > Hi Bill, > > Just my 2 cents. How about sent a "HEADS UP" message to the ML > before you make changes. You can say "Hey, if you're using those > API I am going to change, please wait until I say everything is > stable." I think David can wait until you say the
2013 Feb 06
0
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...One of the goals of LLVM is to be a set of reusable libraries and this goal is not met by gratuitous API churn with no accompanying documentation. If we can't have a sane deprecation strategy or an automated migration tool then please can we at least have a token attempt at documentation? The AttributeSet documentation is just embarrassing. For example, the document for the class is: > >> This class manages the ref count for the opaque AttributeSetImpl >> object and provides accessors for it > > Great. It's a wrapper around an opaque type that isn't documented in the...
2013 Feb 05
3
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...One of the goals of LLVM is to be a set of reusable libraries and this goal is not met by gratuitous API churn with no accompanying documentation. If we can't have a sane deprecation strategy or an automated migration tool then please can we at least have a token attempt at documentation? The AttributeSet documentation is just embarrassing. For example, the document for the class is: > This class manages the ref count for the opaque AttributeSetImpl > object and provides accessors for it Great. It's a wrapper around an opaque type that isn't documented in the public headers. What...
2013 Feb 08
0
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...had to happen before the attributes classes were in a proper state for the new feature work. The typical way to understand the APIs is to read the header files and/or look at existing code. The changes I made showed how to use the new APIs while I was going along. >>> >>> So the AttributeSet class is going away and being replaced with something else? If so, then why did it even make it into the tree. If not, then why is it not documented. >>> >> The AttributeSet isn't going away. I'm not sure how you got that from what I wrote above. > > If it is not go...
2015 Jul 15
3
[LLVMdev] String attributes for function arguments and return values
> On Jul 14, 2015, at 4:48 PM, Reid Kleckner <rnk at google.com> wrote: > > This sounds more like a use case for metadata. Can we attach metadata to function arguments, or does that not work currently? We can’t, no. I have an out of tree patch which allows metadata in AttributeSets. This would also potentially also work here. However, depending on the number of unique strings/metadata in AttributeSets, this could get large. I don’t think we’ve ever had more that a few unique AttributeSets in an entire module. If you have too many different strings then you could have a s...
2013 Feb 07
0
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...diate steps that had to happen before the attributes classes were in a proper state for the new feature work. The typical way to understand the APIs is to read the header files and/or look at existing code. The changes I made showed how to use the new APIs while I was going along. > > So the AttributeSet class is going away and being replaced with something else? If so, then why did it even make it into the tree. If not, then why is it not documented. > The AttributeSet isn't going away. I'm not sure how you got that from what I wrote above. > I'm sorry, but there is no excuse...
2013 Feb 05
1
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
> However, we do list the thing we do change in the ReleaseNotes Unfortunately this doesn't actually seem to be the case. -- Sean Silva
2013 Feb 08
0
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
Hi Bill, Just my 2 cents. How about sent a "HEADS UP" message to the ML before you make changes. You can say "Hey, if you're using those API I am going to change, please wait until I say everything is stable." I think David can wait until you say the changes are done and done, please sync with TOT. How about that, David? Regards, chenwj -- Wei-Ren Chen (陳韋任)
2013 Feb 06
0
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
On Feb 6, 2013, at 2:02 AM, Óscar Fuentes <ofv at wanadoo.es> wrote: > Bill Wendling <wendling at apple.com> writes: > > [snip] > >> Welcome to living on the top-of-tree! :-) >> >> We are in between releases. It's expected that the APIs will be >> unstable. [snip] > > One thing is an unstable API, and a different thing is a code base
2016 Feb 07
3
[PATCH] strlen -> strnlen optimization
...@@ return CI; } +Value *llvm::emitStrNLen(Value *Ptr, Value *MaxLen, IRBuilder<> &B, + const DataLayout &DL, const TargetLibraryInfo *TLI) { + if (!TLI->has(LibFunc::strlen)) + return nullptr; + + Module *M = B.GetInsertBlock()->getModule(); + AttributeSet AS[2]; + AS[0] = AttributeSet::get(M->getContext(), 1, Attribute::NoCapture); + Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind }; + AS[1] = AttributeSet::get(M->getContext(), AttributeSet::FunctionIndex, AVs); + + LLVMContext &Context = B.GetInsertBlock()->...
2013 Feb 07
3
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...al intermediate steps that had to happen before the attributes classes were in a proper state for the new feature work. The typical way to understand the APIs is to read the header files and/or look at existing code. The changes I made showed how to use the new APIs while I was going along. So the AttributeSet class is going away and being replaced with something else? If so, then why did it even make it into the tree. If not, then why is it not documented. I'm sorry, but there is no excuse for committing large changes to a core bit of LLVM without even a brief overview of what the new class (whic...