This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
/
TODO
92 lines (63 loc) · 3.3 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Items marked with * are high priority.
Build system
------------
Determination of the target triple should be moved from the Makefile to a
configure script.
Target subdirectories should have their own Makefiles, instead of assuming
that there's only one source file and that it's called llvm-target.cpp.
Currently the target directory (eg: i386) is calculated from the target triple
(eg: x86_64-unknown-linux-gnu) using the "target" tool. This should be done
from a configure script, rather from the Makefile.
Define LLVM_TARGET_NAME from the Makefile rather than being specified in
llvm-target.h. Maybe LLVM_TARGET_INTRINSIC_PREFIX could go too. An annoyance
is that the target tool returns "x86" while what is needed is "X86".
Optimizations
-------------
Consider using separate caches for types and globals.
Correctness
-----------
GCC now has per-function optimization levels. Add support for this.
Unify the code that determines which LLVM linkage type to use. Need to do
a bunch of experimenting to work out how the mapping should really be done.
* Stop hooking directly into target specific ABI code (which requires patching
gcc). Instead, either try to get ABI info from the gcc hooks (which may mean
translating RTL) or reuse the clang code.
Testing
-------
Move the old FrontendXYZ tests from LLVM to dragonegg.
Code quality
------------
Consider not extending GEP indices to "pointer type" since GEP indices can have
any integer type now (except for struct GEP's - there the type must be i32).
Note that GEP indices are implicitly sign extended, so unsigned indices still
need to be explicitly zero extended to pointer size (is this always done now?).
Clarify and extend the distinction between gimple registers and "the rest",
the rest being mostly references.
BIT_FIELD_REF is used to extract (and presumably insert) vector elements.
Consider turning this directly into the corresponding vector operations.
Work in terms of units rather than octets (i8). For example, if the target
has a 16 bit byte, then use i16 for byte addressing.
Convert GCC floating point register constants without "going through memory"
(see TreeToLLVM::EmitRealRegisterConstant).
Reduce the use of macros.
Features
--------
* Move debug info generation over to the latest LLVM system, since we are now
the only user of the old debug info system.
Output proper debug info rather than throwing most of it away. Provide column
numbers in location info.
Many x86 specific builtins are not supported, even though it would be easy to
add support for some of them, for example the 256 bit versions of builtins we
do support. Improve this.
The GCC builtin lowering outputs helpful warnings (for example,
20081109_0.c:3:35: warning: attempt to free a non-heap object ‘bar’,
see maybe_emit_free_warning), but we don't. Improve this somehow.
Make LTO transparent. One part of this working out how to write bitcode when
using -c, which runs into trouble because gcc insists on running the assembler
on compiler output. Another part is looking into the possibility of encoding
bitcode in ELF sections like gcc does for gimple when doing LTO.
Add support for address spaces.
Add support for non-temporal stores.
Add type based alias analysis tags in more cases. Extend LLVM's tbaa
representation so it can represent a DAG and generate tags for struct
types too.