summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/TargetParser.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-07-15 08:53:29 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-07-15 08:53:29 +0000
commit6af95d0a08e8adae4cd46b988680bcf541f1a29c (patch)
treef52027cc4e05d2f4b2d9bc33768a431fafcc06e0 /llvm/lib/Support/TargetParser.cpp
parentb9288601a3ec46c3b645818110038c9910efcc55 (diff)
downloadbcm5719-llvm-6af95d0a08e8adae4cd46b988680bcf541f1a29c.tar.gz
bcm5719-llvm-6af95d0a08e8adae4cd46b988680bcf541f1a29c.zip
[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. llvm-svn: 242281
Diffstat (limited to 'llvm/lib/Support/TargetParser.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud