OSDN Git Service

[PM] Teach SCEV to invalidate itself when its dependencies become
authorChandler Carruth <chandlerc@gmail.com>
Mon, 9 Jan 2017 07:44:34 +0000 (07:44 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 9 Jan 2017 07:44:34 +0000 (07:44 +0000)
commitf7babeb5d8e4d5d3b069fdda72285671fa74a2de
tree62b1ba8f36cff8166cd0d529a339e1b9a4a2b05d
parenta72cf1129dd4856f505e3e97dcfa45dcc3f3ff73
[PM] Teach SCEV to invalidate itself when its dependencies become
invalid.

This fixes use-after-free bugs that will arise with any interesting use
of SCEV.

I've added a dedicated test that works diligently to trigger these kinds
of bugs in the new pass manager and also checks for them explicitly as
well as triggering ASan failures when things go squirly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291426 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/invalidation.ll [new file with mode: 0644]