Commit Graph

6860 Commits

Author SHA1 Message Date
Chris Lattner 6a561beb35 Add namespace specifier, add flags used by the X86 BE
llvm-svn: 7403
2003-07-29 23:02:49 +00:00
Chris Lattner 590fd82e42 Don't crash if there is no Inst class in the tablegen file!
llvm-svn: 7402
2003-07-29 23:00:08 +00:00
Misha Brukman 0f918540b6 * Cleaned up and corrected comments wrt instruction formats
* Enabled STXFSR instructions

llvm-svn: 7400
2003-07-29 21:21:20 +00:00
Misha Brukman fb8f64a590 Make emitFarCall() public, and add a few comments to functions.
llvm-svn: 7399
2003-07-29 20:52:56 +00:00
Vikram S. Adve f128c11bdd Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.

llvm-svn: 7398
2003-07-29 20:30:20 +00:00
Vikram S. Adve f8049f93c2 Bug fix: after reallocating the hash table, we have to re-insert each value
instead of copying table entries!

llvm-svn: 7396
2003-07-29 20:01:01 +00:00
Vikram S. Adve e895c2e241 Unify all constant evaluations that depend on register size
in ConvertConstantToIntType.

llvm-svn: 7395
2003-07-29 19:59:23 +00:00
Vikram S. Adve 2b630b4ec2 Rename 'dump-asm' to 'dump-input' and really print it just before code-gen.
llvm-svn: 7394
2003-07-29 19:58:00 +00:00
Vikram S. Adve dbc0eb6a2d Bug fix: don't unnecessarily pretty-print control-characters, some of
which were wrong (particularly, '\a' for '\007').

llvm-svn: 7393
2003-07-29 19:57:34 +00:00
Vikram S. Adve 648ce40adf Add ConvertConstantToIntType() to unify all constant handling
that depends on machine register size.
Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall to TargetRegInfo: they are all
machine independent.  Remove several dead functions.

llvm-svn: 7392
2003-07-29 19:54:41 +00:00
Vikram S. Adve 2353584afc Add code to support stack spill/temp offsets that don't fit in the
immed. field.  Moved insertCallerSavingCode() to PhyRegAlloc: it is
now machine independent.  Remove all uses of PhyRegAlloc.

llvm-svn: 7391
2003-07-29 19:53:21 +00:00
Vikram S. Adve 9143f1962e All constant-evaluation code now unified into
TargetInstrInfo::ConvertConstantToIntType().

llvm-svn: 7390
2003-07-29 19:50:12 +00:00
Vikram S. Adve c9cb319bcb 1. Bug fix: Don't use branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
   (which will eventually be moved before the branch).
2. Bug fix:  Delete the delay slot instr, not the branch instr, when
   moving delay slot instr. out!!!!
3. Move code to insert caller-saves moved here from SparcRegInfo:
   it is now machine-independent.

llvm-svn: 7389
2003-07-29 19:49:21 +00:00
Vikram S. Adve 09091ee782 Don't require a BB to look-up live variables, unless they may need to
be recomputed.

llvm-svn: 7388
2003-07-29 19:42:32 +00:00
Vikram S. Adve fa31c92f8e Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall here: they are all
machine independent.  Remove all uses of PhyRegAlloc.

llvm-svn: 7387
2003-07-29 19:41:23 +00:00
Vikram S. Adve e2ef34a818 Add const version of getLiveRangeForValue().
llvm-svn: 7386
2003-07-29 19:38:22 +00:00
Vikram S. Adve 91e75d87d2 Code to insert caller-saves moved here from SparcRegInfo: it is now
machine-independent.
Fix problem with using branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).

llvm-svn: 7385
2003-07-29 19:37:41 +00:00
Vikram S. Adve 44119ac56e Don't require a BB to look-up live variables, unless they may need to
be recomputed.

