changeset | 40bd4a0d4870 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen |
description | Update to work with LLVM 2.7. Removed use of dyn_cast, llvm no compiles without exceptions and rtti by default. We do need exceptions for the libconfig stuff, but rtti isn't necessary (anymore). Debug info needs to be rewritten, as in LLVM 2.7 the format has completely changed. To have something to look at while rewriting, the old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means that you have to define this to compile at the moment. Updated tango 0.99.9 patch to include updated EH runtime code, which is needed for LLVM 2.7 as well. |
files |
changeset | 207a8a438dea |
---|---|
branch | |
bookmark | |
tag | |
user | Leandro Lucarella <llucax@gmail.com> |
description | Merge DMD r253: refactor: Argument => Parameter --- dmd/arrayop.c | 30 ++++---- dmd/arraytypes.h | 2 +- dmd/class.c | 8 +- dmd/declaration.c | 10 ++-- dmd/declaration.h | 16 ++-- dmd/doc.c | 12 ++-- dmd/dsymbol.c | 4 +- dmd/expression.c | 48 +++++++------- dmd/expression.h | 32 +++++----- dmd/func.c | 78 +++++++++++----------- dmd/init.c | 2 +- dmd/interpret.c | 8 +- dmd/mtype.c | 190 ++++++++++++++++++++++++++-------------------------- dmd/mtype.h | 32 +++++----- dmd/opover.c | 34 +++++----- dmd/parse.c | 40 ++++++------ dmd/parse.h | 2 +- dmd/statement.c | 90 +++++++++++++------------- dmd/statement.h | 14 ++-- dmd/struct.c | 8 +- dmd/template.c | 30 ++++---- gen/functions.cpp | 10 ++-- gen/functions.h | 2 +- gen/tocall.cpp | 10 ++-- gen/typinf.cpp | 6 +- 25 files changed, 359 insertions(+), 359 deletions(-) |
files |
changeset | 8d086d552909 |
---|---|
branch | |
bookmark | |
tag | |
user | Benjamin Kramer <benny.kra@gmail.com> |
description | IntegerType is now contextifed. Requires llvm >= 78969. resistor says this will be the last context API change :) |
files |
changeset | 1d5c3354b3c2 |
---|---|
branch | |
bookmark | |
tag | |
user | Benjamin Kramer <benny.kra@gmail.com> |
description | getNullValue is in Constant again Requires LLVM >= r77721 |
files |
changeset | 61f12f4651b5 |
---|---|
branch | |
bookmark | |
tag | |
user | Benjamin Kramer <benny.kra@gmail.com> |
description | Don't use llvm::getGlobalContext() anymore |
files |
changeset | 8ca25bd765a3 |
---|---|
branch | |
bookmark | |
tag | |
user | Benjamin Kramer <benny.kra@gmail.com> |
description | Build fix for the latest LLVMContext changes (LLVM r75445) This shouldn't break the build with older LLVM revs. We include LLVMContext.h in gen/llvm.h now to make the transition a little bit easier. |
files |
changeset | b6b6afc2dfc7 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Put scope-limited data on the stack instead of using 'new' and 'delete'. |
files |
changeset | e1e93343fc11 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Move function codegen data from IrFunction to new FuncGen. This change reduces memory consumption significantly by releasing the memory held by the STL containers that are now inside FuncGen. |
files |
changeset | 2292878925f4 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Add an `llvm::OStream` workalike class for use with `Logger::cout()`, with the crucial difference being special handling of `llvm::Type`s so they get printed by name rather than printing their full representation (which can be positively *huge*). This allows re-enabling some logger calls that were disabled due to extreme verbosity. |
files |
changeset | b243e28f63d4 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Generate less dead code by deleting unreachable blocks at the end of functions (which would otherwise appear if a function ends with a return, for example). |
files |
changeset | 93644700a0b3 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
description | Some minor changes to handling of variables referenced from nested functions in D2 . Added generation of new 'void*[4] reserved;' !ModuleInfo member . |
files |
changeset | 9a049fd1a014 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Let TargetABI::passByValue() know when a parameter is byref (either explicitly or because it's a static array) by giving it the pointer type instead of the type itself. This fixes Derelict compilation on x86-64, where the ABI wasn't expecting a static array to be passed in at all. |
files |
changeset | 46f6365a50d7 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
description | Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong. |
files |
changeset | 34f2fd925de3 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Intrinsics shouldn't see struct padding, so use a special TargetABI for them that removes it. This unbreaks the `llvm_*_with_overflow` intrinsics. |
files |
changeset | 15e9762bb620 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
description | Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 . |
files |
changeset | 854e86eaa022 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Revert change to treat bodyless functions in abstract classes as abstract. See DMD bug 2894. |
files |
changeset | 0c8048e13867 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Add forgotten null check. |
files |
changeset | 4b0b470bb2f9 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Automated merge with http://hg.dsource.org/projects/ldc |
files |
changeset | 871ae029ff49 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Do not emit declare or emit a vtbl entry for bodyless functions in abstract classes. Maybe the better fix would be to adjust FuncDeclaration::isAbstract, but there may be unwelcome sideeffects. |
files |
changeset | 01909bd1132c |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
description | Merge. |
files |
changeset | 1e699a4e9759 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Merge. |
files |
changeset | 79c6c8bc866c |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Removed invalid assertion. |
files |
changeset | 79758fd2f48a |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Added Doxygen file. Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete. |
files |
changeset | a16b587aab58 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Remove some logging I didn't mean to commit. |
files |
changeset | 00f377e03423 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Fix a problem which occurred when a function type was forward-referenced by parameter types. This was intended to fix the following test case: {{{ void delegate(Hit) dg; struct Hit { void delegate(Hit) a; } }}} which ChristianK reduced from a problem downs had on IRC. It also seems to fix mini/compile_delegate.d (which turns out to be quite similar, but produced a different error message). |
files |
changeset | 00a84912c689 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Remove 'noalias' and 'nocapture' from %.nest_arg. They no longer apply now that it may point to a struct containing variables from outer functions. |
files |
changeset | 8699c450a1a0 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Implement -nested-ctx=hybrid |
files |
changeset | 83d3b25c2213 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Isolate all knowledge of what a function's nested context looks like in a single place. No functional change. |
files |
changeset | 0424e7dfadb1 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Do not skip abstract function declarations if they have a function body. Fixes abstract_17_A,B. |
files |
changeset | ba9d6292572a |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Fixed forward reference problem in struct methods on x86-64. |
files |
changeset | 521dd1626d76 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Added initial support for raw LLVM inline asm. |
files |
changeset | 3cf0066e6faf |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | - Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM. - Eliminated the DLRValue DValue. - Implemented proactive handling of l-value CastExpS. - Minor tweak in runtime memory.d . |
files |
changeset | 5ebe8224988b |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Fixed problems introduced by previous commits that prevented Tango from compiling. |
files |
changeset | 3d1b16dabd25 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Eliminated the need for resolve, declare, const-init and define lists to drive code generation. |
files |
changeset | 4c20fcc4252b |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Fun with parameter attributes: For several of the "synthetic" parameters added to D functions, we can apply noalias and nocapture. They are sret parameters, 'nest' pointers passed to nested functions, and _argptr: Nocapture: - Sret and nest are nocapture because they don't represent D-level variables, and thus the callee can't (validly) obtain a pointer to them, let alone keep it around after it returns. - _argptr is nocapture because although the callee has access to it as a pointer, that pointer is invalidated when it returns. All three are noalias because they're function-local variables - Sret and _argptr are noalias because they're freshly alloca'd memory only used for a single function call that's not allowed to keep an aliasing pointer to it around (since the parameter is nocapture). - 'Nest' is noalias because the callee only ever has access to one such pointer per parent function, and every parent function has a different one. This commit also ensures attributes set on sret, _arguments and _argptr are propagated to calls to such functions. It also adds one exception to the general rule that attributes on function types should propagate to calls: the type of a delegate's function pointer has a 'nest' parameter, but this can either be a true 'nest' (for delegates to nested functions) or a 'this' (for delegates to member functions). Since 'this' is neither noalias nor nocapture, and there's generally no way to tell which one it is, we remove these attributes at the call site if the callee is a delegate. |
files |
changeset | 802d508f66f1 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Ignore the ABI some more for intrinsics |
files |
changeset | dc608dc33081 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the same LDC call. |
files |
changeset | afe271b0e271 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Two small bugfixes: - See through typedefs and enums in passByVal - Don't depend on TypeFunction::parameters->dim being the actual number of parameters; it contains unexpanded tuples as single elements. |
files |
changeset | 6bb04dbee21f |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Some calling convention work for x86-64: - Implement x86-64 extern(C), hopefully correctly. - Tried to be a bit smarter about extern(D) while I was there. Interestingly, this code seems to be generating more efficient code than gcc and llvm-gcc in some edge cases, like returning a `{ [7 x i8] }` loaded from a stack slot from an extern(C) function. (gcc generates 7 1-byte loads, while this code generates a 4-byte, a 2-byte and a 1-byte load) I also added some changes to make sure structs being returned from functions or passed in as parameters are stored in memory where the rest of the backend seems to expect them to be. These should be removed when support for first-class aggregates improves. |
files |
changeset | a91d6fc600cd |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
description | Fixed lazy arguments again. |
files |
changeset | 45af482e3832 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Updated ABI handling to be more flexible with regard to reusing lvalues and allocating fewer temporaries. |
files |
changeset | 9167d492cbc2 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Abstracted more (most) ABI details out of the normal codegen. |
files |
changeset | e8c6dbcd33d1 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | - Fixed x86-32 C ABI for complex number return values. - Removed unused code from the ABI class. |
files |
changeset | 7a0238db1962 |
---|---|
branch | |
bookmark | |
tag | |
user | Frits van Bommel <fvbommel wxs.nl> |
description | Implement support for intrinsics returning struct types (such as llvm.*.with.overflow) |
files |
changeset | 2667e3a145be |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | - Fixed LLVM style CL args for D2. - Moved main() into its own file gen/main.cpp - Fixed basic cross compilation - removed the option for setting OS - added support for llc's mattr, mcpu and mtriple switches - added basic ABI abstraction for return value rewrites, it's not perfect and will probably be completely rewritten once I get to handling parameter rewrites as well. - x86-64 extern(C) abi for cfloat returns now match (llvm-)gcc. |
files |
changeset | 89729c76b8ff |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Static ctors/dtors added via template mixins should not be added to modules that just import a module containing such a mixin. |
files |
changeset | 9a10fa839dc5 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Switch some getModule to getCompilationModule to make sure templates are emitted in the right module. |
files |
changeset | 1714836f2c0b |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h. Add getCompilationModule to Dsymbol and fix template compile unit decision code. Runtime compiles with -g again. |
files |
changeset | 03d7c4aac654 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | 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 . |
files |
changeset | 39519a1ff603 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Changed the way LDC determines if a template instantiation needs to get a definition, seems to speed up compile times quite a bit in some cases. |
files |
changeset | cac9895be400 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Automated merge with http://hg.dsource.org/projects/ldc |
files |
changeset | a904cc9bc064 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Convert struct arg to integer when passing inreg to make sure LLVM doesn't ignore the attribute! |
files |
changeset | b56f3571c450 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Fixed problem with static ctors, in templated imported classes, not begin run. Fixes #203 |
files |
changeset | d3a6f1a96731 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Replace assertion with errormessage for unsupported calling conventions. like Pascal. See dstress/run/e/extern_10_A.d |
files |
changeset | 7985bb036db4 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Follow the D ABI and pass the last arg in a register if it is a struct that fits. |
files |
changeset | 545f54041d91 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Implemented proper support for naked asm using llvm module level asm. Still not 100% complete, but already 1000 times better that what we had before. Don's BignumX86 implementation from Tango (when turned into a standalone unittest) seems to fully work with no changes, and great performance :) Fixed align N; in asm blocks. Fixed inreg parameter passing on x86 for ref/out params. Removed support for lazy initialization of function local static variables, I have no idea why I ever implemented this, it's not in the D spec, and DMD doesn't support it :P Some of the global variable related changes might cause minor regressions, but they should be easily fixable. |
files |
changeset | 94ba810ea2b0 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Fixed problem with nested function inside static nested function. see mini/compile_nested2.d. fixes #143 . |
files |
changeset | 331a176c1f4f |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Removed error on naked, not fully complete, but I'll be doing more work on it during this Christmas, and some things do work. Fixed taking delegate of final class method. see mini/delegate3.d. |
files |
changeset | 504a21e81a46 |
---|---|
branch | |
bookmark | |
tag | |
user | Christian Kamm <kamm incasoftware de> |
description | Only run unittests contained directly in the module. |
files |
changeset | 340acf1535d0 |
---|---|
branch | |
bookmark | |
tag | |
user | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
description | Removed KDevelop3 project files, CMake can generate them just fine! Fixed function literals in static initializers. Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE. Changed errors to go to stderr instead of stdout. Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!! |
files |