search for: setmetadata

Displaying 20 results from an estimated 84 matches for "setmetadata".

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? Also, I...
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 by yourself. Logan On Thu, May 2, 2013 at 11:10 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at g...
2019 Jul 03
2
optimisation issue in an llvm IR pass
...B.CreateICmpULT(Incr, ConstantInt::get(Int8Ty, 1)); Incr = IRB.CreateAdd(Incr, cf); //interestingly this totally different approach creates the same instructions as variant2 CallInst *AddOv = IRB.CreateBinaryIntrinsic(Intrinsic::uadd_with_over flow, Counter, ConstantInt::get(Int8Ty, 1)); AddOv->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None)); Value *SumWithOverflowBit = AddOv; Incr = IRB.CreateAdd(IRB.CreateExtractValue(SumWithOverflowBit, 0), IRB.CreateZExt(IRB.CreateExtractValue(SumWithOverflowBit, 1), Int8Ty)); So - How do I have to write the code that the target code has...
2019 Jul 03
3
optimisation issue in an llvm IR pass
...cr = IRB.CreateAdd(Incr, carry); it makes no difference to the generated assembly > Have you tried using the llvm.uadd.with.overflow.i8 intrinsic? we have tried this: CallInst *AddOv = IRB.CreateBinaryIntrinsic(Intrinsic::uadd_with_overflow, Counter, ConstantInt::get(Int8Ty, 1)); AddOv->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None)); Value *SumWithOverflowBit = AddOv; Incr = IRB.CreateAdd(IRB.CreateExtractValue(SumWithOverflowBit, 0), IRB.CreateZExt(IRB.CreateExtractValue(SumWithOverflowBit, 1), Int8Ty)); but that generated exactly the same as auto cf = IRB.Cre...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...ors. I have >> only one segfault: >> >> opt: LLVMContext.cpp:147: unsigned int >> llvm::LLVMContext::getMDKindID(llvm::StringRef) const: Assertion >> `isValidName(Name) && "Invalid MDNode name"' failed. >> >> This is due because when I setMetadata() it failes. >> >> StringRef tsts = llvm::Twine(srsr).str(); >> .... >> LLVMContext& C = is->getContext(); >> MDNode* N = MDNode::get(C, MDString::get(C, "path")); >> is->setMetadata(tsts, N); >> >> >> If I put >> is-&g...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...n <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"*) > }; > > 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 by yourself. > > Logan > > > On Thu, May 2, 2013 at 11:10 PM, Alexandru Ionut Diaconesc...
2016 Apr 23
2
push-notification plugin and imap-metadata permissions
...endor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify >> >> If the key is set then everything is OK and the notification is sent, otherwise the >> action is skipped. >> >> If I try to setup the metadata key by hand (telnet as the user over the imap port): >> setmetadata INBOX (/private/vendor/vendor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify "user=myuser at mydomain.com") >> >> I get the error message: "Internal mailbox attributes cannot be accessed" > Server metadata is set with: > > a SETMETADATA "" (/...
2013 May 03
2
[LLVMdev] set of integers to metadata
...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(), since *Hello.cpp:706:56: error: no matching function for call to ‘llvm::MDNode::get(llvm::LLVMContext&, llvm::Value* [(((unsigned int)(((int)cebagcnt) + -0x00000000000000001)) + 1)])’ Hello.cpp:706:56: note: candidate is: /h...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...tAsInteger(/*radix=*/ 10, /*output=*/ i); Sincerely, Logan On Thu, May 2, 2013 at 9:53 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > 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...
2013 May 03
0
[LLVMdev] set of integers to metadata
...g, 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 at 1:18 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone, > > I want to pass a set of integers using metadata but I don't know how. I > have tried: > > the inte...
2010 Apr 24
2
[LLVMdev] Proposal for Adding MetaData to a BasicBlock
...uot;Instruction" to class "BasicBlock": public: bool hasMetadata() const MDNode *getMetadata(unsigned KindID) const; MDNode *getMetadata(const char *Kind) const; void getAllMetadata(SmallVectorImpl<std::pair<unsigned, MDNode*> > &MDs)const; void setMetadata(unsigned KindID, MDNode *Node); void setMetadata(const char *Kind, MDNode *Node); private: // These are all implemented in Metadata.cpp. MDNode *getMetadataImpl(unsigned KindID) const; MDNode *getMetadataImpl(const char *Kind) const; void getAllMetadataImpl(SmallVectorImpl&lt...
2016 Apr 22
4
push-notification plugin and imap-metadata permissions
...he following mailbox metadata key: /private/vendor/vendor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify If the key is set then everything is OK and the notification is sent, otherwise the action is skipped. If I try to setup the metadata key by hand (telnet as the user over the imap port): setmetadata INBOX (/private/vendor/vendor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify "user=myuser at mydomain.com") I get the error message: "Internal mailbox attributes cannot be accessed" Digging in the Dovecot 2.2.22 sources i found that: This string is from lib-imap-storag...
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 LLVM 2.7 Thank you, Oksana -------------- next part -------------- An HTML attachment was scrubbe...
2013 Aug 15
1
[LLVMdev] Removing metadata from instruction
Hi, I want to remove metadata from an instruction. Is there any way doing this in my pass? Regards, Kyriakos -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130815/08200e23/attachment.html>
2015 Sep 29
2
Removing metadata from LLVM Instruction
Hi, an older thread about removing metadata says to use “setMetadata(Kind, nullptr)” to drop the metadata from the instruction. I have using this method without success. When I look at inside the IR code the metadata are still there, any idea why is that? Thanks. Best, Simone
2019 Jan 14
2
Metadata/DebugInfo in *.ll file
...mentation regarding DebugInfo creation in the LLVM IR bytecode. It can be done for compileunits, functions, and other constructs, with the help of DIBuilder class. However I can't save debug information related to individual llvm::Instructions. I tried DebugLoc, DILocation setting directly with setMetadata(). I tried other ways, for e.g.: insertDbgValueIntrinsic(). If I set invalid parameters for the call, then the LLVM passes warn me, correctly, so at least I see in the log, that LLVM tries to assign debuginfo to given instruction. If however I set valid parameters, then I suppose, that the passes d...
2016 Nov 02
2
RFC: Drop support for old style scalar TBAA
In https://reviews.llvm.org/D26229 I've proposed dropping support for old style scalar TBAA metadata. Here is the proposed commit message: "We've had support for auto upgrading old style scalar TBAA access metadata into the "new" struct path aware TBAA metadata for 3 years now. The only way to actually generate old style TBAA was explicitly through the IRBuilder API. I
2014 Mar 29
1
still issues with metadata support
On dovecot 2.2.12 compiled from source I use ActiveSync with kolab-syncroton. When running a test i have this imap log: [29-Mar-2014 22:58:25 +0200]: [F658] S: A0004 OK Getmetadata completed. [29-Mar-2014 22:58:25 +0200]: [F658] C: A0005 SETMETADATA INBOX (/private/vendor/kolab/activesync "{\"DEVICE\":{\"601099122\":{\"ID\": \"a5daac4806642a1cfeceb53aea32e86218c4d512\",\"TYPE\": \"TestActiveSyncConnectivity\",\"ALIAS\":null}},\"FOLDER\":{\"601099122\&quo...
2011 Nov 20
2
[LLVMdev] How can I output assembly comments from emitPrologue()?
...earching 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 instruction using setMetadata(). 3. Add a new member to MachineInstr to hold the metadata, and attach it when converting LLVM instructions. 4. Update AsmPrinter to read off the metadata and output it as an assembly comment. Is this the only (and correct) way to do this? If so, I am having trouble attaching the...
2011 Mar 14
2
[LLVMdev] set line number debug info
Hi, I am new to LLVM infrastructure. Recently I am trying to set the debug info for an instruction. The main aim is to set the source line number of an instruction. Can anyone please show how to do that? I think that setMetadata method in Instruction class is to be used. But how do I create MDNode* consisting of desired source line number. Source line number can be extracted from the instruction-debug-info using getMetadata method and then using getLineNumber method from DILocation class. Unfortunately DILocation class doe...