From b0d21ef20c29f4ea46d21b488f17feaa6a8760e1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 8 Mar 2006 04:25:59 +0000 Subject: Change the interface for getting a target HazardRecognizer to be more clean. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26608 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/ScheduleDAG.h | 9 +++------ include/llvm/CodeGen/SelectionDAGISel.h | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index a506b82..25b62e2 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -57,10 +57,6 @@ namespace llvm { NoopHazard, // This instruction can't be emitted, and needs noops. }; - /// StartBasicBlock - This is called when a new basic block is started. - /// - virtual void StartBasicBlock() {} - /// getHazardType - Return the hazard type of emitting this node. There are /// three possible results. Either: /// * NoHazard: it is legal to issue this instruction on this cycle. @@ -410,10 +406,11 @@ namespace llvm { MachineBasicBlock *BB); /// createTDListDAGScheduler - This creates a top-down list scheduler with - /// the specified hazard recognizer. + /// the specified hazard recognizer. This takes ownership of the hazard + /// recognizer and deletes it when done. ScheduleDAG* createTDListDAGScheduler(SelectionDAG &DAG, MachineBasicBlock *BB, - HazardRecognizer &HR); + HazardRecognizer *HR); } #endif diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h index ffaa1c6..1bdf055 100644 --- a/include/llvm/CodeGen/SelectionDAGISel.h +++ b/include/llvm/CodeGen/SelectionDAGISel.h @@ -62,9 +62,9 @@ public: return true; } - /// GetTargetHazardRecognizer - Return the hazard recognizer to use for this - /// target when scheduling the DAG. - virtual HazardRecognizer &GetTargetHazardRecognizer(); + /// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer + /// to use for this target when scheduling the DAG. + virtual HazardRecognizer *CreateTargetHazardRecognizer(); protected: /// Pick a safe ordering and emit instructions for each target node in the -- cgit v1.1