diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-13 17:19:57 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-13 17:19:57 +0000 | 
| commit | 66e41e3c6e8b8fbc48d5d3b4d2bd9ce0be4ecb75 (patch) | |
| tree | 9de1c5f67a98cd0e73c60838396486c984f63ac2 /lib/CodeGen/MachineFunction.cpp | |
| parent | abdf259d487163e72081a8cf4991b1617206b41e (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
| -rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 16 | 
1 files changed, 11 insertions, 5 deletions
| diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index a38c881982e7..666120f032c6 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -378,7 +378,7 @@ void MachineFunction::viewCFG() const  #ifndef NDEBUG    ViewGraph(this, "mf" + getFunction()->getNameStr());  #else -  errs() << "SelectionDAG::viewGraph is only available in debug builds on " +  errs() << "MachineFunction::viewCFG is only available in debug builds on "           << "systems with Graphviz or gv!\n";  #endif // NDEBUG  } @@ -388,7 +388,7 @@ void MachineFunction::viewCFGOnly() const  #ifndef NDEBUG    ViewGraph(this, "mf" + getFunction()->getNameStr(), true);  #else -  errs() << "SelectionDAG::viewGraph is only available in debug builds on " +  errs() << "MachineFunction::viewCFGOnly is only available in debug builds on "           << "systems with Graphviz or gv!\n";  #endif // NDEBUG  } @@ -438,10 +438,16 @@ MCSymbol *MachineFunction::getJTISymbol(unsigned JTI, MCContext &Ctx,  /// index with a negative value.  ///  int MachineFrameInfo::CreateFixedObject(uint64_t Size, int64_t SPOffset, -                                        bool Immutable, bool isSS) { +                                        bool Immutable) {    assert(Size != 0 && "Cannot allocate zero size fixed stack objects!"); -  Objects.insert(Objects.begin(), StackObject(Size, 1, SPOffset, Immutable, -                                              isSS)); +  // The alignment of the frame index can be determined from its offset from +  // the incoming frame position.  If the frame object is at offset 32 and +  // the stack is guaranteed to be 16-byte aligned, then we know that the +  // object is 16-byte aligned. +  unsigned StackAlign = TFI.getStackAlignment(); +  unsigned Align = MinAlign(SPOffset, StackAlign); +  Objects.insert(Objects.begin(), StackObject(Size, Align, SPOffset, Immutable, +                                              /*isSS*/false));    return -++NumFixedObjects;  } | 
