similar to: [LLVMdev] How to insert metadata in llvm IR?

Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] How to insert metadata in llvm IR?"

2012 Aug 21
1
[LLVMdev] Dwarf debug info misses while clang codegen
I'm trying to write a llvm pass to add debug info into a non-debug-info bitcode file. I have been read http://llvm.org/docs/SourceLevelDebugging.html. And I use DIBuilder to produce the debug metadata. I know I can't get all information form ir code . So I add some manual info as test data. After executing my pass, I can find debug info metadata in my generated bitcode. Those metadata
2013 Aug 29
0
[LLVMdev] Allowed types llvm.dbg.declare's "storage" parameter
Hi everyone, I have a question about the llvm.dbg.declare instrinsic which I am using through DIBuilder::insertDeclare(): What kind of instructions are supported as the "storage" parameter? Is it only allocas? I've also had some success with a combination of llvm::Argument and DIBuilder::createComplexVariable(). That is, create a DIVariable with one additional OpDeref and then
2013 Nov 03
0
[LLVMdev] get function local debug info?
On Sat, Nov 2, 2013 at 4:17 PM, lu zhao <luzhao at cs.utah.edu> wrote: > Hi, > > If I have an instance of DISubprogram, can I get the debug info of local > variables of the function, including parameters? > > I tried to use the getVariables() function defined in DISubprogram, but it > seemed to return an empty DIArray node when I ran my pass alone using opt. > Do I
2013 Nov 03
0
[LLVMdev] get function local debug info?
+llvmdev because I accidentally dropped it On Nov 3, 2013 6:57 AM, "David Blaikie" <dblaikie at gmail.com> wrote: > You're welcome to provide a patch or I might get to it myself. Also this > should be described in http://llvm.org/docs/SourceLevelDebugging.html if > it isn't already > On Nov 3, 2013 12:11 AM, "lu zhao" <luzhao at cs.utah.edu>
2013 Nov 02
4
[LLVMdev] get function local debug info?
Hi, If I have an instance of DISubprogram, can I get the debug info of local variables of the function, including parameters? I tried to use the getVariables() function defined in DISubprogram, but it seemed to return an empty DIArray node when I ran my pass alone using opt. Do I need to enable any other analysis passes in order to populate the data? My related snippet of code is like the
2014 Nov 13
2
[LLVMdev] [RFC] Separating Metadata from the Value hierarchy
> On Nov 12, 2014, at 1:00 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > > If you don't care about function-local metadata and debug info > intrinsics, skip ahead to the section on assembly syntax in case you > have comments on that. > >> On 2014-Nov-09, at 17:02, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: >> >>
2012 Jan 19
2
[LLVMdev] context/scope of instruction
Hello, I need to know how I get the LLVM::IDScope object of an instruction. My program contains: call void (...)* @commit(), !dbg !16 !16 = metadata !{i32 16, i32 5, metadata !8, null} !8 = metadata !{i32 589835, metadata !4, i32 10, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ] LLVM::Instruction.hasMetadata() is 0 I got LLVM::Scope for variables over DIGlobalVariable.getContext()
2017 Jun 19
2
LLVM behavior different depending on function symbol name
using `opt --print-after-all -O3` I see that EarlyCSE is interpreting the call to `ceil` and constant fold: *** IR Dump After Early CSE *** ; Function Attrs: nobuiltin nounwind define i1 @do_test() #2 { Entry: %0 = call fastcc float @ceil(float 0.000000e+00) #6 %1 = call fastcc float @ceil32(float 0.000000e+00) #6 %2 = fcmp fast oeq float 0.000000e+00, %1 ret i1 %2 } So just running `opt
2010 Nov 04
2
[LLVMdev] C++ interface for metadta
Hi, I'm new to LLVM, so this might be a stupid question - I apologize if I've just missed it. I've read about the way metadata is represented in the LLVM 2.7 IR, but can't figure out how to write it into the IR explicitly. Can someone please show me a very simple example of a pass that iterates over functions and attaches metadata to them, and another pass that reads it and
2017 Jun 19
2
LLVM behavior different depending on function symbol name
On Mon, Jun 19, 2017 at 12:06 PM, Mehdi AMINI <joker.eph at gmail.com> wrote: > Hi, > > 2017-06-19 8:45 GMT-07:00 Andrew Kelley via llvm-dev < > llvm-dev at lists.llvm.org>: > >> Greetings, >> >> I have a Zig implementation of ceil which is emitted into LLVM IR like >> this: >> >> ; Function Attrs: nobuiltin nounwind >> define
2017 Sep 17
2
assertion triggered since update to llvm 5
Dump the IR before newgvn and run through opt -newgvn. It should crash. I'm not familiar with your frontend but you might want to use -mllvm -opt-bisect-limit. On Sep 17, 2017 1:06 PM, "Andrew Kelley" <superjoe30 at gmail.com> wrote: Valgrind is strictly better than address sanitizer, is that right? It runs valgrind-clean: [nix-shell:~/dev/zig/build-llvm5-debug]$ valgrind
2017 Oct 01
2
load with alignment of 1 crashes from being unaligned
Below is attached a full IR module that can reproduce this issue, but the part to notice is this: %Foo96Bits = type <{ i24, i24, i24, i24 }> define internal fastcc i16 @main.0.1() unnamed_addr #2 !dbg !113 { Entry: %value = alloca %Foo96Bits, align 1 %b = alloca i24, align 4 %0 = bitcast %Foo96Bits* %value to i8*, !dbg !129 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast
2017 Sep 16
2
assertion triggered since update to llvm 5
When zig updated to llvm 5 we started hitting this assertion: zig: /home/andy/downloads/llvm-project/llvm/include/llvm/Support/Casting.h:106: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::Instruction; From = llvm::Value]: Assertion `Val && "isa<> used on a null pointer"' failed. I wonder if however this was caused by an
2017 Sep 17
2
assertion triggered since update to llvm 5
Can you please open a bug on bugzilla and attach the ir testcase? Your fix doesn't look right (just hiding the assertion failure) On Sep 17, 2017 10:45 AM, "Andrew Kelley via llvm-dev" < llvm-dev at lists.llvm.org> wrote: > What do you think about this patch? > > --- a/llvm/lib/Transforms/Scalar/NewGVN.cpp > +++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp > @@
2011 Oct 17
0
[LLVMdev] Variable name from metadata
Closing this, found below links to get variable name.   http://groups.google.com/group/llvm-dev/browse_thread/thread/1a239f0d24db2b5c   http://markmail.org/message/fj5qg44vyjsdde7k#query:+page:1+mid:5zhmyncisenomcga+state:results           I could do following, to get the required information.                 const CallInst *CI = dyn_cast<CallInst>(Insn);                 int numoperands =
2010 Sep 02
0
[LLVMdev] Line number information (and other metadata)
On 02/09/10 11:27, David Given wrote: > I'd like my compiler to emit proper line number information. The docs > talk about Instruction::setDebugLoc(), but that method doesn't actually > have to be in my 2.7 LLVM Debian package. What's the correct way of > doing this? Grr stupid typo. > The docs > talk about Instruction::setDebugLoc(), but that method doesn't
2011 Mar 07
1
[LLVMdev] DW_TAG_lexical_block structure in debug information
Hello, The documentation for debug information (http://llvm.org/docs/SourceLevelDebugging.html) says the structure of block descriptors metadata is: !3 = metadata !{ i32, ;; Tag = 11 + LLVMDebugVersion (DW_TAG_lexical_block) metadata,;; Reference to context descriptor i32, ;; Line number i32 ;; Column number } However, looking at the generated metadata, there are 2 extra
2018 Mar 22
0
Question about debug information for global variables
> On Mar 22, 2018, at 4:08 PM, Roman Levenstein <romixlev at gmail.com> wrote: > > Hi, > > I'm trying to achieve the following: > > - I have a global variable BaseAddress that holds the base address of > a contiguous dynamically allocated memory block. > > - I have a number of logical variables of different types that are > mapped on certain address
2018 Mar 22
2
Question about debug information for global variables
Hi, I'm trying to achieve the following: - I have a global variable BaseAddress that holds the base address of a contiguous dynamically allocated memory block. - I have a number of logical variables of different types that are mapped on certain address ranges inside the memory block pointed to by BaseAddress. The offset and the size of each such logical variable inside the memory block are
2012 Jan 27
0
[LLVMdev] [RFC] Module Flags Metadata
On Jan 24, 2012, at 9:11 PM, Nick Lewycky wrote: > Yeah, I can't think of any use for something that would pull out NamedMDNodes for no reason. That said, if you want this to work, please audit the module cloner at the very least (it should copy the NamedMDNodes). > > But what would you do with llvm-extract? llvm-extract already copies over named metadata. > Should it keep a