linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Handling of local variables in the backend
@ 2017-09-12 21:54 Dibyendu Majumdar
  2017-09-12 22:44 ` Christopher Li
  0 siblings, 1 reply; 5+ messages in thread
From: Dibyendu Majumdar @ 2017-09-12 21:54 UTC (permalink / raw)
  To: Linux-Sparse

Hi,

One issue I am facing at the moment is that there is no explicit
alloca for each symbol that is used in a function - so that the
backend has to detect when a symbol is accessed and then do alloca to
associate stack space. In the LLVM backend this is not so much an
issue as LLVM allows instructions to be inserted at a particular point
- so my code just ensures that all the allocas go at the start of the
function as required by LLVM. But I am having trouble with the other
backend that doesn't have this capability.

I think that there is no easy way to identify all the symbols used for
which stack space is needed and do the allocas at the start - is
there? I mean the only way is to go through all the instructions to
find these references as far as I know.

Is there a better way?

Regards
Dibyendu

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-13 10:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12 21:54 Handling of local variables in the backend Dibyendu Majumdar
2017-09-12 22:44 ` Christopher Li
2017-09-13  9:56   ` Dibyendu Majumdar
2017-09-13 10:18     ` Luc Van Oostenryck
2017-09-13 10:22       ` Dibyendu Majumdar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).