search for: xorchain

Displaying 3 results from an estimated 3 matches for "xorchain".

Did you mean: dorchain
2011 Jul 28
1
[LLVMdev] XOR Optimization
...am implementing the following optimization for folding XOR instructions working on bits (it still must be extended to OR and AND instructions). Any comments and critics are appreciated. Basically, I try to identify a chain of XOR instructions and fold it. The below image illustrate this: [image: XORChain.png] In order to do that I am adding an additional function call to "visitXor()" in Instruction Combining. My Optimization function is attached as a patch file. (the diff was made using the 2.9 release version of llvm). Thanks Daniel Nicacio -------------- next part -------------- An...
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
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