llvm-6502/lib/Analysis/IPA
Chandler Carruth 7d51923226 [PM/AA] Fix *numerous* serious bugs in GlobalsModRef found by
inspection.

While we want to handle calls specially in this code because they should
have been modeled by the call graph analysis that precedes it, we should
*not* be re-implementing the predicates for whether an instruction reads
or writes memory. Those are well defined already. Notably, at least the
following issues seem to be clearly missed before:
- Ordered atomic loads can "write" to memory by causing writes from other
  threads to become visible. Similarly for ordered atomic stores.
- AtomicRMW instructions quite obviously both read and write to memory.
- AtomicCmpXchg instructions also read and write to memory.
- Fences read and write to memory.
- Invokes of intrinsics or memory allocation functions.

I don't have any test cases, and I suspect this has never really come up
in the real world. But there is no reason why it wouldn't, and it makes
the code simpler to do this the right way.

While here, I've tried to make the loops significantly simpler as well
and added helpful comments as to what is going on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242281 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 08:53:29 +00:00
..
CallGraph.cpp [CallGraph] Given -print-callgraph a stable printing order. 2015-06-19 23:20:31 +00:00
CallGraphSCCPass.cpp Delete whitespace at start of line. 2015-07-02 14:17:12 +00:00
CallPrinter.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CMakeLists.txt Remove the unused FindUsedTypes pass. 2014-11-24 20:53:26 +00:00
GlobalsModRef.cpp [PM/AA] Fix *numerous* serious bugs in GlobalsModRef found by 2015-07-15 08:53:29 +00:00
InlineCost.cpp Revert the new EH instructions 2015-07-10 07:15:17 +00:00
IPA.cpp Remove the unused FindUsedTypes pass. 2014-11-24 20:53:26 +00:00
LLVMBuild.txt
Makefile