string constant propagation

I'm wondering what is the best way to handle constant propagation for complex types in LLVM. For example, my language needs to be able to simplify expressions involving strings by precomputing (in my own constant propagation pass) various external function calls. Here's an example program: