mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -321,10 +321,6 @@ void ValueEnumerator::EnumerateValue(const Value *V) {
|
||||
if (const Constant *C = dyn_cast<Constant>(V)) {
|
||||
if (isa<GlobalValue>(C)) {
|
||||
// Initializers for globals are handled explicitly elsewhere.
|
||||
} else if (isa<ConstantArray>(C) && cast<ConstantArray>(C)->isString()) {
|
||||
// Do not enumerate the initializers for an array of simple characters.
|
||||
// The initializers just pollute the value table, and we emit the strings
|
||||
// specially.
|
||||
} else if (C->getNumOperands()) {
|
||||
// If a constant has operands, enumerate them. This makes sure that if a
|
||||
// constant has uses (for example an array of const ints), that they are
|
||||
|
Reference in New Issue
Block a user