[llvm-dev] Compatibility of .ll file among different versions of LLVM

4 views
Skip to first unread message

Peng Yu via llvm-dev

unread,
Jan 25, 2019, 1:52:18 PM1/25/19
to llvm-dev
Hi,

I am wondering what is the compatibility of .ll file. For example, for
a .ll file generated by an older version of LLVM, can it be guaranteed
to be assembled to a bc file using a newer version of LLVM and run
correctly? Thanks.

--
Regards,
Peng
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Tim Northover via llvm-dev

unread,
Jan 25, 2019, 2:07:29 PM1/25/19
to Peng Yu, llvm-dev
On Fri, 25 Jan 2019 at 18:52, Peng Yu via llvm-dev
<llvm...@lists.llvm.org> wrote:
> I am wondering what is the compatibility of .ll file. For example, for
> a .ll file generated by an older version of LLVM, can it be guaranteed
> to be assembled to a bc file using a newer version of LLVM and run
> correctly? Thanks.

The policy is documented here:
https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility

Basically, .ll files have no guarantees at all: you must assemble them
with the same compiler that generated them. Newer LLVMs can read .bc
files from 3.0 onwards (if not, report a bug), but we reserve the
right to break compatibility at some point in the future (giving
sufficient warnings etc).

Cheers.

Tim.

Reply all
Reply to author
Forward
0 new messages