llvm-6502/lib
Derek Schuff c22cdb7203 Fix miscompile due to StackColoring incorrectly merging stack slots (PR15707)
IR optimisation passes can result in a basic block that contains:

  llvm.lifetime.start(%buf)
  ...
  llvm.lifetime.end(%buf)
  ...
  llvm.lifetime.start(%buf)

Before this change, calculateLiveIntervals() was ignoring the second
lifetime.start() and was regarding %buf as being dead from the
lifetime.end() through to the end of the basic block.  This can cause
StackColoring to incorrectly merge %buf with another stack slot.

Fix by removing the incorrect Starts[pos].isValid() and
Finishes[pos].isValid() checks.

Just doing:
      Starts[pos] = Indexes->getMBBStartIdx(MBB);
      Finishes[pos] = Indexes->getMBBEndIdx(MBB);
unconditionally would be enough to fix the bug, but it causes some
test failures due to stack slots not being merged when they were
before.  So, in order to keep the existing tests passing, treat LiveIn
and LiveOut separately rather than approximating the live ranges by
merging LiveIn and LiveOut.

This fixes PR15707.
Patch by Mark Seaborn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181922 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 21:15:09 +00:00
..
Analysis Use only explicit bool conversion operators 2013-05-15 07:36:59 +00:00
Archive Fix auto_ptr is deprecated warnings 2013-02-26 21:20:35 +00:00
AsmParser Add ArrayRef constructor from None, and do the cleanups that this constructor enables 2013-05-05 00:40:33 +00:00
Bitcode Micro-optimization: don't shift an entire bitcode record over to get the code. 2013-05-10 22:17:10 +00:00
CodeGen Fix miscompile due to StackColoring incorrectly merging stack slots (PR15707) 2013-05-15 21:15:09 +00:00
DebugInfo libDebugInfo depends on libObject nowadays. 2013-05-09 13:48:26 +00:00
ExecutionEngine SectionMemoryManager shouldn't be a JITMemoryManager. Previously, the 2013-05-14 19:29:00 +00:00
IR Speed up Value::isUsedInBasicBlock() for long use lists. 2013-05-14 23:45:56 +00:00
IRReader Measure time that IR parsing took as part of the -time-passes measurement. 2013-04-03 15:33:45 +00:00
Linker Fix a performance bug in the Linker. 2013-05-04 05:05:18 +00:00
MC Cleanup relocation sorting for ELF. 2013-05-15 18:22:01 +00:00
Object Object: Fix Mach-O relocation printing. 2013-05-14 22:41:29 +00:00
Option Resort the #include lines in include/... and lib/... with the 2013-01-02 10:22:59 +00:00
Support Fix build on Windows 2013-05-15 09:00:30 +00:00
TableGen Allow TableGen DAG arguments to be just a name. 2013-03-24 19:36:51 +00:00
Target Cleanup relocation sorting for ELF. 2013-05-15 18:22:01 +00:00
Transforms [objc-arc] Fixed a spelling error and made the statistic descriptions be consistent about their usage of periods. 2013-05-15 17:43:03 +00:00
CMakeLists.txt Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
LLVMBuild.txt Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
Makefile Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00