[LLVMdev] Constant Propagation Problem

Morten Ofstad morten at hue.no
Wed Jan 19 06:44:14 PST 2005


Hello,

I have some code which I was hoping the LLVM optimization passes would 
get rid of for me, but no such luck -- all the code does is store four 
float 0.f to memory, load four other floats from memory, load back the 
first four floats, multiply them together (here we should have always 
get 0) and finally store them back to memory. Any ideas why this isn't 
picked up by the constant propagation?

m.

PS. I'm running the following passes (which is certainly overkill, I 
based it partly on the llvm-ld Optimize.cpp and added all the 
optimizations I could find which run on Functions, I don't need the IP 
optimizers):

LowerPackedPass
CFGSimplificationPass
PromoteMemoryToRegister
InstructionCombiningPass
CFGSimplificationPass
RaisePointerReferencesPass
TailDuplicationPass
CFGSimplificationPass
ScalarReplAggregatesPass
InstructionCombiningPass
ReassociatePass
InstructionCombiningPass
TailCallEliminationPass
CFGSimplificationPass
LICMPass
InstructionCombiningPass
IndVarSimplifyPass
LoopUnrollPass
InstructionCombiningPass
GCSEPass
SCCPPass
InstructionCombiningPass
DeadStoreEliminationPass
AggressiveDCEPass
CFGSimplificationPass

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: optimizeme.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050119/1336c23d/attachment.txt>


More information about the llvm-dev mailing list