summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-03 10:59:55 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-03 10:59:55 +0000
commite74a4a791535b9756fa7312e5cd6f746ecc1c989 (patch)
treefa89e6b64c32f82b11a4322e9dff964bb9bf6b43 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
parent53916aa78f134650259eb2ed5cf2013446ef72ae (diff)
downloadllvm-e74a4a791535b9756fa7312e5cd6f746ecc1c989.tar.gz
llvm-e74a4a791535b9756fa7312e5cd6f746ecc1c989.tar.bz2
llvm-e74a4a791535b9756fa7312e5cd6f746ecc1c989.tar.xz
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'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
0 files changed, 0 insertions, 0 deletions