Chris Lattner
4b861b07a7
Fix handling of asm specifiers for external globals. This unbreaks many programs
...
on leopard in the jit.
llvm-svn: 29391
2006-07-28 21:11:31 +00:00
Evan Cheng
4ceeac4159
Resolve BB references with relocation.
...
llvm-svn: 29351
2006-07-27 18:21:10 +00:00
Jim Laskey
17acc47da9
Fixed a typo in Evan's submisson.
...
llvm-svn: 29345
2006-07-27 13:40:34 +00:00
Evan Cheng
39112023f1
Move synchronizeICache from TargetJITInfo into a static function in JITEmitter.cpp
...
llvm-svn: 29334
2006-07-27 06:33:55 +00:00
Chris Lattner
d2170e1b17
Fix warning on linux
...
llvm-svn: 29314
2006-07-27 00:04:14 +00:00
Evan Cheng
beeb4e5c8c
- Refactor the code that resolve basic block references to a TargetJITInfo
...
method.
- Added synchronizeICache() to TargetJITInfo. It is called after each block
of code is emitted to flush the icache. This ensures correct execution
on targets that have separate dcache and icache.
- Added PPC / Mac OS X specific code to do icache flushing.
llvm-svn: 29276
2006-07-25 20:40:54 +00:00
Nate Begeman
6ba0156891
Fix the build on my old and busted version of OS X
...
llvm-svn: 29266
2006-07-22 16:59:38 +00:00
Evan Cheng
09d3be29fa
Forgot to #ifdef __APPLE__
...
llvm-svn: 29264
2006-07-22 00:42:03 +00:00
Evan Cheng
55bff38268
Resolve __dso_handle.
...
llvm-svn: 29259
2006-07-21 23:06:20 +00:00
Chris Lattner
2d974f5de3
Remove non-portable optimization that isn't worth it
...
llvm-svn: 29115
2006-07-12 00:31:47 +00:00
Chris Lattner
cad94f6042
Change AllocateRWX/DeallocateRWX do not throw an exception.
...
llvm-svn: 29057
2006-07-07 17:31:41 +00:00
Chris Lattner
26b53f505e
Adapt to new interface function materialization interface
...
llvm-svn: 29051
2006-07-07 17:18:09 +00:00
Evan Cheng
2db138d4b0
Added jump table address relocation.
...
llvm-svn: 28908
2006-06-23 01:02:37 +00:00
Chris Lattner
5a1f56fc2a
Simplify TargetData ctor call
...
llvm-svn: 28832
2006-06-16 18:24:38 +00:00
Chris Lattner
4a8f3c456a
Only count instructions as code size, not constant pools and other per-function stuff.
...
llvm-svn: 28827
2006-06-16 18:09:26 +00:00
Chris Lattner
ac373d311b
Simplify interpreter construction.
...
llvm-svn: 28826
2006-06-16 18:08:38 +00:00
Chris Lattner
6838320f46
Fix -pedantic warnings.
...
llvm-svn: 28636
2006-06-01 17:29:22 +00:00
Chris Lattner
50af98a5f2
Fix -pedantic warnings
...
llvm-svn: 28635
2006-06-01 17:27:11 +00:00
Chris Lattner
cba966934e
Silence some -pedantic warnings.
...
llvm-svn: 28629
2006-06-01 17:12:14 +00:00
Reid Spencer
574d4e6992
For PR786:
...
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.
llvm-svn: 28453
2006-05-24 19:21:13 +00:00
Chris Lattner
1024577552
Make this print the right start pointer
...
llvm-svn: 28321
2006-05-16 06:45:50 +00:00
Chris Lattner
05311325f1
LoadLibraryPermanently can theoretically throw an exception. Do not propagate
...
it out of 'ExecutionEngine::create'. This fixes a problem reported by coverity.
llvm-svn: 28293
2006-05-14 19:01:55 +00:00
Chris Lattner
b1ad13a4bc
Fix a hypothetical memory leak, identified by Coverity. In practice, this
...
object is never deleted though.
llvm-svn: 28256
2006-05-12 18:10:12 +00:00
Owen Anderson
29e4d70aed
Refactor a bunch of includes so that TargetMachine.h doesn't have to include
...
TargetData.h. This should make recompiles a bit faster with my current
TargetData tinkering.
llvm-svn: 28238
2006-05-12 06:33:49 +00:00
Chris Lattner
14cdcc59b8
For extra sanity checking, fill free'd memory with garbage so we know that
...
people aren't reusing machine code buffers at all.
llvm-svn: 28228
2006-05-12 00:03:12 +00:00
Chris Lattner
ecc6d6f334
Fix some bugs in the freelist manipulation code.
...
Finally, implement ExecutionEngine::freeMachineCodeForFunction.
llvm-svn: 28227
2006-05-11 23:56:57 +00:00
Chris Lattner
81a3c90080
Significantly revamp allocation of machine code to use free lists, real
...
allocation policies and much more. All this complexity, and we have no
functionality change, woo! :)
llvm-svn: 28225
2006-05-11 23:08:08 +00:00
Chris Lattner
6e58d3a317
Move some methods out of line so that MutexGuard.h isn't needed in a public header.
...
llvm-svn: 28179
2006-05-08 22:00:52 +00:00
Chris Lattner
bf8f91715e
Adjust to use proper TargetData copy ctor
...
llvm-svn: 28112
2006-05-04 21:18:40 +00:00
Chris Lattner
326eedfa77
minor cleanups, no functionality change
...
llvm-svn: 28087
2006-05-03 18:55:56 +00:00
Chris Lattner
d36b66d6dc
Suck block address tracking out of targets into the JIT Emitter. This
...
simplifies the MachineCodeEmitter interface just a little bit and makes
BasicBlocks work like constant pools and jump tables.
llvm-svn: 28082
2006-05-03 17:10:41 +00:00
Owen Anderson
71bc529dfa
Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
...
This fixes PR 759.
llvm-svn: 28074
2006-05-03 01:29:57 +00:00
Chris Lattner
be9958e6f7
Align function bodies correctly.
...
llvm-svn: 28073
2006-05-03 01:03:20 +00:00
Chris Lattner
c43d309514
Simplify some code. Don't add memory blocks to the Blocks list twice.
...
llvm-svn: 28071
2006-05-03 00:54:49 +00:00
Chris Lattner
06ccac43d7
Change the BasicBlockAddrs map to be a vector, indexed by MBB number.
...
llvm-svn: 28069
2006-05-03 00:32:55 +00:00
Chris Lattner
be23568cea
Simplify some code
...
llvm-svn: 28066
2006-05-03 00:13:06 +00:00
Chris Lattner
2bf37af52d
Several related changes:
...
1. Change several methods in the MachineCodeEmitter class to be pure virtual.
2. Suck emitConstantPool/initJumpTableInfo into startFunction, removing them
from the MachineCodeEmitter interface, and reducing the amount of target-
specific code.
3. Change the JITEmitter so that it allocates constantpools and jump tables
*right* next to the functions that they belong to, instead of in a separate
pool of memory. This makes all memory for a function be contiguous, and
means the JITEmitter only tracks one block of memory now.
llvm-svn: 28065
2006-05-02 23:22:24 +00:00
Chris Lattner
8054cd3830
Do not make the JIT memory manager manage the memory for globals. Instead
...
just have the JIT malloc them.
llvm-svn: 28062
2006-05-02 21:57:51 +00:00
Chris Lattner
41cc593fc3
Minor cleanups, no functionality change.
...
llvm-svn: 28061
2006-05-02 21:44:14 +00:00
Chris Lattner
055baf5c7b
Refactor the machine code emitter interface to pull the pointers for the current
...
code emission location into the base class, instead of being in the derived classes.
This change means that low-level methods like emitByte/emitWord now are no longer
virtual (yaay for speed), and we now have a framework to support growable code
segments. This implements feature request #1 of PR469.
llvm-svn: 28059
2006-05-02 18:27:26 +00:00
Chris Lattner
5c1abc2b94
Remove dead method
...
llvm-svn: 28055
2006-05-02 17:20:28 +00:00
Nate Begeman
acdefe26fa
Fix a warning
...
llvm-svn: 27967
2006-04-25 17:46:32 +00:00
Nate Begeman
7ed816f900
JumpTable support! What this represents is working asm and jit support for
...
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.
llvm-svn: 27947
2006-04-22 18:53:45 +00:00
Chris Lattner
4f0240b577
Fix JIT support for static ctors, which was apparently completely broken!
...
This allows Prolangs-C++/city and probably a bunch of other stuff to work
well with the new front-end
llvm-svn: 27941
2006-04-22 05:02:46 +00:00
Jeff Cohen
dab30f45d8
Get JIT/Interpreter working on Windows again.
...
llvm-svn: 27037
2006-03-24 02:53:49 +00:00
Chris Lattner
56a6600a72
prune #includes
...
llvm-svn: 26975
2006-03-23 05:43:58 +00:00
Chris Lattner
3d5ca510c9
remove always-null IntrinsicLowering argument.
...
llvm-svn: 26971
2006-03-23 05:28:02 +00:00
Chris Lattner
2aa3f9a6b5
remove the intrinsiclowering hook
...
llvm-svn: 26970
2006-03-23 05:22:51 +00:00
Chris Lattner
ab22cd5c33
Eliminate the dependency of ExecutionEngine on the JIT/Interpreter libraries.
...
Now you can build a tool with just the JIT or just the interpreter.
llvm-svn: 26946
2006-03-22 06:07:50 +00:00
Reid Spencer
728a2e9f62
Convert llvm.cs.uiuc.edu -> llvm.org
...
llvm-svn: 26748
2006-03-14 05:54:52 +00:00