How is GCC IR different from LLVM IR?

Why do people prefer LLVM IR and how different is it from IRC GCC? Is target dependency a factor here?

I am a complete newbie in compilers and could not find anything relevant even after many hours of searching for an answer. Any ideas would be helpful.

+4
source share
1 answer

They are not so different - both are pretty standard CFG + three-address code (at least if we are talking about the middle end and not touching the part of codegen). But LLVM IR is perhaps better structured, better defined, less tightly coupled to compiler implementation, and has a better C ++ API compared to GCC Gimple. This allows us to simplify processing, transformation and analysis, which makes it preferable today for both the compiler and other related tools.

+5
source

Source: https://habr.com/ru/post/1661912/


All Articles