annotate llvm/docs/HistoricalNotes/2001-02-13-Reference-Memory.txt @ 164:fdfabb438fbf

...
author anatofuz
date Thu, 19 Mar 2020 17:02:53 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 Date: Tue, 13 Feb 2001 13:29:52 -0600 (CST)
anatofuz
parents:
diff changeset
2 From: Chris Lattner <sabre@nondot.org>
anatofuz
parents:
diff changeset
3 To: Vikram S. Adve <vadve@cs.uiuc.edu>
anatofuz
parents:
diff changeset
4 Subject: LLVM Concerns...
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 I've updated the documentation to include load store and allocation
anatofuz
parents:
diff changeset
8 instructions (please take a look and let me know if I'm on the right
anatofuz
parents:
diff changeset
9 track):
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 file:/home/vadve/lattner/llvm/docs/LangRef.html#memoryops
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 I have a couple of concerns I would like to bring up:
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 1. Reference types
anatofuz
parents:
diff changeset
16 Right now, I've spec'd out the language to have a pointer type, which
anatofuz
parents:
diff changeset
17 works fine for lots of stuff... except that Java really has
anatofuz
parents:
diff changeset
18 references: constrained pointers that cannot be manipulated: added and
anatofuz
parents:
diff changeset
19 subtracted, moved, etc... Do we want to have a type like this? It
anatofuz
parents:
diff changeset
20 could be very nice for analysis (pointer always points to the start of
anatofuz
parents:
diff changeset
21 an object, etc...) and more closely matches Java semantics. The
anatofuz
parents:
diff changeset
22 pointer type would be kept for C++ like semantics. Through analysis,
anatofuz
parents:
diff changeset
23 C++ pointers could be promoted to references in the LLVM
anatofuz
parents:
diff changeset
24 representation.
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 2. Our "implicit" memory references in assembly language:
anatofuz
parents:
diff changeset
27 After thinking about it, this model has two problems:
anatofuz
parents:
diff changeset
28 A. If you do pointer analysis and realize that two stores are
anatofuz
parents:
diff changeset
29 independent and can share the same memory source object, there is
anatofuz
parents:
diff changeset
30 no way to represent this in either the bytecode or assembly.
anatofuz
parents:
diff changeset
31 B. When parsing assembly/bytecode, we effectively have to do a full
anatofuz
parents:
diff changeset
32 SSA generation/PHI node insertion pass to build the dependencies
anatofuz
parents:
diff changeset
33 when we don't want the "pinned" representation. This is not
anatofuz
parents:
diff changeset
34 cool.
anatofuz
parents:
diff changeset
35 I'm tempted to make memory references explicit in both the assembly and
anatofuz
parents:
diff changeset
36 bytecode to get around this... what do you think?
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 -Chris
anatofuz
parents:
diff changeset
39