►
From YouTube: OMR Architecture Meeting 20200312
Description
Agenda:
* JitBuilder 2.0 [ @mstoodle ]
B
C
This
is
a
very
hastily
prepared
presentation,
in
fact,
I
just
finished,
putting
my
name
on
the
first
slide
just
before
we
started
here,
so
it's
gonna
be
a
little
bit
rougher.
But
the
point
of
me
coming
to
the
meeting
now
to
talk
about
this
is
because
I
think
I
have
enough
to
really
talk
about
and
I
have
a
bunch
of
ideas
and
a
bunch
of
I
felt
a
bit
of
a
prototype
for
myself
over
the
Christmas
holidays.
C
Just
now
with
him
two
months
ago,
and
so
I
wanted
to
start
talking
about
this
with
the
broader
group
and
see
what
people's
thoughts
were
see
if
the
things
that
I
did
in
the
prototype
found
attractive
and
if
people
have
thoughts
on
where
we
should
go
further
with
this,
so
I
wanted
to
start
just
by
what
got
me
going
down.
This
path
was
sort
of
sitting
back
and
thinking
a
little
bit
of
a
a
lot
of
the
feedback
and
points
that
people
have
made
over
the
last
couple
of
years.
That
just
builder
has.
C
Has
been
around
and
trying
to
address
some
of
the
using
user
scenarios
that
just
builder
wasn't
really
originally
designed
to
to
me.
I
should
step
to
take
a
step
back
and
talk
about.
Why
did
builder
is
what
it
is
today,
so
the
origins
of
jet
builder
actually
predate
our
going
open
source
and
in
fact
it
was
a
a
hedge
against
our
ability
to
open
source.
C
The
the
compiler
technology,
as
early
as
we
did,
I
was
trying
to
create
an
API
to
the
Omar
compiler
that
we
could
open-source
independently
of
the
compiler
itself
and
as
part
of
that
exercise,
I
was
also
trying
to
sort
of
drastically
simplify
what
it
was
he
had
to
do
nor
write
a
compiler
since
as
part
of
that
effort,
I've
kind
of
gone
through
the
process
a
few
times,
and
it
was
reasonably
painful.
The
number
of
things
you
had
to
hook
up
and
configure
and
get
going
before.
C
You
could
even
sort
of
start
really
writing
a
JIT
compiler
for
a
language
just
kind
of
what
usually
set
down
instead
of
to
do
from
the
get-go.
So
I
was
trying
to
simplify
that
process,
and
so
what
I
ended
up
creating
was
really
an
epi
that
just
kind
of
sat
on
top
of
the
Omar
compiler
and
passed
through
the
things
that
you
are
asking
it
to
do
down
to
the
Omar
compiler,
which
meant
that
people
using
JIT
builder
had
a
set
of
concepts
that
they
were
working
with,
which
were
defined
by
the
JIT
builder
API.
C
Sort
of
bimodal
or
the
two
aspects
are
confusing
for
some
people,
especially
if
you
really
want
to
see
what
what
you're
doing
with
JIT
builder,
and
so
that
was
one
of
the
one
of
the
main
goals.
I
wanted
to
try
and
bridge
this
dual
mental
model
that
you
have.
If
you,
if
you
really
start
looking
deeply
into
what
JIT
builder
is
doing
and
and
some
people
had
expressed
some
difficulty
kind
of
managing
that
that
duality
and
and
where
it
kind
of
surfaces,
a
lot
is
when
you're
trying
to
do
with
logging
debugging
analysis.
C
So
when
you're
trying
to
it's
all
well
and
good,
if
you
know
exactly
what
you're
trying
to
do,
and
you
write
exactly
the
correct
just
builder
code
right
from
the
start.
But
if
you
happen
to
make
a
mistake,
figuring
out
that
you've
made
a
mistake,
wasn't
only
the
straightforward
process
and
it
was
hard
to
do
that.
It
just
builder
was
your
mental
model
of
the
world,
so
I
wanted
to
fix
some
of
that.
In
addition,
I
was
hoping
to
improve
on
some
of
the
accessibility
of
JIT
builder.
C
It's
sort
of
part
of
this
extensibility
aspect.
It
struck
me
that
it
would
be
very
useful
to
be
able
to
operate
from
the
JIT
builder
representation
itself.
So,
if
you
think
of
the
coals
that
you
make
digit
builder
as
building
a
data
structure
as
opposed
to
being
a
path
through
API
into
some
other
thing,
the
Omar
compiler
that
that
started
to
feel
to
me,
like
a
more
usable
mechanism,
I
was
hoping
to
provide
an
easier
experimentation
path
for
new
compiler
concepts,
so
not
not
forcing
everybody
to
go
all
the
way
down
to
the
Omar
compiler.
C
C
It
could
actually
extend
if
you
could
extend
it
down
so
that
it
actually
could
encompass
what
the
compiler
il
currently
looks
like
you
could
use
it
as
a
as
a
path
to
evolve
the
il
in
a
different
direction,
without
necessarily
losing
backwards
compatibility
with
all
the
existing
things
that
depend
on
the
compiler
IO,
which
is
really
kind
of
a
decoupling
story.
So
this
isn't
to
say
necessarily
that
I
want
to
do
a
couple
of
just
builder
from
the
Omar
compiler.
But
I
was
hoping
to
get
a.
C
You
know
that
sort
of
freedom
to
play
without
pulling
in
all
of
the
omar
compiler
easier
ability
to
have
cut
a
client
and
compiler
versus
server
kind
of
scenarios,
maybe
make
it
easier
to
rate
to
other
languages
and
one
that
kind
of
popped.
Up
from
now
and
again,
you
make
it
a
little
bit
more
distinct
from
open,
G
line
so
that
maybe
there
are
fewer
constraints
on
how
it
evolves
going
forward.
C
It's
still
like
it-it's
kind
of
a
fact
of
nature
that
Omar
no
59
or
barely
linked
in
a
lot
of
ways.
So
it's
hard
to
change
some
things
without
making
changes
in
both
projects,
I
was
hoping
to
provide
a
place
where
we
could
do.
Excuse
me
things
that
you
could
just
do
it
into
builder
and
not
have
to
worry
about
what
you
would
what
you
would
do
to
open
janeline,
because
you
wouldn't
be
affecting
an
open,
j9
role,
which
has
pluses
and
minuses
of
course
anyway.
C
So
so
that's
I
mean
kind
of
a
grab
bag
of
of
interesting
things
that
I
was
hoping
to
accomplish
with
jib
builder
2.0,
where
I
am
right.
Now
is
nowhere
near
to
accomplishing
almost
any
of
these,
but
it
did
provide
sort
of
a
way
to
start
and
I
wanted
to
mention
these
just
because
they
are
things
that
I
guess
I've
collected
over
the
years
as
sort
of
issues
with
the
Omar
compiler
and
with
dick
builder
1.0,
not
that
we
ever
used
that
naming
the
current
kit
builder
API
alright.
C
The
prototype
is
completely
independent
of
Omar,
but
that's
mainly
because
I
just
haven't
written
the
code
generator
to
generate
code
down
into
the
Omar
compiler.
That's
not
to
say
that
I,
don't
think
that's
something
I
should
do.
In
fact,
I
had
hoped
to
do
that
before
I
came
to
talk
to
this
group
about
it,
but
in
the
interests
of
moving
forward
and
given
I
haven't
had
enough
time
to
do
it.
You
know
that's
kind
of
where
we
are.
It
does
include
some
interesting
rudimentary
logging
and
allows
you
to
pretty
print
just
build
or
oil.
C
So,
as
I
mentioned
before,
I
wanted
it
to
be
a
representation
that
stands
on
its
own.
So
there
is
now
a
JIT
builder
I
data
structure
that
you
build
when
you're,
when
you're
calling
to
builder
API
functions
and
then
I
also
bought
some
broth
and
some
interesting
sort
of
prototype
experiments.
I'll
talk
a
little
bit
more
later
on
about
it,
rather
than
worry
about
it
here.
C
So
there's
a
lot
of
JIT
builder
2.0
things
that
look
very
similar
to
the
existing
JIT
builder
things.
Well,
there
are
some
twists:
I
did
simplify
some
of
the
names,
so
some
of
the
familiar
concepts
are
there
still
a
thing
called
a
builder
which
used
to
be
called
il
builder
edge,
decided
to
take
the
il
out.
It
has
a
subclass
called
function
builder,
which
used
to
be
called
method
builder
I'm,
not
quite
sure,
I,
never
really
liked
the
method.
Builder
name
it
felt
like
it
was
just
carrying
stuff
from
Java
that
wasn't
really
appropriate.
C
I
felt
weird
talking
about
a
native
seed
like
function.
That
was
called
a
method,
so
I
changed
that
function
builder.
The
other
builder
types
would
come
along
with
this,
but
I
have
an
implement
of
yet
type
is
I
did
the
same
thing
with
type
as
with
builder
I
just
took
off
the
il.
There
is
still
a
type
dictionary
and
there's
a
thing
called
value.
All
these
things
are
in
the
Oh
market
builder
namespace.
So
they
don't
include
anybody
else's
life,
and
then
there
are
a
few
different
new
things
that
I
have
brought
in
here.
C
So
I
created
a
things
very
simple
right
now
called
config.
That
just
allows
you
to
specify
some
configuration
for
things
like
do
you
want
to
do
logging
or
not?
Do
you
want
to?
Are
you
trying
to
debug
the
transformations
that
are
being
done
by
transform
a
transformation
operation
that
sort
of
thing
I
stole
the
concept
of
dialect
from
ml?
I
are
I,
guess
still
is
a
bit
strong,
really
just
a
concept.
C
It's
the
idea
that
the
idea
that
you
could
layer
you'd
have
different
layers
of
operations
that
you
could
use
and,
in
a
particular
dialect,
you'd
be
restricted
to
using
a
certain
subset
of
the
operations,
and,
if
you
had
I
guess
the
goal,
there
was,
if
you
had
a
transformation
that
was
written
for
a
particular
that
knew
about
a
particular
set
of
operations
that
were
part
of
a
dialect.
You
wouldn't
be
able
to
necessarily
apply
that
to
another.
C
Operation
is
another
key
thing
that
doesn't
exist
in
the
current
tip
builder
API,
because
you
can't
talk
about
operations
independently
of
just
calling
them
so
in
in
jiff
builder.
You
call
things
like
adds
upload
for
loop
up,
I
now
call
those
things
operations
and
they
actually
are
a
data
structures
that
represent
the
actual
action,
that's
being
performed,
there's
an
enum
that
lists
what
the
what
the
operations
can
be
and
they're.
C
One
neat
thing
is
a
type
graph
which
is
essentially
stores
the
valid
kinds
of
types
for
values
that
you
can
pass
into
an
operation
so
that
you
can
validate
the
calls
that
you're
making
on
the
fly.
Basically,
as
soon
as
you
make
a
call
to
create
an
operation,
it
will
validate
that
it's
a
proper
kind
of
operation,
and
it
can
give
you
a
meaningful
error
message.
C
So
it
becomes
part
of
the
data
structure
that
you
build
when
you,
when
you're
using
JIT
builder,
so
values
type
symbols,
operations,
builders,
etc.
They
all
create
data
structures.
Each
one
has
an
an
ID
and
potentially
you
can
even
give
it
a
name.
So,
for
instance,
a
builder
object.
You
could
give
it
a
name
that
corresponds
to
it.
That's
a
meaningful
thing
for
you
to
give
it
a
name.
C
C
So,
for
example,
if
you
were,
if
you
were
to
call
it,
then
else
and
pass
it,
the
address
of
the
end
builder
variable
and
the
address
of
the
elta
builder
variable
is
those
two
variables
we're
set
to
null.
It
would
automatically
allocate
you
a
builder
object
and
store
it.
There
I've
changed
that
so
that
you
now
have
to
call
orphan
builder
to
create
a
builder
and
pass
it
in
just
to
simplify
the
API
a
little
bit.
C
These
things
up
a
bit
I
think
that's
as
much
as
I'll
stay
there
I'll
say
all
right,
so
I'm
gonna
go
through
a
bunch
of
the
facilities.
Now,
I
guess
I,
don't
classes
about
their
work
for
this
and
just
kind
of
talk
a
little
bit
about
what
they
look
like
what
kind
of
API
they
expose
to
the
world
and
again
I
want
to
emphasize.
C
This
is
a
prototype
that
I
wrote
it's
not
something
that
the
cast
in
stone
or
that
it
has
to
work
this
way,
I'm
I'm
describing
a
thing
that
I
came
up
with
to
see
what
people
think
of
it
and
as
a
mechanism
to
get
concrete
feedback,
but
I'm
in
by
no
means
attached
necessarily
to
how
these
things
are
all
there
as
I
described
them
here.
Alright,
so
the
I
guess
lowest
level
fundamental
piece
here
as
a
value
right
value
is
just
some
type
of
data
that
you
operate
on
and
because
I
wanted.
C
The
API
are
the
the
representation
to
be
extendable
and
for
people
to
be
able
to
add
their
own
types
and
to
add
their
own
operations
in
here.
It
really
is
some
kind
of
data
right.
It's
not
any
kind,
it's
not
necessarily
a
primitive
kind
of
data.
It
could
be
a
record.
It
could
be
an
array.
It
could
be
all
kinds
of
different
things
if
you
had
sensor
whatever
and
so
right
now.
C
At
this
exact
moment,
the
public
API
of
value
is
right
there
and
the
third
one
is
probably
not
something
that
really
needs
to
be
there.
It's
just
you
can
ask
for
its
ID
and
you
can
ask
for
its
pipe
and
this
used
to
be
on
parents
thing
is
just
an
interesting
little
toy
thing,
I
put
in
there
to
identify
if
a
value
is
used
outside
of
the
Builder
in
which
it
was
created
ie.
Is
it
used
further
away
than
just
a
very
local
context?
C
C
What
the
legal
data
is
that
that
value
can
have
and
sort
of
new
in
this
prototype,
you
can
ask
the
value
for
it
like,
and
that
type
is
a
real
type
like
it's,
not
just
the
primitive
type
but
like
it
used
to
be
used
to
be
able
to
ask
a
value.
What
it's
primitive
type
was,
which
actually
correspond
it
to
the
Omar
compilers
to
your
data
type
type.
C
But
if
you
were
talking
about
a
value
that
was
looking
at
a
struct,
you
would
actually
get
back
a
pointer
type,
because
it's
what
you're
really
talking
about
it's
an
address
to
something
in
the
new
scheme
if
you're
or
actually,
if
you
were
even
a
better
example,
would
be.
If
you
had
a
pointer
type,
you
could
be
pointer
to
pointer
to
a
pointer
to
n64
the
type
that
it
would
tell
you
is
address,
because
that's
a
pointer
type,
it
doesn't
tell
you
the
details
about
what
it
is.
C
But
now
you
can
ask
for
the
just
builder
type
of
something,
and
so
if
you
are
actually
working
with
a
pointer
to
pointer
to
pointer
to
n64
the
type
of
that
type
of
a
value
of
that
will
be
pointer
to
pointer
to
pointer
to
n64,
and
you
can
actually
manipulate
that
type
and
look
at
it.
And
then,
if
you
perform
operations
like,
if
you
dereference
that
value,
it
will
strip
off
one
of
the
pointer
tools
in
the
type
of
the
value
that
it
returns.
C
So
you
can
actually
query
the
real
value
as
an
open
question
here
is
whether
or
not
value
will
become
an
immutable
thing.
It's
sort
of
an
immutable
thing
in
the
current
chip
builder
API
and
it's
sort
of
isn't.
There
are
facilities
like
virtual
machine
operand
stock,
for
example
that
will
overwrite
what
a
value
is
if
it
learns
of
a
new
control
path
that
it
needs
to
to
add
things
into.
C
Walk
on
traverse
the
existing
data
structure,
that's
being
they
file,
it's
being
created
from
a
shipbuilder
call,
so
that
I
think
virtual
machine
offer
and
stack
will
be
able
to
do
what
it
does
today
without
needing
to
to
introduce
mutability
of
values.
But
I
have
to
think
about
that
a
little
bit
harder.
But
that's
the
direction
I'd
like
to
go
in
is
to
make
value
in
beautiful
and
I.
Think
that's
all
I
was
gonna,
say
about
values.
C
C
C
A
C
Remembering
everything
I
have
in
here
operation
is
the
next
sort
of
level
up.
So
an
operation
is
is
something
that
does
something
right
again,
because
I
want
it
to
be
extensible
and
for
people
to
be
able
to
define
their
own
things.
It's
hard
to
lay
down
a
more
specific
definition
than
it's
a
thing
that
does
something
it's
so
full
margins
build.
Our
operation
is
an
abstract
base
class
for
operations
which
identifies
what
the
actual
action
is
using
an
enum,
so
I
gave
an
example
of
some
of
the
things
that
are
in
the
enum
right
now.
C
At
sub
load
store
at
people
be
familiar
to
people
who
have
used
to
filter
before,
and
you
can
ask
an
operation
what
its
action
is,
but
interaction.
Every
operation
has
a
parent
builder,
which
is
where
this
operation
resides.
So
operations
aren't
allowed
to
float
around.
They
have
a
place
where
they
are
in
the
in
the
universe,
and
that
parent
builder
is
the
one.
C
So
you
you
get
a
begin
iterator,
you
get
a
rate
until
it's
the
end
iterator
and
you
can
dereference
it
to
get
the
value
that's
at
each
operation.
So
you
can
ask
for
operands
begin.
You
can
you
can
plus
plus
that,
as
long
as
it's
not
equal
to
operand
end
and
you
can
dereference
the
iterator
and
you'll
get
that
value
in
the
in
the
iteration.
C
Similarly,
for
results
and
for
types
and
for
any
builders
that
are
referenced
in
the
in
the
operation,
there
are
also
concrete
subclasses
for
each
of
the
kind
of
the
action.
So
there's
an
add
class
there's
a
subclass,
there's
a
load
class
store,
add
if
then
else
for
loop
up
etc.
So
if
you
want
to
define
a
new
operation
of
your
own
making,
you
have
to
create
one
of
these
subclasses.
C
You
have
to
add
it
to
the
action
to
the
enum
to
correspond
to
it
and
then
you'll
have
to
implement
some
of
these
public
interfaces
to
be
able
to
say
you
know
how
many
operands
it's
got,
how
many
results.
It's
got,
what
types
that
operates
on
if
it
has
any
builder
objects,
etc,
and
you
can
obviously
add
special
API,
that's
specific
to
your
new
operation.
If
you
want
to
at
that
point,.
C
D
C
So
builder
is
a
sequence
of
operations,
so
this
isn't
any
different
from
the
current
chip.
Builder
API
is
just
trying
to
come
up
with
some
sort
of
simple
explanations
for
what
these
things
really
are
so
a
builder.
Let's,
it's
basically
a
control
flow.
You
can
think
of
it
like
a
control
flow
label,
so
things
can
jump
to
it
direct
control
to
execute.
What's
in
that
builder,
and
then
it
will
perform
a
sequence
of
operations
and
those
operations
may
themselves
introduce
additional
control
flow
internal
to
themselves.
C
But
basically,
if
you
start
executing
a
builder,
unless
you
leave
the
builder,
you
will
continue
just
executing
the
sequence
of
operations,
one
by
one.
It's
not
a
basic
block,
it's
more
complicated
than
a
basic
block
and
again
that
boils
down
to
why
the
operations
can
be
more
complicated
and
higher
level
than
the
operations
that
we
typically
see
in
a
compiler
right.
We
have
in
JIT
builder,
we
have
operations
like
for
loop,
which
are
more
complicated
than
just
an
ad
or
a
sub
right.
They
have
internal
control
flow.
C
So,
anyway,
every
builder
is
contained
within
a
function
builder.
It
has
a
parent
function.
Builder
I'll
talk
about
function
builder
in
sections
to
clarify
what
that
is,
and
then
I
introduced
this
something
of
a
this
was
a
bit
of
a
murky
area
in
the
original
or
the
current
I
guess
just
builder
API
is
that
some
some
operations
that
you
call
like
I
gave
the
example.
C
If
compare
greater
than
are
basically
just
a
branch
to
another
builder
and
there's
no
promise
that
it's
going
to
come
back
or
not,
and
if
you
want
it
to
come
back,
you
have
to
explicitly
do
something
to
make
that
other
builder
come
back
to
like
to
merge
back,
there's
no
implicit,
merge
back
and
I
decided
to
call
that
an
unbound
builder.
So
it's
unbound
to
the
operation
that
directed
you
there
right.
So,
if
compare
greater
than
branches
to
a
found,
a
builder
that's
not
found
to
the
if
compare
greater
than
operation.
C
The
flows
are
already
determined
so
and
the
reason
why
you
need
to
do
that
or
the
reason
why
I
went
down
this
path
is
to
motivate
things
like
data
flow
analysis,
where
you
have
to
know
how
to
flow
values
around
through
operations
and
so
the
notion
of
a
builder
being
bound
or
not.
Helps
you
figure
out
how
values
flow
through
these
operations
to
the
builders
that
they
refer
to.
Ok,.
A
So
just
make
sure
you
understood
correctly
so
an
unbound
builders,
basically
like
kind
of
like
doing
a
go-to,
a
builder
yeah
a
bound
little
builders.
Well,
it
may
be
conditional.
Yes,
you
found
a
builder
is
more
like
a
call
and
that
there's
an
expectation
you're
going
to
go
somewhere
else,
do
stop,
come
back
and
then
come
back
and
yes,
the
so.
C
Yes,
because
it
kind
of
is
the
case
the
Builder
visit.
If
you
look
at
the
builder
in
isolation,
it
you
somehow
get
there,
it
gets
called
by
something
else,
and
then
it
goes
back
to
wherever
it
got
called
from.
I
want
to
say
no,
even
though
it
probably
is
more
accurate
than
I'm,
giving
it
credit
for
the
way
that
the
outer
service
plays
it
down.
I
guess
anyway,
I
guess
more
trying
to
trying
to
say
that
it's
the
operation
that
directs
control
to
the
Builder
that
determines
what
happens
after
the
Builder
completes.
A
C
C
Right,
and
so
what
that
means
is
that
there,
if
you,
if
you
have
a
bound
builder
you're,
not
really
allowed
to
have
it
unconditionally
branch
somewhere.
So
you
can't
put
a
go-to
at
the
end
of
a
round
builder,
for
example,
even
though
in
principle
you
probably
could,
but
it
seems
like
a
useful
rule
for
trying
to
validate
when
you're
putting
proper
control
flow
together.
C
C
So
that's
partially
how
it
gets
the
proper
types
for
the
values
that
you're
working
with
function
build
is
really
no
different
than
the
current
chip
builder
API
other
than
in
fact
it's
called
function.
Build
addresses
the
method
builder
as
a
name
and
as
parameter
so
that
it's
basically
a
callable
builder.
It's
a
builder
that
you
expect
to
be
called
and
pass
off,
operands
or
arguments
via
parameters,
but
other
than
that.
It's
just
a
sequence
of
things
that
execute
and
then,
if
you
want
to
make
more
complicated
things,
you
just
add
more
complicated
operations.
C
As
part
of
that
list,
no
different
than
the
current
API
is
is
a
builder
analogous
to
a
basic
block
or
is
my
things
more
complicated
than
a
basic
vlog?
Okay,
because
there's
in
there
can
be
internal
controls,
little
write
basic
logon,
a
basic
block.
If
you
execute
the
first
instruction
and
a
basic
block,
you'll
execute
everything
in
the
basic
block:
that's
not
necessarily
guaranteed
in
the
Builder
object.
It
would
be
hard
to
guarantee
that
I
think
so
it's
a
little
bit
more
generic.
C
So
it
wouldn't,
you
wouldn't
be
able
to
put
say
a
for
loop
into
a
block.
Builder
you'd
only
be
able
to
put
in
CMP
and
if
you
put
in
a
CMP
into
a
block
builder,
that
would
close
off
the
block
builder
at
that
point
right.
So
it
would
be
a
more
traditional
notion
of
a
basic
block
from
a
compilers
perspective.
You
could
also
imagine
an
extended
block
builder,
which
would
model
what
our
extended
basic
blocks
look
like
in
the
Omar
compiler
and
that's
sort
of
how
I
started
down
the
path
of.
C
Maybe
this
could
actually
be
a
different
way
to
represent
our
existing
il
and
so
provide
a
way
to
do
sort
of
higher
level
optimization
stuff
first,
but
eventually
be
able
to
lower
it
down
into
a
model.
That
looks
very
much
like
what
the
Omar
compilers
il
looks
like
and
then
just
becomes
a
straightforward
translation
into
it.
What.
C
Program
just
be
one
big
builder
like:
why
do
we?
When
would
we
have
different?
You
need
different
builders
to
be
able
to
represent
different
entry
points
right
so
and,
if
you're
doing
an
if-then-else,
that's
one
operation,
but
it
has
to
it,
has
to
builder
objects
associated
with
course
to
correspond
to
the
them.
Okay
and
the
else
path.
A
for
loop
has
a
loop
body
builder.
C
That's
where
you
put
the
operations
that
you
want
to
be
iterated
on
by
the
for
loop
operation,
okay,
and
if
you
can
also
tell
it
that
you
or
it
can
also
give
you
a
break
builder.
So
if
you
need
to
jump
to
a
great,
if
you
want
to
do
a
break
inside
the
loop,
you
just
jump
to
the
break
builder.
If
you
want
to
do
a
continue,
you
just
jump
to
the
continue
builder
and
that's
all
set
up
by
the
for
loop.
C
C
So
the
idea
here
is
that
this
register
valid
operation
is
a
functions
provided
by
the
type
graph
and
it's
basically
saying
that
it
produces
an
integer
eight,
eight
by
ten
to
eight
bit.
Integer
result
if
you
tripa,
if
you
use
an
add
service
and
you
pass
two
values
that
are
an
8-bit
integer
and
Nathan
integer
and
then
the
same
thing.
C
There's
this
rule
down
here
that
allows
you
to
add
any
machine,
word
sized
integer
to
an
address
and
get
another
address,
which
is
a
very
easy
like
thing
to
be
able
to
do,
but
there
are
actually
better
productions
produced
for
pointer
types,
which
I
think
is
on
the
next
slide
right.
So
type
Dictionary
has
a
register
pointer,
type
I,
which
is
used
by
pointer
to
so
when
you
call
pointer
to
with
a
base
type,
it
returns
a
type.
C
That
is
a
that
reflects
a
pointer
to
that
type
of
base
item,
so
it
could
be
pointers
to
pointers
in
64,
in
which
case
this
pointer
type,
that's
being
passed
in
here
would
be
pointer
to
pointer
to
in
64
so
registers
the
type
with
the
graph,
so
it
can
create
so
I
can
link
nodes
based
on
that
type.
It
asks
what
the
base
type
is.
C
In
the
example
I
just
listed,
that
would
be
pointer
to
n
64
because
we're
talking
about
the
pointer
type
Pasadena's
pointer
to
pointer
to
n
64,
so
the
base
type
would
be
pointer
to
n
64
and
then
in
registers
valid
operations
for
manipulating
that
pointer.
So
you
can
add
an
integer
to
that
pointer
type
and
it
will
give
you
another
pointer
type
of
the
same
type,
basically
you're.
It's
kind
of
you're
using
add
to
index
into
a
half
of
a
base
pointer
and
you're,
going
to
add
elements
of
the
size
of
base
type.
C
That's
not
shown
under
a
sub
can
be
used
to
subtract
two
pointer
types
and
get
the
size
between
them.
The
number
of
elements
between
it,
you
can
index
at
a
pointer
type
for
a
word
and
get
the
address
and
sort
of
the
same
thing
as
ad
synonym
for
add
I.
Guess
in
this
case,
if
you
do
a
load
at
for
that,
pointer
type
he'll
get
the
base
type
and
if
you
do
a
store
at
with
that
pointer
type
and
that
base
type,
it
doesn't
return
anything.
C
So
it
says
that
that's
a
valid
operation
combination,
so
that-
and
it
will
do
that
for
any
pointer
type
that
gets
created
by
the
system.
So,
as
you
create
pointer
types
that
you
work
with,
it
will
add
valid
productions
to
the
type
graph
to
allow
you
to
manipulate
those
pointers.
Properly.
I
also
created
some
extremely
basic
traversal
support.
So
a
visitor,
you
can
probably
guess
what
this
looks
like.
C
Basically,
it's
a
base
class
that
allows
you
to
override
a
set
of
protected
virtual
functions
that
are
called
at
various
points
during
a
traversal
of
the
of
the
graph
of
the
starts
of
the
function
builder
walks
through
all
the
operations
and
as
it
visits
an
operation.
If
that
operation
has
builder
object,
it
will
visit
those
builder
objects.
C
So
it's
a
very
straightforward,
depth-first
traversal
of
the
graph,
and
then
you
can
basically
instrument
at
any
point
in
that
you
can
get
called
when
you're
on
the
function
build
results
before
you
visit
the
operations
or
after
you
visit
the
operations
when
you're
going
to
visit
a
builder,
you
can
get
called
before
it
walks
through
the
operations
of
that
builder
or
after,
and
you
can
also
get
called
at
every
operation
that
it
did
it's
along
that
path.
So
that's
not
a
fully
general
or
even
you
know,
there
are
way
more
different
varieties
of
useful
visitations.
C
It's
just
what
I
kind
of
started.
With
from
what
I
needed
the
example
that
I
created
a
visitor
is
a
pretty
printer
type
thing,
actually
called
it
pretty
country,
that's
about
450
lines
of
code
that
basically
creates
a
logging
stream
and
outputs.
It
walks
the
pipe
dictionary
and
then
it
walks
the
function
builder,
using
using
the
the
visitor
pattern
to
basically
print
out
a
textual
representation
of
the
of
the
full
just
builder
il
that
you've
created
so
I
didn't
show
everything
here,
but
this
is
from
the
start
of
the
function
builder.
C
So
mb0
is
basically
that's
the
index.
I
mentioned
everything
has
an
index
and
a
name
so
that
you
can
search
for
it.
This
one
has
the
name
of
the
function.
It
has
a
type
dictionary
which
I
didn't
show,
but
it
actually
got
printed
out
earlier
on
which
wouldn't
define
what
these
various
types
are.
That
are
me,
represented
everywhere.
I
tried
to
make
it
easily
kind
of
easy
to
navigate
around
in
the
system
to
find
different
pieces
and
sort
of
the
same
way
that
we
walk
through
jet
logs
right.
C
So
operations
have
an
identifier,
that's
consistent
for
that
operation.
So,
in
a
log,
if
you
were
doing
transformations-
and
you
saw
an
off
three-
it
would
always
be
this
off
three
and
therefore
you
could
you
know
kind
of
search
for
off
three
throughout
the
log
and
find
out
what
was
going
on
with
that
thing
in
previous
operations
or
not
I
elected,
to
do
kind
of
an
kind
of
an
LLVM
II
way
of
writing
the
operations
out.
C
C
It's
going
to
create
a
consonant
or
for
loop
up
is
an
interesting
one,
because
it
takes
the
name
of
iteration
variable,
a
value
for
the
base
of
the
iteration
value
for
the
end
of
the
iteration
and
a
value
for
the
step
of
the
iteration,
and
then
a
body
builder
b1,
which
I
didn't
show
but
looks
again
like
one
of
these
guys,
which
has
a
list
of
operations
in
principle,
could
have
other
attributes
like
these
things.
So
I
used
square
brackets,
just
for
the
hell
of
it.
C
Just
cuz
I
didn't
want
it
to
look
like
Lisp,
but
but
basically
things
that
are
sort
of
part
of
a
thing
other
than
operations
I
encased
in
in
brackets.
So
you
could
tell
the
extent
of
those
things.
I
probably
went
a
little
bit
overboard
on
some
of
these
things,
but
it's
it
is
what
it
is.
So
it's
I
find
it
to
be
relatively
readable,
but
it's
it's
just
one
example
of
how
to
do
this.
C
The
idea
here
is
that
year
passed
as
it
as
it
presents
through
the
operations,
it
will
pass
you
the
operation
object
and
you
can
give
back
a
builder
object
and
it
will
replace
automatically
for
you.
It
will
replace
the
existing
operation
with
whatever
sequence
of
operations
are
in
that
builder
object.
So
basically
the
model.
Is
you
look
at
the
operation?
C
If
you
want
to
change
that
operation,
you
create
a
builder
object,
inject
the
things
that
you
want
to
replace
the
operation
with,
and
then
you
return
it
and
it
will
automatically
extract
those
operations
out
of
the
Builder
object
and
put
it
in
place
stitch
it
together
for
you.
So
you
don't
have
to
manage
the
mechanics
of
doing
that.
C
You
just
have
to
worry
about
what
you're
trying
to
transform
that
operation
into
now
that
again,
only
one
of
the
things
that
you
one
of
the
kinds
of
things
that
you
would
want
to
do
in
a
compiler,
but
it's
there
are
some
useful
things
that
you
can
do
with
just
this.
So
the
first
thing
I
wrote,
which
ended
up
being
used
was
because
I
didn't
need.
It
anymore
was
an
append
builder
in
liners.
C
The
idea
here
was,
if
you
look
at
so
a
pen
builder,
is
just
a
way
of
passing
a
builder
object
and
saying
insert
this
builder
object
here
and
this
other
a
filter
object
and
if
you
look
at
that,
should
build
ril
for
that.
It's
basically
an
operation
that
says
append
builder
and
there's
a
builder
object,
and
then
that
builder
object
has
the
actual
operations
which
is
kind
of
wasteful.
C
It's
just
kind
of
it
doesn't
provide
any
real
value
to
have
that
be
in
another
builder
object
unless
something
needs
to
branch
to
that
that
code
sequence
as
well.
So
what
this
transformer
does
is
it
in
an
in
an
earlier
version
of
this
pit
builder
IL
I
ended
up
producing
a
whole
bunch
of
these
kind
of
append
builder
calls
automatically,
which
didn't
really
they
weren't
really
needed,
but
it
simplified
building
out
some
of
the
infrastructure.
So
I
wrote
this
little
transformer
thing
that
could
kind
of
go
through
and
just
piece
them
back.
C
C
Is
this
an
append
builder
operation
if
it
is
check
to
see
if
the
builder
object
that
it
refers
to
is
target
so
I
whenever
somebody
branches
to
a
builder
I've
just
set
a
boolean
on
the
builder
to
say
something
jumps
to
here,
and
so,
if
something
jumps
to
this
builder
than
I
can't
inline
it
because
I
need
something
to
be
able
to
write
it
otherwise,
and
so,
if,
if
it
is
a
target
or
it's
not
an
append
builder,
then
just
return
null,
don't
change
the
operation
at
all.
Otherwise
you
can.
C
C
C
But
it's
one
of
those
things
that
if
you
don't
build
it
in
right
from
the
get-go,
it
gets
really
really
painful
to
to
get
in
later,
and
so
I
wanted
to
put
that
in
right
from
the
start
and
so
function
builder
basically
counts
transformations
in
in
conjunction
with
transformer,
and
it
also
has
a
nice
because
of
the
pretty
printer
functionality
you
can
actually
print
the
operation
before
and
the
treat
and
shouldn't
say
trees.
The
operations
that
you're
transforming
it
to
it
can
print
it
out
directly
in
the
log.
C
So,
for
example,
there's
another
transformer
I
wrote
which
was
I
called
it
a
dielectric
reducer.
But
the
idea
was
that
it
would
reduce
higher
level
functions
kind
of
like
what
I
was
talking
about
with
with
or
one
before
it
could
take
for
loop
up,
and
it
would
break
it
down
into
more
like
a
blase
basic
block
kind
of
notation,
and
so
all
it
does
is
it
injects.
C
It
turns
this
for
loop
over
K
in
to
store
the
initial
value
in
decay
load
K
into
a
value
so
that
I
can
use
it
in
this
if
compare
greater
than
or
equal
to.
If,
if
the
loop
should
iterate
then
go
to
the
loop
body,
which
is
this
b15
thing
which
I
haven't
and
it's
going
to
include
b3
from
the
original
guy
and
then
there's
an
append
builder
of
B
13
B
13.
Is
that
continued?
C
The
break
builder
break
builder,
I,
think
I,
remember
YP
13!
Is
there
now
that
I
think
about
it,
because
B
15
is
actually
the
because
it
has
this
label
mark
it's
the
it's
the
break
builder
right,
so
anything
inside
b3.
If
it
wants
to
break
from
the
loop
it'll
branch
to
be
15,
I
can't
actually
remember
where
B
13,
Oh
B
13
is
sorry
it's
a
loop.
C
It
is
the
loop
continue,
so
I
haven't
shown
it,
but
that
would
have
the
bump
the
bump,
those
bump
K
by
one
and
check
to
see
if
it's
less
than
n
still,
if
it
is
then
branch
back
to
to
be
59.
So
this
is
this:
is
the
control
structure
that's
needed
to
implement
this
loop,
the
for
loop
and
so
like
2?
Is
the
transformation
number
that's
appended,
so
you
can
actually
say
I
don't
want
to
do
operation
I,
don't
want
to
do
transformation
to
your.
C
C
The
for
loop
over
loops
again,
the
iteration,
the
iteration
variable-
is
K,
so
it's
going
to
loop
over
K
and
then
it's
going
to
loop
from
from
the
value
v4
to
the
value
V
3,
which
would
be
things
that
have
computed
above
right.
So
this
is
like
from
0
to
n.
Minus
1
by
1
would
be
b5,
and
then
the
loop
body
is
a
builder
b300.
C
And
that
kind
of
got
me
to
the
end,
that's
as
much
as
I
had
time
to
write
for
today.
So
one
other
sort
of
level
of
experiment
that
I
performed
on
here
so
I've
talked
about
expense
ability,
but
I
I
also
put
the
proof
to
it
a
little
bit,
although
it's
currently
not
an
estate
that
builds
so
I.
So
I
mentioned
that
the
example
I
use
with
matrix
multiply,
just
because
it
has
a
relatively
contained
set
of
operations
to
work
with
by
default.
Just
builder
defines
a
type
called
doubles.
C
You
can
do
a
or
integers
you
can
do
matrix
multiply
over
doubles,
but
it
doesn't
define
a
complex
type
because
the
Omar
compiler
doesn't
have
a
complex
type,
and
so
what
I
did
to
extend
that
was
I
created
a
new
type
called
complex,
which
is
just
a
record
that
contains
both
a
real
and
an
imaginary
part.
I
created
a
new
operation
called
Const,
complex
I,
also
created
conjugate
and
magnitude,
but
then
used
them.
So
it
wasn't
very
useful
that
I
created
those
but
Gaunt's
complex.
You
need
and,
and
then
I'm
not
modified.
C
The
original
matrix
multiply,
which
is
the
same
code
sample
basically
that's
in
the
in
the
project
now,
and
the
only
real
changes
I
had
to
make
or
to
change
the
types
of
the
parameters
to
be
complex
instead
of
double,
which
is
basically
literally
changing.
The
word
double
to
complex
in
a
few
places
and
then,
when
you're
initializing,
the
dot
product
inside
the
matrix
multiply,
rather
than
initializing
the
some
variable
to
constant
double
at
0.
C
It's
a
Const,
complex
of
0,
comma
0,
and
now
the
only
change
I
had
to
make
to
the
client
code
in
order
to
have
it
operate
on
a
completely
new
type.
That
did
not
exist
in
jibt
builder
itself,
and
then
on
top
of
that.
Obviously,
you
can't
run
that
code.
Well,
I
can't
run
anything
right
now,
but
but
to
convince
myself
that
I
could
run
that
code.
C
If
it
sees
anything
that
has
a
complex
operand,
it
does
the
mapping
to
get
the
two
double
values.
And
then
it
generates
two
new
operations
which
do
the
individual
parts
of
double
operations
and
potentially
generate
new
double
results,
which
corresponds
to
the
original
complex,
any
confirmational,
complex
result
and
so
on.
And
so
it
manages
to
go.
Walking
through
this
whole
thing
and
basically
reduce
the
matrix
multiply
to
a
complex
matrix,
multiply,
write,
reduce
a
complex
mix
of
matrix,
multiply
into
a.
C
It's
like
yeah,
oh
okay.
What
next
I
have
a
web
browser
tab,
that's
open
with
a
new
issue,
but
it
hasn't
been
filled
in
with
very
much
yet
I
didn't
get
time
to
do
that
before
the
meeting,
I'm
scoring
and
I
have
not
yet
pushed
my
current
code,
which
I
don't
know
it's
about
it's
about
five
five
ish
thousand
lines
of
code
to
do
what
I've
gone
I,
don't
think
all
of
this
necessary
some
of
its
kind
of
older
versions
of
it.
C
So
I
need
to
do
some
cleanup
before
I,
really
push
it
and
yeah
I.
Guess
next
step
is
to
try
and
get
some
feedback.
The
whole
point
of
this
coming
out
was
to
talk
to
more
people
about
what
it
is
that
I've
done
so
far,
and
what
I
feel
like
I've
accomplished
so
far
and
to
see
what
people
think
and
then
I
guess
to
just
iterate
keep
going
if
you
want
I
can
I
can
show
a
more
complete
example
of
what
the
log
format
looks
like
if
that's
of
interest,
otherwise
stop
there
and
chat.
C
For
it
was
it
so
I
didn't
have
to
implement
a
virtual
function
in
every
subclass
just
to
return
the
thing
that
says
what
you
are,
but
basically
all
it
is
all
right.
Let's
use
its
its
use.
One
data
element
rather
than
a
whole
bunch
of
code
elements.
C
In
principle,
I
mean
I.
Guess
it's
possible
that
you
could
you
could
go
a
whole
hog
on
the
subclass
approach
and
then
you
wouldn't
even
really
need
anything
in
the
beta
class,
but
I
thought
I
felt
I
felt
like
it
was
useful
to
have
at
least
some
common
API
is
defined
there
and
I.
Don't
know
it
felt
silly
to
have
everybody
returning
a
constant.
C
You
could
just
store
a
constant
in
the
and
plus
it
I
think
it
makes
it
easier
for
diagnostic,
like
when
you,
when
you're
looking
at
the
thing
in
memory,
it's
easier
to
see
what
you've
gone.
If,
unless,
if
you
don't
have
symbols,
you
can
actually
look
at
that
value
rather
than
having
to
decode
what
class
this
object
is
to
figure
out.
What
did
PST
would
return.
C
D
First,
this
your
hand
I'm
not
sure
whether
I
got
it
correctly,
but
you
said
that
you
know
one
of
the
ideas
behind
these
two
is
to
make
a
JIT
builder,
essentially
a
builder
for
the
off
for
data
structure,
and
the
complete
data
structure
is
independent
from
omr
compiler.
So
in
theory,
you
can
build
a
data
structure
using
a
JIT
builder
and
then
feed
the
data
structure
to
another
sort
of
compiler
that
can
actually
then
generate
the
actual
machine
code.
Yes,
that's
right.
C
Yeah
I
mean
it's
essentially
very
similar
to
how
LLVM
allows
you
to
generate
LLVM
ir
without
necessarily
generating
code
from
it
right
you
can,
you
can
call
a
bunch
of
functions,
it
will
generate
LLVM
ir,
which
you
can
store
to
a
file
or
you
can
print
out
or
whatever
and
then
at
some
were
store
in
memory
and
then
at
some
later
time
you
can
say
just
compile
this
ir
that
I
already
generated
for
you
now.
Where,
for
you
can
you
can
write
analysis
passes
that
do
analysis
on
the
ir
itself,
without
necessarily
generating
code,
etc.
D
D
C
D
C
Such
a
wild
and
crazy
that
that's
something
that
I've
wanted
to
be
able
to
do.
Yes,
and
and
one
of
the
reasons
why
I
went
down
this
path,
I
mean
I
started
with
C++.
We
have
I,
have
a
Java,
client
API
before
or
again
matrix-multiply,
showing
that
you
could
that
you
could
write
Java
code
that
leveraged
the
shipbuilder,
API
I
am
hopeful
that
it
would
be
possible
to
write
a
language
extension
that
could
be
extended
in
the
language
itself.
Now
I'm
sure
that
would
come
with
some
restrictions
like
I.
C
Don't
think
everything
would
naturally
just
work,
but
you
could
like
that
might
be
another
place
where
dialect
could
come
into
play
right.
You
could
end
up
creating
a
dialect
which
is
visible
at
the,
for
example,
Java
level,
since
you
use
Java,
and
your
Java
client
could
work
with
the
the
operations
that
you
defined
in
that
that
that
dialect,
which
is
visible
in
Java.
But
if
you
wanted
to
leverage
more
of
the
lower-level
code,
you
would
need
to
translate
it
into
a
lower
dialect.
That's
sort
of
known
by
the
rest
of
the
JIT
builder
implementation.
C
That's
one
way
that
might
work.
I
think
that's
sort
of
consistent
with
how
ml
IR
works
in
a
sense
like
that
idea
of,
like
not
everything
works
with
every
every
kind
of
dialect.
What
I'm
hoping
to
be
is
a
little
bit
more
inclusive
right,
so
I'm
as
I
as
I
understand
it.
I
could
be
wrong
about
this,
but
as
I
understand
it,
the
example
that
I
showed
with
matrix
multiply
where
I
defined
a
new
type
called
complex
and
all
of
the
existing
operations
just
work
on
it.
C
I'm
not
sure
that
MLI
are
can
do
that
because
of
the
way
it
it
manages,
dialects
I,
don't
think
it
lets
you
and
then
I've
been
wrong,
but
I
don't
think
it
lets.
You
add
a
new
type
like
that
to
existing
operations,
you'd
have
to
define
new
operations
which
operate
on
the
new
type
and
then,
if
you
wanted
to
leverage
any
code
that
was
based
on
the
existing
dialect,
you'd
have
to
you'd
have
to
lower
it
into
the
you'd,
have
to
completely
lower
your
new
dialect
into
the
existing
dialect.
D
D
The
problem
is
that
you
need
to
you
need
to
debug
it,
and
that
means
not
debugging
the
code
generator,
but
actually
you
know
provide
a
debugger
for
language
that
you
that
you
are
implementing
using
to
cheat
builder
and
that's
becoming
hard
and,
for
example,
you
know
I
write
a
lot
of
with
LLVM
and
there
is
an
API
that
you
know
allows
you
to
generate
a
dwarf
metadata
out
of
it
because
it
was
not
built
in
right
from
the
beginning.
It's
actually
quite
awful
too.
You
want
to
do
it
and
then
then
the
whole
thing's
become.
D
C
C
Out
at
canines
all
that
we
created
our
own
tool.
That's
what
the
ddr!
That's!
What
our
ddr
tool
is
for
right.
It's!
It
leverages
some
of
the
some
of
the
clang
debug
info
that
comes
out,
and
it
also
does
some
other
kind
of
scraping
of
header
files
and
so
on,
to
parse
the
offsets
of
various
fields,
instructors
and
and
then
put
it
all
together.
C
C
I
would
say
the
one
place
where
there
is
something
of
what
your
what
you
described
is
I
believe
in
the
truffle
crawl
universe,
I
believe
they
have
a
notion
of
how
to
create
a
common
debug
format
for
all
the
polyglot
languages
that
run
on
top
of
the
the
grohl
and
truffle
on
top
of
truffle.
Maybe
give
you
on
top
of
groel
I'm,
not
100%,
sure,
where
that
I
guess
it
must
be
in
Brawl
but
then
probably
exposed
up
through
the
truffle
API
as
well.
I
know,
there's
been
some
research
work
done
on
that
front.
C
No
I
think
it'll
live
in
omar,
at
least
italy
it
it's.
Currently
it's
a
good
question,
because
right
now,
JIT
builder
is
an
omar
compiler
exception
directory,
so
I'll
have
to
what
I've
done
in
my
prototype,
which
is
easy
because
it
doesn't
connect
anything
yet
is
I
just
created
a
sub
directory
underneath
chip
builder
called
JBL,
which
is
the
acronym
I've
been
using
for
this
work,
just
Builder
il
I'm,
not
her
percent
happy
with
je
bill.
C
It's
a
good
question:
I
do
want
it
to
live
in
a
Walmart,
but
I
mean
principle.
You
could
write
backends
for
it
for
anything
in
principle.
In
fact,
another
interesting
use
case
I
was
thinking
about,
especially
in
the
context
of
the
llj
be
stuff.
That's
showing
up
at
the
project
is
that,
similarly,
to
how
I
talked
about
having
a
block
builder
an
extended
block
builder,
you
could
imagine
operations
that
are
implementing
fie
nodes
or
SSA.
That
would
simplify
the
translation
of
LLVM
ir
into
a
jig
builder.
C
This
JIT
builder
I
held
universe,
and
even
potentially
you
could
be
something
that
you
could
operate.
You
could
write
SSA
transformations
on
principle
if
you
wanted
to
so
I,
think
it's
a
very
good
question,
but
where
it
would
go
but
I
think
in
the
Omar
project,
probably
sitting
either
inside
or
besides,
the
JIT
builder
project
is
where
I
imagine
it
will
end
up.
C
Well,
there
aren't
any
other
questions.
All
I
guess
I'll
extend
the
open
invitation
to
people
who
can
write
me
emails
or
whatever.
If
you,
if
you
think
of
questions
after
the
call
that
want
to
ask
anything
privately,
that's
fine
I
will
try
to
get
the
issue
up
in
the
next
week
and
I'll.
Try
to
get
my
code
committed
after
I
fix.
The
problem
would
be
with
the
complex
type
right
now
and
I
look
forward
to
continuing
to
discuss
with
you.
Thank
you.