similar to: [LLVMdev] Removing metadata from instruction

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Removing metadata from instruction"

2011 Dec 20
3
[LLVMdev] creating new Metadata
Dear llvm-ers, I am trying to attach a customized metadata to llvm instructions. Let's say, I want to attach some number to each instruction. I am trying to use void Instruction::setMetadata(unsigned KindID, MDNode* Node) but I am not sure how to create a brand new instance of an MDNode. Do you have any code samples demonstrating how to do that? Due to some tool dependencies, I am using
2010 Apr 24
2
[LLVMdev] Proposal for Adding MetaData to a BasicBlock
Hello group, Per my posting on the Clang Newsgroup. I'm interested in doing some loop optimizations, towards this end I would like to add some custom Metadata to a Loop header. Loops in LLVM are represented using BasicBlocks, but unfortunately you can NOT add MetaData to a BasicBlock. Although you can add Metadata to an instruction. So I'm proposing to add the Metadata manipulation
2011 Dec 21
0
[LLVMdev] creating new Metadata
> Dear llvm-ers, > I am trying to attach a customized metadata to llvm instructions. > Let's say, I want to attach some number to each instruction. > I am trying to use > > void Instruction::setMetadata(unsigned KindID, MDNode* Node) > > but I am not sure how to create a brand new instance of an MDNode. > Do you have any code samples demonstrating how to do that?
2011 Dec 22
3
[LLVMdev] creating new Metadata
Hello, Thank you very much for the pointers. I am are able to create new MDNodes, filled with some constants, and attach them to llvm instructions. However, the metadata map is not getting updated as expected. For example, instead of the expected new entry !n = metadata !{some values} we are getting !n = metadata !{null} Do you know what might be wrong? Do we need to enter the MDNodes into the
2011 Dec 22
0
[LLVMdev] creating new Metadata
On 12/21/11 11:24 PM, Oksana Tkachuk wrote: > Hello, > Thank you very much for the pointers. > I am are able to create new MDNodes, filled with some constants, and > attach them > to llvm instructions. However, the metadata map is not getting updated > as expected. > For example, instead of the expected new entry If you look at PoolMDPass::runOnModule(), you'll see that
2011 Sep 13
3
[LLVMdev] Handling of DebugLocs during CSE of SelectionDAG nodes.
I've been investigating a case with the XCore target (which doesn't use FastISel) where the DWARF line number emitted at -O0 results in the xgdb visiting source lines in an unexpected order. I've tracked down the problem to the handling of DebugLocs in the selection DAG, in the getNode method shown bellow. It first tries to find if a similar node already exists in order to use that
2011 Sep 13
0
[LLVMdev] Handling of DebugLocs during CSE of SelectionDAG nodes.
On Sep 13, 2011, at 4:01 AM, Kyriakos Georgiou wrote: > I've been investigating a case with the XCore target (which doesn't use > FastISel) where the DWARF line number emitted at -O0 results in the xgdb > visiting source lines in an unexpected order. I've tracked down the > problem to the handling of DebugLocs in the selection DAG, in the getNode > method shown bellow.
2011 Sep 14
3
[LLVMdev] Handling of DebugLocs during CSE of SelectionDAG nodes.
On 13/09/11 17:40, Devang Patel wrote: > On Sep 13, 2011, at 4:01 AM, Kyriakos Georgiou wrote: >> I've been investigating a case with the XCore target (which doesn't use >> FastISel) where the DWARF line number emitted at -O0 results in the xgdb >> visiting source lines in an unexpected order. I've tracked down the >> problem to the handling of DebugLocs in
2013 May 02
4
[LLVMdev] int to StringRed conversion
Hello everyone, I have an integer and I want to convert it to StringRef in order to set metadata. setMetadata->(StringRef, MDNode*); It is there a native LLVM way to do it? 1. In the llvm::APSInt Class is toString() method, which seems it is not for this purpose 2. itoa and string are not part of LLVM 3. stringstream is not part of LLVM 4. to_string is not part of LLVM 5. any casting method?
2013 May 02
2
[LLVMdev] int to StringRed conversion
I think the better solution should be: LLVMContext& C = is->getContext(); Value *values[] = { ConstantInt::getSigned(Type::getInt64Ty(C), *scsr*), MDString::get(C, *"path"*) }; lnstr.setMetadata(*"your_analysis_name"*, MDNode::get(C, values)); So that you can take advantage of the type system of LLVM bitcode, and don't have to cast the integers from/to strings
2019 Jul 03
2
optimisation issue in an llvm IR pass
Hello, I have an optimisation issue in an llvm IR pass - the issue being that unnecessary instructions are generated in the final assembly (with -O3). I want to create the following assembly snippet: mov dl,BYTE PTR [rsi+rdi*1] add dl,0x1 adc dl,0x0 mov BYTE PTR [rsi+rdi*1],dl however what is created is (variant #1): mov dl,BYTE PTR [rsi+rdx*1] add dl,0x1 cmp
2019 Jul 03
3
optimisation issue in an llvm IR pass
Hi Craig, On 03.07.19 17:33, Craig Topper wrote: > Don't the CreateICmp calls return a Value* with an i1 type? But then > they are added to an i8 type? Not sure that works.  I had that initially: auto cf = IRB.CreateICmpULT(Incr, ConstantInt::get(Int8Ty, 1)); auto carry = IRB.CreateZExt(cf, Int8Ty); Incr = IRB.CreateAdd(Incr, carry); it makes no difference to the generated assembly
2013 May 03
2
[LLVMdev] set of integers to metadata
Hello everyone, I want to pass a set of integers using metadata but I don't know how. I have tried: the integers are in array[] *1. * LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } *is->setMetadata("path",MDNode::get(C,values));* failes when setMetadata(),
2013 May 02
0
[LLVMdev] int to StringRed conversion
The problem is that I want to pass only srsr which is an int. "marked" was just an example :) Thanks you! On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: > I'm not familiar with this, but maybe you can try: > > StringRef tst = ("marked" + Twine(srsr)).str(); > > It seems that you can't use integer as meta data
2013 May 02
0
[LLVMdev] int to StringRed conversion
Yes, it sounds good. I can try tomorrow. Thank you for your advice ! On Thu, May 2, 2013 at 5:43 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: > I think the better solution should be: > > > LLVMContext& C = is->getContext(); > Value *values[] = { > ConstantInt::getSigned(Type::getInt64Ty(C), *scsr*), > MDString::get(C, *"path"*) > };
2013 May 02
0
[LLVMdev] int to StringRed conversion
Hi, I think you may try to use llvm::Twine(int). For example, to convert 30 to string, you can use: Twine(30).str() To convert the string back to integer, you can try the StringRef::getAsInteger(unsigned, APInt &). For example: APInt i; str.getAsInteger(/*radix=*/ 10, /*output=*/ i); Sincerely, Logan On Thu, May 2, 2013 at 9:53 PM, Alexandru Ionut Diaconescu <
2013 May 03
0
[LLVMdev] set of integers to metadata
I also tried the following, with no compilation errors, but segfault, core dumped: *LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } llvm::ArrayRef<Value*> bla = values[size]; is->setMetadata("path",MDNode::get(C,bla));* On Fri, May 3, 2013
2002 Jul 30
3
Error running sammon() in multiv package
When I try to run the "sammon" function of the multiv package, I always get this error message: Error in as.vector(dist(a)) : couldn't find function "dist" It happens even with example(sammon). I am running R 1.5.0 on Win98 and I have still installed R 1.4.1 but it doesn't work on the old R version with the older multiv package either. Is there a problem with the
2011 Nov 20
2
[LLVMdev] How can I output assembly comments from emitPrologue()?
Dear all, I am looking to output assembly comments in my emitPrologue() function, just for my own readability. Searching for a way to do this found me this thread - http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043722.html, which says that the best way to output comments from somewhere like emitPrologue() is to: 1. Create an MDString for the comment. 2. Attach it to an LLVM
2002 Dec 18
2
acceptable p-level for scientific studies
Dear list members, I have a statistical question, that doesn't belong to this list, and I apologise for that in advance but I would appreciate your help very much. Is there some convention for selecting the a level for significance testing in scientific (e.g. chemical processes) studies? Most people use the 0.05 level but I could not find a reference to justify this. Why not 0.01 or 0.1?