llvm-project/llvm/unittests
George Burgess IV 1b1fef30d0 [MemorySSA] Fix bugs in walker; refactor unittests a bit.
This patch fixes two somewhat related bugs in MemorySSA's caching
walker. These bugs were found because D19695 brought up the problem
that we'd have defs cached to themselves, which is incorrect.

The bugs this fixes are:

- We would sometimes skip the nearest clobber of a MemoryAccess, because
  we would query our cache for a given potential clobber before
  checking if the potential clobber is the clobber we're looking for.
  The cache entry for the potential clobber would point to the nearest
  clobber *of the potential clobber*, so if that was a cache hit, we'd
  ignore the potential clobber entirely.

- There are times (sometimes in DFS, sometimes in the getClobbering...
  functions) where we would insert cache entries that say a def
  clobbers itself.

There's a bit of common code between the fixes for the bugs, so they
aren't split out into multiple commits.

This patch also adds a few unit tests, and refactors existing tests a
bit to reduce the duplication of setup code.

llvm-svn: 268087
2016-04-29 18:42:55 +00:00
..
ADT Add a CachedHash structure. 2016-04-21 12:16:21 +00:00
Analysis [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
Bitcode Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
CodeGen Remove autoconf support 2016-01-26 21:29:08 +00:00
DebugInfo [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ExecutionEngine [ORC] clang-format code that was touched in r267457. NFC. 2016-04-25 21:21:20 +00:00
IR DebugInfo: Remove MDString-based type references 2016-04-23 21:08:00 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Delete the deprecated LLVMLinkModules. 2016-02-12 15:28:45 +00:00
MC Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
MI Make a stub version of MITests, instead of reverting. 2016-02-18 07:37:17 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
ProfileData Fix some Clang-tidy modernize and Include What You Use warnings. 2016-04-28 18:04:41 +00:00
Support Use gcc's rules for parsing gcc-style response files 2016-04-26 13:53:56 +00:00
Transforms [MemorySSA] Fix bugs in walker; refactor unittests a bit. 2016-04-29 18:42:55 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00