[LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?

Henrique Santos hnsantos at gmx.com
Sun Sep 22 06:10:40 PDT 2013


Might have to do with GVN's PRE (partial redundancy elimination), which tends to increase code size.

H.
----- Original Message -----
From: Abhinash Jain
Sent: 09/22/13 01:17 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?

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 I!
 nstruction 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 at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130922/884ae9c4/attachment.html>


More information about the llvm-dev mailing list