mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Dwarf requires variable entries to be in the source order. Right now, since we are recording variable information at isel time this means parameters would appear in the reverse order. The short term fix is to issue recordVariable() at asm printing time instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c451ac0a42
commit
4e3f5a4e9c
@ -118,9 +118,8 @@ bool AsmPrinter::doInitialization(Module &M) {
|
||||
|
||||
SwitchToDataSection(""); // Reset back to no section.
|
||||
|
||||
if (MachineModuleInfo *MMI = getAnalysisToUpdate<MachineModuleInfo>()) {
|
||||
MMI->AnalyzeModule(M);
|
||||
}
|
||||
MMI = getAnalysisToUpdate<MachineModuleInfo>();
|
||||
if (MMI) MMI->AnalyzeModule(M);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1291,8 +1290,12 @@ void AsmPrinter::printLabel(unsigned Id) const {
|
||||
|
||||
/// printDeclare - This method prints a local variable declaration used by
|
||||
/// debug tables.
|
||||
/// FIXME: It doesn't really print anything rather it inserts a DebugVariable
|
||||
/// entry into dwarf table.
|
||||
void AsmPrinter::printDeclare(const MachineInstr *MI) const {
|
||||
// Do nothing.
|
||||
int FI = MI->getOperand(0).getIndex();
|
||||
GlobalValue *GV = MI->getOperand(1).getGlobal();
|
||||
MMI->RecordVariable(GV, FI);
|
||||
}
|
||||
|
||||
/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/Target/TargetLowering.h"
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "llvm/CodeGen/MachineConstantPool.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "IA64ISelLowering.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "PPCHazardRecognizers.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
@ -1780,7 +1780,6 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
|
||||
<< "}\n\n";
|
||||
|
||||
OS << "SDNode *Select_DECLARE(const SDOperand &N) {\n"
|
||||
<< " MachineModuleInfo *MMI = CurDAG->getMachineModuleInfo();\n"
|
||||
<< " SDOperand Chain = N.getOperand(0);\n"
|
||||
<< " SDOperand N1 = N.getOperand(1);\n"
|
||||
<< " SDOperand N2 = N.getOperand(2);\n"
|
||||
@ -1791,8 +1790,6 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
|
||||
<< " }\n"
|
||||
<< " int FI = cast<FrameIndexSDNode>(N1)->getIndex();\n"
|
||||
<< " GlobalValue *GV = cast<GlobalAddressSDNode>(N2)->getGlobal();\n"
|
||||
<< " // FIXME. Handle variable declarations later since it lives on.\n"
|
||||
<< " MMI->RecordVariable(GV, FI);\n"
|
||||
<< " SDOperand Tmp1 = "
|
||||
<< "CurDAG->getTargetFrameIndex(FI, TLI.getPointerTy());\n"
|
||||
<< " SDOperand Tmp2 = "
|
||||
|
Loading…
x
Reference in New Issue
Block a user