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
Chris Lattner
0b736a0d1e
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
e976315aec
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
c81f375f21
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
1111a4b76d
rename fields of constant pool entries
...
llvm-svn: 26076
2006-02-09 04:22:52 +00:00
Jeff Cohen
e66383eb06
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
909ee648c7
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
f115c17f23
Allow the specification of explicit alignments for constant pool entries.
...
llvm-svn: 25855
2006-01-31 22:23:14 +00:00
Chris Lattner
201586783d
Add #include of <iostream>
...
llvm-svn: 25516
2006-01-22 23:41:42 +00:00
Robert Bocchino
51e0be55e8
Fixed InitializeMemory to handle ConstantPacked.
...
llvm-svn: 25481
2006-01-20 18:18:40 +00:00
Chris Lattner
446a1e7a68
Wrap long lines.
...
llvm-svn: 25140
2006-01-07 06:20:51 +00:00
Chris Lattner
05a3f338cd
wrap long line
...
llvm-svn: 25139
2006-01-07 06:12:07 +00:00
Chris Lattner
5b4d016b3f
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
965f10f2f2
Shrinkify to match llc
...
llvm-svn: 23912
2005-10-23 22:39:01 +00:00
Jim Laskey
1f9c40400c
Add help support for -mcpu and -mattr.
...
llvm-svn: 23222
2005-09-02 19:27:43 +00:00
Jim Laskey
f32ef9a37f
1. Use SubtargetFeatures in llc/lli.
...
2. Propagate feature "string" to all targets.
3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.
llvm-svn: 23192
2005-09-01 21:38:21 +00:00
Andrew Lenharth
a48ff3bd21
one cannot allocate a global, until one is done initializing the global pointers
...
llvm-svn: 22568
2005-08-01 17:35:40 +00:00