3 ms·
Ah, I think I see....you mean I could write non-portable IR code by doing that, although LLVM would never produce code like that? I guess there must always be I
by phaemon 13y ago
Ah, I think I see....you mean I could write non-portable IR code by doing that, although LLVM would never produce code like that? I guess there must always be IR that the frontend will never produce then?
- KenoFischer 13y agoNo, every LLVM frontend (e.g. Clang) has to do so all the time for things to work.
- phaemon 13y agoThat makes no sense at all. You've just said that every LLVM frontend has to produce code that every LLVM frontend won't produce! If you mean something different, then could you please be clearer, as I really don't understand what you're talking about. [EDIT: caf's post made it clearer. I know what you meant now]
- caf 13y agoNo, the implication is that the LLVM IR that the frontend produces changes depending on the ultimate target that the LLVM IR will be compiled to. In other words, the frontends aren't backend-agnostic.
- phaemon 13y agoOh, right! That makes more sense. So you have to specify the backend when you start the process? I didn't know LLVM did that.
- azakai 13y agoYes, the frontend very much knows what target you are aiming for. It greatly affects the IR that is generated. And once you generate that IR, you can't just built it to an arbitrary target, it must be the one it was generated for.