reed kotler
2013-Mar-13 17:58 UTC
[LLVMdev] changing register classes on a per function basis
Current ISelDagToDag is created once per module. The TargetLowering class is allocated there and register classes are added and the computeRegisterProperties is called. In order to switch back and forth between mips16 and mips32, I need to be able to reset what is done during computerRegisterProperties. Has anyone else looked into this for another port? Ideas? Mips16 is an instruction decoding mode, akin to Thumb 1 and so functions of both mips16 and mips32 mode can exist side by side in the same module. Tia. Reed
Reed Kotler
2013-Mar-13 18:51 UTC
[LLVMdev] changing register classes on a per function basis
On 03/13/2013 10:58 AM, reed kotler wrote:> Current ISelDagToDag is created once per module. > > The TargetLowering class is allocated there and register classes are > added and the computeRegisterProperties is called. > > In order to switch back and forth between mips16 and mips32, I need to > be able to reset what is done during computerRegisterProperties. > > Has anyone else looked into this for another port? > > Ideas? > > Mips16 is an instruction decoding mode, akin to Thumb 1 and so functions > of both mips16 and mips32 mode can exist side by side in the same module. > > Tia. > > ReedSeems, that except for the obvious memory leaking, that merely resetting AvailableRegClasses and calling computerRegisterProperties again will do the trick. I'll see if this works and then solve the memory leak problem if it does. I guess I would add a pair of reset functions to TargetLoweringBase. Thoughts? Tia. Reed
Reasonably Related Threads
- [LLVMdev] initial putback for implementing mips16/nomips16 attributes - please review
- [LLVMdev] proposed change to class BasicTTI
- [LLVMdev] proposed change to class BasicTTI
- [LLVMdev] proposed change to class BasicTTI
- [LLVMdev] proposed change to class BasicTTI