search for: addattributes

Displaying 20 results from an estimated 42 matches for "addattributes".

Did you mean: addattribute
2013 Mar 13
0
[LLVMdev] attributes helper functions - please review
...ble, this returns a new set. + AttributeSet addAttribute(LLVMContext &C, unsigned Idx, + StringRef Kind) const; + /// \brief Add attributes to the attribute set at the given index. Since /// attribute sets are immutable, this returns a new set. AttributeSet addAttributes(LLVMContext &C, unsigned Idx, Index: lib/IR/Attributes.cpp =================================================================== --- lib/IR/Attributes.cpp (revision 176874) +++ lib/IR/Attributes.cpp (working copy) @@ -649,6 +649,13 @@ return addAttributes(C, Idx, AttributeSet::get(C, Idx, Attr...
2016 Nov 17
3
DWARF Generator
I have recently been modifying the DWARF parser and have more patches planned and I want to be able to add unit tests that test the internal llvm DWARF APIs to ensure they continue to work and also validate the changes that I am making. There are not many DWARF unit tests other than very simple ones that test DWARF forms currently. I would like to expand this to include many more tests. I had
2017 Aug 24
2
How do set 'nest' addribute in an indirect call?
On 08/24/2017 09:40 AM, Tim Northover wrote: > On 17 August 2017 at 15:15, Rodney M. Bates via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> For an indirect call, i.e., on a function whose address is runtime variable, >> I can't find any place/way to attach this attribute. LLVMAddAttribute >> won't take a type. > > In the C++ API you'd add the
2016 Nov 18
4
DWARF Generator
> On Nov 17, 2016, at 3:40 PM, David Blaikie <dblaikie at gmail.com> wrote: > > > > On Thu, Nov 17, 2016 at 3:12 PM Greg Clayton via llvm-dev <llvm-dev at lists.llvm.org> wrote: > I have recently been modifying the DWARF parser and have more patches planned and I want to be able to add unit tests that test the internal llvm DWARF APIs to ensure they continue to
2011 Aug 19
2
[LLVMdev] How to halt a program
Guys, I would like to instrument the bytecode that LLVM produces with assertions. I have written the instrumentation code manually, but I do not know how to halt the program in case the assertion is false. I took a look into the bytecode that LLVM produces for a program like: #include <stdlib.h> int main() { exit(1); } And it is like this: define i32 @main() nounwind { entry:
2016 Nov 18
2
DWARF Generator
> On Nov 17, 2016, at 5:40 PM, Robinson, Paul <paul.robinson at sony.com> wrote: > > > >> -----Original Message----- >> From: Greg Clayton [mailto:gclayton at apple.com] >> Sent: Thursday, November 17, 2016 5:01 PM >> To: David Blaikie >> Cc: llvm-dev at lists.llvm.org; Robinson, Paul; Eric Christopher; Adrian >> Prantl >> Subject: Re:
2016 Nov 18
2
DWARF Generator
On Fri, Nov 18, 2016 at 10:18 AM Eric Christopher <echristo at gmail.com> wrote: > On Fri, Nov 18, 2016 at 8:43 AM Greg Clayton <gclayton at apple.com> wrote: > > > > On Nov 17, 2016, at 5:40 PM, Robinson, Paul <paul.robinson at sony.com> > wrote: > > > > > > > >> -----Original Message----- > >> From: Greg Clayton
2011 Aug 19
0
[LLVMdev] How to halt a program
Victor Campos wrote: > Guys, > > I would like to instrument the bytecode that LLVM produces with > assertions. I have written the instrumentation code manually, but I do > not know how to halt the program in case the assertion is false. I took > a look into the bytecode that LLVM produces for a program like: > > #include <stdlib.h> > int main() { >
2019 Feb 22
2
Create the GlobalVariable which have extern in one header file
Hi Good day. I am facing issue with creating a GlobalVariable. I already have an extern for that global in a header file to use it in the following way extern const void* DATA_TABLE[]; And with a LLVM PASS, I am trying to create this array with the same name and with initializer. So, I have following: GlobalVariable *gvar_data = new GlobalVariable( M, blockItems->getType(), true,
2011 Sep 01
1
[LLVMdev] How to halt a program
Hi, all, I managed to insert the assertion in my bytecode, but the result is not really what I expected :( Let me do a quick recap: I am trying to instrument the bytecode with some assertions, and to do this, I want to insert the abort() function into the bytecode. The problem is that LLVM is creating a new abort() function, instead of using the one that already exists in libc. Let me
2019 Feb 22
1
Create the GlobalVariable which have extern in one header file
I have changed it to ExternalLinkage. Now, in LLVM IR, it looks like that: @DATA_TABLE = external global [0 x i8*], section "data_section", align 16 #0 @DATA_TABLE.1 = global [10 x i8*] [i8* inttoptr (i64 53415718 to i8*), i8* bitcast (void (%class.Hello*)* @_ZN5Hello5ptofnEv to i8*),...], section "data_section", align 16 #0 In my uses: %arrayidx = getelementptr inbounds [0 x
2013 May 15
2
[LLVMdev] Attributes & CloneFunctionInto
...g. removing all attributes from the target declaration, then cloning, and then setting the correct attributes. However, I can't find a way to modify an existing alignment *in any way* without hitting an assertion (the other one being line 727 for removeAttributes). I've also tried using addAttributes() and setAttributes() to set the alignment to 0, but this seems to be ignored... Any help on this? :) Thanks, Ralf
2016 Dec 30
3
Avoiding during my pass the optimization (copy propagation) of my LLVM IR code (at generation)
Hello. I'm writing an LLVM pass that is working on LLVM IR. To my surprise the following LLVM pass code generates optimized code - it does copy propagation on it. Value *vecShuffleOnePtr = Builder.CreateGEP(ptr_B, vecShuffleOne, "VectorGep"); ... packed_gather_params.push_back(vecShuffleOnePtr); CallInst *callGather =
2015 Jul 13
2
[LLVMdev] String attributes for function arguments and return values
Hi, I’d like to support string attributes on function arguments and return values. We are going to use them in our tree to express higher level language types. Internally attributes framework have everything to do this, it’s even possible to generate string attributes via API right now: Function *function; function->setAttributes(function->getAttributes().addAttribute(context, i,
2017 Aug 17
3
How do set 'nest' addribute in an indirect call?
I need to set the 'next' attribute on a parameter. If the function is to be directly called, i.e., a function constant, I am getting what I want as follows (using the C 'Core.h' binding) 1) Build a function type, using LLVMFunctionType. 2) Build a function value, passing the result of 1) to LLVMAddFunction 3) Go through the formal parameters of 2), using LLVMGet[First|Next]Param,
2011 Jan 01
3
[LLVMdev] misaligned_stack_error caused by LLVM code on MacOS: how to fix?
llvm-generated code that runs fine on linux/i386 causes EXC_BAD_ACCESS with misaligned_stack_error_ on MacOS/i386. I read online that each function should have stack aligned by 16 on MacOS/i386 and such code should be used: Fn->addAttribute(~0U, llvm::Attribute::constructStackAlignmentFromInt(16)); But when I run clang on some C++ code I don't see alignstack instructions generated at
2015 Mar 24
2
[LLVMdev] Propagate clang attribute to IR
> On 24 Mar 2015, at 14:55, Aaron Ballman <aaron at aaronballman.com> wrote: > > On Tue, Mar 24, 2015 at 9:48 AM, Rinaldini Julien > <julien.rinaldini at heig-vd.ch> wrote: >> Hi, >> >> I want to *tag* some functions with some *flags*. I was using annotate((“myFlag”)) and everything was working fine until I tried on ObjC method. It seems that clang just
2013 May 15
0
[LLVMdev] Attributes & CloneFunctionInto
...ributes from the target declaration, then cloning, and then setting > the correct attributes. > However, I can't find a way to modify an existing alignment *in any > way* without hitting an assertion (the other one being line 727 for > removeAttributes). I've also tried using addAttributes() and > setAttributes() to set the alignment to 0, but this seems to be > ignored... SAFECode clones a function to change the alignment of byval arguments. You can look at the code at http://llvm.org/viewvc/llvm-project/safecode/branches/release_32/lib/BaggyBoundsChecks/BaggyBoundsCheck...
2019 Jan 04
2
[RFC] Adding a -memeq-lib-function flag to allow the user to specify a memeq function.
Thanks for the suggestions Hal, So if I understand correctly, you're recommending we add a module flag <https://llvm.org/docs/LangRef.html#module-flags-metadata> to LLVM, something like: !llvm.module.flags = !{..., !123} !123 = !{i32 1, !"memeq_lib_function", !"user_memeq"} I've given it a try in the following patch: https://reviews.llvm.org/D56311 If this
2015 Jul 13
2
[LLVMdev] String attributes for function arguments and return values
Hi, On 13 Jul 2015, at 15:59, Hal Finkel <hfinkel at anl.gov<mailto:hfinkel at anl.gov>> wrote: ----- Original Message ----- From: "Artur Pilipenko" <apilipenko at azulsystems.com<mailto:apilipenko at azulsystems.com>> To: llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu> Cc: "Hal Finkel" <hfinkel at anl.gov<mailto:hfinkel at