This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Register AVRDAGToDAGISel pass with the pass manager
Changes PlannedPublic

Authored by eugmes on Dec 5 2022, 11:14 AM.

Details

Reviewers
dylanmckay
Summary

This makes it possible to see the output from the pass when using --print-after-all and other command line options.

Diff Detail

Event Timeline

eugmes created this revision.Dec 5 2022, 11:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 5 2022, 11:14 AM
Herald added subscribers: Jim, hiraditya. · View Herald Transcript
eugmes requested review of this revision.Dec 5 2022, 11:14 AM
eugmes planned changes to this revision.Dec 6 2022, 3:10 AM

A static char ID needs to be added to AVRDAGToDAGISel, and probably to AMDGPUDAGToDAGISel.

llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
588

I think this requires a new instance of ID for the class to be registered. And somebody else is also missing it and uses one from SelectionDAGISel (AMDGPUDAGToDAGISel is one of such classes). That's why there is a double registration error.

eugmes added a comment.Dec 6 2022, 4:25 AM

It looks like all ISel pass classes have shared ID thanks to SelectionDAGISel and fixing this is more complicated.