Commit Graph

429 Commits

Author SHA1 Message Date
Reid Spencer cbd791c5e7 Be double sure about including sys/stat.h by wrapping the inclusion in
an "#if defined(HAVE_SYS_STAT_H)".

llvm-svn: 19069
2004-12-20 06:34:02 +00:00
Reid Spencer 181cf4ce17 Move the #include of sys/stat.h inside the linux "hack" for the stat
family of functions so it gets noticed if we ever remove this.

llvm-svn: 19022
2004-12-17 19:09:16 +00:00
Reid Spencer 0575a63578 Only #include sys/stat.h if we're on linux where we have the PR274 problem.
llvm-svn: 19020
2004-12-17 18:56:29 +00:00
Reid Spencer 53bd3d0b1a Get rid of some leaks found by VC leak detector.
Patch contributed by Morten Ofsted.

llvm-svn: 18889
2004-12-13 16:04:04 +00:00
Chris Lattner a34f9da4b4 Properly implement a fix for PR475
llvm-svn: 18537
2004-12-05 07:19:16 +00:00
Chris Lattner 1a0117f641 Revert this patch, it broke a ton of programs.
llvm-svn: 18535
2004-12-05 06:59:59 +00:00
Alkis Evlogimenos 8c5affedd1 Fix PR475.
llvm-svn: 18515
2004-12-05 01:51:20 +00:00
Chris Lattner 87a756f09f Remove darwin specific majik
llvm-svn: 18467
2004-12-03 23:02:55 +00:00
Chris Lattner 5a4dc8ca5a Do not look here for elegance.
This fixes the ugly darwin "cannot find symbols starting with __" issue.

Thanks for Owen/resistor for testing this out for me.

llvm-svn: 18454
2004-12-03 07:16:51 +00:00
Chris Lattner 9a43d294b9 Remove unneeded cast.
llvm-svn: 18405
2004-12-01 17:13:05 +00:00
Chris Lattner 56bac30683 Fix the JIT when being used from llvm-db
llvm-svn: 18391
2004-11-30 17:41:49 +00:00
Reid Spencer 70e37278cb Use System/DynamicLibrary instead of Support/DynamicLinker
llvm-svn: 18357
2004-11-29 14:11:29 +00:00
Chris Lattner c5753055ea Rename Emitter.cpp -> JITEmitter.cpp
llvm-svn: 18132
2004-11-22 22:00:25 +00:00
Chris Lattner 88dc917c72 Fix the FIXME, nuke the JIT specific forceCompilationOf method.
llvm-svn: 18131
2004-11-22 21:54:35 +00:00
Chris Lattner 213e39ee7c These methods are obsolete
llvm-svn: 18129
2004-11-22 21:48:33 +00:00
Chris Lattner 50c2e117b3 Support targets that require stubs for external functions better
llvm-svn: 18098
2004-11-22 07:24:43 +00:00
Chris Lattner 9de8e2225f Clean up DEBUG output
llvm-svn: 18081
2004-11-21 03:44:32 +00:00
Chris Lattner 65f6638822 Allow targets to avoid emitting a stub for EVERY lazily resolved call. In
most cases (e.g. direct calls) no stub is needed.

llvm-svn: 18080
2004-11-21 03:37:42 +00:00
Chris Lattner 60d815a18b Implement relocation support by adding a target independent resolver interface.
llvm-svn: 18069
2004-11-20 23:57:07 +00:00
Chris Lattner 374301ecb9 This method does not exist any longer.
llvm-svn: 18061
2004-11-20 23:51:03 +00:00
Chris Lattner 6cf7a43603 Add getCurrentPCOffset() and addRelocation() methods.
Add stub support for relocations to finishFunction

