mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Propagate alloca alignment information via variable size object frame
information. No functional change yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -417,9 +417,10 @@ public:
|
|||||||
/// variable sized object is created, whether or not the index returned is
|
/// variable sized object is created, whether or not the index returned is
|
||||||
/// actually used.
|
/// actually used.
|
||||||
///
|
///
|
||||||
int CreateVariableSizedObject() {
|
int CreateVariableSizedObject(unsigned Alignment) {
|
||||||
HasVarSizedObjects = true;
|
HasVarSizedObjects = true;
|
||||||
Objects.push_back(StackObject(0, 1, 0, false, false));
|
Objects.push_back(StackObject(0, Alignment, 0, false, false));
|
||||||
|
MaxAlignment = std::max(MaxAlignment, Alignment);
|
||||||
return (int)Objects.size()-NumFixedObjects-1;
|
return (int)Objects.size()-NumFixedObjects-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2848,7 +2848,7 @@ void SelectionDAGBuilder::visitAlloca(const AllocaInst &I) {
|
|||||||
|
|
||||||
// Inform the Frame Information that we have just allocated a variable-sized
|
// Inform the Frame Information that we have just allocated a variable-sized
|
||||||
// object.
|
// object.
|
||||||
FuncInfo.MF->getFrameInfo()->CreateVariableSizedObject();
|
FuncInfo.MF->getFrameInfo()->CreateVariableSizedObject(Align ? Align : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectionDAGBuilder::visitLoad(const LoadInst &I) {
|
void SelectionDAGBuilder::visitLoad(const LoadInst &I) {
|
||||||
|
Reference in New Issue
Block a user