Chris Lattner
6c79005b0d
Simplify TargetData ctor call
...
llvm-svn: 28832
2006-06-16 18:24:38 +00:00
Chris Lattner
e796266d58
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
91f228b291
Simplify interpreter construction.
...
llvm-svn: 28826
2006-06-16 18:08:38 +00:00
Chris Lattner
71819be586
Fix -pedantic warnings.
...
llvm-svn: 28636
2006-06-01 17:29:22 +00:00
Chris Lattner
e1ade0a523
Fix -pedantic warnings
...
llvm-svn: 28635
2006-06-01 17:27:11 +00:00
Chris Lattner
dcd73534df
Silence some -pedantic warnings.
...
llvm-svn: 28629
2006-06-01 17:12:14 +00:00
Reid Spencer
6e64180f03
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
aa10fb7ebe
Make this print the right start pointer
...
llvm-svn: 28321
2006-05-16 06:45:50 +00:00
Chris Lattner
63539389ca
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
1fe2d2c600
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
8c2c1e90c4
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
22acb80971
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
3c729b9e5d
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
873ef133ce
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
6d8dd189f6
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
b6277c510c
Adjust to use proper TargetData copy ctor
...
llvm-svn: 28112
2006-05-04 21:18:40 +00:00
Chris Lattner
005d7174c8
minor cleanups, no functionality change
...
llvm-svn: 28087
2006-05-03 18:55:56 +00:00
Chris Lattner
1d8ee1fc80
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
20a631fde7
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
37c39b9c62
Align function bodies correctly.
...
llvm-svn: 28073
2006-05-03 01:03:20 +00:00
Chris Lattner
77fe5b4459
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
d8b192ba3b
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
0574e47dca
Simplify some code
...
llvm-svn: 28066
2006-05-03 00:13:06 +00:00
Chris Lattner
b8065a9a3a
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
23621fe8f4
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
25b95ed868
Minor cleanups, no functionality change.
...
llvm-svn: 28061
2006-05-02 21:44:14 +00:00
Chris Lattner
c9aa3715e8
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
67a3aa2aaa
Remove dead method
...
llvm-svn: 28055
2006-05-02 17:20:28 +00:00
Nate Begeman
48ccd3f826
Fix a warning
...
llvm-svn: 27967
2006-04-25 17:46:32 +00:00
Nate Begeman
4ca2ea5b43
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
fe36eaebda
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
0eafbc3593
Get JIT/Interpreter working on Windows again.
...
llvm-svn: 27037
2006-03-24 02:53:49 +00:00
Chris Lattner
a011ba8a76
prune #includes
...
llvm-svn: 26975
2006-03-23 05:43:58 +00:00
Chris Lattner
811dd8d009
remove always-null IntrinsicLowering argument.
...
llvm-svn: 26971
2006-03-23 05:28:02 +00:00
Chris Lattner
0b2de9f2d4
remove the intrinsiclowering hook
...
llvm-svn: 26970
2006-03-23 05:22:51 +00:00
Chris Lattner
2d52c1b8b9
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
c67a060a51
Convert llvm.cs.uiuc.edu -> llvm.org
...
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Chris Lattner
faae50b66b
Add a helper method for running static ctors/dtors in the module.
...
llvm-svn: 26619
2006-03-08 18:42:46 +00:00
Chris Lattner
729ffe95c4
simplify this code now that each constant pool entry is not separately allocated
...
llvm-svn: 26079
2006-02-09 04:49:59 +00:00
Chris Lattner
f6190821da
Adjust to MachineConstantPool interface change: instead of keeping a
...
value/alignment pair for each constant, keep a value/offset pair.
llvm-svn: 26078
2006-02-09 04:46:04 +00:00
Chris Lattner
ba97264e72
rename fields of constant pool entries
...
llvm-svn: 26076
2006-02-09 04:22:52 +00:00
Jeff Cohen
2439669c6f
The interpreter assumes that the caller of runFunction() must be lli, and
...
therefore the function being called must be a main() returning an int. The
consequences when these assumptions are false are not good, so don't assume
them.
llvm-svn: 26031
2006-02-07 05:29:44 +00:00
Jeff Cohen
69e849014c
Teach the interpreter to handle global variables that are added to a module after
...
interpretation has begun. The JIT already handles this situation correctly, and
the interpreter can already handle new functions being added.
llvm-svn: 26030
2006-02-07 05:11:57 +00:00
Evan Cheng
32be2dc0af
Allow the specification of explicit alignments for constant pool entries.
...
llvm-svn: 25855
2006-01-31 22:23:14 +00:00
Chris Lattner
01a325ed68
Add #include of <iostream>
...
llvm-svn: 25516
2006-01-22 23:41:42 +00:00
Robert Bocchino
69d621387c
Fixed InitializeMemory to handle ConstantPacked.
...
llvm-svn: 25481
2006-01-20 18:18:40 +00:00
Chris Lattner
2e8b93ac46
Wrap long lines.
...
llvm-svn: 25140
2006-01-07 06:20:51 +00:00
Chris Lattner
31b05d0ee3
wrap long line
...
llvm-svn: 25139
2006-01-07 06:12:07 +00:00
Chris Lattner
a551033ea8
Fix a nasty bug that was causing miscompilation of global variables
...
on big endian 32-bit targets in some cases (e.g. PPC). This fixes several
PPC JIT failures.
llvm-svn: 23914
2005-10-23 23:54:56 +00:00
Chris Lattner
ac23014355
Shrinkify to match llc
...
llvm-svn: 23912
2005-10-23 22:39:01 +00:00