Add %local-tag to external core output
authorJan Rochel <jan.rochel@stud.uka.de>
Sun, 2 Jul 2006 20:45:59 +0000 (20:45 +0000)
committerJan Rochel <jan.rochel@stud.uka.de>
Sun, 2 Jul 2006 20:45:59 +0000 (20:45 +0000)
Hello, this is my first patch contributed to GHC. If there are any
inadequacies about it (maybe like this introductory disclaimer), please
let me know about it.

So, the need for this patch arose, while I was involved with processing
hcr files (external core output) and I noticed, that the output didn't
fully conform to the specification [1].
No %local-tags were used, which turned out to be a real nuisance as it
was not possible to determine which VDEFs can be erased in a further
optimization process and which ones are exported by the module.

Since the specification does not define the meaning of the %local-tag, I
assume, it makes sense, that it tags all functions, that are not
exported by the module.

The patch does not fully comply to the specification, as in my
implementation a local tag may appear before a VDEF but not before a
VDEFG.

[1] An External Representation for the GHC Core Language
    (DRAFT for GHC5.02), page 3, line 1

Greetings
Jan


No differences found