On Tue, Jun 22, 2010 at 1:53 PM, Chris Lattner <clattner at apple.com>
wrote:>
> On Jun 22, 2010, at 10:29 AM, Jianzhou Zhao wrote:
>
>> Hi,
>>
>> Does LLVM have passes that do translations between GCC RTL and LLVM
>> SSA, RTL -> SSA and SSA -> RTL?
>
> Nope. There has been some talk about doing a Clang -> RTL or LLVM IR
-> RTL backend, to allow using the GCC backend with the Clang frontend, but
I'm not aware of any progress on this. You could ask on the gcc mailing
list about it.
Thanks. The gcc mailing list mentioned the DragonEgg project
(http://dragonegg.llvm.org/), which translates GCC Gimple to LLVM
bitcode. In my understanding, bitcode means the LLVM SSA. My goal for
these translators is that I wanted to reuse existing passes from LLVM
and GCC, and such translations can link these two settings. This
DragonEgg solved this problem at a different level, because it
replaces the GCC optimizers with LLVM's. I was also pointed out that
RTL may not be a right IR for such as a translation, because it uses
machine-dependent information, while Gimple is much cleaner. I am not
sure if I understand the difference between RTL and Gimple. In
general, I still have this question about which IR I should use as the
source/target of the translation if I wanted to port one pass from one
compiler to the other one.
>
> -Chris
--
Jianzhou