llvm-svn: 7384
2003-07-29 19:32:04 +00:00
John Criswell 4f37692a80 Enable JIT when the platform supports it.
Select /localhome/$USER when it exists.
Fix the checks for bidirectional and forward iterators so that they work with
version of GCC prior to 3.x.

llvm-svn: 7383
2003-07-29 19:11:58 +00:00
Misha Brukman 0db560d8f6 * Correctly emit a far call if the target address does not fit into 30 bits
instead of assert()ing
* Fixed a nasty bug where '07' was used instead of register 'o7'

llvm-svn: 7382
2003-07-29 19:00:58 +00:00
Misha Brukman e47f069855 * Stop hard-coding a value for beginning of emitted code on Sparc since we can
now handle far calls (i.e., beyond the 30-bit limit in call instructions).
* As a side-effect, this allows us to unify and clean up the mmap() call and
  code around it.

llvm-svn: 7381
2003-07-29 16:57:16 +00:00
Misha Brukman a845a566e1 * Disambiguate symbols before we start splitting module by functions
* Moved DisambiguateGlobalSymbols() out of the ReduceMisCodegenFunctions class
* Added an assert to have a cleaner exit if `main' is not found in the module

llvm-svn: 7380
2003-07-29 16:02:28 +00:00
Vikram S. Adve 29a64e481d Regression test for incorrect character emitted to char array.
llvm-svn: 7379
2003-07-29 14:02:40 +00:00
Chris Lattner e8c59958d3 Fix copy and paste-o
llvm-svn: 7378
2003-07-29 05:15:44 +00:00
Chris Lattner bbc8db5266 Move "register flags" definition the type of registers to be fully fledged
value types

llvm-svn: 7377
2003-07-29 05:14:16 +00:00
Chris Lattner c1e3827de6 Move value type enums to CodeGen/ValueTypes.h
llvm-svn: 7376
2003-07-29 05:13:34 +00:00
Chris Lattner 91ea759ad9 Define target value types in a form usable by target-independent code
llvm-svn: 7375
2003-07-29 05:13:09 +00:00
Misha Brukman c3e789388f Made many paragraphs fit into 80 characters per line to avoid wrapping in an
editor window. Re-worded confusing description about interdependence of modules.

llvm-svn: 7374
2003-07-28 21:57:18 +00:00
Chris Lattner 60104f00c7 Add support for Alpha intrinsics, contributed by Rahul Joshi
llvm-svn: 7373
2003-07-28 21:20:57 +00:00
Chris Lattner 8c48a098a5 Add alpha intrinsics, contributed by Rahul Joshi
llvm-svn: 7372
2003-07-28 21:18:21 +00:00
Misha Brukman 123c8576e5 Implemented cleanups as suggested by Chris:
* Use Module::getNamedFunction() to delete "main" instead of using a loop
* Compare function pointers instead of function names to determine equivalence
* Simplified creation of a 2-element vector containing zeroes
* Manually performed LICM on code
* Added an abort() in case a function we're considering occurs in something that
  is not an instruction
* Use DEBUG() around code sections instead of just in a statement in a loop,
  because GCC's DCE may not be good enough to completely remove it in a release
  build
* Print out a command that can be directly copied-and-pasted to re-execute
* Instead of just checking if a symbol begins with a dot and fixing it
  accordingly, use Mangler and fix all the problems (invalid chars in C symbol
  names) entirely
* The new `main' function has external linkage

llvm-svn: 7371
2003-07-28 21:07:39 +00:00
Misha Brukman eacfd216d3 Added comment to function isExecutingJIT()
llvm-svn: 7370
2003-07-28 20:59:16 +00:00
John Criswell fe72063d68 Added two tasks:
o Check for GCC version in configure script.
	o Rewrite this file without Netscape Composer.

