search for: instnamer

Displaying 20 results from an estimated 52 matches for "instnamer".

2011 Oct 22
9
[LLVMdev] Question about local variables
Nick, Unfortunately this doesn't answer my question I don't think. It seems that -instnamer, as you mention, names the instructions but still does not name the local variables. So there really is no way to do this shy of creating (or basically copying) the API from AsmWriter (seems very dedundant to me)? This seems like a large failing? On Fri, Oct 21, 2011 at 7:03 PM, Nick Lewycky &...
2011 Oct 24
0
[LLVMdev] Question about local variables
...gt; >>> Ah, forgot the -o, thanks, silly mistake. >>> >>> So how would you extract "add" from the instruction "%A"? >>> >> >> I->getOpcodeName(). >> >> >> Yes, this is sort of what I am trying to do. The instnamer works fine >>> for the local variables and I already had the constants sorted out. >>> >> >> Great! >> >> Nick >> >> >>> On Sat, Oct 22, 2011 at 1:21 PM, Nick Lewycky <nicholas at mxc.ca >>> <mailto:nicholas at mxc.ca>...
2011 Oct 22
0
[LLVMdev] Question about local variables
Ryan Taylor wrote: > Nick, > > Ah, forgot the -o, thanks, silly mistake. > > So how would you extract "add" from the instruction "%A"? I->getOpcodeName(). > Yes, this is sort of what I am trying to do. The instnamer works fine > for the local variables and I already had the constants sorted out. Great! Nick > > On Sat, Oct 22, 2011 at 1:21 PM, Nick Lewycky <nicholas at mxc.ca > <mailto:nicholas at mxc.ca>> wrote: > > Ryan Taylor wrote: > > Nick, > >...
2011 Oct 22
0
[LLVMdev] Question about local variables
Ryan Taylor wrote: > Nick, > > Also, I forgot to mention I had no luck with instnamer, it still left > the local variables as "%slotNum", it didn't name them, unless I used > -instnamer wrong: > > opt -instnamer <file.bc> file2.bc Almost, use -o to specify output: opt -instnamer file.bc -o file2.bc > Those are the ones I am refering to. The descr...
2011 Oct 24
0
[LLVMdev] Question about local variables
...t;>>> So how would you extract "add" from the instruction "%A"? >>>>>> >>>>> >>>>> I->getOpcodeName(). >>>>> >>>>> >>>>> Yes, this is sort of what I am trying to do. The instnamer works >>>>>> fine >>>>>> for the local variables and I already had the constants sorted out. >>>>>> >>>>> >>>>> Great! >>>>> >>>>> Nick >>>>> >>>>> >&gt...
2013 Oct 29
1
[LLVMdev] Non-deterministic behavior when using LoopInfo pass in LLVM
...arks and in three consecutive tests the number of loop headers was different. Does anybody know if this behavior is correct? If so, I would like to know the logic behind this pass. Thanks, Raphael Ernani P.S.: Here is the output (a similar variation occurs when I run my pass without -mem2reg, -instnamer, and -break-crit-edges): raphael at ubuntu:~/llvm-3.3/projects/test-suite/SingleSource/Benchmarks/Stanford/Output$ opt -mem2reg -instnamer -break-crit-edges -load MyModule.so -my-counter -stats Oscar.linked.rbc -f >/dev/null ===-------------------------------------------------------------------...
2011 Oct 22
0
[LLVMdev] Question about local variables
Ryan Taylor wrote: > Nick, > > Unfortunately this doesn't answer my question I don't think. It > seems that -instnamer, as you mention, names the instructions but still > does not name the local variables. What other local variables are you referring to? When AsmWriter prints "%y = add i32 %x, 1", the name of that add instruction is "y" and "x" is the name of another instruction...
2011 Oct 24
0
[LLVMdev] Question about local variables
...add" from the instruction "%A"? >>>>>>>> >>>>>>> >>>>>>> I->getOpcodeName(). >>>>>>> >>>>>>> >>>>>>> Yes, this is sort of what I am trying to do. The instnamer works >>>>>>>> fine >>>>>>>> for the local variables and I already had the constants sorted out. >>>>>>>> >>>>>>> >>>>>>> Great! >>>>>>> >>>>>>&gt...
2009 Nov 13
3
[LLVMdev] values with no name in 2.6
Hi, I've been upgrading some custom LLVM passes to work with LLVM 2.6 instead of LLVM 2.5. I've noticed that in 2.6, some functions seem to have several local values with no name (where getName() returns an empty string). I never saw this in 2.5. Is this a known change in behaviour? Is there some handy way to get unique, deterministic names assigned to all values in a function? Thanks,
2009 Nov 13
0
[LLVMdev] values with no name in 2.6
...2.6, some functions seem to > have several local values with no name (where getName() returns an > empty string). I never saw this in 2.5. Is this a known change in > behaviour? Is there some handy way to get unique, deterministic names > assigned to all values in a function? Run the -instnamer pass. --Owen -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2620 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091113/98058f99/attachment.bin>
2011 Oct 21
2
[LLVMdev] Question about local variables
It looks like the AsmWriter is generating the local variables (SlotNum)s on the fly in that file (AsmWriter.cpp), so is there any way at all to get this information from the operation itself, via Instruction, Value or Type? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111021/55f4887c/attachment.html>
2011 Oct 22
0
[LLVMdev] Question about local variables
...ny way at all to > get this information from the operation itself, via Instruction, Value > or Type? Nope! As you noticed, they're created on the fly... ...when the Value or Type is anonymous. If you want them to be persistent, values can have names via. the setName() call. "opt -instnamer" will name all your instructions, for example. Nick
2011 Feb 25
0
[LLVMdev] Accessing the name of the temporary variable in Instruction
...me() does not return anything as %13 is not a variable declared in the program. Is there a way to get to this temporary variable name? The problem occurs because the value doesn't actually have a name; the LLVM disassembler is just printing %13 because the value has no name. You can run the -instnamer pass right before your analysis/transform pass. It will give each instruction a real name. -- John T. > Thanks > Sreekumar > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >...
2019 Jan 09
3
Textual IR value names
I like my LLVM IR text to have nice value names, e.g. %add = add ... %mul = mul ... And this all works well if the build has asserts enabled. If the build does not have asserts enabled, it's not so nice: %1 = add ... %2 = mul ... I understand the use for obfuscating names, but the choice to make this dependent on whether or not asserts are enabled seems odd to me. At the very least
2013 Jun 20
1
[LLVMdev] opt fails with assertion in Attributes.cpp
Hi Bill, With the latest llvm version I'm getting the following error: opt -instnamer < core-device.c.bc > core-device.o.bc Attribute 'nobuiltin' only applies to functions! void (%struct.fw_csr_iterator*, i32*)* @fw_csr_iterator_init Broken module found, compilation aborted! 0 opt 0x0000000001914bf1 llvm::sys::PrintStackTrace(_IO_FILE*) + 38 1 opt...
2019 Jul 08
4
What can cause llc to throw an error for instruction numbering?
Hi Tim, Thank you for that. I was just trying to replicate the branch instruction under a new opcode, so I don’t think that returns a value. Plus the code I was testing out didn’t have a br or my newly added instruction but it still threw that error at me. Here’s the IR code I tested: ; ModuleID = ‘cc.c’ source_filename = “cc.c” target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128”
2011 Feb 25
2
[LLVMdev] Accessing the name of the temporary variable in Instruction
I have developed a pass to instrument LLVM bit code files with calls to a custom instrumentation library. For one of the instrumentation calls, I need to pass the name of the temporary variable used in LLVM bit code. For example, if I see LLVM assembly code as shown below, %13 = icmp eq i64 %11, 0, !dbg !14 After the instrumentation pass, it needs to look like the following %13 = icmp eq i64
2010 Mar 27
0
[LLVMdev] Operand, instruction
...t name, but llvm > produces some instruction like "%0=add i32 tmp, 1", here getName() shows > empty string as result name. > So please help. as you have noticed, names are optional: instructions may not have names. That said, you can give names to all instructions by running the instnamer pass. Ciao, Duncan.
2011 Sep 22
2
[LLVMdev] Getting number of "unnamed temporory"
Hello, I am trying to print out output name of "unnamed temporary". For instance, for %3 = add i32 %21, i32 %index.01, I would like to print out %3. Can anybody please let me know how I can get it? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110921/56a6991a/attachment.html>
2012 Apr 27
1
[LLVMdev] clang branching using label
...#39;t be able to read the IR back in > again. > The numbers it chooses just increment sequentially. This makes it hard to > modify such human readable IR by hand since you have to preserve the > sequential > numbering. (If you want everything to have a real name use opt's > -instnamer > pass). > >> >> How about the following case where a variable assignment does not occur? > > I'm not sure what you mean by "a variable assignment does not occur". > An instruction like "%var = add i32 %7, 0" isn't really an assignment to &gt...