Commit Graph

6 Commits

Author SHA1 Message Date
Torok Edwin
529bd53411 processStore may delete the instruction, avoid
using dyn_cast<> on already freed memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 08:51:25 +00:00
Owen Anderson
02e9988020 Revert r50441. The original code was correct. Add some more comments so that I don't make the same mistake in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50446 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-29 21:51:00 +00:00
Owen Anderson
9dcace3caf Fix a bug in memcpyopt where the memcpy-memcpy transform was never being applied because
we were checking for it in the wrong order.  This caused a miscompilation because the
return slot optimization assumes that the call it is dealing with is NOT a memcpy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50444 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-29 21:26:06 +00:00
Owen Anderson
7b6fafaa8d We should be returning true here since we've changed the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-29 21:02:46 +00:00
Owen Anderson
a8bd65835b Refactor memcpyopt based on Chris' suggestions. Consolidate several functions
and simplify code that was fallout from the separation of memcpyopt and gvn.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 07:45:10 +00:00
Owen Anderson
a723d1e48f Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 08:23:16 +00:00