llvm-6502/lib
Akira Hatanaka 1cdebe50c1 ARM: Fix a bug which was causing convergence failure in constant-island pass.
The bug is in ARMConstantIslands::createNewWater where the upper bound of the
new water split point is computed:

// This could point off the end of the block if we've already got constant
// pool entries following this block; only the last one is in the water list.
// Back past any possible branches (allow for a conditional and a maximally
// long unconditional).
if (BaseInsertOffset + 8 >= UserBBI.postOffset()) {
  BaseInsertOffset = UserBBI.postOffset() - UPad - 8;
  DEBUG(dbgs() << format("Move inside block: %#x\n", BaseInsertOffset));
}

The split point is supposed to be somewhere between the machine instruction that
loads from the constant pool entry and the end of the basic block, before branch
instructions. The code above is fine if the basic block is large enough and
there are a sufficient number of instructions following the machine instruction.
However, if the machine instruction is near the end of the basic block,
BaseInsertOffset can point to the machine instruction or another instruction
that precedes it, and this can lead to convergence failure.

This commit fixes this bug by ensuring BaseInsertOffset is larger than the
offset of the instruction following the constant-loading instruction.

rdar://problem/18581150


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220015 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17 01:31:47 +00:00
..
Analysis [LVI] Add some additional comments about caching and context instructions 2014-10-16 00:40:05 +00:00
AsmParser Make CallingConv::ID an alias of "unsigned". 2014-09-10 18:00:17 +00:00
Bitcode correct const-ness with auto and dyn_cast 2014-10-15 17:45:13 +00:00
CodeGen Reduce code duplication between patchpoint and non-patchpoint lowering. NFC. 2014-10-16 21:26:35 +00:00
DebugInfo Add couple of missing 'override' keyword. NFC. 2014-10-10 17:34:30 +00:00
ExecutionEngine [MCJIT] Replace memcpy with readBytesUnaligned in RuntimeDyldMachOI386. 2014-10-10 23:07:09 +00:00
IR [LLVM-C] Add LLVMInstructionClone. 2014-10-17 01:02:34 +00:00
IRReader Pass a && to getLazyBitcodeModule. 2014-09-03 17:31:46 +00:00
LineEditor
Linker Merge alignment of common GlobalValue. 2014-09-09 17:48:18 +00:00
LTO LTO: Document the Boolean argument from r218784 2014-10-02 21:11:04 +00:00
MC Revert commit r219835 and r219829. 2014-10-17 01:06:02 +00:00
Object Add MachOObjectFile::getUuid() 2014-10-15 23:35:45 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData Reduce double set lookups. NFC. 2014-10-10 15:32:50 +00:00
Support Introduce LLVMParseCommandLineOptions C API function. 2014-10-16 22:47:52 +00:00
TableGen Eliminate some deep std::vector copies. NFC. 2014-10-03 18:33:16 +00:00
Target ARM: Fix a bug which was causing convergence failure in constant-island pass. 2014-10-17 01:31:47 +00:00
Transforms [SROA] Switch the common variable name for the 'AllocaSlices' class to 2014-10-16 21:11:55 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile