search for: attrkind

Displaying 20 results from an estimated 30 matches for "attrkind".

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 because it is represented in the bitcode with a 64-bit bitmask. There is only one free slot left and I don't want to use...
2013 Mar 25
3
[LLVMdev] llvm2cpp attributes handling
...ot;="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } ] The problem is that llvm2cpp code generation supports only the attributes present in the AttrKind enum of the Attribute class. It means that the following attributes are not supported: - "less-precise-fpmad" - "no-frame-pointer-elim" - "no-frame-pointer-elim-non-leaf" - "no-infs-fp-math" - "no-nans-fp-math" - "...
2019 Apr 04
2
[RFC] Proposed update to convert two 64-bit attribute bitmasks to std::bitset
...r don't communicate enum attributes via bitmask anymore. Enum attributes are encoded in attribute groups. The AvailableFunctionAttrs and AvailableAttrs bitmasks are leftovers that need to be updated to remove the limitation on the number of enum attributes that can be defined in the Attribute::AttrKind enum. Per a suggestion that I received a while ago from Reid Kleckner (on the llvm-dev list), I propose to implement both of these data members as std::bitset objects. Here are the details for this proposed change: llvm/lib/IR/AttributeImpl.h<https://sdocc.itg.ti.com/ui#file:review=11893/vers...
2017 Aug 24
2
How do set 'nest' addribute in an indirect call?
...what you want via > LLVMAddCallSiteAttribute. I don't find LLVMAddCallSiteAttribute or anything similar in include/llvm. (I am using 3.6.1) I do see llvm::CallInst::addAttribute /// addAttribute - adds the attribute to the list of attributes. void addAttribute(unsigned i, Attribute::AttrKind attr); Is 'i' the number of the parameter that gets the attribute? This matters for 'nest'. Is it zero-origin numbering, left-to-right? I have an out-of-tree binding already for a small set of things not in Core.h, and it's not hard to add things in ones & twos. > &g...
2013 Mar 25
0
[LLVMdev] llvm2cpp attributes handling
..."no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" > "use-soft-float"="false" } > ] > > The problem is that llvm2cpp code generation supports only the attributes > present in the AttrKind enum of the Attribute class. > It means that the following attributes are not supported: > - "less-precise-fpmad" > - "no-frame-pointer-elim" > - "no-frame-pointer-elim-non-leaf" > - "no-infs-fp-math" > - "no-nans-fp...
2013 Mar 13
0
[LLVMdev] attributes helper functions - please review
...this function. + /// + void addFnAttr(StringRef 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...
2016 Jul 15
4
RFC: Coroutine Optimization Passes
...ve a preference on how to restart CGSCC pipeline? One of the four options I listed (repeated in P.S), or even some better way I did not think about? Thank you, Gor P.S. Option 1: https://reviews.llvm.org/D21569 (no longer relevant, since we are removing AttrKind::Coroutine) Option 2: https://reviews.llvm.org/D21570 (bool& Devirt in runSCC) Option 3: https://reviews.llvm.org/D21572 (virtual bool restatedRequested()) Option 4: Fake devirtualized call in a function pass, so that RefreshSCC will detect devirtualization and restart the pipeline by...
2016 Dec 21
1
Accessing '__attribute__((noinstrument))' during lowering
Thanks David, I have tried ‘MF.getFunction()->hasFnAttribute(Attribute::???)’, but it seems that the front-end ‘NoInstrumentFunction’ attribute is not propagated to the collection of LLVM IR attributes (no equivalent is in the ‘Attribute::AttrKind’ enum). It is not obvious that there is another mechanism, and I suspect that there is not due to the separation between FE processing and LLVM IR. However, I think that I could add a new IR attribute to the TD file, and set it when emitting IR in the FE depending on the corresponding CLang ‘D...
2016 Nov 20
3
uninitialized values in Attributes.cpp
...:607) ==29299== by 0x13FCF12: llvm::AttributeSet::get(llvm::LLVMContext&, llvm::ArrayRef<std::pair<unsigned int, llvm::Attribute> >) (Attributes.cpp:627) ==29299== by 0x13FD62B: llvm::AttributeSet::get(llvm::LLVMContext&, unsigned int, llvm::ArrayRef<llvm::Attribute::AttrKind>) (Attributes.cpp:712) ==29299== by 0x146F9AC: llvm::Intrinsic::getAttributes(llvm::LLVMContext&, llvm::Intrinsic::ID) (Intrinsics.gen:20104) ==29299== by 0x146F3A0: llvm::Function::Function(llvm::FunctionType*, llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Module*...
2013 Jan 11
0
[LLVMdev] [RFC] Overhauling Attributes
I would like to add something to atttributes.h, attributes.cpp in the interim until your full scheme is available. A new attribute called "target" would be added to AttrKind. And target can take a list of strings. target("foo", "goo") For example. I would add a component targetAttrs to AttrBuilder Will this meet with resistance if I try and put this back? Reed On 01/01/2013 04:07 AM, Bill Wendling wrote: > On Dec 31, 2012, at 4:37 AM, Dunc...
2013 Jan 11
1
[LLVMdev] [RFC] Overhauling Attributes
...work is moving along quickly Maybe I should just wait. ??? On 01/11/2013 03:09 PM, Reed Kotler wrote: > I would like to add something to atttributes.h, attributes.cpp in the > interim until your full scheme is available. > > A new attribute called "target" would be added to AttrKind. > > And target can take a list of strings. > > target("foo", "goo") > > For example. > > I would add a component targetAttrs to AttrBuilder > > Will this meet with resistance if I try and put this back? > > Reed > > On 01/01/2013 04:07...
2013 Feb 09
3
[LLVMdev] Using the New Attributes Classes
...r attribute-value pairs other than alignment. In the new scheme, an Attribute object represents a single attribute that's uniqued. You use the "Attribute::get" methods to create a new Attribute object. An attribute can be a single "enum" value (the enum being the Attribute::AttrKind enum), a string representing a target-dependent attribute, or an attribute-value pair. Some examples: Target-independent: noinline, zext Target-dependent: "no-sse", "thumb2" Attribute-value pair: "cpu" = "cortex-a8", align = 4 (Note: for an a...
2016 Nov 20
3
uninitialized values in Attributes.cpp
...llvm::AttributeSet::get(llvm::LLVMContext&, >> llvm::ArrayRef<std::pair<unsigned int, llvm::Attribute> >) >> (Attributes.cpp:627) >> ==29299== by 0x13FD62B: llvm::AttributeSet::get(llvm::LLVMContext&, >> unsigned int, llvm::ArrayRef<llvm::Attribute::AttrKind>) >> (Attributes.cpp:712) >> ==29299== by 0x146F9AC: >> llvm::Intrinsic::getAttributes(llvm::LLVMContext&, llvm::Intrinsic::ID) >> (Intrinsics.gen:20104) >> ==29299== by 0x146F3A0: llvm::Function::Function(llvm::FunctionType*, >> llvm::GlobalValue::L...
2013 Jan 01
3
[LLVMdev] [RFC] Overhauling Attributes
On Dec 31, 2012, at 4:37 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Bill, > > On 30/12/12 03:21, Bill Wendling wrote: >> Hi Rafael, >> >> Sorry, I forgot to respond to this. They can be arbitrary strings that are known only to the specific back-end. It may be beneficial to define them inside of the LangRef document though. > > this sounds so much
2016 Jul 15
2
RFC: Coroutine Optimization Passes
...ction Pass @ EP_OptimizerLast) -------------- Another boring pass that lowers all remaining coroutine intrinsics that were not processed by earlier coroutine passes. Questions / Concerns / Thoughts: ================================ Coroutine attribute or not. --------------------------- I added a AttrKind::coroutine to flag the pre-split coroutine. The intention is to lessen the impact of CoroSpit pass since it can simply check for an attribute to learn if there is any work to be done on a function or not. Without the attribute, it would need to examine every functions body to see if it has an llvm....
2013 Feb 19
2
[LLVMdev] [RFC] NoBuiltin Attribute
...vice versa. Here's what I propose then: Note: I'm intentionally leaving out the `-fno-builtin-FUNCTION' flag, because clang doesn't yet support it, and that can be easily added later --- probably in the form I mentioned above. I add the `NoBuiltin' attribute to the Attribute::AttrKind enum list and a `nobuiltin' keyword to the LLVM assembly language (documentation, etc.). This can be applied to function definitions, but not to function declarations or to call/invoke instructions, because that kind of granularity doesn't make a lot of sense to me. I want the attribute to...
2016 Dec 20
0
Accessing '__attribute__((noinstrument))' during lowering
I imagine you can get the llvm::Function from the MachineFunction, and the attribute will be there (on the llvm::Function), but can't say I know much about it. On Tue, Dec 20, 2016 at 2:04 AM Martin J. O'Riordan via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Is it possible to find whether a function has the ‘noinstrument’ > attribute during Target lowering? I would like
2016 Feb 07
3
[PATCH] strlen -> strnlen optimization
...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()->getContext(); + Constant *StrNLen = M->getOrInsertFunction( + "strnlen", AttributeSet:...
2018 Aug 27
3
Replacing a function from one module into another one
...t is being replaced) with the ones in the function foo3, to "move" the references, but I don't understand the difference between the functions of llvm::Function "addAttribute" and "addParamAttr", neither why they require to specify the attribute (or the Attribute::AttrKind <http://llvm.org/doxygen/classllvm_1_1Attribute.html#aab7ee4b8fd1d3e7e4cea87868855e60e> ) if the function already requires the argument position. When I did a similar process to change the calling instruction in the main function, I used the functions "setArgOperand" and "getA...
2013 Feb 09
0
[LLVMdev] Using the New Attributes Classes
...other than alignment. > > In the new scheme, an Attribute object represents a single attribute that's > uniqued. You use the "Attribute::get" methods to create a new Attribute > object. An attribute can be a single "enum" value (the enum being the > Attribute::AttrKind enum), a string representing a target-dependent > attribute, > or an attribute-value pair. Some examples: > > Target-independent: noinline, zext > Target-dependent: "no-sse", "thumb2" > Attribute-value pair: "cpu" = "cortex-a8&quot...