Displaying 14 results from an estimated 14 matches for "use_back".
2013 Oct 24
2
[LLVMdev] LLVM use chains
...b) p m_CurTransaction->getModule()->dump()
llvm::AssemblyWriter::printGlobal (this=0x7fff5fbfe850, GV=0x107274058)
at
/Users/vvassilev/workspace/root/interpreter/llvm/src/lib/IR/AsmWriter.cpp:1444
1444 if (GV->isMaterializable())
(gdb) p GV->use_empty()
$78 = false
(gdb) p GV->use_back()
$79 = (class llvm::User *) 0x107279b88
(gdb) p GV->use_back()->dump()
i8* getelementptr inbounds ([21 x i8]* @.str1, i32 0, i32 0)
$80 = void
(gdb) p (('llvm::Instruction'*)GV->use_back())
$81 = ('llvm::Instruction' *) 0x107279b88
(gdb) p (('llvm::Instruction'*)GV...
2013 Oct 24
0
[LLVMdev] LLVM use chains
...tModule()->dump()
> llvm::AssemblyWriter::printGlobal (this=0x7fff5fbfe850, GV=0x107274058) at
> /Users/vvassilev/workspace/root/interpreter/llvm/src/lib/IR/AsmWriter.cpp:1444
> 1444 if (GV->isMaterializable())
> (gdb) p GV->use_empty()
> $78 = false
> (gdb) p GV->use_back()
> $79 = (class llvm::User *) 0x107279b88
> (gdb) p GV->use_back()->dump()
> i8* getelementptr inbounds ([21 x i8]* @.str1, i32 0, i32 0)
> $80 = void
> (gdb) p (('llvm::Instruction'*)GV->use_back())
> $81 = ('llvm::Instruction' *) 0x107279b88
> (gdb)...
2013 Oct 24
2
[LLVMdev] LLVM use chains
...;> llvm::AssemblyWriter::printGlobal (this=0x7fff5fbfe850, GV=0x107274058) at
>> /Users/vvassilev/workspace/root/interpreter/llvm/src/lib/IR/AsmWriter.cpp:1444
>> 1444 if (GV->isMaterializable())
>> (gdb) p GV->use_empty()
>> $78 = false
>> (gdb) p GV->use_back()
>> $79 = (class llvm::User *) 0x107279b88
>> (gdb) p GV->use_back()->dump()
>> i8* getelementptr inbounds ([21 x i8]* @.str1, i32 0, i32 0)
>> $80 = void
>> (gdb) p (('llvm::Instruction'*)GV->use_back())
>> $81 = ('llvm::Instruction' *)...
2004 Nov 19
1
[LLVMdev] Loop unroll : approximate loop size for loops with debug info?
.../ADT/Statistic.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/IntrinsicInst.h"
#include <cstdio>
#include <set>
#include <algorithm>
@@ -86,6 +87,11 @@
// Ignore PHI nodes in the header.
} else if (I->hasOneUse() && I->use_back() == Term) {
// Ignore instructions only used by the loop terminator.
+ } else if (DbgStopPointInst *SPI = dyn_cast<DbgStopPointInst>(I)) {
+ // Ignore debug stop point instructions.
+
+ // TODO: Ignore other debug instructions once they are defined
+...
2009 Sep 02
2
[LLVMdev] [PATCH] PR2218
...Operand();
> + else if (Repl != SI->getPointerOperand())
> + return false;
> +
> + } else
> + return false;
> + }
>
> Please do something like this:
>
> if (!L->hasOneUse()) return false;
> StoreInst *StoreOfLoad = dyn_cast<StoreInst>(L->use_back());
> if (StoreOfLoad == 0 || ...)
> ...
>
>
> Actually, I see now that the code actually allows multiple stores as
> long as they are to the same pointer. That also seems reasonable to
> me, but please update the comment above the loop to make it really
> clear what...
2009 Aug 07
0
[LLVMdev] [PATCH] PR2218
...false;
+
+ if (!Repl)
+ Repl = SI->getPointerOperand();
+ else if (Repl != SI->getPointerOperand())
+ return false;
+
+ } else
+ return false;
+ }
Please do something like this:
if (!L->hasOneUse()) return false;
StoreInst *StoreOfLoad = dyn_cast<StoreInst>(L->use_back());
if (StoreOfLoad == 0 || ...)
...
Actually, I see now that the code actually allows multiple stores as
long as they are to the same pointer. That also seems reasonable to
me, but please update the comment above the loop to make it really
clear what it is doing. It is probably also reas...
2009 Sep 02
0
[LLVMdev] [PATCH] PR2218
...1 for both sizes.
Please put a comment above the call to AA.alias explaining why you
require mustalias here.
+ // Look for a replacement for our pointer. If more than one found,
exit.
+ if (!L->hasOneUse())
+ return false;
+ StoreInst *StoreOfLoad = dyn_cast<StoreInst>(L->use_back());
+ if (!StoreOfLoad)
+ return false;
Please do these check before the MemDep query, they are very cheap and
will make the optimization run faster (by avoiding queries).
I'm pretty sure that there is still a legality check missing here.
Your code will transform this:
%tempor...
2009 Jul 25
2
[LLVMdev] [PATCH] PR2218
Hello,
Sorry for my stupid mistakes. I hope that everything is fine now. This
patch fixes PR2218. There are no loads in example, however
"instcombine" changes memcpy() into store/load.
Regards,
Jakub Staszak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr2218-2.patch
Type: application/octet-stream
Size: 6525 bytes
Desc: not available
URL:
2014 Aug 09
0
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
...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 = GV->use_back();
u->replaceUsesOfWith(GV, GEP);
}
assert(GV->use_empty());
===========================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140809/facdf50d/attachment.html>
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
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
...of the old arguments with the new arguments.
for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(), NI =
NF->arg_begin();
I != E; ++I, ++NI) {
I->replaceAllUsesWith(NI);
}
#if 1
// Replace all callers
while ( !F.use_empty() ) {
CallSite CS(F.use_back());
Instruction *Call = CS.getInstruction();
// Function *CallingF = Call->getParent()->getParent();
// Get the global struct in our caller.
//Value* CallerGlobals = ModifyFunctionRecursive(CallingF).first;
Value* CallerGlobals = NULL; // <- This sho...
2009 Sep 02
1
[LLVMdev] [PATCH] PR2218
...ove the call to AA.alias explaining why you
> require mustalias here.
>
>
>
> + // Look for a replacement for our pointer. If more than one
> found, exit.
> + if (!L->hasOneUse())
> + return false;
> + StoreInst *StoreOfLoad = dyn_cast<StoreInst>(L->use_back());
> + if (!StoreOfLoad)
> + return false;
>
> Please do these check before the MemDep query, they are very cheap
> and will make the optimization run faster (by avoiding queries).
>
>
>
> I'm pretty sure that there is still a legality check missing here.
&g...
2011 Sep 16
0
[LLVMdev] How to duplicate a function?
...of the old arguments with the new arguments.
for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(), NI =
NF->arg_begin();
I != E; ++I, ++NI) {
I->replaceAllUsesWith(NI);
}
#if 1
// Replace all callers
while ( !F.use_empty() ) {
CallSite CS(F.use_back());
Instruction *Call = CS.getInstruction();
// Function *CallingF = Call->getParent()->getParent();
// Get the global struct in our caller.
//Value* CallerGlobals = ModifyFunctionRecursive(CallingF).first;
Value* CallerGlobals = NULL; // <- This sho...
2008 Sep 13
3
[LLVMdev] Duplicate Function with duplicated Arguments
I'm now writing a pass and I wanna ask a question about how to
duplicate the function and add duplicated arguments in llvm, for
example:
func(int a, char *b) -> func(int a, char *b, int a1, char *b1)
I'm now stuck at using "getOrInsertFunction" and how to handle
"getArgumentList", please share your opinion, thanks a lot!
James