This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

3x ARM

Note: This was originally posted on 3rd March 2013 at http://forums.arm.com

I am aware, i have few robust reasons against it: an ARM assembler, outputting ARM code
from a bare assembly language source and the whole... running on ARM.

it is fascinating me though :rolleyes:
What is your opinion, and why pros or contras ?

Thank You in advance,
Marc

p.s. should be this one a topic poll ?
Parents
  • Note: This was originally posted on 5th March 2013 at http://forums.arm.com

    ANTLR provides the front-end parser for the grammar of choice, but you're still writing the midend of the compiler from scratch. That's "really hard / really time consuming" - LLVM and GCC have years of development and hundreds of active developers.

    TBH it depends what you are really trying to achieve with the project.

    As a bit of fun side project - sure write your own, I have and I'm sure so have many others. However go in to it with your eyes open. Pros - it's very fun to work on, and very rewarding when it works. Cons - you are going to have a hard time getting your code generation quality/performance up to the same level as "commercial tools" or large scale open source projects. If you want a toy compiler for a limited set of use cases, go for it, but don't expect to beat existing compilers without a lot of work =)

    If you want to contribute to a commercial grade compiler, I'd suggest that writing your own from scratch is a hard proposition, and therefore I'd recommend the LLVM or GCC route. Pros - a lot of the boring framework generation is already done, and you don't have to be expert on everything. Linkers, libraries, and debugger support tools already exist. Cons - you don't have control over everything. Big pro - you are more likely to get things "into the field".

    Yes both GCC and LLVM compilers are "huge", and on top of that you have the linkers, loaders, binutils, and libraries. Developing a compiler infrastructure is expensive. Huge is good (albeit probably a bit scary with a learning curve) - it means someone else has invented most of the wheel for you =)

    *EDIT* One thing you can do to cut down work is write the compiler yourself, but emit assembler and then rely on existing tools to do the backend code generation. My toy compiler did this, using GCC's assembler to generate the ELF binaries.

    HTH,
    Iso
Reply
  • Note: This was originally posted on 5th March 2013 at http://forums.arm.com

    ANTLR provides the front-end parser for the grammar of choice, but you're still writing the midend of the compiler from scratch. That's "really hard / really time consuming" - LLVM and GCC have years of development and hundreds of active developers.

    TBH it depends what you are really trying to achieve with the project.

    As a bit of fun side project - sure write your own, I have and I'm sure so have many others. However go in to it with your eyes open. Pros - it's very fun to work on, and very rewarding when it works. Cons - you are going to have a hard time getting your code generation quality/performance up to the same level as "commercial tools" or large scale open source projects. If you want a toy compiler for a limited set of use cases, go for it, but don't expect to beat existing compilers without a lot of work =)

    If you want to contribute to a commercial grade compiler, I'd suggest that writing your own from scratch is a hard proposition, and therefore I'd recommend the LLVM or GCC route. Pros - a lot of the boring framework generation is already done, and you don't have to be expert on everything. Linkers, libraries, and debugger support tools already exist. Cons - you don't have control over everything. Big pro - you are more likely to get things "into the field".

    Yes both GCC and LLVM compilers are "huge", and on top of that you have the linkers, loaders, binutils, and libraries. Developing a compiler infrastructure is expensive. Huge is good (albeit probably a bit scary with a learning curve) - it means someone else has invented most of the wheel for you =)

    *EDIT* One thing you can do to cut down work is write the compiler yourself, but emit assembler and then rely on existing tools to do the backend code generation. My toy compiler did this, using GCC's assembler to generate the ELF binaries.

    HTH,
    Iso
Children
No data