Mercurial > projects > ldc
view ir/irdsymbol.h @ 1285:91d9386d4a5a
Implement another D-specific pass: -dgc2stack
This one promotes GC allocations to stack memory when it can determine it's safe
to do so.
Not all GC calls are recognized yet (in fact only one *is* recognized for now).
Needs metadata, so disabled for LLVM versions that don't support it.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sat, 02 May 2009 11:58:50 +0200 |
parents | 1860414bf3b7 |
children |
line wrap: on
line source
#ifndef LDC_IR_IRDSYMBOL_H #define LDC_IR_IRDSYMBOL_H #include <set> struct IrModule; struct IrFunction; struct IrStruct; struct IrGlobal; struct IrLocal; struct IrField; struct IrVar; struct Dsymbol; namespace llvm { struct Value; } struct IrDsymbol { static std::set<IrDsymbol*> list; static void resetAll(); // overload all of these to make sure // the static list is up to date IrDsymbol(); IrDsymbol(const IrDsymbol& s); ~IrDsymbol(); void reset(); Module* DModule; bool resolved; bool declared; bool initialized; bool defined; IrModule* irModule; IrStruct* irStruct; IrFunction* irFunc; IrGlobal* irGlobal; IrLocal* irLocal; IrField* irField; IrVar* getIrVar(); llvm::Value*& getIrValue(); bool isSet(); }; #endif