Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
9ef636c698
Implement vaarg instruction. This is not quite perfect: 2003-08-11-VaListArg
...
still causes a crash. But it's better than before.
llvm-svn: 9794
2003-11-07 21:20:47 +00:00
Brian Gaeke
85baf8c65a
popStackAndReturnValueToCaller() must advance instruction pointer to normal
...
destination, if returning from an invoke.
Implement 'unwind' instruction.
llvm-svn: 9792
2003-11-07 20:44:58 +00:00
Brian Gaeke
6d145eb65f
Add stub version of unwind support
...
llvm-svn: 9789
2003-11-07 20:07:06 +00:00
Brian Gaeke
a6454d3532
visitCallInst --> visitCallSite.
...
Use visitCallSite to implement both CallInsts and InvokeInsts.
llvm-svn: 9788
2003-11-07 20:04:22 +00:00
Brian Gaeke
a6d48e4db2
Make the operation of visitCallInst() only depend on the CallSite.
...
llvm-svn: 9787
2003-11-07 19:59:08 +00:00
Brian Gaeke
18b59578c9
Use CallSites for call sites, instead of CallInsts. A revolutionary concept.
...
llvm-svn: 9784
2003-11-07 19:26:23 +00:00
Brian Gaeke
65cac90a92
Refactor the return-from-function code into popStackAndReturnValueToCaller().
...
Make external function calls slightly less special; now they get a stack frame.
llvm-svn: 9765
2003-11-07 05:22:49 +00:00
Chris Lattner
b5b9ba6ff6
Be friendly to gcc 3.4... good compiler. Nice compiler.
...
llvm-svn: 9726
2003-11-05 06:20:27 +00:00
Brian Gaeke
221827ab07
Use regular old malloc to emulate malloc/alloca instructions.
...
llvm-svn: 9713
2003-11-05 01:02:14 +00:00
Brian Gaeke
175018317e
Remove a comment which no longer applies.
...
llvm-svn: 9712
2003-11-05 00:59:28 +00:00
Brian Gaeke
e278c22380
Reduce the number of #includes.
...
CurFrame, TraceMode, and the CachedWriter are history.
ArrayChecksEnabled and non-QuietMode are history.
The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.
ExecutionContext now keeps Values for each stack frame in a std::map.
Stop pre-initializing Values on the stack to 42.
Remove some dead variables, excess whitespace and commented-out code.
executeInstruction() is now part of run().
printValue() and print() are history.
llvm-svn: 9489
2003-10-24 19:59:01 +00:00
John Criswell
482202a601
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
fefd3bebc4
Interpret the new varargs intrinsics correctly
...
llvm-svn: 9222
2003-10-18 05:55:25 +00:00
Misha Brukman
aa7d26c8c8
Fix spelling.
...
llvm-svn: 9021
2003-10-10 17:42:19 +00:00
Brian Gaeke
20c65741d0
Never set any signal handlers.
...
Never call setjmp(), longjmp() or strsignal().
llvm-svn: 9014
2003-10-10 17:03:22 +00:00
Chris Lattner
a28e1f281a
Change FunctionInfo from being an annotation put on Functions to be
...
something which is mapped from functions.
llvm-svn: 8580
2003-09-17 17:26:22 +00:00
Brian Gaeke
9b518bc0be
Make getOperandValue and executeCastOperation methods of Interpreter.
...
This lets us protect a few more ExecutionEngine methods.
llvm-svn: 8367
2003-09-05 18:55:03 +00:00
Brian Gaeke
33d98aebe7
Remove printOperandInfo(), and simplify run().
...
llvm-svn: 8362
2003-09-05 05:22:08 +00:00
Brian Gaeke
ed9917b3f8
Remove support for printing values from a module by name, only used
...
w/ interactive keyboard entry of names.
With that, Support.cpp is history.
llvm-svn: 8360
2003-09-05 05:04:32 +00:00
Brian Gaeke
8421765778
Remove support for interactive (step finish next) instructions.
...
Remove printCurrentInstruction, printStackFrame and infoValue
(only used interactively) and other unused methods of Interpreter.
Fold UserInput.cpp containing only callMainFunction() into Interpreter.cpp.
Remove unused Profile flag.
llvm-svn: 8359
2003-09-05 04:46:26 +00:00
Brian Gaeke
411281cc82
Remove support for breakpoints (not used).
...
Remove some dead code and whitespace.
llvm-svn: 8346
2003-09-04 23:15:40 +00:00
Brian Gaeke
e80e5ba7f8
Interpreter cleanups:
...
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().
llvm-svn: 8344
2003-09-04 22:21:24 +00:00
Chris Lattner
625eef3e41
Remove redundant const qualifier
...
llvm-svn: 7254
2003-07-23 15:30:32 +00:00
Chris Lattner
4a5bb95729
Add support for atexit function, remove support for __main function
...
llvm-svn: 6194
2003-05-14 14:21:30 +00:00
Chris Lattner
185045c494
switch main LLI core execution to use an InstVisitor instead of a switch statement
...
llvm-svn: 6081
2003-05-10 21:22:39 +00:00
Chris Lattner
bd6771cb25
Fix testcase: SingleSource/UnitTests/2003-05-02-DependantPHI.c
...
llvm-svn: 6074
2003-05-10 20:21:16 +00:00
Chris Lattner
525e251c4e
Implement varargs support for LLI!
...
llvm-svn: 6043
2003-05-08 16:52:43 +00:00
Chris Lattner
470754e3ca
A large number of simple changes:
...
* s/Method/Function
* Kill some obsolete (external) functions that used to be to support tracing
llvm-svn: 6041
2003-05-08 16:18:31 +00:00
Chris Lattner
22e90434f3
Add support for recording arguments passed through the ... of a varargs function
...
llvm-svn: 6040
2003-05-08 16:06:52 +00:00
Chris Lattner
ba90675054
Fix problem where we would read 64 bits worth of pointer information, even on 32 bit targets!
...
llvm-svn: 5930
2003-04-25 04:21:19 +00:00
Chris Lattner
ed27f84ed9
Fix a problem with setcc instructions and pointers
...
llvm-svn: 5886
2003-04-23 19:55:35 +00:00
Chris Lattner
7881fc8704
Implement &|^ on bool values
...
llvm-svn: 5884
2003-04-23 19:21:00 +00:00
Chris Lattner
aee56b8d34
Kill using declarations
...
Kill code for invalid operations on pointers
llvm-svn: 5856
2003-04-22 21:22:33 +00:00
Chris Lattner
bbd1157f71
Implement cast to bool
...
llvm-svn: 5855
2003-04-22 21:15:56 +00:00
Chris Lattner
fa5fc55f83
Get rid of extraneous arguments to implementation functions
...
llvm-svn: 5852
2003-04-22 20:37:39 +00:00
Chris Lattner
d215af03a3
Add support to LLI for switch instruction
...
llvm-svn: 5851
2003-04-22 20:34:47 +00:00
Chris Lattner
f11d8a35ab
Fix wierd idiom
...
llvm-svn: 5831
2003-04-21 22:43:32 +00:00
Chris Lattner
13b3e5bdab
Fix typeo
...
llvm-svn: 5624
2003-02-25 21:14:59 +00:00
Chris Lattner
4e7aa44644
Handle value promotion properly to work with tracing better
...
llvm-svn: 5253
2003-01-13 00:58:52 +00:00
Chris Lattner
a0d7b084ef
Substantial changes to refactor LLI to incorporate both the Jello JIT and
...
the traditional LLI interpreter
llvm-svn: 5125
2002-12-23 23:59:41 +00:00
Chris Lattner
3552d79ac1
Namespacify more
...
llvm-svn: 4956
2002-12-08 06:01:34 +00:00
Chris Lattner
4f96aa450e
Add support to count the number of dynamic instructions executed by LLI
...
llvm-svn: 4955
2002-12-08 05:51:08 +00:00
Chris Lattner
a2b4c6cc49
Make command line arguments setup be endian correct!!
...
llvm-svn: 4605
2002-11-07 19:29:31 +00:00
Chris Lattner
61596ad266
Fix two problems:
...
* Load Implementation can cause unaligned memory accesses, which caused
problems for sparc.
* cast from pointer to pointer would zero the upper 32 bits of the pointer
which obviously causes problems on 64 bit hosts.
llvm-svn: 4454
2002-10-30 21:47:57 +00:00
Chris Lattner
7fe1f7c931
Fix a major bug in lli
...
llvm-svn: 4289
2002-10-26 01:57:15 +00:00
Chris Lattner
6a1a65f9de
- Fix LLI so that it simulates the endianness of the target machine
...
correctly, despite the fact that the host machine might not be the same.
llvm-svn: 4180
2002-10-15 20:34:05 +00:00
Chris Lattner
dabbf17b47
Expose TD to ExternalFunctions.cpp
...
llvm-svn: 4020
2002-10-02 21:10:48 +00:00
Chris Lattner
bd0d2eab64
* Fix a bug that was causing lli to misrun:
...
test/Regression/Transforms/DecomposeMultiDimRefs/mixedindices.c
* Eliminate unneccesary #include
llvm-svn: 3712
2002-09-13 23:30:42 +00:00
Chris Lattner
f78e050e93
Another portability patch graciously provided by Casey Carter
...
llvm-svn: 3698
2002-09-13 14:41:38 +00:00
Chris Lattner
e314bf5264
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3683
2002-09-11 01:21:35 +00:00
Chris Lattner
b0b412e66e
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Chris Lattner
c837dbc39f
Implement ConstantPointerRef support, & ConstantExpr support for Cast, GEP & Add.
...
llvm-svn: 3516
2002-08-27 22:33:45 +00:00
Chris Lattner
dfb3a2cd07
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
cd709cbf53
Load & StoreInst no longer derive from MemAccessInst, so we don't have
...
to handle indexing anymore
llvm-svn: 3485
2002-08-22 22:49:05 +00:00
Chris Lattner
b3c2af69fe
Remove support for NOT instruction
...
llvm-svn: 3313
2002-08-14 17:45:39 +00:00
Chris Lattner
42f596feda
Minor change to make lli print out characters numerically as well as symbolically
...
llvm-svn: 3303
2002-08-13 20:45:11 +00:00
Chris Lattner
600ba8fa6d
Fix one real nasty bug
...
llvm-svn: 3227
2002-08-02 22:06:04 +00:00
Chris Lattner
6dd03356a6
Fix gcc 3.1 complaint
...
llvm-svn: 3091
2002-07-25 17:37:05 +00:00
Chris Lattner
f5cad15a67
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Chris Lattner
f6d3cb95cf
Implementing shift left & shift right on pointers
...
llvm-svn: 2844
2002-07-09 18:42:36 +00:00
Chris Lattner
7076ff29ed
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner
3ad34b9c3c
Change usage of isPointerType to use isa
...
llvm-svn: 2487
2002-05-06 16:15:49 +00:00
Chris Lattner
79baf91f17
Implement the NOT operator.
...
llvm-svn: 2455
2002-05-03 19:52:30 +00:00
Chris Lattner
45243fa9b7
Implement cast operations on booleans to allow casting bools to ints, f.e.
...
llvm-svn: 2437
2002-05-02 19:28:45 +00:00
Chris Lattner
9c0b187463
Fix #include broken by iMemory.h not including DerivedTypes.h
...
llvm-svn: 2407
2002-04-29 18:56:45 +00:00
Chris Lattner
0ebb7930c9
FIXME removed: malloc/alloca ALWAYS have a size argument
...
llvm-svn: 2389
2002-04-28 21:57:33 +00:00
Chris Lattner
ca14237696
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
87b84e474f
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2217
2002-04-09 19:59:31 +00:00
Chris Lattner
62b7fd136e
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
af83890436
Change from Method to Function
...
llvm-svn: 1992
2002-03-26 18:02:30 +00:00
Chris Lattner
fb55ba00e1
Keep track of memory allocated by alloca so that it is freed appropriately
...
llvm-svn: 1776
2002-02-19 18:50:09 +00:00
Chris Lattner
60a6591d83
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
2787a4edea
Add new abort-on-exceptions flag
...
llvm-svn: 1737
2002-02-12 15:47:23 +00:00
Chris Lattner
7a79cfa2af
Make array bound checks optional and disabled by default.
...
llvm-svn: 1725
2002-02-11 20:19:16 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
24404f8223
* Support the new -q flag for automated tests
...
* Remove unsized array support
* Add pointer indexing support
llvm-svn: 1477
2001-12-14 16:49:29 +00:00
Chris Lattner
2413b160ec
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
3462ae3ad7
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
fb5ae02e1a
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
5de2204fe8
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
f679703feb
Move DataTypes.h from llvm/Support to just Support
...
llvm-svn: 1399
2001-11-26 23:04:08 +00:00
Chris Lattner
5ba757369c
* Implement array indexing in lli
...
* Add external atoi method as well as floor, and srand
llvm-svn: 1355
2001-11-26 18:18:18 +00:00
Chris Lattner
af84e627fd
Rename cruft
...
llvm-svn: 1299
2001-11-14 11:28:18 +00:00
Chris Lattner
747f016184
Print percentages for profiling info better
...
llvm-svn: 1274
2001-11-12 20:13:14 +00:00
Chris Lattner
a7482e05d0
Print profile info if exit() is called
...
llvm-svn: 1268
2001-11-12 16:28:48 +00:00
Chris Lattner
e32deb455b
Hack a structure profiling option together
...
llvm-svn: 1267
2001-11-12 16:19:45 +00:00
Chris Lattner
b1f672812b
Correct problem that allows indirect function calls
...
llvm-svn: 1179
2001-11-07 20:12:30 +00:00
Chris Lattner
31e9e4d219
* Switch to operation on pointers with PointerTy more consistently
...
* Fix misspeling
* Catch SIGFPE for traps
* info XXX now prints the raw contents of the GenericValue
* Switch to calloc instead of malloc (temporarily I hope) to bandaid Olden benchmarks
* Implement binary And & Or
* Convert expressions like this:
PointerTy SrcPtr = getOperandValue(I->getPtrOperand(), SF).PointerVal;
to:
GenericValue SRC = getOperandValue(I->getPtrOperand(), SF);
PointerTy SrcPtr = SRC.PointerVal;
because the prior way confuses purify.
* Taint the initial values of the value planes
* Handling 'print bb4' in the interpreter without crashing
* Print nicer stack frames with concise return type
* printf doesn't suck nearly as badly as it used to
llvm-svn: 1177
2001-11-07 19:46:27 +00:00
Chris Lattner
eaec4ede57
*Print Stack traces better.
...
* Use the cache writer for all it's problems.
* print arguments to methods in stack traces.
*Print the current stack from for up/down commands.
llvm-svn: 1170
2001-11-07 05:31:27 +00:00
Chris Lattner
1f01726487
* Use cached writer to speed up printing and get symbolic types more consistently
...
* When a segfault or bus error occurs, stop the program, print a stack trace, and dump the user in the debugger mode
llvm-svn: 1169
2001-11-07 04:23:00 +00:00
Chris Lattner
487b1b8cc1
Implement xor operator
...
llvm-svn: 1050
2001-10-30 20:54:36 +00:00
Chris Lattner
5946b1150d
* Add some assertions for checking internal error conditions
...
* Implement the 'rem' instruction
* Fix getelementptr to work right
* Copy the return result of an external function call into the receiving value
* Convert stuff to new style casts
llvm-svn: 1046
2001-10-30 20:27:31 +00:00
Chris Lattner
62d1fb6777
Print out a label if we step into the first instruction of a basic block
...
llvm-svn: 1038
2001-10-29 20:44:34 +00:00
Chris Lattner
05fbeedde8
Implement getelementptr instruction as well as the load and store forms
...
that incorporate gep
llvm-svn: 1036
2001-10-29 19:32:19 +00:00
Chris Lattner
13babb6805
Remember to print out the next instruction if stepping over an external method call
...
llvm-svn: 1028
2001-10-29 16:05:19 +00:00
Chris Lattner
689049e1cd
Fix problem next'ing over an external method
...
llvm-svn: 1027
2001-10-29 14:08:33 +00:00
Chris Lattner
009f8108bc
Implement a -trace command line option and a trace option in the interpreter.
...
llvm-svn: 989
2001-10-27 08:43:52 +00:00
Chris Lattner
0b00b31c78
* Make pointer values work better by treating them uniformly as 64 bit values.
...
This causes code that is generated by gcc to work better.
* Implement mul & div
* Export malloc, free, and pow
* add strtol, atoi, and atol to the runtime library
llvm-svn: 988
2001-10-27 08:28:11 +00:00
Chris Lattner
6642eec003
Provide argv for commands
...
llvm-svn: 987
2001-10-27 05:54:31 +00:00