similar to: [LLVMdev] Why there is no unary operator in LLVM?

Displaying 20 results from an estimated 90 matches similar to: "[LLVMdev] Why there is no unary operator in LLVM?"

2013 Mar 02
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
Hi folks, Hope this is not a silly question. But it bothers me when I am thinking about it. My question is: 1. In the implementation of serverSplitPHINodes(), why it only checks the first PHI node for possible multiple inputs from outside the region to extract. There could be more than one PHI nodes in the header block, and the code only checks the first one. I don't quite get it.
2007 Dec 04
2
[LLVMdev] Memory allocation (or deallocation) model?
On Mon, 2007-12-03 at 18:56 -0800, Chris Lattner wrote: > Other IR objects (like instructions) have very simple ownership. An > instruction is owned by its basic block, a bb is owned by the function, a > function is owned by thet module. If an instruction is initially allocated with its Instruction *insertAtEnd parameter defaulted to null, and then later appended to a BasicBlock,
2004 May 26
0
[LLVMdev] Changes in llvm::Instruction and subclasses
This should not affect current code but it may help people who deal with LLVM instructions. Up till now one could create an llvm::Instruction (and subclasses) using the following constructor: Instruction(const Type *Ty, unsigned iType, const std::string &Name ="", Instruction *InsertBefore = 0); If InsertBefore was specified the instruction was added to the basic block
2010 Nov 23
0
[LLVMdev] how to get a void type value in llvm
Hi Shuying, You will find in the documentation that amongst the overloaded CallInst::Create()'s there is one that takes no function arguments: static CallInst* llvm::CallInst::Create ( Value * F, const Twine & NameStr, BasicBlock * InsertAtEnd); Regards On 23/11/2010, at 11:20 AM, Shuying Liang wrote: > Hi, I want to insert a function with a void type parameter, > for example:
2010 Nov 23
2
[LLVMdev] how to get a void type value in llvm
Hi, I want to insert a function with a void type parameter, for example: int foo(void); OI declared fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext())); then the question is how to get the void type value to make the CallInst inserted sucessfully? (what should be ********) CallInst::Create(fcall2, ******,
2010 Nov 23
1
[LLVMdev] how to get a void type value in llvm
Hi, sivart Thanks for pointing it out. I used it, and it works. Thank you again. BTW, for any later reference, the function prototype declaration with no arguments is not what I wrote: fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext())); INSTEAD, I changed to : fcall2 = M.getOrInsertFunction("foo",
2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
Hi, This is probably more of a standard C++ question instead of an actual LLVM question, but here it goes anyway. I'm trying to invoke the following constructor: CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, const Twine &NameStr, BasicBlock *InsertAtEnd); My code is: using namespace llvm; void replaceByClone(Function *f, CallInst *I){ Function *clone =
2005 Feb 02
1
[LLVMdev] RE: Question about Global Variable
Thanks for your reply. After I change Cstr to gI, it compiled successfully. Thanks again. Another question is for constructing getelementpt. // C code char gStrA[10] = "test str"; // here is Global variable,gStrA and initializer "test str" char gStrB[10]= "test str2"; main(){ int = i; char *pGVars[20]; // here, the pGVar is for storing the address of each
2008 Sep 12
0
[LLVMdev] CPP API User-level Question: Returning multiple values
Hi Tony, I just checked LLVM 2.3 and ReturnInst has these: static ReturnInst* Create(Value * const* retVals, unsigned N, Instruction *InsertBefore) static ReturnInst* Create(Value * const* retVals, unsigned N, BasicBlock *InsertAtEnd) which are what you're looking for. In LLVM trunk, MRV-syntax LLVM assembly files and bitcode
2009 Dec 04
0
[LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue
Hello Ether, I think it is referring to the Value class (captial V) whose documentation is found at http://llvm.org/doxygen/classllvm_1_1Value.html . It has to be a pointer because the Value class is a parent class to many many child classes. --Sam ----- Original Message ---- > From: ether zhhb <etherzhhb at gmail.com> > To: LLVM Developers Mailing List <llvmdev at
2017 Jan 20
2
Get Num of Uses in only dominated blocks?
Hi all, I am doing a project that requires counting the number of uses of a value only in all dominated blocks in a function. I checked the manual for llvm::User class, but only get this unsigned <http://llvm.org/test-doxygen/api/classunsigned.html> getNumUses <http://llvm.org/test-doxygen/api/classllvm_1_1Value.html#a380559e99b47632a34f74de7c1d03cc0> () const This gives me all the
2009 Jan 22
0
[LLVMdev] replacing instructions
Ralf Karrenberg wrote: > Hello everyone, > > is there any way to replace an instruction inside LLVM that is more > elegant than creating a new one, replacing uses and deleting the old one > if I only want to modify the type? It is generally not a big deal, but > the issue gets really messy if I am in the middle of iterating over uses > and start deleting some of them... >
2007 Dec 04
0
[LLVMdev] Memory allocation (or deallocation) model?
On Mon, 3 Dec 2007, Benjamin Smedberg wrote: > I've been reading the headers and > http://llvm.org/releases/2.1/docs/ProgrammersManual.html and I'm still > confused about a pretty fundamental point... who is expected to clean up > various objects when we're finished with them, and when? Ok, different objects have different life times. The important ones are: (most)
2008 Sep 12
2
[LLVMdev] CPP API User-level Question: Returning multiple values
Dan, Thanks for the info. Unfortunately for the time being we are using (for the most part) the 2.3 release (with a couple of patches that Dave Greene has applied). The first-class aggregates is one of the things we don't yet have in the LLVM we're working with. I'll look again to see if there's a ReturnInst::Create( ) which I can pass an array of llvm::Value *'s to,
2007 Dec 04
2
[LLVMdev] Memory allocation (or deallocation) model?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've been reading the headers and http://llvm.org/releases/2.1/docs/ProgrammersManual.html and I'm still confused about a pretty fundamental point... who is expected to clean up various objects when we're finished with them, and when? Let's say I've created a module, retrieved a bunch of types, created a function, a basic block,
2007 Apr 20
2
[LLVMdev] llvm-gcc Bug, Looking for Advice on Fix
Ok, I've tracked down the problem I've had bootstrapping llvm-gcc. The culprit is in TreeToLLVM::EmitMemCpy: void TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align) { const Type *SBP = PointerType::get(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { CastToType(Instruction::BitCast,
2007 Jul 03
0
[LLVMdev] API design
On Mon, 2 Jul 2007, David A. Greene wrote: >>> - Changing the API >>> a) Template it to take two iterators. This causes code size bloat. > > This seems like the right solution to me. Unless llvm is running on > extremely limited memory embedded systems, the extra code space > shouldn't be an issue. Code size is always an issue. What specifically are you
2017 Jun 05
2
Question about llvm::Value::print performance
Hi, I want to use llvm::Value::print to output the assembly strings for llvm::Instructions inside a rather large llvm::Module (linked module with lots of types/...). I started with plain ::print and switched over to http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html#a04e6fc765eeb0c4c90ac5d55113db116 with a ModuleSlotTracker I pass in myself to avoid some complexity. Still now I have
2017 Jul 20
2
Value
I am performing the bit analysis, so actually I want to propagate information about bits from operands to the instruction (the result of instruction), and every time I access the Instruction first , than get the operands, then access to the next instruction. That was the only problem, that I keep a map from Instruction to bit info and was confused, is Instruction, that I am putting to map, is the
2009 Nov 19
0
[LLVMdev] Strange error using CallInst constructor
Please keep replies on the list. Now you've missed "InputIterator must be a random-access iterator pointing to contiguous storage (e.g. a std::vector<>::iterator). Checks are made for random-accessness but not for contiguous storage as that would incur runtime overhead." from CallInst's constructor (although that comment should be on Create()). Function::arg_iterator