TaoPan added inline comments.

================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:273-276
+    if (TLI->getSchedulingPreference() == Sched::Fast)
+      return createFastDAGScheduler(IS, OptLevel);
+    if (TLI->getSchedulingPreference() == Sched::Linearize)
+      return createDAGLinearizer(IS, OptLevel);
----------------
craig.topper wrote:
> craig.topper wrote:
> > TaoPan wrote:
> > > pengfei wrote:
> > > > I saw they are always registered in ScheduleDAGFast.cpp:
> > > > https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp#L36
> > > > Why do we register them again here?
> > > Please also help to have a review of the Summary. It's a little bit of a 
> > > trick. ScheduleDAGFast.cpp is compiled to object file, but the object 
> > > file isn't linked into clang executable file as no symbol is referred by 
> > > outside without this patch.
> > That wasn't very clear from your summary. The "the object file isn't linked 
> > into clang executable file as no symbol is referred by outside without this 
> > patch" in this comment was much more help. Can you put something like that 
> > in summary?
> > 
> > Why are they being stripped from clang but not llc?
> Oh I see, llc uses include/llvm/CodeGen/LinkAllCodegenComponents.h to force 
> these to link in.
Thanks! I modified summary. could you please have a review?
Yes, you are right, llc include LinkAllCodegenComponents.h which refers 
function createFastDAGScheduler of ScheduleDAGFast.cpp.


================
Comment at: llvm/test/CodeGen/Generic/pre-ra-sched.c:1
+// RUN: clang %s -mllvm -pre-RA-sched=fast -c -o - | FileCheck %s
+// RUN: clang %s -mllvm -pre-RA-sched=linearize -c -o - | FileCheck %s
----------------
craig.topper wrote:
> You can't run clang from an llvm test directory. There's no guarantee clang 
> will have been compiled.
Thanks for notifying no guarantee clang in llvm test directory! I moved the 
test back to clang/test/CodeGen/.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101601/new/

https://reviews.llvm.org/D101601

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to