leaningtech/duetto-llvm — pull request #8 by sbabbi (2014-05-22 10:33:12+00:00)
Title: Refactoring an some optimizations.

Effective changes:
- ReplaceNopCast pass, replace all the nop casts with bitcasts. Should be added early in the optimization process (edit duetto/clang accordingly). It actually crashes the compiler in some dom-releated test cases if added earlier (it is ok if added after AllocaMerging).
- The no-wrapping-array optimization is now applied more often, we got rid of the POINTER_IS_NOT_UNIQUE_OWNER flag and instead we look for storeinst in the alias of a pointer.
- isValidTypeCast now ignores the uses of *all* the casts instruction, not only the user-supplied one (which is removed from the list of arguments)

Refactoring:
- TypeSupport class includes the getBasesInfo and some global functions of Utility.h
- DynamicAllocInfo provides info about a dynamic allocation instruction (malloc, calloc, etc.). Decouple some analysis code from the Writer in order to be used in other passes.