[PATCH] D86684: [Refactor] Add the SchedHeuristic for Scheduler to allow platform customizing the heuristics

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 6 20:42:15 PDT 2020


steven.zhang updated this revision to Diff 290170.
steven.zhang added a comment.

> I am a little surprised that, if virtual dispatch was hurting performance so much, function pointer would end up being a lot better. It's still a similar indirect non inlinable/optimisable function call.

I think, the virtual dispatch has two memory dereference(one for vtable and another one for virtual func) while the function pointer only need one. And I am not sure if compiler can do some better optimization there isn't any virtual function for a class.  I double confirm and it indeed shows that, the new implementation didn't have any compiling time deg now.

Address other comments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86684

Files:
  llvm/include/llvm/CodeGen/MachineScheduler.h
  llvm/lib/CodeGen/MachineScheduler.cpp
  llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
  llvm/lib/Target/PowerPC/PPCMachineScheduler.cpp
  llvm/lib/Target/PowerPC/PPCMachineScheduler.h
  llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
  llvm/test/CodeGen/PowerPC/botheightreduce.mir
  llvm/test/CodeGen/PowerPC/loop-instr-form-prepare.ll
  llvm/test/CodeGen/PowerPC/rematerializable-instruction-machine-licm.ll
  llvm/test/CodeGen/PowerPC/sched-addi.ll
  llvm/test/CodeGen/PowerPC/sms-cpy-1.ll
  llvm/test/CodeGen/PowerPC/sms-phi-1.ll
  llvm/test/CodeGen/PowerPC/sms-simple.ll
  llvm/test/CodeGen/PowerPC/stack-clash-dynamic-alloca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86684.290170.patch
Type: text/x-patch
Size: 78507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200907/42800d3f/attachment-0001.bin>


More information about the llvm-commits mailing list