Commit Graph

6886 Commits

Author SHA1 Message Date
Misha Brukman
9d679cbc6c * Moved InputArgv out of anonymous scope to be extern'd in another file.
* Added DEBUG() statements to print out parameters passed to executing programs
* Actually ADD parameters to a program running via the JIT (using vector<char*>)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7433 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 20:15:44 +00:00
Chris Lattner
e623fe3d0a Minor reorganization, move ParseFile to the lexer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7432 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 19:55:10 +00:00
Chris Lattner
90523906fa Make tablegen take an input filename to parse if one is specified, otherwise
use stdin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 19:48:02 +00:00
Chris Lattner
35c7444e52 Initial tests for tblgen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7430 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 19:40:00 +00:00
Chris Lattner
d33b8db415 Directly support C style comments in tblgen, but allow them to actually nest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7429 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 19:39:36 +00:00
Chris Lattner
61972242f3 Fix a bug that brian reported
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7428 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 19:04:37 +00:00
Misha Brukman
800e6e216a Moved definition of InputArgv into ExecutionDriver.cpp -- it is only used there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7427 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 17:59:23 +00:00
Misha Brukman
7835c85227 Use a vector<char*> instead of char*[] so that we can add arbitrary number of
parameters, such as command-line arguments that the executing program gets via
bugpoint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7423 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 17:44:15 +00:00
Chris Lattner
c1869e85de Add variable to capture arguments that should be passed to the user program
This is unused so far.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7422 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 17:36:07 +00:00
Chris Lattner
9cf3d47702 Add support for "named positional arguments"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7421 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 17:34:02 +00:00
Misha Brukman
5d5bc7b90c Revert change: default architecture is never set, it is guessed from input
bytecode file. This means that LLC on X86 will compile to Sparc assembly given a
64-bit input bytecode file...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7419 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 15:29:55 +00:00
Vikram S. Adve
db68577691 When emitting a constant, check for ConstantExpr before
ordinary (primitive) types since ConstantExprs may be of primitive type!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7418 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 12:54:47 +00:00
Vikram S. Adve
6235ea2012 1. Make table size prime -- improves hashing performance vastly.
2. Reduce #hashes from 2 to 1 for initial inserts.
3. Fix incorrect assertion from last checkin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7417 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 12:49:25 +00:00
Chris Lattner
7a3dd8651f Conform to the new interface for describing target registers... even though
it's currently not used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7416 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:51:34 +00:00
Chris Lattner
7c28952e7a Add all of the necessary classes to describe the contents of the MRegister.h implementation
for a target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7415 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:50:12 +00:00
Chris Lattner
b4d3f46ba2 Only regenerate the .inc file if IT has changed, not just if the .td files
have changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7414 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:49:17 +00:00
Chris Lattner
7db1fa9802 Use target specific interface instead of forcing it to be target-generic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7413 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:33:48 +00:00
Chris Lattner
92988ecdb6 Code generation passes don't need access to raw LLVM types, this method is unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7412 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:29:45 +00:00
Chris Lattner
18226e0cf1 Fix coredump for when an ID is used illegally outside a record
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7411 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:17:35 +00:00
Chris Lattner
bfce056ea8 Don't pollute the namespace with template arguments after they have been resolved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7410 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 04:56:05 +00:00
Chris Lattner
554af5cd62 Implement TODO: disallow 'def's with template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7409 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 04:31:17 +00:00
Chris Lattner
fc06bf0eaa Allow specification of anonymous definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7408 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 04:26:44 +00:00
Chris Lattner
f1b36f9a71 Allow passing lists through variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7407 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 04:16:52 +00:00
Chris Lattner
9b929aa749 Implement resolution of variables to the value of the variable once it gets a value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7406 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 04:05:07 +00:00
Chris Lattner
ee6b5f69bd No this file is not actually Sparc.td :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7405 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:07:13 +00:00
Chris Lattner
dbc1ab88ae Do not use 'cpp' directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7404 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:04:41 +00:00
Chris Lattner
84c40c1dce Add namespace specifier, add flags used by the X86 BE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7403 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:02:49 +00:00
Chris Lattner
30709543d2 Don't crash if there is no Inst class in the tablegen file!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7402 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:00:08 +00:00
Misha Brukman
92aa8ca9c5 * Cleaned up and corrected comments wrt instruction formats
* Enabled STXFSR instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7400 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 21:21:20 +00:00
Misha Brukman
a21b8e8213 Make emitFarCall() public, and add a few comments to functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7399 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 20:52:56 +00:00
Vikram S. Adve
588668d468 Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7398 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 20:30:20 +00:00
Vikram S. Adve
b3b0414c87 Bug fix: after reallocating the hash table, we have to re-insert each value
instead of copying table entries!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7396 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 20:01:01 +00:00
Vikram S. Adve
e6124d3b7c Unify all constant evaluations that depend on register size
in ConvertConstantToIntType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7395 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:59:23 +00:00
Vikram S. Adve
deb9634f0e Rename 'dump-asm' to 'dump-input' and really print it just before code-gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7394 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:58:00 +00:00
Vikram S. Adve
00477cf26d Bug fix: don't unnecessarily pretty-print control-characters, some of
which were wrong (particularly, '\a' for '\007').


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7393 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:57:34 +00:00
Vikram S. Adve
ada280faa9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7392 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:54:41 +00:00
Vikram S. Adve
83d30c89e5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7391 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:53:21 +00:00
Vikram S. Adve
b5161b60c2 All constant-evaluation code now unified into
TargetInstrInfo::ConvertConstantToIntType().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7390 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:50:12 +00:00
Vikram S. Adve
814030a0c5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7389 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:49:21 +00:00
Vikram S. Adve
7a81a0fd13 Don't require a BB to look-up live variables, unless they may need to
be recomputed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:42:32 +00:00
Vikram S. Adve
ceb7d2f4f8 Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall here: they are all
machine independent.  Remove all uses of PhyRegAlloc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7387 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:41:23 +00:00
Vikram S. Adve
b403b2c019 Add const version of getLiveRangeForValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7386 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:38:22 +00:00
Vikram S. Adve
102f295114 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7385 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:37:41 +00:00
Vikram S. Adve
0eb7f745ed Don't require a BB to look-up live variables, unless they may need to
be recomputed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7384 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:32:04 +00:00
John Criswell
c78022ed07 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7383 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:11:58 +00:00
Misha Brukman
a1f1fea105 * 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'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7382 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:00:58 +00:00
Misha Brukman
89e8be00c5 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7381 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 16:57:16 +00:00
Misha Brukman
de9720ffce * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7380 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 16:02:28 +00:00
Vikram S. Adve
46721dde71 Regression test for incorrect character emitted to char array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7379 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 14:02:40 +00:00
Chris Lattner
38dbde19cc Fix copy and paste-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7378 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 05:15:44 +00:00