search for: replaceusesofwithonconst

Displaying 20 results from an estimated 22 matches for "replaceusesofwithonconst".

2010 Feb 16
2
[LLVMdev] [PATCH] - Union types, replaceUsesOfWithOnConstant
Here's the implementation of ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet :( Two questions: -- Any suggestions as to an existing test I could use as a model for testing this? -- I could also use some advice on what part of the code to work on next (in terms of finishing up union support). -- -- Talin -------------- next part -------------- An HTML...
2010 Feb 17
0
[LLVMdev] [PATCH] - Union types, replaceUsesOfWithOnConstant
On Feb 16, 2010, at 12:38 PM, Talin wrote: > Here's the implementation of ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet :( Seems basically ok, please commit. > > Two questions: > > -- Any suggestions as to an existing test I could use as a model for testing this? IS this what is causing this to be broken? $ cat t.ll @union1 = constant union { i32*, i8 } { i32* @G } @G = global i3...
2010 Feb 17
1
[LLVMdev] [PATCH] - Union types, replaceUsesOfWithOnConstant
On Wed, Feb 17, 2010 at 12:05 PM, Chris Lattner <clattner at apple.com> wrote: > > On Feb 16, 2010, at 12:38 PM, Talin wrote: > > > Here's the implementation of > ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet :( > > Seems basically ok, please commit. > > I suppose that means that I'll have to send in the info to get commit access then :( > > > Two questions: > > > > -- Any suggestions as to an existing test I could use as a model for > testing...
2011 Feb 10
0
[LLVMdev] ConstantExpr::replaceUsesOfWithOnConstant() function for llvm::GetElementPtrConstantExpr
Hi LLVMdev members I found something strange in ConstantExpr::replaceUsesOfWithOnConstant() function. in lib/VMCore/Constants.cpp file 2118 if (getOpcode() == Instruction::GetElementPtr) { 2119 SmallVector<Constant*, 8> Indices; 2120 Constant *Pointer = getOperand(0); 2121 Indices.reserve(getNumOperands()-1); 2122 if (Pointer == From) Pointer = To; 2123 2124...
2011 Jun 17
0
[LLVMdev] replaceUsesOfWithOnConstant
What is the use of the third parameter to the replaceUsesOfWithOnConstant function? The documentation only states the uses of the first 2 parameters. Thanks, Regards, Arushi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110617/a5115ca8/attachment.html>
2010 Feb 12
1
[LLVMdev] [patch] Union Types - work in progress
...tType() == Type::getInt32Ty(Val->getContext()) && > > You're reverting these changes, please don't. There are a couple instances > of this. > Didn't mean to :) Hope that the train hasn't moved too far while I was editing this. > > +void ConstantUnion::replaceUsesOfWithOnConstant(Value *From, Value *To, > + Use *U) { > + assert(false && "Implement replaceUsesOfWithOnConstant for unions"); > +} > + > > Still not implemented? > > Not in this patch - as you say, it's too large alr...
2010 Feb 10
0
[LLVMdev] [patch] Union Types - work in progress
...;implicitly converted". Constants.cpp: - assert(Idx->getType()->isInteger(32) && + assert(Idx->getType() == Type::getInt32Ty(Val->getContext()) && You're reverting these changes, please don't. There are a couple instances of this. +void ConstantUnion::replaceUsesOfWithOnConstant(Value *From, Value *To, + Use *U) { + assert(false && "Implement replaceUsesOfWithOnConstant for unions"); +} + Still not implemented? +UnionType *UnionType::get(const Type *type, ...) { + va_list ap; + std::vector<const l...
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...return false; >> // Check the elements to make sure they are all integers, not constant >> // expressions. >> >> You have a couple of these things which revert a recent patch, please >> don't :) >> >> >> Funky indentation in ConstantUnion::replaceUsesOfWithOnConstant and >> implementation missing :) >> >> In UnionValType methods, please use "UT" instead of "ST" as an acronym. >> >> +bool UnionType::isValidElementType(const Type *ElemTy) { >> + return ElemTy->getTypeID() != VoidTyID && ElemTy...
2004 Oct 12
1
[LLVMdev] Re: Hide visible string in variable (Chris Lattner)
...ments of the original > string, but modified according to the function you want (exclusive or > is a reasonable start). As you said, how could construct a new ConstantArray? Is it like Constant *pC = new Constant(SBtype); // Constant(const Type *Ty) for ConstantArray, replaceUsesOfWithOnConstant(Value *From, Value *To, bool DisableChecking = false); this API replaceUsesOfWithOnConstant seems to be able to do what I want, but how could create/construct a new Value with my owner value? for 3,4,5, those should work well. I would really appr...
2015 Jul 29
0
[LLVMdev] Error when i am using command make -j4 command in cygwin to compile safecode
...alloc/lib/PoolAllocate/PoolAllocate.cpp: > In member function ‘virtual bool > llvm::PoolAllocate::runOnModule(llvm::Module&)’: > /home/NIKHILREDDY/WORK/LLVM_SRC/projects/poolalloc/lib/PoolAllocate/PoolAllocate.cpp:403:16: > error: ‘class llvm::Constant’ has no member named > ‘replaceUsesOfWithOnConstant’ > C->replaceUsesOfWithOnConstant(F, CEnew, > ReplaceWorklist[index]); > ^ > llvm[4]: Compiling PoolOptimize.cpp for Release+Asserts build > llvm[4]: Compiling RunTimeAssociate.cpp for Release+Asserts build > /usr/bin/rm: cannot remove > ‘/h...
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...e()->getElementType() != Type::getInt8Ty(getContext())) return false; // Check the elements to make sure they are all integers, not constant // expressions. You have a couple of these things which revert a recent patch, please don't :) Funky indentation in ConstantUnion::replaceUsesOfWithOnConstant and implementation missing :) In UnionValType methods, please use "UT" instead of "ST" as an acronym. +bool UnionType::isValidElementType(const Type *ElemTy) { + return ElemTy->getTypeID() != VoidTyID && ElemTy->getTypeID() != LabelTyID && +...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...::getInt8Ty(getContext())) > return false; > // Check the elements to make sure they are all integers, not constant > // expressions. > > You have a couple of these things which revert a recent patch, please don't > :) > > > Funky indentation in ConstantUnion::replaceUsesOfWithOnConstant and > implementation missing :) > > In UnionValType methods, please use "UT" instead of "ST" as an acronym. > > +bool UnionType::isValidElementType(const Type *ElemTy) { > + return ElemTy->getTypeID() != VoidTyID && ElemTy->getTypeID() != >...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...::getInt8Ty(getContext())) > return false; > // Check the elements to make sure they are all integers, not constant > // expressions. > > You have a couple of these things which revert a recent patch, please don't > :) > > > Funky indentation in ConstantUnion::replaceUsesOfWithOnConstant and > implementation missing :) > > In UnionValType methods, please use "UT" instead of "ST" as an acronym. > > +bool UnionType::isValidElementType(const Type *ElemTy) { > + return ElemTy->getTypeID() != VoidTyID && ElemTy->getTypeID() != >...
2010 Jan 16
0
[LLVMdev] [patch] Union Types - work in progress
OK here's the patch for real this time :) On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test "union.ll" > does not work, so you probably don't want to check this in as is. However, > I'd be interested in any feedback you're willing to give. > > -- > -- Talin
2011 Oct 21
0
[LLVMdev] Replacing uses within a function
On 10/21/11 11:15 AM, Carlos Sánchez de La Lama wrote: > Hi all, > > I am trying to replace all uses of a value1 *inside of a given function* > to use value2. My strategy was to iterate all the basic blocks, again > iterating all the instructions in each basic block, and using > replaceUsesOfWith(value1, value2) for every instruction. > > This used to work all right, but
2010 Jan 16
2
[LLVMdev] [patch] Union Types - work in progress
Here's a work in progress of the union patch. Note that the test "union.ll" does not work, so you probably don't want to check this in as is. However, I'd be interested in any feedback you're willing to give. -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Oct 21
2
[LLVMdev] Replacing uses within a function
Hi all, I am trying to replace all uses of a value1 *inside of a given function* to use value2. My strategy was to iterate all the basic blocks, again iterating all the instructions in each basic block, and using replaceUsesOfWith(value1, value2) for every instruction. This used to work all right, but now I am finding some problems. There are instructions like this: store i32 0, i32*
2014 May 23
3
[LLVMdev] Changing the design of GlobalAliases to represent what is actually possible in object files.
...about working with a module that > lacks data layout. But in here RAUW is seeing the actual replacement. It is seeing the GlobalObject that is directly used by a GlobalAlias being replaced with an expression. If the alias points to a Constant, it is seeing the result of a perfectly valid run of replaceUsesOfWithOnConstant which may or may not be a valid aliasee. Cheers, Rafael
2008 Nov 06
4
[LLVMdev] Available code-generation parallelism
On Mon, 2008-11-03 at 23:59 -0800, Chris Lattner wrote: > On Nov 3, 2008, at 3:55 PM, heisenbug wrote: > > What about "inventing" pseudo-constants (which point to the right > > thing) and build the piece of IR with them. When done, grab mutex and > > RAUW it in. Alternatively, submit to a privileged thread that performs > > the RAUW. > > The trick is to
2014 May 23
2
[LLVMdev] Changing the design of GlobalAliases to represent what is actually possible in object files.
Bringing the discussion to llvmdev. For the purposed of this discussion, object files can be thought as having just a few thing we care about: data, labels and relocations. Data is what at llvm ir would be just the contents of variables or functions. Relocations are utilities to compute the data at link time when it is not possible to do so earlier. For example, to compute a pcrel relocation we