Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace C files in the runtime with generated code #101

Open
2 tasks
emwap opened this issue Feb 28, 2013 · 0 comments
Open
2 tasks

Replace C files in the runtime with generated code #101

emwap opened this issue Feb 28, 2013 · 0 comments

Comments

@emwap
Copy link
Member

emwap commented Feb 28, 2013

Background

Some runtime support files in lib/Feldspar/C have caused problems when linking on Ubuntu (see #26).

The intention of the files (feldspar_(c99|tic64x).{hc}) is to enable different implementations of runtime support functions on different platforms.

However, there are a few problems with this solution.

  • GHC and GHCi uses different linkers which can have surprising results on different architectures.
  • Most of the functions are small and should really be implemented as inline in the corresponding header file to allow optimization by the C compiler.
  • We have more information in the language than a C compiler (ranges etc) can gather, so we are missing an optimization opportunity by introducing the code this late in the chain.

Tasks

pjonsson added a commit to pjonsson/feldspar-compiler that referenced this issue Apr 12, 2014
…eldspar#101,

but keep it disabled by default.

No functional changes.
pjonsson added a commit to pjonsson/feldspar-compiler that referenced this issue Apr 14, 2014
pjonsson added a commit that referenced this issue Apr 14, 2014
Add a few more functions to the runtime library for #101.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant