llvm-project/llvm/lib
Chandler Carruth f02b8bf11b Remove some buggy and apparantly unnecessary code from SROA.
The partitioning logic attempted to handle uses of an alloca with an
offset starting before the alloca so long as the use had some overlap
with the alloca itself. However, there was a bug where we tested
'(uint64_t)Offset >= AllocSize' without first checking whether 'Offset'
was positive. As a consequence, essentially every negative offset (that
is, starting *before* the alloca does) would be thrown out, even if it
was overlapping. The subsequent code to throw out negative offsets which
were actually non-overlapping was essentially dead. The code to *handle*
overlapping negative offsets was actually dead!

I've just removed all of this, and taught SROA to discard any uses which
start prior to the alloca from the beginning. It has the lovely property
of simplifying the code. =] All the tests still pass, and in fact no new
tests are needed as this is already covered by our testsuite. Fixing the
code so that negative offsets work the way the comments indicate they
were supposed to work causes regressions. That's how I found this.

Anyways, this is all progress in the correct direction -- tightening up
SROA to be maximally aggressive. Some day, I really hope to turn
out-of-bounds accesses to an alloca into 'unreachable'.

llvm-svn: 169120
2012-12-03 10:59:55 +00:00
..
Analysis Move the InstVisitor utility into VMCore where it belongs. It heavily 2012-11-30 03:08:41 +00:00
Archive Mark checkSignature const, and in turn stop casting away const from 2012-09-05 22:09:23 +00:00
AsmParser Add back support for reading and parsing 'deplibs'. 2012-11-28 08:41:48 +00:00
Bitcode Add back support for reading and parsing 'deplibs'. 2012-11-28 08:41:48 +00:00
CodeGen Allow merging multiple store sequences on the same chain. 2012-12-02 17:14:09 +00:00
DebugInfo The section is .debug_line. 2012-11-27 01:40:36 +00:00
ExecutionEngine Move the InstVisitor utility into VMCore where it belongs. It heavily 2012-11-30 03:08:41 +00:00
Linker Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
MC MC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc() 2012-12-01 01:38:48 +00:00
Object Object: Pass the buffer name through when making a copy. 2012-11-29 20:08:03 +00:00
Support Add support for fission attributes/forms/operations -> string. 2012-11-30 23:20:43 +00:00
TableGen Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
Target Define signed const-ext predicates. 2012-12-03 06:54:50 +00:00
Transforms Remove some buggy and apparantly unnecessary code from SROA. 2012-12-03 10:59:55 +00:00
VMCore Revert previous check in r168581, r169079 as they are still in code review status. 2012-12-01 10:54:28 +00:00
CMakeLists.txt Move TableGen's parser and entry point into a library 2011-10-01 16:41:13 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile