[PATCH] D54203: Use template instead of void* -based type erasure in MachineRegistry

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 05:53:08 PST 2018


serge-sans-paille created this revision.
serge-sans-paille added a reviewer: Eugene.Zelenko.
Herald added subscribers: javed.absar, qcolombet, MatzeB.

Type safe version of MachinePassRegistry

      

Previous version used type erasure through a `void* (*)()` pointer,
which triggered gcc warning and implied a lot of reinterpret_cast.

      

This version should make it harder to hit ourselves in the foot.


Repository:
  rL LLVM

https://reviews.llvm.org/D54203

Files:
  include/llvm/CodeGen/MachinePassRegistry.h
  include/llvm/CodeGen/MachineScheduler.h
  include/llvm/CodeGen/RegAllocRegistry.h
  include/llvm/CodeGen/SchedulerRegistry.h
  lib/CodeGen/MachinePassRegistry.cpp
  lib/CodeGen/MachineScheduler.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/CodeGen/TargetPassConfig.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54203.172932.patch
Type: text/x-patch
Size: 13542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181107/ae9b48bd/attachment.bin>


More information about the llvm-commits mailing list