llvm-svn: 18035
2004-11-20 03:46:14 +00:00
Chris Lattner b7b78508a8 Add accessor
llvm-svn: 18030
2004-11-20 03:11:07 +00:00
Chris Lattner c27389815d Match change in MachineCodeEmitter prototype.
llvm-svn: 18009
2004-11-19 20:56:46 +00:00
Chris Lattner d215992b35 This is a horrible hack to work around libstdc++ bugs :(
llvm-svn: 17988
2004-11-19 08:44:07 +00:00
Chris Lattner 1edd79a1bc Now that we have ghost linkage, we can force resolution of external symbols
immediately instead of lazily.

In this program, for example:

int main() {
  printf("hello world\n");
  printf("hello world\n");
  printf("hello world\n");
  printf("hello world\n");
}

We used to have to go through compilation callback 4 times (once for each
call to printf), now we don't go to it at all.

Thanks to Misha for noticing this, and for adding the initial ghost linkage
patches.

llvm-svn: 17864
2004-11-15 23:20:04 +00:00
Chris Lattner b264f7f428 There is no reason to try to materialize the function from bytecode if it
already has been.  This may be a small speedup.

llvm-svn: 17863
2004-11-15 23:18:09 +00:00
Misha Brukman 624685d9a1 Implement ExecutionEngine::freeMachineCodeForFunction()
llvm-svn: 17601
2004-11-07 23:58:46 +00:00
Brian Gaeke 9a51b8ca7c When emitting debug msgs for function stubs, don't truncate the
printed pointer value if sizeof(unsigned) != pointer size.  Instead,
use uintptr_t.

llvm-svn: 17338
2004-10-29 18:22:45 +00:00
Reid Spencer c833eddfe6 Fix library name.
llvm-svn: 17307
2004-10-28 05:37:24 +00:00
Reid Spencer 57cbe39d1e Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer f9676539bb Changes to support rand48 tests
llvm-svn: 17284
2004-10-27 23:03:44 +00:00
Chris Lattner d7a7a3f42f Fix the interpreter crash that Michael McCracken found
llvm-svn: 17239
2004-10-26 05:35:14 +00:00
Misha Brukman 37a7102ccb Use cleaner quoting and eliminate blank space
llvm-svn: 17174
2004-10-22 23:35:57 +00:00
Reid Spencer c1c320c335 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer 6a11a75f31 Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner 98e541457b Add support for unreachable
llvm-svn: 17056
2004-10-16 18:21:33 +00:00
Chris Lattner 61753bf847 Add support for undef
llvm-svn: 17055
2004-10-16 18:19:26 +00:00
Reid Spencer ace94df71f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer b84cbf2725 Initial version of automake Makefile.am file.
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Reid Spencer 6614946443 Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!

llvm-svn: 16368
2004-09-15 17:06:42 +00:00
Reid Spencer f7948483d2 Simplify the sys::Memory interface per Chris' request.
llvm-svn: 16318
2004-09-13 22:38:11 +00:00
Reid Spencer 96019262ca Convert the Emitter to use the lib/System "Memory" interface instead of the
old SystemUtils.h interface to allocate RWX blocks of memory.

llvm-svn: 16286
2004-09-11 04:31:03 +00:00
Reid Spencer 7c16caa336 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner 3361c5da6f Add a special case for argc,argv
llvm-svn: 15802
2004-08-16 01:07:04 +00:00
Chris Lattner b1cad0b3bc Don't pass too many arguments into runFunction
llvm-svn: 15801
2004-08-16 01:05:35 +00:00
Chris Lattner 3f9d4ed43d Finally, add support for calling arbitrary non-varargs functions.
llvm-svn: 15799
2004-08-16 00:14:18 +00:00
Chris Lattner 58d0582548 Handle all nullary functions, of any valid return type.
llvm-svn: 15798
2004-08-15 23:53:06 +00:00
Chris Lattner 23f7c98016 Fine, go all of the way and check that the argument types are correct as well.
llvm-svn: 15797
2004-08-15 23:39:59 +00:00
Chris Lattner 8f8f72f21b These only really work if returning int or void
llvm-svn: 15796
2004-08-15 23:34:48 +00:00
Chris Lattner 47380e3ba0 Handle zero arg function case
llvm-svn: 15794
2004-08-15 23:31:43 +00:00