mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-15 07:33:18 +00:00
Add an option to view the selection dags as they are generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19498 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a6127504a
commit
7944d9d995
@ -28,11 +28,20 @@
|
|||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/Target/TargetLowering.h"
|
#include "llvm/Target/TargetLowering.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
#ifndef _NDEBUG
|
||||||
|
static cl::opt<bool>
|
||||||
|
ViewDAGs("view-isel-dags", cl::Hidden,
|
||||||
|
cl::desc("Pop up a window to show isel dags as they are selected"));
|
||||||
|
#else
|
||||||
|
static const bool ViewDAGS = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
/// FunctionLoweringInfo - This contains information that is global to a
|
/// FunctionLoweringInfo - This contains information that is global to a
|
||||||
@ -890,6 +899,8 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB, MachineFunction &MF,
|
|||||||
// the code to the MachineBasicBlock.
|
// the code to the MachineBasicBlock.
|
||||||
InstructionSelectBasicBlock(DAG);
|
InstructionSelectBasicBlock(DAG);
|
||||||
|
|
||||||
|
if (ViewDAGs) DAG.viewGraph();
|
||||||
|
|
||||||
DEBUG(std::cerr << "Selected machine code:\n");
|
DEBUG(std::cerr << "Selected machine code:\n");
|
||||||
DEBUG(BB->dump());
|
DEBUG(BB->dump());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user