llvm-6502/lib
Matt Wala 1849093f7b [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().

Reviewers: srhines

Reviewed By: srhines

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239644 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-12 22:49:11 +00:00
..
Analysis Don't create instructions from ConstantExpr's in CFLAliasAnalysis. 2015-06-12 16:13:54 +00:00
AsmParser Fix doxygen comments. NFC 2015-06-07 06:40:24 +00:00
Bitcode Rangify several for loops in ValueEnumerator constructor. 2015-06-12 20:18:20 +00:00
CodeGen [WinEH] Put finally pointers in the handler scope table field 2015-06-11 23:37:18 +00:00
DebugInfo [DWARF] Fix a bug in line info handling 2015-05-31 23:37:04 +00:00
ExecutionEngine [Orc] Fix a bug in the CompileOnDemand layer where stub decls were not cloned 2015-06-12 21:31:15 +00:00
Fuzzer [lib/Fuzzer] make assertions more informative and update comments for the user-supplied mutator 2015-05-30 17:33:13 +00:00
IR Refix a use of explicit pointer types in GEP constant folding 2015-06-12 18:22:03 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LibDriver LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker While in GlobalValue fix the function(s) that don't follow the 2015-05-15 18:20:14 +00:00
LTO Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
MC [WinEH] Create an llvm.x86.seh.exceptioninfo intrinsic 2015-06-11 22:32:23 +00:00
Object Object: Prepend __imp_ when mangling a dllimport symbol in IRObjectFile. 2015-06-11 21:42:18 +00:00
Option Option parsing: properly handle flag aliases for joined options (PR23394) 2015-05-04 18:00:13 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData InstrProf: Fix reading of consecutive 32 bit coverage maps 2015-06-05 01:23:42 +00:00
Support Add 'shave' processor name to Triple 2015-06-12 18:31:38 +00:00
TableGen [TableGen] Change OpInit::getNumOperands and getOperand to use unsigned integers. NFC 2015-06-06 01:34:04 +00:00
Target R600/SI: Add assembler support for FLAT instructions 2015-06-12 20:47:06 +00:00
Transforms [Scalarizer] Fix potential for stale data in Scattered across invocations 2015-06-12 22:49:11 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00