[LLVMdev] LLVM pass question
rkotler at mips.com
Wed Mar 27 10:19:18 PDT 2013
What I am thinking of now is to just register the MIPS116 and MIPS32
DAGToDAGISel passes and then within run on machine function, I can just
return if the current mode indicates that mips16 is needed for example,
so the run on machine function for Mips32 would return immediately.
On 03/27/2013 10:05 AM, Reed Kotler wrote:
> I guess another way to do this is to just register both passes for
> mips16 and mips32 and have them return immediately if it is not their
> turn to run.
> On 03/27/2013 08:58 AM, Reed Kotler wrote:
>> 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
>> 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.
More information about the llvm-dev