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

cost type for Space - how does a suitable cost modell look like for LLVM? #1

Open
maxhaslbeck opened this issue May 9, 2020 · 1 comment

Comments

@maxhaslbeck
Copy link
Collaborator

In

section \<open>experiment: cost type for Space\<close>

we define a cost type for space. It could be used to reason about space consumption of LLVM programs, similarly to time.
Abstract arguments should be moved upwards to the level of NREST. There an analog concept should exist.

what would be a suitable cost model for space in LLVM?
counting the number of words occupied?

@lammich
Copy link
Owner

lammich commented May 9, 2020

The bytes of allocated memory on the heap can be precisely measured. The real size will only contain an memory-manager implementation specific overhead. Stack space is harder to measure: variables might be held in registers (decreases actual space), or be subject to architecture specific alignment constraints (increases actual space). I think, however, that a safe over-approximation by a constant factor is possible. Another problem with stack space is that we don't see variables in the shallow embedding at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants