Commit graph

43 commits

Author SHA1 Message Date
Benjamin Kramer
a31f3eb98f getClosestStaticTargetForModule was replaced with lookupTarget
Build fix for LLVM r77111.
2009-07-28 15:26:21 +02:00
Benjamin Kramer
69171c07cd Temporarily force our LLVMContext to the global context
From llvm r75846:
"To simplify the upcoming context-on-type change, switch all command
line tools to using the default global context for now."
2009-07-20 17:55:05 +02:00
Benjamin Kramer
ac5bd294ca We need to parse mArch ourselves now
Build fix for LLVM r75890
2009-07-17 19:23:20 +02:00
Benjamin Kramer
7359448063 Use TargetRegistry instead of TargetMachineRegistry for Target lookups
This fixes the build for LLVM >= r75774 and will probably break older
LLVM revs.
2009-07-15 23:01:51 +02:00
Benjamin Kramer
0ee2f34611 Don't use llvm::getGlobalContext() anymore 2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1 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.
2009-07-13 12:17:58 +02:00
Benjamin Kramer
8576788245 Get rid of USE_METADATA 2009-07-11 14:19:21 +02:00
Benjamin Kramer
45f7401a5b Remove all of the now unecessary #if LLVM_REV 2009-07-11 14:09:33 +02:00
Robert Clipsham
4fbcd9b9c4 A couple of ldc2 tweaks now druntime compiles. 2009-07-09 12:36:08 +01:00
Robert Clipsham
951e961f9e Merge. 2009-07-06 23:56:11 +01:00
Robert Clipsham
1812c5b00a Fixed some unmerged parts of the D2 frontend.
Removed the automatic linker flags for D2 (temp).
Renamed a runtime function for D2.
2009-07-06 23:54:02 +01:00
Benjamin Kramer
22b36384b0 Fix build for LLVM >= r74640
Some LLVM objects now take a 'Context' to make multi-threaded apps easier.
Since we're not multi-threaded it's safe to use llvm::getGlobalContext()
which gives us the same behavior as we had before.
2009-07-03 17:24:35 +02:00
Christian Kamm
88f6e9e83a Initialize LLVM target and asmprinter for the native and extra targets.
Uses some CMake hackery to get the native LLVM target name, since it only
provides a conveniance function for initializing the native target and not the
native asmprinter.
2009-06-26 21:02:23 +02:00
Frits van Bommel
f76870f255 Print the path to the configuration file being used if -v is passed. 2009-06-07 17:20:55 +02:00
Frits van Bommel
96fdcd6347 Run semantic3 on imported modules, and emit new symbols with
`available_externally` linkage. This allows the inliner to inline functions from
other modules while telling the code generator to ignore those functions (treat
them as declarations)
Still generates a few extra `TypeInfo`s and strings...
Disabled when generating debug info because I don't really understand it, and it
doesn't like this.
2009-06-07 16:00:13 +02:00
Tomas Lindquist Olsen
f6997cb604 D2:
Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct.

Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d .

