-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathissues.txt
34 lines (32 loc) · 841 Bytes
/
issues.txt
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
todo:
- string constants
- global variables
- check if global var initialized from non-pure function
- continue
nice-to-have:
- foo++/foo-- as statement
- &&, ||
- optimize:
- if: move common part from begin of if/else basic block to previous basic block
- move assignments the most way down
- detect/remove unused assignments
- import
done:
- global constants
- output ASM
- support for stack and register variables
- optimize:
- copy propagation (inline unchanged variables like `int a = b;`)
- constant propagation (inline constants)
- sum: 1 + a + 2 -> a + 3
- +=, -=, *=, <<=, >>=
- limit number of local variables (registers)
- more complex, realistic example
- / %
- fix cast
- hex numbers
- while loop
- break statement
- pure function detection
- linearize AST (IR) to basic blocks
- determine needed/provided local variables