mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -159,7 +159,8 @@ bool SROA::performScalarRepl(Function &F) {
|
||||
if (const StructType *ST = dyn_cast<StructType>(AI->getAllocatedType())) {
|
||||
ElementAllocas.reserve(ST->getNumContainedTypes());
|
||||
for (unsigned i = 0, e = ST->getNumContainedTypes(); i != e; ++i) {
|
||||
AllocaInst *NA = new AllocaInst(ST->getContainedType(i), 0,
|
||||
AllocaInst *NA = new AllocaInst(ST->getContainedType(i), 0,
|
||||
AI->getAlignment(),
|
||||
AI->getName() + "." + utostr(i), AI);
|
||||
ElementAllocas.push_back(NA);
|
||||
WorkList.push_back(NA); // Add to worklist for recursive processing
|
||||
@@ -169,7 +170,7 @@ bool SROA::performScalarRepl(Function &F) {
|
||||
ElementAllocas.reserve(AT->getNumElements());
|
||||
const Type *ElTy = AT->getElementType();
|
||||
for (unsigned i = 0, e = AT->getNumElements(); i != e; ++i) {
|
||||
AllocaInst *NA = new AllocaInst(ElTy, 0,
|
||||
AllocaInst *NA = new AllocaInst(ElTy, 0, AI->getAlignment(),
|
||||
AI->getName() + "." + utostr(i), AI);
|
||||
ElementAllocas.push_back(NA);
|
||||
WorkList.push_back(NA); // Add to worklist for recursive processing
|
||||
|
Reference in New Issue
Block a user