Displaying 20 results from an estimated 7000 matches similar to: "Type unmatched after replacing functions"
2019 Sep 19
2
Type unmatched after replacing functions
On Thu, Sep 19, 2019 at 4:34 PM Tim Northover <t.p.northover at gmail.com> wrote:
>
> Hi Will,
>
> On Thu, 19 Sep 2019 at 09:21, Will Lester via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > The function pointers are often put in the initializers of global variables, and
> > they can not be simply replaced by a bitcast ConstantExpr since setOperand()
2020 Mar 21
3
Multi-Threading Compilers
> On Mar 20, 2020, at 12:34 PM, Nicholas Krause <xerofoify at gmail.com> wrote:
>
>>
>> The problem isn’t constants or functions themselves, it is that they are instances of llvm::Value. Everything that walks a use/def list would have to run code that checks for this, and every call to inst->setOperand() would have to do locking or conditional locking. This would be
2008 Jun 17
0
[LLVMdev] Transforming ConstantExprs to Instructions
On Tue, Jun 17, 2008 at 8:50 AM, Matthijs Kooijman <matthijs at stdin.nl> wrote:
> Hi,
>
> I've been struggling with constantexprs for a bit. I'm working on a pass that
> transforms global variables to local variables, and in particular the
> GetElementPtrConstantExpr is a bit troublesome. For my transformation to
> properly work, a global value should only be used
2015 Mar 18
5
[LLVMdev] casting Constant * to value *?
John, you are right.
I 'browsed' the doxygen's inheritance diagram.
Shouldn't I then be able to cast Constant * to Value*?
Plugging the retrieved Constant* (from ConstantExpr::getGetElementPtr)
into Instruction->setOperand compiles, but gives me an assertion failure at
runtime.
I have no access to the code at the moment. I will gather more information
possibly tomorrow.
2017 Aug 17
2
Inst->replaceAllUsesWith and uses in ConstantExpr
Whoops, sorry, I meant "value->replaceAllUsesWith".
Should I create a new post with an updated title?
Thanks
Siddharth
On Thu 17 Aug, 2017, 01:05 Tim Northover <t.p.northover at gmail.com> wrote:
> On 16 August 2017 at 15:39, (IIIT) Siddharth Bhat via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > From what I have observed, using
2020 Mar 25
4
Multi-Threading Compilers
On Wed, Mar 25, 2020 at 8:52 AM Doerfert, Johannes <jdoerfert at anl.gov> wrote:
> I think the solution space for the value/use-list issue might be larger
> than what was mentioned so far.
>
>
> Some random thoughts:
>
> If no pass ever walks the use list of a constant, except globals which
> we could handle differently, we could get rid of their use-list or
>
2008 Jun 17
4
[LLVMdev] Transforming ConstantExprs to Instructions
Hi,
I've been struggling with constantexprs for a bit. I'm working on a pass that
transforms global variables to local variables, and in particular the
GetElementPtrConstantExpr is a bit troublesome. For my transformation to
properly work, a global value should only be used by Instructions, not by
ConstantExprs.
I was thinking to add a ConstantExpr::replaceWithInstr() virtual method,
2017 Aug 17
3
Inst->replaceAllUsesWith and uses in ConstantExpr
I see. Is there a pre-existing way to do this in LLVM?
Cheers,
~Siddharth.
On Thu, 17 Aug 2017 at 02:12 Craig Topper <craig.topper at gmail.com> wrote:
> ConstantExprs are immutable, they can't be changed once they are created.
> And a ConstantExpr can reference other ConstantExprs. So replacing all uses
> of a Value in a ConstantExpr would require creating a new immutable
2017 Aug 16
2
Inst->replaceAllUsesWith and uses in ConstantExpr
Hello all,
>From what I have observed, using `Inst->replaceAllUsesWith` does not
replace uses of the `Inst` in `ConstantExpr`s. Is there some way to have a
universal replaceAllUsesWith?
Thanks,
~Siddharth.
--
Sending this from my phone, please excuse any typos!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2015 Mar 17
2
[LLVMdev] casting Constant * to value *?
Hi all,
extracting datafields of globals, the API code ends up in a Constant *
Constant* const_ptr_103 = ConstantExpr::getGetElementPtr(gvar_struct_foo,
const_ptr_103_indices);
it can be used to initialize e.g. a new instruction like:
StoreInst* void_119 = new StoreInst(const_float_102, const_ptr_103, false,
label_entry_113);
But how about replacing the operand of an already existing
2011 Oct 14
0
[LLVMdev] BasicBlock succ iterator
Hi
I have checked all blocks, each block have a Terminator instruction and each
blocks belongs to a function.
I'm really confused. I guess the problem is caused by the removal of the
Loop,The code is as follows:
* //every block to header (except the ones in the loop), will now
redirect to newblock
for (pred_iterator PI = pred_begin(header); PI != pred_end(header);
++PI) {
2020 Feb 13
3
setOperands(int, Value*)
Hello,
I am trying to reset the operands of instructions. What I am doing is, I am
finding all Uses of a specific operand in an Instruction and resetting it
with a new value using "setOperands(int, Value*)". I am doing as:
for (auto vmitr=vm.begin(), vsitr=vs.begin(); vmitr!=vm.end() &&
vsitr!=vs.end(); vmitr++, vsitr++){
// I have two *Value ( operands)
for ( auto myitr
2015 May 17
2
[LLVMdev] copy value of a global's data field to another global
Hi all,
I can get access to the data stored in globals as follows:
GlobalVariable* pGvarAct=_set_a_valid_global_;
const_ptr_indicesVec=_the_indexes_
llvm::Constant* pConst;
pConst=ConstantExpr::getGetElementPtr(pGvarAct, const_ptr_indicesVec);
and e.g. use this to repalece an argumrnt of an instruction like:
I->setOperand(someArgumentIndex,pConst);
However, getGetElementPtr returns a
2019 Jan 14
3
Function - replaceAllUsesWith
Hello LLVM-World,
currently I play around with a "llvm::Module" and an external function defined there "puts". Normally this function gets resolved in the JIT-Process but I wonder about two things:
1. Can I resolve the function already in this step? I used "replaceAllUsesWith" and passed a "llvm::ConstantInt" to the function. But this didn't
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
I now understand that IndVarSimplify.cpp is capable of reproducing array
references when the pointer initialization from the array address is found
inside the immediately enclosing loop, such that in the following code:
int A[20000], B[100], Z;
int main()
{
int i, j, *a, *b;
for ( a = &A[0], i = 0; i != 200; i++ )
for ( b = &B[0], j = 0; j != 100; j++
2013 Aug 02
1
[LLVMdev] replacing GetElementPtrConstantExpr with GetElementPtrInst ... sometimes
Hi
During a pass, the XCore target lowers thread local global variables by turning them into global variable arrays indexed by the (max 8) thread ID.
(see XCoreLowerThreadLocal.cpp)
This works fine for instructions e.g. GetElementPtrInst
But can't be done for constants e.g. GetElementPtrConstantExpr
Thus I would like to replace GetElementPtrConstantExpr with GetElementPtrInst when it is
2013 Jan 08
0
[LLVMdev] get ref to parent instruction
On Tue, Jan 8, 2013 at 3:06 PM, Eduardo <erocha.ssa at gmail.com> wrote:
> Hi all,
>
> How can I get a reference to an instruction if I have a reference to
> an operand? For example, let suppose I have a reference to the
> ConstantExpr "getelementptr inbounds" in the following instruction:
>
> %4 = getelementptr i32* getelementptr inbounds ([8 x i32]*
>
2019 Jan 15
2
Function - replaceAllUsesWith
On Mon, Jan 14, 2019 at 3:21 AM Gaier, Bjoern via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hello LLVM-World,
currently I play around with a „llvm::Module” and an external function defined there “puts”. Normally this function gets resolved in the JIT-Process but I wonder about two things:
1. Can I resolve the function already in this step? I
2012 Sep 29
2
[LLVMdev] [pocl-devel] [cfe-dev] SPIR provisional specification is now available in the Khronos website
On Sep 28, 2012, at 9:45 AM, James Molloy <james at jamesmolloy.co.uk> wrote:
> You can easily simplify this problem with a restriction in SPIR: disallow ConstantExpr casts - no ptrtoint constant expression. Because GlobalVariables have pointer type, if you disallow converting their type to non-pointer type in a constantexpr, the number of constantexpr subclasses you have to deal with is
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*