Add a simple pass to make sure that all (non-library) calls to malloc and free

are visible to analysis as intrinsics.  That is, make sure someone doesn't pass
free around by address in some struct (as happens in say 176.gcc).

This doesn't get rid of any indirect calls, just ensure calls to free and malloc
are always direct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth
2006-04-10 19:26:09 +00:00
parent db3c626eb9
commit 3433141a3e
3 changed files with 98 additions and 1 deletions

View File

@@ -169,6 +169,11 @@ ModulePass *createBlockExtractorPass(std::vector<BasicBlock*> &BTNE);
// specific well-known (library) functions.
ModulePass *createSimplifyLibCallsPass();
// createIndMemRemPass - This pass removes potential indirect calls of
// malloc and free
ModulePass *createIndMemRemPass();
} // End llvm namespace
#endif