Re: [Tinycc-devel] Re : Re: Re : Some questions regarding of TCC's optimizations.

2022-04-04 Thread Domingo Alvarez Duarte
After reading this https://briancallahan.net/blog/20220330.html and using a citation on this list about dumping the ASM generated by TCC using objdump maybe we can find patterns on the generated code and identify where it's produced and update then. On 31/3/22 20:16, rempas via Tinycc-devel

Re: [Tinycc-devel] Enabling TinyCC to Create Empty Archives

2022-04-04 Thread Christian Jullien
Hi, As you need to update your Makefile to replace ar by 'tcc ar' you can as well replace the command that produce an empty archive by: echo '!' > libempty.a. This works even in the case you use gcc. Your patch is small and looks good too. Maybe maintainer will want to accept it. It's a good

Re: [Tinycc-devel] Re : Re: Re : Some questions regarding of TCC's optimizations.

2022-04-04 Thread Brian Callahan
Hello -- I am on this list, you know :) There may well be opportunities in tcc for a peephole optimizer approach, but I'll caution that each compiler is different and that blog post was examining QBE, so it wouldn't necessarily be a direct 1:1 mapping. QBE does a lot of optimization itself

Re: [Tinycc-devel] Re : Re: Re : Some questions regarding of TCC's optimizations.

2022-04-04 Thread Elijah Stone
A while ago, somebody worked on improving the quality of tcc's code generation. Apparently the resulting code performed similarly to gcc -O0. This was specific to the (32-bit) x86 backend, but feasible to port to others. I don't have a pointer handy, but you should be able to find it by

Re: [Tinycc-devel] Re : Re: Re : Some questions regarding of TCC's optimizations.

2022-04-04 Thread Domingo Alvarez Duarte
Hello Brian ! I understand what you are saying and based on that TCC basically doesn't do basically any optmization and based on the basic idea of search/look through the generated assembly (trough objdump) trying recognize easy hanging fruits and if finding any and localizing the generating