Disabled (#if 0) some potentally very large type dumps for -vv .

Updated classinfo and typeinfo generation for D2, almost complete now.

Added finer grained checks for vtbl type mismatching, aids debugging.
2009-06-03 02:28:48 +02:00
Christian Kamm
a05ed9a171 Fix #309: allow -of with multiple source files if -singleobj is given. 2009-05-30 12:58:04 +02:00
Frits van Bommel
1791d7b8b4 Fix a behavioral change accidentally introduced by the move to the LLVM
commandline system: `-output-(bc|ll|s)` used to disable generation of an object
file unless explicitly requested with `-output-o`. Now they do so again.
2009-05-23 20:57:22 +02:00
Christian Kamm
f675d36cfb Tentative fix for semantic3 on imported modules and unnecessary template
function definition issue. Please test!
Also change linkage of __interfaceInfos to external (same as __Class, __vtbl,
__init). The other change might make this superfluous.
2009-05-21 10:56:04 +02:00
Christian Kamm
8e56fe69a4 Merged xfBuild patch for dependency tree generation. See #286. 2009-05-20 21:13:41 +02:00
Frits van Bommel
827880e467 Don't try to strip metadata if we don't generate any 2009-05-17 22:40:02 +02:00
Tomas Lindquist Olsen
e2ba08388f Added new FreeBSD and Solaris predefined version identifiers. 2009-05-17 17:10:26 +02:00
Frits van Bommel
76ae0b0ab6 Fix format-string bugs by adding __attribute__((__format__)) in all applicable
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
2009-05-17 00:15:25 +02:00
Frits van Bommel
35d62be334 Remove some other code that tested for LLVM before r67588. 2009-05-12 16:02:51 +02:00
Christian Kamm
883f13dbce Strip metadata for -singleobj as a workaround to a LLVM linking bug. 2009-05-09 18:57:21 +02:00
Frits van Bommel
f5b56ce346 Fix typo in function name 2009-05-07 15:33:06 +02:00
Frits van Bommel
83dda319ae Add #include "gen/llvm-version.h" to files that use the macro it defines... 2009-04-24 16:47:42 +02:00
Christian Kamm
2347526ca8 Disable frame pointer elimination when -g or -gc is passed. 2009-04-08 21:12:08 +02:00
Christian Kamm
ba200214d4 Make sure -run doesn't consume the config file flags. 2009-04-05 15:58:28 +02:00
Frits van Bommel
ff72b1f640 Make sure -defaultlib and -debuglib don't get cut off if longer than 63 chars,
and clean up some overly verbose code.
2009-04-01 00:52:31 +02:00
Frits van Bommel
e129494812 Allow specific optimization passes to be requested from the command line.
Now you can run "`ldc test.d -c -mem2reg -simplifycfg`" if you feel the urge.
The -O<N> options are still supported, and are inserted in the passes list in
the position where they appear on the command line.
(so -simplifycfg -O1 -instcombine does the "right thing")

One small change: -inline is renamed to -enable-inlining due to a naming
conflict with the option to add the -inline pass. -inline now inserts the
inlining pass in the position specified, not in the middle of -O<N>.
(ldmd has been updated to translate -inline to -enable-inlining)
2009-03-29 15:46:55 +02:00
Tomas Lindquist Olsen
be3bfbff5d Fixed problems introduced by previous commits that prevented Tango from compiling. 2009-03-27 23:17:04 +01:00
Tomas Lindquist Olsen
daef67acc3 Changed use of toObjFile to a new codegen method.
More versioning of DMD specific codegen code.
2009-03-27 17:54:27 +01:00
Tomas Lindquist Olsen
8b751cce0e - Updated to DMD frontend 1.041.
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
2009-03-12 20:37:27 +01:00
Frits van Bommel
c1d9694494 Work around llvm bug #3749 better, or not at all if using a fixed llvm revision. 2009-03-09 13:29:25 +01:00
Christian Kamm
13e83bf1c1 Improved template emission control for singleobj building. 2009-03-08 16:21:56 +01:00
Christian Kamm
95f12f04f1 Add '-singleobj' command line switch that will tell LDC to link LLVM modules internally and only emit a single object file.
The switch allows the optimizer and inliner to run on all modules at once and opens the door for template instantiation improvements that should lower compile time and executable size.
2009-03-07 19:38:00 +01:00
Christian Kamm
a3bc6ce3f9 Switch LLVM_InlineAsm -> D_InlineAsm. It's for real this time, hopefully. 2009-03-03 17:44:56 +01:00
Tomas Lindquist Olsen
a71b028a0f Implemented basic -m32 and -m64 options. 2009-03-01 22:27:03 +01:00
Christian Kamm
2f5b7bcd3e Readded indentation that got lost in the dmd/mars.c -> gen/main.cpp move. 2009-02-28 15:06:09 +01:00
Tomas Lindquist Olsen
bcd05cf258 Added some missing version identifiers. 2009-02-26 18:28:50 +01:00
Tomas Lindquist Olsen
886a66f4e0 Missing %s error param in main.cpp 2009-02-26 15:51:19 +01:00
Tomas Lindquist Olsen
024946219a Forgot new files that were supposed to be in last commit. 2009-02-26 14:13:27 +01:00