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.
Paths
| Differential D54203
Use template instead of void* -based type erasure in MachineRegistry ClosedPublic Authored by serge-sans-paille on Nov 7 2018, 5:52 AM.
Details Summary Type safe version of MachinePassRegistry Previous version used type erasure through a void* (*)() pointer, This version should make it harder to hit ourselves in the foot.
Diff Detail
Event TimelineHerald added subscribers: javed.absar, qcolombet, MatzeB. · View Herald TranscriptNov 7 2018, 5:52 AM Comment Actions Pass manager related stuff, probably good idea to have Chandler or Fedor look over it since they've been doing a lot of work related to PM infrastructure. Comment Actions This is the legacy PM, and specifically as it is implemented in codegen, so my opinions are few and far between... Not sure the benefits here are all that important, but maybe? Looping in folks w/ more backend feelings about this kind of thing. Comment Actions meh The whole registry system isn't used much. The whole machine seems a little overengineered in retrospect (there only ever is a single listener for example). But making it typesafe seems sensible. This revision is now accepted and ready to land.Nov 8 2018, 11:29 AM Comment Actions ok, thanks. The only goal of that patch is to silent disturbing warning, I'll apply it at the end of the day. This revision now requires review to proceed.Nov 9 2018, 12:56 AM Closed by commit rL346522: Type safe version of MachinePassRegistry (authored by serge_sans_paille). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 173362 llvm/trunk/include/llvm/CodeGen/MachinePassRegistry.h
llvm/trunk/include/llvm/CodeGen/MachineScheduler.h
llvm/trunk/include/llvm/CodeGen/RegAllocRegistry.h
llvm/trunk/include/llvm/CodeGen/SchedulerRegistry.h
llvm/trunk/lib/CodeGen/MachinePassRegistry.cpp
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
|