<span style='font-family:Verdana'><span style='font-size:12px'>Might have to do with GVN's PRE (partial redundancy elimination), which tends to increase code size.<br /><br />H.<p style="margin:0px; padding:0px;" > </p><blockquote style="border-left: 1px solid #CCC; padding-left: 5px; margin-left: 5px; margin-bottom: 0px; margin-top: 0px; margin-right: 0px;" type="cite"><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">----- Original Message -----</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">From: Abhinash Jain</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">Sent: 09/22/13 01:17 AM</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">To: llvmdev@cs.uiuc.edu</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">Subject: [LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?</span></span></p> <div><div><pre style="white-space: pre-wrap; word-wrap: break-word; font-size:11;pre">Below are the 4 cases out of which for the first 3 cases am able to
understand the variation on total number of store inst.
But
when -gvn parameters is passed (in case 4) , why does the total number of
strore Instruction present on the attached file increases (instead of
decrease).
Please explain considering that use of -reg2mem pass is mandatory.
eg.
clang -emit-llvm bzip.c -c -o bzip1.bc
1. opt -load /home/honey/llvm/build/Debug+Asserts/lib/loadInstruction.so
-storeInstruction < bzip1.bc
output :- Total Store Instruction 3115
2. opt -reg2mem -load
/home/honey/llvm/build/Debug+Asserts/lib/loadInstruction.so
-storeInstruction < bzip1.bc
output :- Total Store Instruction 3174
3. opt -dse -dce -reg2mem -load
/home/xxx/llvm/build/Debug+Asserts/lib/loadInstruction.so -storeInstruction
< bzip1.bc
output :- Total Store Instruction 3171
4. opt -gvn -dse -dce -reg2mem -load
/home/xxx/llvm/build/Debug+Asserts/lib/loadInstruction.so -storeInstruction
< bzip1.bc
output :- Total Store Instruction 4489
bzip.c <http://llvm.1065342.n5.nabble.com/file/n61412/bzip.c>
--
View this message in context: http://llvm.1065342.n5.nabble.com/Why-total-number-of-store-instructions-increased-in-case-of-gvn-with-reg2mem-tp61412.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
_______________________________________________
LLVM Developers mailing list
LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</pre></div></div></blockquote><p style="margin:0px; padding:0px;" > </p></span></span>