Displaying 20 results from an estimated 1100 matches similar to: "[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?"
2014 Aug 09
3
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
On Sat, Aug 9, 2014 at 6:06 AM, Tim Northover <t.p.northover at gmail.com>
wrote:
> Hi Rob,
>
> On 9 August 2014 02:03, Rob Jansen <jansen at cs.umn.edu> wrote:
> > Why is the first for loop not equivalent to the second?
>
> In the second loop, "*ui" is an llvm::Use object. It's owned by a
> User, but isn't a subclass of one. To match the
2014 Aug 09
1
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
> I think this is incorrect since the use_iterator is defined as:
>
> `typedef value_use_iterator<User> use_iterator;`
>
> and indeed `ui->getUser();` is not a callable function on a User. What am I
> missing?
Ah, looks like this has changed this year. What I said applies to
trunk; you may be right there about 3.4 or earlier (looks plausible
from the key commit).
2014 Aug 09
0
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
Ahh ha! I believe that `User::replaceUsesOfWith` modifies the use list,
which probably invalidated the use_iterator and caused my code to miss some
of the uses. The following works great! (I'll spare you the details about
what I am actually trying to do here, unless you really want to know more.)
Thanks,
Rob
===========================
while(GV->getNumUses() > 0) {
User* u =
2015 May 25
2
[LLVMdev] global variable uses
Hi,
I'm trying to change all uses of a global variable so they'll use a
different global variable.
For instance, I have:
@a = global [100 x [100 x i64]] zeroinitializer, align 16
@b = global [100 x [100 x i64]] zeroinitializer, align 16
And I want to change the use
%arrayidx = getelementptr inbounds [100 x [100 x i64]]* @a, i32 0, i64 %3
to
%arrayidx = getelementptr inbounds
2008 Apr 16
0
[LLVMdev] PATCH: Use size reduction -- wave2
On Apr 16, 2008, at 2:50 AM, heisenbug wrote:
>
> And now here is my educated speculation:
> There are 2 things that became slower
> 1) Use::getUser()
> 2) Use::get/set due to tagging.
>
> The former is seldom called:
>
> $ find lib -name "*.cpp" | xargs grep "getUser(" | wc -l
> 41
The majority of those aren't actually Use::getUser, but
2008 Apr 16
5
[LLVMdev] PATCH: Use size reduction -- wave2
On Apr 16, 2:13 am, Dan Gohman <goh... at apple.com> wrote:
> Hi Gabor,
>
> Can you provide performance data for this? I'd
> like to know what affect these changes have on
> compile time.
Hi Dan,
Unfortunately, no. I can feed you with some speculation, though,
see below.
The reason why I cannot do measurements (at the moment) is that
- I have no experience with
2017 Oct 14
2
Bug in replaceUsesOfWith: does not keep addrspace consistent in GEP
Hello,
Calling `replaceUsesOfWith` with a value in a different addrspace does not
keep the addrspace of a GEP consistent. Is this known? Is this a bug or
expected behaviour?
Minimal counterexample link
<https://gist.github.com/bollu/152ba5e1c20c03c7fc6d8c7b23ba828f>
Reproduced here:
#include <iostream>
#include "llvm/ADT/APFloat.h"
#include
2018 Apr 20
2
Missed strlen optimizations
Use *last = nullptr;
for (Use &U : Src->uses())
last = &U;
last->getUser()->dump();
Or any better solution?
2018-04-20 19:19 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>:
> Is:
>
>
> 2018-04-20 18:07 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>:
>
>> Hello,
>>
>> Code: https://godbolt.org/g/EG4Wi6
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
2015 Jul 27
2
[LLVMdev] a question about pooalloc
Hello, today I download poolalloc from "
https://github.com/llvm-mirror/poolalloc". and I compiled it with LLVM3.3.
Then when I excute "make",I get the error:
AddressTakenAnalysis.cpp:18:30:fatal error:llvm/IR/CallSite.h: No such file
or directory.
I correct the path of callsite.h to "llvm/Support/Callsite.h". there is
another error:
AddressTakenAnalysis.cpp:In
2015 May 18
2
[LLVMdev] copy value of a global's data field to another global
getInitializer returns the complete initializer of the global.
My globals are complex nested structs, from which I want to extract e.g. one
double datafield.
Example:
>From a struct Stuct having double,array(3xint),float fields, I could extract
the second int value using the index sequence 0,1,1 with getGetElementPtr.
This gives me a constantPointer, but I would need to get a constInt...
2005 Apr 07
0
[LLVMdev] arguments to standard library functions
Right now I am trying to capture the function name and the number of
arguments ,
so this following is the pass I wrote .
-------------------------------------------------------------
struct pass06a : public ModulePass {
virtual bool runOnModule(Module &M) {
std::vector<const Type*> pList;
pList.push_back( PointerType::get(Type::SByteTy) );
pList.push_back(
2014 Dec 05
2
errors with GeForce GTX 650 Ti and 3 monitors
There were fixes in 3.17 that were supposed to help this, but
apparently they didn't help enough. See
https://bugs.freedesktop.org/show_bug.cgi?id=72180 -- basically some
sort of card setup failure on our part is causing our ctxsw to die,
but nvidia's appears to be more resilient to the screwups.
On Fri, Dec 5, 2014 at 1:16 PM, Rob Jansen <rob.g.jansen at nrl.navy.mil> wrote:
>
2011 Oct 10
2
[LLVMdev] PHI node operads
Hi all,
I have a pass that duplicates all instructions and keeps a "reference
map" of duplicated values, which is later used to update all the
references, thus creating a whole copy of a previous function. How I was
doing it is calling "replaceUsesOfWith" in all the replicated
instructions.
This used to work on 2.9 and older, in svn it no longer does in the case
of PHI nodes,
2012 Oct 17
24
[zfs] portable zfs send streams (preview webrev)
We have finished a beta version of the feature. A webrev for it
can be found here:
http://cr.illumos.org/~webrev/sensille/fits-send/
It adds a command ''zfs fits-send''. The resulting streams can
currently only be received on btrfs, but more receivers will
follow.
It would be great if anyone interested could give it some testing
and/or review. If there are no objections,
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
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
2015 May 09
4
[LLVMdev] [LSR] hoisting loop invariants in reverse order
Hi,
I was tracking down a performance regression and noticed that
LoopStrengthReduce hoists loop invariants (e.g., the initial formulae of
indvars) in the reverse order of how they appear in the loop.
This reverse order creates troubles for the StraightLineStrengthReduce pass
I recently add. While I understand ultimately SLSR should be able to sort
independent candidates in an optimal order,
2010 Mar 02
9
DO NOT REPLY [Bug 7194] New: Getting --inplace and --sparse to work together
https://bugzilla.samba.org/show_bug.cgi?id=7194
Summary: Getting --inplace and --sparse to work together
Product: rsync
Version: 3.0.7
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P3
Component: core
AssignedTo: wayned at samba.org
ReportedBy: jansen at
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 for