Commit Graph

441 Commits

Author SHA1 Message Date
Chris Lattner 7b9020a059 Fix the missing symbols problem Bill was hitting. Patch contributed by
Bill Wendling!!

llvm-svn: 20649
2005-03-17 15:38:16 +00:00
Chris Lattner 531f9e92d4 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner 7f32c4aa36 Use const iterators where possible. Patch by Evan Jones!
llvm-svn: 20354
2005-02-27 19:06:10 +00:00
Chris Lattner ec3f094489 Fix problems running the HowToUseJIT on powerpc, and probably problems with
ANY program that does not have all functions internalized.

llvm-svn: 20258
2005-02-20 18:43:35 +00:00
Chris Lattner 45a6a18393 This is no longer needed. Global variables with undef initializers can be
initialized to anything, including garbage.

llvm-svn: 20010
2005-02-02 20:50:50 +00:00
Chris Lattner 28edd69eb4 If the interpreter tries to execute an external function, kill it. Of course
since we are dirty, special case __main.  This should fix the infinite loop
horrible stuff that happens on linux-alpha when configuring llvm-gcc.  It
might also help cygwin, who knows??

llvm-svn: 19729
2005-01-21 19:59:37 +00:00
Chris Lattner cebb964fef Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
llvm-svn: 19586
2005-01-16 01:31:31 +00:00
Chris Lattner 5326f35715 Rework constant pool handling so that function constant pools are no longer
leaked to the system.  Now they are destroyed with the JITMemoryManager is
destroyed.

llvm-svn: 19434
2005-01-10 18:23:22 +00:00
Chris Lattner 4588542d39 Silence warnings
llvm-svn: 19392
2005-01-08 20:13:44 +00:00
Chris Lattner df1f152420 Silence VS warnings.
llvm-svn: 19391
2005-01-08 20:13:19 +00:00
Chris Lattner fa66dc7852 Silence VS warnings.
llvm-svn: 19390
2005-01-08 20:07:03 +00:00
Chris Lattner feeab9f753 Silence VS warnings
llvm-svn: 19389
2005-01-08 20:05:34 +00:00
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