leonid
2010-Apr-04 14:52 UTC
[LLVMdev] How to specify the subtarget instruction set for LLVM unit in ARM-backend?
Dear developers! I’d like to ask you a question concerning the implementation of one algorithm for the generation of energy-efficient code for ARM processors. Unfortunately, the documentation on this subject is incomplete on your site, so could you please explain how to implement my algorithm. Without going into details, I would like to say, that the implementation of this algorithm requires the ability to specify the subtarget instruction set (ARM or Thumb) for a particular instruction LLVM intermediate representation. If at this stage of development, your compiler does not support this feature, please specify the minimal unit (basic block, entire function or anything else) that the current version of the compiler is able to translate with an indication of the subtarget instruction set. Also, I wonder whether an LLVM pass can be added to the ARM-backend (if so, please explain how). Best regards, Leonid.
Anton Korobeynikov
2010-Apr-04 15:33 UTC
[LLVMdev] How to specify the subtarget instruction set for LLVM unit in ARM-backend?
Hello> compiler does not support this feature, please specify the minimal unit > (basic block, entire function or anything else) that the current version > of the compiler is able to translate with an indication of the subtarget > instruction set.Subtarget features are specified on per-module basis. It might be good to allow certain features to be applied on per-function level. Patches are welcome :)> Also, I wonder whether an LLVM pass can be added to the ARM-backend (if > so, please explain how).Yes, it is possible. There are plenty of examples in the current codebase. See e.g. lib/Target/ARM/ARMTargetMachine.cpp -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Possibly Parallel Threads
- [LLVMdev] How to specify the subtarget instruction set for LLVM unit in ARM-backend?
- [LLVMdev] How to specify the arm subtarget instruction set in a pass or an arm-backend?
- [LLVMdev] Different instruction encodings based on subtarget features
- [LLVMdev] Request for Help: Teach ARM target to auto-detect cpu / subtarget features
- [LLVMdev] MMX/SSE subtarget feature in IR