Mercurial > projects > ldc
view ir/irdtype.cpp @ 1210:3d4581761b4c
Add some alignment info where LLVM might otherwise be more pessimistic.
In particular, %.nest_arg is always aligned even though it's bitcast from i8*.
Pointers in vtables are also guaranteed to be stored at aligned addresses.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 12 Apr 2009 21:56:43 +0200 |
parents | a6dbd571d417 |
children | 2a92c115461d |
line wrap: on
line source
#include "gen/llvm.h" #include "ir/ir.h" #include "ir/irdtype.h" std::set<IrDType*> IrDType::list; void IrDType::resetAll() { std::set<IrDType*>::iterator it; for(it = list.begin(); it != list.end(); ++it) (*it)->reset(); } IrDType::IrDType() { assert(list.insert(this).second); reset(); } IrDType::IrDType(const IrDType& s) { assert(list.insert(this).second); type = s.type; } IrDType::~IrDType() { list.erase(this); } void IrDType::reset() { type = NULL; }