similar to: [LLVMdev] XOR optimization

Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] XOR optimization"

2011 Jul 26
2
[LLVMdev] XOR Optimization
Hi Daniel, > Hi folks, > > I couldn't find a specific XOR (OR and AND) optimization on llvm, and > therefore I am about to implement it. > But first I would like to check with you guys that it really does not exist. > > For a simple loop like this: > > nbits = 128; > bit_addr = 0; > while(nbits--) > { > bindex=bit_addr>>5; /* Index is
2011 Jul 26
0
[LLVMdev] XOR optimization
Den 26.07.2011 03:25, skrev Daniel Nicácio: > - Do you know why a OR instruction is used for increments? instead of > using a INC or ADD? You mean "bit_addr++;" ? It's add'ing (+4 due to loop unrolling i guess) %inc.3 = add i32 %0, 4
2011 Jul 26
0
[LLVMdev] XOR Optimization
Hi, On Tue, Jul 26, 2011 at 11:32 AM, Matt Johnson <johnso87 at crhc.illinois.edu>wrote: > Hi Daniel, > > > Hi folks, > > > > I couldn't find a specific XOR (OR and AND) optimization on llvm, and > > therefore I am about to implement it. > > But first I would like to check with you guys that it really does not > exist. > > > > For a
2011 Jul 27
2
[LLVMdev] XOR Optimization
After a few more tests, I found out that if we set -unroll-threshold to a value large enough, and run "opt -std-compile-opts" or "opt -O3" 3 times, the unroll will be able to unroll the original loop 32 times, and when you have it unrolled for at least 32 times a optimization is triggered, folding it to a single "%xor.3.3.1 = xor i32 %tmp6, -1" (dont know why it does
2011 Jul 26
0
[LLVMdev] XOR Optimization
Hi Duncan, when I run "opt -std-compile-opts" on the original source code it has the same output of O3. when I run "opt -std-compile-opts" on the -O3 optimized code, things get even more weird, it outputs the following code: while.body: ; preds = %while.body, %entry %indvar = phi i32 [ 0, %entry ], [ %indvar.next.3, %while.body ] %tmp
2011 Jul 28
1
[LLVMdev] XOR Optimization
Hey guys, I still think there is no optimization doing what I want. When the loop is unrolled 32 times, llvm is able to identify that the loop is working on a whole word, it finds some constants and propagate them, resulting in the folded XOR instruction. However, when the loop operates on some bits of the word, llvm is still not able to fold those XOR, even when the operated bits does not
2011 Jul 26
2
[LLVMdev] XOR Optimization
Hi Daniel, > Precisely. The code generated by unrolling can be folded into a single XOR and > SHL. And even if it was not inside a loop, it can still be optimized. What I > want to know is: is there any optimization supposed to optimize this code, but > for some reason it thinks it is not possible, or there is no optimization for > that situation at all? it could be a phase
2011 Jul 27
0
[LLVMdev] XOR Optimization
2011/7/26 Daniel Nicácio <dnicacios at gmail.com>: > > I also would like to see why the "XOR  A,  -1" is not turned into a NOT, any > Probably because NOT (like NEG) doesn't exist :) <http://llvm.org/docs/LangRef.html#instref> I assume the decision was made that it wasn't worth adding the extra unary instructions when they can easily be handled in codegen
2007 Nov 06
2
index corruption
Hi people Just switched to Dovecot yesterday, and I've already got about five reports of users with duplicate mail in their inbox :-/. Not as bad as lost email, mind you, but pretty annoying still. Checking the server log, it says: postfix/smtpd: disconnect from unknown deliver: msync() failed with index file maildir/dovecot.index: Input/output error unionfs: new lower inode mtime
2003 Aug 05
3
Samba 3 + PDC + LDAP machine accounts
Hiya all, this should hopefully be a simple question. I've noticed that their is a setting: ldap machine suffix Allowing you to put all the machine accounts in a different tree in your ldap directory (which is a definate plus). However, I note, that it is almost impossible to do so. Has anyone done this (eg had machines in ou=Machines,dc=domain,dc=com and people in ou=People,dc=domain,dc=com)?
2010 Jul 07
0
[LLVMdev] ConstantFold 'undef xor undef'
On Jul 6, 2010, at 3:37 PM, Jianzhou Zhao wrote: > Which semantics is better? I guess both are fine because if we assume > these two def's are same, then it is 0 as > 'ConstantFoldBinaryInstruction', while if we assume they are different > then it is equal to undef. But the second case seems to include the > first one. If we let undef xor undef to be undef, later we can
2010 Jul 07
0
[LLVMdev] ConstantFold 'undef xor undef'
On Wed, Jul 7, 2010 at 11:38 AM, Chris Lattner <clattner at apple.com> wrote: > > On Jul 7, 2010, at 5:47 AM, Jianzhou Zhao wrote: > >>> >>> Does this also apply to two different variables? say >>>   int z x y; >>>   z = x ^ y; >>> If ConstantFoldBinaryInstruction also folds x ^ y into z, should this >>> pass (which uses
2011 Jul 21
1
[LLVMdev] How to XOR return address
Hi all, How to XOR the return address on the stack with a canary word both are 32 bits? Is there a method to implement it? Thank you. Ying -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
2011 Jul 26
0
[LLVMdev] XOR Optimization
"The fact that the loop is unrolled explains why the XORs, SHLs, and ORs are not folded into 1." I dont see why the unrolling explains it. "I think he is trying to say this expression generated by unrolling by a factor of 4 can indeed be folded into a single XOR, SHL and OR. " Precisely. The code generated by unrolling can be folded into a single XOR and SHL. And even if it
2013 Apr 14
0
[LLVMdev] SimplifyDemandedUseBits vs (and (xor %V, -1), 4096)
SimplifyDemandedUseBits in part because of the following comment: // FIXME: for XOR, we prefer to force bits to 1 if they will make a -1. will transform %neg = xor i32 %V, -1 %and = and i32 %not, 4096 into %and = and i32 %V, 4096 %xor = xor i32 %and, 4096 which would generate worse code for platforms that have a negate instruction vs. encoding the immediate in the xor. What should happen to
2016 Apr 04
2
XOR CommandLine arguments
With the CommandLine library, is there a way to specify that one of two options must be present? I have two parameters, -if and -od. I want an error if neither is present or if both are present. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160404/dbae63e0/attachment.html>
2010 Jul 07
2
[LLVMdev] ConstantFold 'undef xor undef'
On Jul 7, 2010, at 5:47 AM, Jianzhou Zhao wrote: >> >> Does this also apply to two different variables? say >> int z x y; >> z = x ^ y; >> If ConstantFoldBinaryInstruction also folds x ^ y into z, should this >> pass (which uses ConstantFold) also initialize x and y with a same >> initial value? Otherwise at runtime z may not be 0. > > I guess
2010 Jul 07
0
[LLVMdev] ConstantFold 'undef xor undef'
On Tue, Jul 6, 2010 at 10:07 PM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote: > On Tue, Jul 6, 2010 at 8:34 PM, Chris Lattner <clattner at apple.com> wrote: >> >> On Jul 6, 2010, at 3:37 PM, Jianzhou Zhao wrote: >> >>> Which semantics is better? I guess both are fine because if we assume >>> these two def's are same, then it is 0 as
2011 Jul 26
2
[LLVMdev] XOR Optimization
Hi- > I haven't seen a machine in which OR is faster than ADD nor more energy-efficient. They're all done by the same ALU circuitry which delays the pipeline by its worstcase path timing. So, for modern processor hardware purposes, OR is exactly equal ADD. Transforming ADD to OR isn't strenght reduction at all. Maybe this is benefical only if you have a backend generating circuitry
2012 Oct 22
2
bitwise XOR of Matrix
Hi, I would like to xor (bitwise) two matrices filled with binary values (0,1). The result of such XOR is expected to be 0,1. But apparently neither of xor nor bitXor is working in this case. I got ": binary operation on non-conformable arrays" error message when I used xor (M1,M2) . The problem with bitXor(M1,M2) is that it just truncates the result into a vector rather than a