aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/ir.c
Commit message (Collapse)AuthorAgeFilesLines
* only put dats can in .text now when emitting itlemon2025-12-141-1/+1
|
* various relocation related optimizationlemon2025-12-141-4/+6
| | | | | | | | | | With 59ca5a8db, querying if a symbol is defined is cheap. If we're compiling code that calls foo() and we defined foo() in this compilation unit, we already know its offset within the .text section, so use it instead of emitting a relocation for the linker to handle. Also, put small literal data in the .text section instead of .rodata. This seems to improve performance (cache locality?), and as a bonus, it will be good for aarch64's instr encoding with smallish PC-relative offsets.
* Add -O optimization flaglemon2025-12-131-2/+4
|
* fix position independent loads of function symbols.lemon2025-12-131-3/+3
| | | | | | | | For `extern int x[1];`, can use PCREL32 for &x. But for `extern int x(int)`, must use GOTREL, when not being called directly (that's PLT). Therefore the type of an external symbol (actually just whether it denotes a function) matters when deciding what kind of relocation to emit, so keep that information.
* rename arraylength macro -> countoflemon2025-12-111-14/+14
|
* c: check actual reachability for non-void func may not return valuelemon2025-11-231-0/+21
|
* implement float varargs, and some other fixeslemon2025-11-231-1/+2
|
* ir: freeblk: clear predslemon2025-11-221-0/+2
|
* ir/ir.c: fix assert in mkcallarglemon2025-11-221-1/+1
|
* ir: barebones IR passes checked contractslemon2025-11-211-0/+3
|
* rename IR classes to reflect bitsizelemon2025-11-211-9/+9
|
* ir: fix delpred when npred becomes 1lemon2025-11-211-2/+12
|
* ir: for easier debugging, keep ctype in dats, print as literal when possiblelemon2025-11-201-2/+2
|
* debug output to stdoutlemon2025-11-191-1/+1
|
* preeliminary va_list supportlemon2025-11-141-9/+44
|
* ir: fix addcon equality check..lemon2025-11-121-1/+1
|
* ir: free useslemon2025-11-121-0/+4
|
* amd64: fix aggregate abi stuff;; ir: fold, peephole optimizing constructorslemon2025-11-051-93/+2
|
* c: also propagate terminates in genswitchlemon2025-10-241-1/+0
|
* codegen fixes, propagate terminatelemon2025-10-241-1/+2
|
* ir bugfixeslemon2025-10-231-1/+20
|
* refactor vec_of(T) and misclemon2025-10-201-1/+1
|
* Organize source files into directorieslemon2025-10-191-0/+618