I'm using a library (the llvm-general haskell library, if it matters)
that uses the PassManagerBuilder interface to build a PassManger given
an optimization level, etc. I've extended this to make it possible to
set the PassManagerBuilder's LibraryInfo member, and as a test I created
a TargetLibraryInfo where LibFunc::malloc was set to "GC_malloc_atomic"
(the allocator for boehm-gc). I've verified that, just before building
the PassManager, pmb->LibraryInfo->getName(LibFunc::malloc) does indeed
return "GC_malloc", yet when I use the PassManager on a module with a
call to GC_malloc whose return value isn't used the call is not
optimized away, while it is when I replace that GC_malloc call with a
call to malloc. Am I misunderstanding the point of LibraryInfo here, or
is something not working correctly? I am using llvm-3.4.