diff options
| author | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-03-30 02:15:01 +0000 |
|---|---|---|
| committer | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-03-30 02:15:01 +0000 |
| commit | 7b0c94e2070d9548c504b9a01b9b45fddfdaddb4 (patch) | |
| tree | fe71df92518c794a03ef77c81f615f319cd80ccd /llvm/lib/MC/MCDisassembler | |
| parent | b3c1847b30d4ef9faba3366e2e405139f9ce8723 (diff) | |
| download | bcm5719-llvm-7b0c94e2070d9548c504b9a01b9b45fddfdaddb4.tar.gz bcm5719-llvm-7b0c94e2070d9548c504b9a01b9b45fddfdaddb4.zip | |
Implement XOR reassociation. It is based on following rules:
rule 1: (x | c1) ^ c2 => (x & ~c1) ^ (c1^c2),
only useful when c1=c2
rule 2: (x & c1) ^ (x & c2) = (x & (c1^c2))
rule 3: (x | c1) ^ (x | c2) = (x & c3) ^ c3 where c3 = c1 ^ c2
rule 4: (x | c1) ^ (x & c2) => (x & c3) ^ c1, where c3 = ~c1 ^ c2
It reduces an application's size (in terms of # of instructions) by 8.9%.
Reviwed by Pete Cooper. Thanks a lot!
rdar://13212115
llvm-svn: 178409
Diffstat (limited to 'llvm/lib/MC/MCDisassembler')
0 files changed, 0 insertions, 0 deletions

