1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib
Matt Wala 145c25bada [Scalarizer] Fix potential for stale data in Scattered across invocations
Summary:
Scalarizer has two data structures that hold information about changes
to the function, Gathered and Scattered. These are cleared in finish()
at the end of runOnFunction() if finish() detects any changes to the
function.

However, finish() was checking for changes by only checking if
Gathered was non-empty. The function visitStore() only modifies
Scattered without touching Gathered. As a result, Scattered could have
ended up having stale data if Scalarizer only scalarized store
instructions. Since the data in Scattered is used during the execution
of the pass, this introduced dangling pointer errors.

The fix is to check whether both Scattered and Gathered are empty
before deciding what to do in finish(). This also fixes a problem
where the Function can be modified although the pass returns false.

Reviewers: rnk

Subscribers: rnk, srhines, llvm-commits

Differential Revision: http://reviews.llvm.org/D10459

llvm-svn: 243040
2015-07-23 20:53:46 +00:00
..
Analysis [GMR] Switch the function info we store for every function to be a much 2015-07-23 07:50:52 +00:00
AsmParser AsmParser: Add a function to parse a standalone constant value. 2015-07-17 22:07:03 +00:00
Bitcode Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
CodeGen [PeepholeOptimizer] Refactor optimizeUncoalescable logic 2015-07-22 21:30:16 +00:00
DebugInfo Return ErrorOr from getSymbolAddress. 2015-07-03 18:19:00 +00:00
ExecutionEngine Fix -Wextra-semi warnings. 2015-07-22 20:46:11 +00:00
Fuzzer [libFuzzer] dump long running units to disk 2015-07-23 18:37:22 +00:00
IR Fix -Wextra-semi warnings. 2015-07-22 20:46:11 +00:00
IRReader
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
LineEditor
Linker Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LTO LTO: expose LTO_SYMBOL_ALIAS, which indicates that the symbol is an alias. 2015-07-04 03:42:35 +00:00
MC Fix a -Winconsistent-missing-override failure in the .intel_syntax 2015-07-22 11:22:29 +00:00
Object Fix fetching the symbol table of a thin archive. 2015-07-22 19:34:26 +00:00
Option [Option] Plug a leak when move-assigning an InputArgList. 2015-06-23 15:28:10 +00:00
Passes
ProfileData Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Support Remove unnecessary in C++11 c_str() calls 2015-07-23 05:49:29 +00:00
TableGen [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC 2015-07-06 06:23:01 +00:00
Target X86: Use dyn_cast instead of isa+cast, NFC 2015-07-23 19:27:07 +00:00
Transforms [Scalarizer] Fix potential for stale data in Scattered across invocations 2015-07-23 20:53:46 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile