Recommitting EH patch; this should answer most of the

review feedback.
-enable-eh is still accepted but doesn't do anything.
EH intrinsics use Dwarf EH if the target supports that,
and are handled by LowerInvoke otherwise.
The separation of the EH table and frame move data is,
I think, logically figured out, but either one still
causes full EH info to be generated (not sure how to
split the metadata correctly).
MachineModuleInfo::needsFrameInfo is no longer used and
is removed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2008-04-02 00:25:04 +00:00
parent 7c3becd9d7
commit 1532f3ddd7
10 changed files with 112 additions and 102 deletions

View File

@@ -20,6 +20,7 @@
#include "PPCFrameInfo.h"
#include "PPCSubtarget.h"
#include "llvm/Constants.h"
#include "llvm/Function.h"
#include "llvm/Type.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
@@ -946,6 +947,8 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
MachineBasicBlock::iterator MBBI = MBB.begin();
MachineFrameInfo *MFI = MF.getFrameInfo();
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
bool needsFrameInfo = (MMI && MMI->hasDebugInfo()) ||
!MF.getFunction()->doesNotThrow();
// Prepare for frame info.
unsigned FrameLabelId = 0;
@@ -1019,7 +1022,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
unsigned MaxAlign = MFI->getMaxAlignment();
if (MMI && MMI->needsFrameInfo()) {
if (needsFrameInfo) {
// Mark effective beginning of when frame pointer becomes valid.
FrameLabelId = MMI->NextLabelID();
BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId).addImm(0);
@@ -1095,7 +1098,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
}
}
if (MMI && MMI->needsFrameInfo()) {
if (needsFrameInfo) {
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
if (NegFrameSize) {