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.
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 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