search for: issameoperationas

Displaying 18 results from an estimated 18 matches for "issameoperationas".

2009 Apr 06
2
[LLVMdev] Patch: MSIL backend global pointers initialization
...declarations. If I have two instructions like those: %1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([16 x i8]* @.str, i32 0, i32 0), i32 %0) nounwind %10 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([11 x i8]* @.str2, i32 0, i32 0), i32 5) nounwind Instruction::isSameOperationAs() returns false for those two. Is it a bug or I misunderstood something? In any case I wrote my custom isSame() operator for this but I'll appreciate any hints. Thanks! Artur
2009 Apr 03
0
[LLVMdev] Patch: MSIL backend global pointers initialization
...ee above. > + //We want each signature just once > + std::vector<Instruction*>::iterator ins = > + std::lower_bound(ivec.begin(), ivec.end(), instr, > + CompareInstructions); > + if(ins!=ivec.end() && instr->isSameOperationAs(*ins)) > continue; Likewise. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
2009 Apr 07
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur > %1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([16 x > i8]* @.str, i32 0, i32 0), i32 %0) nounwind > %10 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([11 x i8]* > @.str2, i32 0, i32 0), i32 5) nounwind > > Instruction::isSameOperationAs() returns false for those two. Is it a > bug or I misunderstood something? These are two different instructions as you might see, thus - no bug :) > In any case I wrote my custom isSame() operator for this but I'll > appreciate any hints. Why do you need this? Won't be enough just...
2011 Mar 07
0
[LLVMdev] matching function call arguments
...ust for the values you want to compare) though, AFAIK there's no public interface for that kind of functionality. A pass like -earlycse or -mergefunc might have something you can factor out though. Other than that, you can probably hack up something with a recursive function using Instruction::isSameOperationAs(), which checks everything except operand values (so you'd need to check equivalence of operands recursively if you want to go more than one instruction deep). You'll probably want to keep a mapping of already-checked equivalences (for performance), and you should definitely be careful not...
2009 Apr 03
6
[LLVMdev] Patch: MSIL backend global pointers initialization
Anton Korobeynikov wrote: > Hi, Artur > > >> I'm working on that backend now, so probably I'll send some more patches >> soon. I'd be grateful if you could give me some suggestions how to add >> some test for that backend to the test-suite. On Linux the output code >> could be run on Mono and compared with outputs for other backends but >>
2011 Mar 07
2
[LLVMdev] matching function call arguments
Hi Reid, Thank you for your response. In my analysis, I will always have entry(2) and exit(2). I will not run into cases involving entry (1+1) or entry (fn return values). I am having trouble trying to compare the arguments of entry and exit in the following scenario. #include<stdio.h> #include<stdlib.h> #include<pthread.h> struct sa { int a; pthread_mutex_t *mutex1;
2009 Apr 07
3
[LLVMdev] Patch: MSIL backend global pointers initialization
...on > %1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([16 x > > i8]* @.str, i32 0, i32 0), i32 %0) nounwind > > %10 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([11 x i8]* > > @.str2, i32 0, i32 0), i32 5) nounwind > > > > Instruction::isSameOperationAs() returns false for those two. Is it a > > bug or I misunderstood something? > These are two different instructions as you might see, thus - no bug :) OK, I just need the same signature for both of those instructions. > > > In any case I wrote my custom isSame() operator for t...
2020 Sep 01
2
[RFC] Framework for Finding and Using Similarity at the IR Level
...types and parameters are considered. Ultimately, if the opcode and types match, then the instructions are considered to be performing the same operation. However, for some instructions like shufflevector, or getelementptr instructions, it is ensured that the parameters match, in keeping with the “isSameOperationAs” instruction method. Each unique instruction via this scheme is mapped to an unsigned integer. Creating the mapping of the entire program to integers treats the program like a string with each integer as a character, and allows the use of data structures such as the Suffix Tree (recently refactor...
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...add(J); > + users.insert(J); > + continue; > + } > + } > + > + // J does not use I, and comes before the first use of I, so it can be > + // merged with I if the instructions are compatible. > + bool isCompat = J->isSameOperationAs(I); > + // FIXME: handle addsub-type operations! > + > + // Only merge two shuffles if they're both constant > + // or both not constant. > + if (isCompat&& isa<ShuffleVectorInst>(I)) { > + isCompat = isa<Constant>(I-&g...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ert(J); > > + continue; > > + } > > + } > > + > > + // J does not use I, and comes before the first use of I, so it can be > > + // merged with I if the instructions are compatible. > > + bool isCompat = J->isSameOperationAs(I); > > + // FIXME: handle addsub-type operations! > > + > > + // Only merge two shuffles if they're both constant > > + // or both not constant. > > + if (isCompat&& isa<ShuffleVectorInst>(I)) { > > + isCom...
2011 Nov 16
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, et al., Attached is the my autovectorization pass. I've fixed a bug that appears when using -bb-vectorize-aligned-only, fixed some 80-col violations, etc., and at least on x86_64, all test cases pass except for a few; and all of these failures look like instruction-selection bugs. For example: MultiSource/Applications/ClamAV - fails to compile shared_sha256.c with an error: error in
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, I've attached the latest version of my autovectorization patch. I was able to add support for using the ScalarEvolution analysis for load/store pairing (thanks for your help!). This led to a modest performance increase and a modest compile-time increase. This version also has a cutoff as you suggested (although the default value is set high (4000 instructions between pairs) because
2011 Dec 02
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...nstsCompatible(Instruction *I, Instruction *J, > + bool IsSimpleLoadStore) { > + AliasAnalysis&AA = getAnalysis<AliasAnalysis>(); AA can become a member of the BBVectorize class and it can be initialized once per basic block. > + bool IsCompat = J->isSameOperationAs(I); > + // FIXME: handle addsub-type operations! > + > + // Loads and stores can be merged if they have different alignments, > + // but are otherwise the same. > + if (!IsCompat&& isa<LoadInst>(I)&& isa<LoadInst>(J)) { > + if (I->...
2011 Dec 14
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...Instruction *J, > > + bool IsSimpleLoadStore) { > > + AliasAnalysis&AA = getAnalysis<AliasAnalysis>(); > AA can become a member of the BBVectorize class and it can be > initialized once per basic block. > > > + bool IsCompat = J->isSameOperationAs(I); > > + // FIXME: handle addsub-type operations! > > + > > + // Loads and stores can be merged if they have different alignments, > > + // but are otherwise the same. > > + if (!IsCompat&& isa<LoadInst>(I)&& isa<LoadInst>(J))...
2011 Nov 23
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 21:22 -0600, Hal Finkel wrote: > On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > > Tobias, > > > > I've attached an updated patch. It contains a few bug fixes and many > > (refactoring and coding-convention) changes inspired by your comments. > > > > I'm currently trying to fix the bug responsible for causing a compile
2011 Dec 02
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...Instruction *J, > > + bool IsSimpleLoadStore) { > > + AliasAnalysis&AA = getAnalysis<AliasAnalysis>(); > AA can become a member of the BBVectorize class and it can be > initialized once per basic block. > > > + bool IsCompat = J->isSameOperationAs(I); > > + // FIXME: handle addsub-type operations! > > + > > + // Loads and stores can be merged if they have different alignments, > > + // but are otherwise the same. > > + if (!IsCompat&& isa<LoadInst>(I)&& isa<LoadInst>(J))...
2011 Nov 22
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > Tobias, > > I've attached an updated patch. It contains a few bug fixes and many > (refactoring and coding-convention) changes inspired by your comments. > > I'm currently trying to fix the bug responsible for causing a compile > failure when compiling >
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
...CXI->getSynchScope() == cast<AtomicCmpXchgInst>(I)->getSynchScope(); if (const AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(this)) return RMWI->getOperation() == cast<AtomicRMWInst>(I)->getOperation() && @@ -388,7 +391,10 @@ bool Instruction::isSameOperationAs(const Instruction *I, FI->getSynchScope() == cast<FenceInst>(I)->getSynchScope(); if (const AtomicCmpXchgInst *CXI = dyn_cast<AtomicCmpXchgInst>(this)) return CXI->isVolatile() == cast<AtomicCmpXchgInst>(I)->isVolatile() && - CXI-&...