[LLVMdev] LLVM pass question
Reed Kotler
rkotler at mips.com
Wed Mar 27 08:58:19 PDT 2013
I'm implementing this ability to switch between mips16 and mips32 on a
per function basis.
One issue that I've run into is regarding the DAGToDAGIsel pass.
We have a different subclass for mips16 and non mips16 ( conceivably
later there could be a separate one for micromips).
I need to run a different pass depending on whether it's mips16 or mips32.
My initial plan was to create a dummy ModuleDAGToDAGIsel whose sole
purpose in it's run machine function was to decide which one of these
to run and then call an appropriate DAGToDAGIIsel but I'm running into
some issue where that class wants to be started up by the pass manager
and not another pass.
So now I'm think that maybe I should have either:
1) The ModuleDAGToDAGIsel pass add another pass.
2) Maybe create two passes, one for Mips16 and one for Mips32 and have
them be dependent on the ModuleDAGToDAGISel pass and then turn them on
or off depending on which one needs to be run for this function.
I'm reading the pass code now to understand this better but thought that
someone might know the answer.
Tia.
Reed
More information about the llvm-dev
mailing list