[LLVMdev] How to create new local variable
Abhirup Ghosh
abhirupju at gmail.com
Sat Feb 5 06:49:55 PST 2011
Hi,
I want to implement a simple common sub expression pass in
llvm2.8 which demands replacing the uses of the redundant expressions
with a temporary variable. So, to introduce new temporary variable I
have inserted an AllocaInst (...) providing the name of the temporary
and desired type. But whenever I am going to insert a LoadInst for
that variable I am getting segmentation fault. It is telling that
llvm::Value::setName(...) fails and that has something to do with
llvm::ValueSymbolTable::createValueName(...) method. What should I do
to insert the local variable?
Thanks and regards,
Abhirup Ghosh
M. Tech
Department of Computer Science & Engg.
IIT, Bombay
email - abhirupju at gmail.com , abhirup at cse.iitb.ac.in
More information about the llvm-dev
mailing list