llvm-svn: 7369
2003-07-28 19:26:39 +00:00
Misha Brukman c0ae1cd93e Add rationale for the MAP_ANONYMOUS vs. MAP_ANON flags.
llvm-svn: 7368
2003-07-28 19:26:19 +00:00
Misha Brukman b7ea12c550 Added comma after `i.e.'
llvm-svn: 7367
2003-07-28 19:21:20 +00:00
Misha Brukman 3bb53319e8 The RTLD_GLOBAL flag allows symbols to be globally accessible, which makes
resolution of symbols in the .so possible (currently assists debugging with
bugpoint).

llvm-svn: 7366
2003-07-28 19:19:58 +00:00
Misha Brukman 2befe71a04 Lined things up in a more aesthetically pleasing way.
llvm-svn: 7365
2003-07-28 19:17:53 +00:00
Misha Brukman 539f95933c BugDriver.h:
* Added method to query if BugDriver is executing the JIT currently.
  This provides the ability in adding code that is conditionally executed in
  codegen debugging phase.

CodeGeneratorBug.cpp:
* Delete test functions from the Safe module
* Code conditionally added when debugging the JIT:
  use the lazy resolver function added to Emitter.cpp to get function pointer
  by name. When compiled into an .so, this is the only way to get a pointer to
  an external function
* Added a symbol disambiguator which will keep symbols uniquely named across
  modules
* Delete generated files by default
* The function `main' *must* stay in the .bc file for the JIT, but that prevents
  debugging it alone. This patch makes the old `main' become `old_main' and adds
  a new function named `main' which just calls the original with the same
  parameters, thereby keeping functionality the same.

ExecutionDriver.cpp:
* Returned to getting unique filenames
* Simplified code choosing between using and not using shared library option

llvm-svn: 7364
2003-07-28 19:16:14 +00:00
Misha Brukman 057f460053 Add ability for external C code to get pointers to functions given their name.
This us used by bugpoint -- when code is compiled to a shared object to be
JITted, it must use the JIT's lazy resolution method to find function addresses,
because some functions will not be available at .so load time, as they are in
the bytecode file.

llvm-svn: 7363
2003-07-28 19:09:06 +00:00
Misha Brukman ee79899ce5 Clean up code dealing with RTLD_SELF differences on Sparc and X86.
llvm-svn: 7362
2003-07-28 19:07:30 +00:00
Misha Brukman d9a9276fe3 Fix reference to architecture.
llvm-svn: 7361
2003-07-28 19:06:50 +00:00
Misha Brukman c69f4a575c Add in support to load shared objects (-load is provided by Support library).
llvm-svn: 7360
2003-07-28 19:06:19 +00:00
Misha Brukman a626a9e4df Removed extra parenthesis and fixed spelling.
llvm-svn: 7359
2003-07-28 16:53:28 +00:00
Tanya Lattner db908a22c8 Need to include <string> to fix compile error on Sun
llvm-svn: 7358
2003-07-28 16:42:33 +00:00
Chris Lattner ae92d0bba6 Specify the value type for the register, not just the size.
llvm-svn: 7357
2003-07-28 04:25:36 +00:00
Chris Lattner 845ed843f1 Instead of specifying the SIZE of the register, go so far as to specify
what value type it is.

llvm-svn: 7356
2003-07-28 04:24:59 +00:00
Chris Lattner 8cdf385f8d Add support for Set statements without {}'s. Now we can just say
set Foo = bar in
  def blah: blahclass {}

llvm-svn: 7355
2003-07-28 03:49:40 +00:00
Chris Lattner 2c76692496 Allow initializing variable initializers with variables
llvm-svn: 7354
2003-07-28 03:39:57 +00:00
Chris Lattner 09a63a80e2 Somehow "simplest" test became a hello world test. Rectify this.
llvm-svn: 7353
2003-07-27 00:28:10 +00:00
Chris Lattner a2e2f5cc45 Rename function to be more consistent with filename
llvm-svn: 7352
2003-07-26 23:49:58 +00:00