summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-12-11 23:47:40 +0000
committerBob Wilson <bob.wilson@apple.com>2009-12-11 23:47:40 +0000
commit895f364ae67df0ac09e35ee4add0459b914a56fa (patch)
tree05fbfd153c24040dfe634df9cc391bb57b8112ff /clang/lib/Driver/Tools.cpp
parent01bf3397a00be703de4ec810c599cd59de814585 (diff)
downloadbcm5719-llvm-895f364ae67df0ac09e35ee4add0459b914a56fa.tar.gz
bcm5719-llvm-895f364ae67df0ac09e35ee4add0459b914a56fa.zip
Revise scalar replacement to be more flexible about handle bitcasts and GEPs.
While scanning through the uses of an alloca, keep track of the current offset relative to the start of the alloca, and check memory references to see if the offset & size correspond to a component within the alloca. This has the nice benefit of unifying much of the code from isSafeUseOfAllocation, isSafeElementUse, and isSafeUseOfBitCastedAllocation. The code to rewrite the uses of a promoted alloca, after it is determined to be safe, is reorganized in the same way. Also, when rewriting GEP instructions, mark them as "in-bounds" since all the indices are known to be safe. llvm-svn: 91184
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud