comparison gen/irstate.h @ 945:03d7c4aac654

SWITCHED TO LLVM 2.5 ! Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel. Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple. Fixed return calling convention for complex numbers, ST and ST(1) were switched around. Added some testcases. I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 08 Feb 2009 05:26:54 +0100
parents 545f54041d91
children 1714836f2c0b
comparison
equal deleted inserted replaced
944:eb310635d80e 945:03d7c4aac654
1 #ifndef LDC_GEN_IRSTATE_H 1 #ifndef LDC_GEN_IRSTATE_H
2 #define LDC_GEN_IRSTATE_H 2 #define LDC_GEN_IRSTATE_H
3 3
4 #include <vector> 4 #include <vector>
5 #include <deque>
5 #include <list> 6 #include <list>
6 #include <sstream> 7 #include <sstream>
7 8
8 #include "root.h" 9 #include "root.h"
9 #include "aggregate.h" 10 #include "aggregate.h"
76 Identifier* isBranchToLabel; 77 Identifier* isBranchToLabel;
77 }; 78 };
78 79
79 struct IRAsmBlock 80 struct IRAsmBlock
80 { 81 {
81 std::vector<IRAsmStmt*> s; 82 std::deque<IRAsmStmt*> s;
82 std::set<std::string> clobs; 83 std::set<std::string> clobs;
83 84
84 // stores the labels within the asm block 85 // stores the labels within the asm block
85 std::vector<Identifier*> internalLabels; 86 std::vector<Identifier*> internalLabels;
87
88 AsmBlockStatement* asmBlock;
89 const LLType* retty;
90 unsigned retn;
91
92 IRAsmBlock(AsmBlockStatement* b) : asmBlock(b), retty(NULL), retn(0) {}
86 }; 93 };
87 94
88 // llvm::CallInst and llvm::InvokeInst don't share a common base 95 // llvm::CallInst and llvm::InvokeInst don't share a common base
89 // but share common functionality. to avoid duplicating code for 96 // but share common functionality. to avoid duplicating code for
90 // adjusting these common properties these structs are made 97 // adjusting these common properties these structs are made