[PATCH] D46801: add getAA in ScheduleDAG for using in HazardRec

Atheel Massalha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 13 22:20:40 PDT 2018


atheel.ma updated this revision to Diff 146539.

Repository:
  rL LLVM

https://reviews.llvm.org/D46801

Files:
  include/llvm/CodeGen/MachineScheduler.h
  include/llvm/CodeGen/ScheduleDAGInstrs.h
  lib/CodeGen/PostRASchedulerList.cpp


Index: lib/CodeGen/PostRASchedulerList.cpp
===================================================================
--- lib/CodeGen/PostRASchedulerList.cpp
+++ lib/CodeGen/PostRASchedulerList.cpp
@@ -184,6 +184,9 @@
     ///
     void finishBlock() override;
 
+	// Returns AliasAnalysis instance for use in Hazard Recognizer.
+	AliasAnalysis* getAA() const { return AA; }
+
   private:
     /// Apply each ScheduleDAGMutation step in order.
     void postprocessDAG();
Index: include/llvm/CodeGen/ScheduleDAGInstrs.h
===================================================================
--- include/llvm/CodeGen/ScheduleDAGInstrs.h
+++ include/llvm/CodeGen/ScheduleDAGInstrs.h
@@ -182,6 +182,10 @@
     SUnit *BarrierChain = nullptr;
 
   public:
+    // Returns AliasAnalysis instance for use in Hazard Recognizer.
+    // The returned AliasAnalysis may be nullptr.
+    virtual AliasAnalysis* getAA() const { return AAForDep; }
+
     /// A list of SUnits, used in Value2SUsMap, during DAG construction.
     /// Note: to gain speed it might be worth investigating an optimized
     /// implementation of this data structure, such as a singly linked list
Index: include/llvm/CodeGen/MachineScheduler.h
===================================================================
--- include/llvm/CodeGen/MachineScheduler.h
+++ include/llvm/CodeGen/MachineScheduler.h
@@ -302,6 +302,10 @@
     return SchedImpl->doMBBSchedRegionsTopDown();
   }
 
+  // Returns AliasAnalysis instance for use in Hazard Recognizer.
+  // The returned AliasAnalysis may be nullptr.
+  AliasAnalysis* getAA() const { return AA; }
+
   // Returns LiveIntervals instance for use in DAG mutators and such.
   LiveIntervals *getLIS() const { return LIS; }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46801.146539.patch
Type: text/x-patch
Size: 1720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180514/866c205d/attachment.bin>


More information about the llvm-commits mailing list