David Nadlinger
d5e176484d
Verbose log prettification.
2012-12-08 19:19:08 +01:00
David Nadlinger
2d02270434
Re-enabled codegen optimization on LLVM 3.2.
...
The bug (PR14376) has been fixed in both master and the release branch.
2012-11-24 14:07:17 +01:00
David Nadlinger
19f570bcb9
AttrListPtr also requires the context arg in LLVM 3.2 now.
2012-11-24 12:40:12 +01:00
kai
2fec23b84e
AttrlistPtr::get() now requires context as first argument.
...
This is the first LLVM 3.3 related change.
2012-11-21 22:10:26 +01:00
kai
45848d19fc
Remove unused include. This fixes yet another MSVC-related compile problem.
...
Root cause is the `root.h` defines `strtof` which is used in `llvm/Target/TargetLibraryInfo.h` as an enumeration identifier.
2012-11-18 17:52:10 +01:00
David Nadlinger
34e1415f35
Merge pull request #226 from jerro/pragma-llvm-inline-ir
...
Pragma llvm_inline_ir
2012-11-15 12:05:17 -08:00
David Nadlinger
540888d6d0
Removed tautological #if block.
2012-11-11 00:32:15 +01:00
David Nadlinger
d14a869c19
Only emit a single bitcast for struct literal padding.
...
Mostly a cosmetic change.
2012-11-10 20:22:56 +01:00
David Nadlinger
5944e9cc51
Correctly zero out real padding in struct literals.
...
Fixes the std.variant unit tests on x86_64.
2012-11-10 20:11:10 +01:00
Jernej Krempuš
7bbe782615
Pragma llvm_inline_ir
...
Adding pragma llvm_inline_ir.
Improved the error messages.
Append "ret void" when the return type is void
Improved the error message
in case when the string passed as llvm inline ir isn't valid llvm
assembly language.
LLVM 3.2 fix.
Add attribute AlwaysInline inside DtoInlineIRFunction.
Always generate a body for llvm_inline_ir
Also, always make llvm_inline_ir functions linkonce_odr. Because
the body is always generated when a module uses a llvm_inline_ir
function, the fact that the linker removes the function shouldn't
cause problems.
2012-11-08 22:05:15 +01:00
David Nadlinger
45a3060da7
Prettied up nested context debug output.
...
The assertion is currently triggered when building the Tango/D1 unit tests.
2012-11-08 21:44:14 +01:00
David Nadlinger
c558f9caab
Added -disable-simplify-libcalls.
...
-disable-simplify-drtcalls was only intended to disable our
custom druntime call simplication pass for debugging purposes.
The new flag controls C runtime library calls optimizations as
performed by the LLVM pass, just as the corresponding LLVM tool
flags do.
2012-11-06 23:53:59 +01:00
David Nadlinger
03ef134aad
StripExternals only makes sense with GlobalDCE for cleanup afterwards.
2012-11-06 23:48:19 +01:00
David Nadlinger
fbd62f0532
It makes no sense to not inline alwaysinline functions.
2012-11-06 23:47:12 +01:00
David Nadlinger
0647cfb50c
Re-enable inlining by default for -O2 and above.
...
This fixes a bug introduced in 2f78dc686 .
Thanks to Jernej (jerro) for the fix!
2012-11-06 19:40:18 +01:00
David Nadlinger
08a8f5df9b
Fixed LLVM function attribute handling.
...
Previously, set_param_attrs would overwrite any pre-existing
attributes, which is problematic, as per-function attributes are
also stored in a slot in that attribute list. This for example
lead to "noinline" being dropped for functions with inline asm.
2012-11-04 17:48:26 +01:00
David Nadlinger
f95371aeb5
Amend -verify-each description to PassManagerBuilder changes.
...
We can't verify after each pass anymore with PassManagerBuilder, but
-verify-each is a hidden flag mainly useful for debugging our own
passes anyway.
2012-11-04 00:56:36 +01:00
David Nadlinger
dbe5e97d85
Clean up optimizer command line switch descriptions.
2012-11-04 00:56:36 +01:00
David Nadlinger
2f78dc686d
Use llvm::PassManagerBuilder for optimization scheduling.
...
This commit is based on Kai's pull request #157 .
2012-11-04 00:56:36 +01:00
David Nadlinger
07888f95e4
D1: Fixed accessing parameters in contracts.
...
This reverts the changes from commit f7e5245 and implements the
proper fix – in D1, contracts are treated as normal nested functions.
GitHub: Fix #138 .
2012-10-21 01:11:04 +02:00
David Nadlinger
ece5176aa9
D1: Fix Tango build.
...
'this' for methods nested in structs is now internally passed as a
pointer, even if struct this is by value in D1.
2012-10-21 01:11:04 +02:00
kai
83a7258ae4
Add address space number to getPointerSize() calls.
...
This is required for LLVM 3.2.
2012-10-20 17:49:58 +02:00
kai
fde625b33d
More changes to the Attributes class in LLVM 3.2.
2012-10-20 17:22:55 +02:00
kai
657fc42221
And still more changes for LLVM 3.2
...
There were additional changes to the Attributes class.
2012-10-15 18:31:18 +02:00
kai
fb108eed12
More LLVM 3.2 changes.
2012-10-14 18:45:31 +02:00
kai
8519f448f8
Improve error message if gcc or other tools can not be found.
...
This fixes #192 .
2012-10-14 12:39:35 +02:00
David Nadlinger
11619e55a9
Fix miscompilation of some functions returning structs.
2012-10-14 03:41:15 +02:00
kai
a7c7b514c0
Add changes for LLVM 3.2
...
- The Attributes class was changed again
- TargetData was renamed to DataLayout
Compiles again with LLVm 3.0, 3.1 and trunk(3.2).
2012-10-13 18:54:42 +02:00
David Nadlinger
051cd7302e
Fixed two issues with nested functions as template alias parameters.
...
Fixes #131 (GitHub).
2012-10-07 03:06:07 +02:00
David Nadlinger
da17b7c6b6
Only invoke mustDefineSymbol() once in DtoLinkage.
...
This is, of course, a microoptimization, but more importantly
makes stepping through the code easier.
2012-10-07 00:03:10 +02:00
David Nadlinger
c9e2fc34d1
Cleanup.
...
If ad would be null, the code above would have already crashed.
2012-10-06 20:40:14 +02:00
David Nadlinger
bb24f9bafe
Log messages: Fixed references to "toObjFile()".
2012-10-06 19:32:42 +02:00
David Nadlinger
5fa1a903e8
DtoResolveStruct cleanup.
...
irField is only set in DtoResolveStruct, so the comment was misleading.
2012-10-06 19:27:55 +02:00
David Nadlinger
2d54a02295
Use null instead of undef for unneeded nested context pointers.
2012-10-06 13:07:17 +02:00
Jernej Krempuš
7966abeb5e
Bitcast the LLValue to the correct type.
2012-10-05 21:58:19 +02:00
Jernej Krempuš
39300283c0
Made casts between vector types work.
2012-10-05 19:38:43 +02:00
David Nadlinger
4e49814afb
Vector -> static array casts are by address.
...
Fixes #176 (GitHub).
2012-10-05 17:23:31 +02:00
David Nadlinger
4f6ec96b27
Fixed vector initialization involving implicit conversions.
...
Fixes first part of GitHub #176 .
2012-10-03 19:51:04 +02:00
Jernej Krempuš
fd3e79b7bb
Corrections.
2012-10-03 15:26:43 +02:00
Jernej Krempuš
115bc7113e
Improved error messages.
2012-10-03 03:44:34 +02:00
Jernej Krempuš
b798974f3a
Added pragma insertelement.
2012-10-02 22:22:53 +02:00
Jernej Krempuš
2cf5d8c2a0
Added pragma extractelement
2012-10-02 21:37:27 +02:00
David Nadlinger
5f6447e52c
Fix GitHub issue #168 – alignment of globals.
2012-09-28 01:57:21 +02:00
David Nadlinger
4b3662adfd
Fixed unlisted vector handling bug.
...
Thanks to filwit on IRC for mentioning it.
2012-09-28 00:34:31 +02:00
David Nadlinger
c6abdcf4a4
Don't set TypePointer::isunsigned to true in the frontend.
...
The previous solution was problematic because the change was language-
visble via the isUnsigned trait. Now, pointers are simply explicitly
checked for in the relevant places. (Note that there might be cases in
the diff where a direct isunsigned() call would have been appropriate –
I only checked for instances where the type clearly cannot be a pointer,
but chose to go the safe route in replicating existing behavior
otherwise).
Fixes DMD testcase 'traits'.
2012-09-28 00:28:49 +02:00
David Nadlinger
e7c72b072b
Default to C-style variadics for all calling conventions.
...
Fixes DMD testcase 'callingconv'.
2012-09-27 23:53:04 +02:00
David Nadlinger
3f9f13594c
Work around unmerged types being returned from frontend.
...
Fixes DMD testcase 'funclit'.
2012-09-27 23:50:52 +02:00
David Nadlinger
4a1cbc2d33
Debug log prettification: Indent toElemDtor() children.
2012-09-27 22:01:53 +02:00
David Nadlinger
9e8ec9613c
Removed superfluous newline in log message.
2012-09-27 21:55:09 +02:00
David Nadlinger
f54fa0077a
Only allow a single D main() function.
...
Fixes DMD testcase 'fail5634'.
2012-09-27 20:22:52 +02:00