Martin Kustermann
4ea512b4c1
[llvm_codegen] Use exclusively SExpression support from VM and nothing else.
...
The LLVM code generator should only consume the serialized IR and not use any other VM functionality.
This CL adds a custom zone which can be used for the deserialized IR nodes and removes any
Dart_SetVMFlags/Dart_Initialize/ApiZone/... calls.
This works with the existing example:
% ninja -C out/ReleaseX64 codegen
% out/ReleaseX64/codegen runtime/llvm_codegen/test/codegen/Inputs/hello.sex
...
define void @"hello.dart::main"() {
B1:
%0 = call i8* @llvm.stacksave()
%1 = ptrtoint i8* %0 to i64
%2 = load i64, i64 addrspace(256)* inttoptr (i64 72 to i64 addrspace(256)*)
%3 = icmp ult i64 %1, %2
br i1 %3, label %4, label %5
...
ret void
}
...
Change-Id: I1d07ba6bc122d100c73f97cfa961d36240489666
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120792
Commit-Queue: Martin Kustermann <kustermann@google.com >
Auto-Submit: Martin Kustermann <kustermann@google.com >
Reviewed-by: Teagan Strickland <sstrickl@google.com >
2019-10-30 16:27:04 +00:00
Jake Ehrlich
87b0dbab2d
[llvm_codegen] Contrived hello world
...
This change adds enough functionality to compile hello world
from S-expressions in a contrived way. It fails to handle this input
realistically in several ways.
1) It assumes the existence of dart:core::print
2) It handles all dart values as C strings
3) It assumes only very static calls can be made with no named arguments
4) If a stack overflow is detected it just traps.
5) I'm not sure how the current dart runtime works but the contrived runtime
used here puts a contrived thread object in `gs`.
This change adds a basic framework for implementing new instructions that
should make it possible to implement new instructions with much smaller
changes however.
Change-Id: Ic167a29908a875bfc234c4e9bf5f4ac2ff52a3a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117222
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2019-10-10 20:57:02 +00:00
Alexander Aprelev
bd049f5b53
[llvm] Fix bit target definition on Windows - it needs .exe extension
...
Change-Id: I4fc94797f0c957dc5bb1d6bf94e7de8c1d2399b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111501
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
Commit-Queue: Alexander Aprelev <aam@google.com >
2019-07-31 17:33:09 +00:00
Samir Jindel
0a85a8878d
[vm/llvm] Use relative paths in LLVM build rules.
...
This fixes the Flutter build.
Change-Id: I2f1e6e48e054e1c2368bed4bc8b47a7bf37dcb56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111420
Reviewed-by: Martin Kustermann <kustermann@google.com >
Auto-Submit: Samir Jindel <sjindel@google.com >
2019-07-31 08:44:32 +00:00
Jake Ehrlich
773f8d53ed
Reland "[llvm] Add initial scaffolding"
...
This is a reland of b71d2d9996
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
> Reviewed-by: Alexander Thomas <athom@google.com >
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Change-Id: I73cd24455c373bcc4d0f5675af6a3b1e0f947f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2019-07-30 20:34:31 +00:00
Jake Ehrlich
45172f0690
Revert "Reland "[llvm] Add initial scaffolding""
...
This reverts commit 524fdc13a9 .
Reason for revert: I still broke flutter somehow. I got the same error. Looking into it now.
Original change's description:
> Reland "[llvm] Add initial scaffolding"
>
> This is a reland of b71d2d9996
>
> Original change's description:
> > [llvm] Add initial scaffolding
> >
> > This change adds the gclient and GN changes needed to build
> > an executable using LLVM in the Dart tree as well as a basic
> > testing framework based on llvm-lit.
> >
> > Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> > Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
> > Reviewed-by: Alexander Thomas <athom@google.com >
> > Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
>
> Change-Id: Ib3cd3299ed463133616c666285f9a58fa387b5bd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107829
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
TBR=vegorov@google.com ,kustermann@google.com ,athom@google.com ,phosek@google.com ,ajcbik@google.com ,jakehehrlich@google.com
Change-Id: I8b18549ec4a030518633ec7f75d2fd2ceea87256
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107837
Reviewed-by: Jake Ehrlich <jakehehrlich@google.com >
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
2019-07-02 20:10:20 +00:00
Jake Ehrlich
524fdc13a9
Reland "[llvm] Add initial scaffolding"
...
This is a reland of b71d2d9996
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
> Reviewed-by: Alexander Thomas <athom@google.com >
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Change-Id: Ib3cd3299ed463133616c666285f9a58fa387b5bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107829
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
2019-07-02 18:04:24 +00:00
Jake Ehrlich
2a15d38759
Revert "[llvm] Add initial scaffolding"
...
This reverts commit b71d2d9996 .
Reason for revert: Somehow this broke flutter because gclient doesn't seem to have generated the needed file
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
> Reviewed-by: Alexander Thomas <athom@google.com >
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
TBR=vegorov@google.com ,kustermann@google.com ,athom@google.com ,phosek@google.com ,ajcbik@google.com ,jakehehrlich@google.com
Change-Id: I877abfe211dc6c3efd94cc2350d028bf54df9d9f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107688
Reviewed-by: Jake Ehrlich <jakehehrlich@google.com >
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
2019-06-29 01:12:55 +00:00
Jake Ehrlich
b71d2d9996
[llvm] Add initial scaffolding
...
This change adds the gclient and GN changes needed to build
an executable using LLVM in the Dart tree as well as a basic
testing framework based on llvm-lit.
Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2019-06-28 23:14:11 +00:00