cbalint13 commented on PR #15685: URL: https://github.com/apache/tvm/pull/15685#issuecomment-1712846790
> I am strongly opting for a backward compatibility for this case. > Allow a little time (1-2 day) to investigate a way going down `llvm<11`, then I'll be back with the results. Details of investigation: **Post ```llvm>=11```:** * Direct access via [TargetParsers](https://github.com/llvm/llvm-project/blob/llvmorg-16.0.6/llvm/include/llvm/TargetParser/X86TargetParser.h#L148-L158) public headers. * Immediate, no need for target-machine, details are fetched via the public getters. Implementation here is slim, infos coming from LLVM are precise and maintained. **Prior ```llvm<=10```:** * The usefull data from [tablegen descriptor](https://github.com/llvm/llvm-project/blob/llvmorg-10.0.0/llvm/lib/Target/X86/X86.td#L514) in class ```MCSubtargetInfo``` is [private](https://github.com/llvm/llvm-project/blob/llvmorg-10.0.0/llvm/include/llvm/MC/MCSubtargetInfo.h#L77-L78) without useful accessor. * There is a [unhelpful](https://github.com/llvm/llvm-project/blob/llvmorg-10.0.0/llvm/lib/MC/MCSubtargetInfo.cpp#L96) way of passing ```std::string("help")``` at the creation of ```MCSubtargetInfo()```. * Usefull queries can be done, only via full llvm taget-machine, this compatibility is implemented here. There is a burden of ```LLVMint()``` and the target-machine creation, but final check/legalizer is precise w.r.t to the arch. --- @junrushao , @kparzysz-quic, @echuraev There are quite some changes now, please help re-reviewing them. Thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
