On 13.11.2016 20:14, alvin albrecht wrote:
> 
>>> llvm-cbe began wrapping some types into structures as pairs.
>> 
>> Did this happen for anything other than arrays? LLVM arrays
>> semantics are different from C (where arrays sometimes decay to
>> pointers, while structs don't). Keep in mind that the cbe also
>> needs to be able to compile LLVM code to C that came from other
>> sources than the cfe.
> 
> The fault was entirely in opt.  In the clisp.c example, opt combined
> some data into pairs called vectors and since clisp is using a lot of
> 32-bit types that resulted in structures with two 32-bit pairs in
> them.  I took out the opt step to avoid this and retried the
> compiles.  The vectors went away and the results were better without
> the opt step.
> 

We currently don't have an SDCC-specific fork of opt. So the opt is
thegenric one. Like all parts of LLVm, whenit encounters an unknown
target architecture it assumes the host architecture. Thus opt will try
to optimize for that one (the reason we need -disable-simplify-libcalls,
since it will otherwise genrate broken calls to puts()), which is not
always optimal. Still, we might benefit from some of the optimizations.
Have you tried calling opt with vectorizations disabled?

Philipp

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to