Commit Graph

3309 Commits

Author SHA1 Message Date
Misha Brukman
86172ab3d6 * Allow passing in an unsigned configuration to allocateSparcTargetMachine()
a default value is set in the header file.
* Fixed some code layout to make it more consistent with the rest of codebase
* Added addPassesToJITCompile() with relevant passes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6369 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 22:24:48 +00:00
Misha Brukman
51aa21c702 Moved generation of the SparcV9CodeEmitter.inc file higher in the Makefile so
that Makefile.common would see it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6367 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 22:04:38 +00:00
Misha Brukman
79caf1fe26 Add prototypes to add passes to JIT compilation and code emission.
Also, added annotations to how instructions are modified (reg/imm operands).
Added prototype for adding register numbers to values pass for interfacing with
the target-independent register allocators in the JIT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6366 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 22:01:10 +00:00
Misha Brukman
0cc640e6c8 Broke out class definition from SparcV9CodeEmitter, and added ability to take a
MachineCodeEmitter to make a pass-through debugger -- output to memory and to
std::cerr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6363 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:45:05 +00:00
Misha Brukman
1df4d5e668 Link in Sparc libs for the JIT, even on X86 to be able to support debugging
of Sparc JIT (printing out instrs) on X86. Con: this increases linking time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6361 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:42:05 +00:00
Misha Brukman
abb027cf41 Allow for specification of which JIT to run on the commandline.
`lli -march=x86' or `lli -march=sparc' will forcefully select the JIT even on a
different platform. Running lli without the -march option will select the JIT
for the platform that it's currently running on.

Pro: can test Sparc JIT (debug printing mode) on X86 -- faster to compile/link
LLVM source base to test changes.
Con: Linking lli on x86 now pulls in all the Sparc libs -> longer link time
(but X86 can bear it, right?)

In the future, perhaps this should be a ./configure option to enable/disable
target JITting...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6360 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:40:39 +00:00
Misha Brukman
3de36f5309 SparcV9CodeEmitter.cpp is a part of the Sparc code emitter. The main function
that assembles instructions is generated via TableGen (and hence must be built
before building this directory, but that's already the case in the top-level
Makefile).

Also added is .cvsignore to ignore the generated file `SparcV9CodeEmitter.inc',
which is included by SparcV9CodeEmitter.cpp .


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6357 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 20:07:58 +00:00
Misha Brukman
998800cb87 Added definitions for a bunch of floating-point instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6356 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 20:03:29 +00:00
Chris Lattner
5c38e99c59 Fix constant folding to ALWAYS work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6355 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 19:16:07 +00:00
Chris Lattner
2a9c847f25 Fix bug: Instcombine/2003-05-27-ConstExprCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6352 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 16:40:51 +00:00
Chris Lattner
39602b2002 Make _sure_ we don't go into an infinite loop if a signal happens!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 16:25:04 +00:00
Chris Lattner
d10376bee5 * Actually USE the statistic that we made
* Implement SRoA for arrays


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6349 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 16:09:27 +00:00
Chris Lattner
ed7b41ea90 Implementation of the simple "scalar replacement of aggregates" transformation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6346 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 15:45:27 +00:00
Vikram S. Adve
a22eace55b Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags.  Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6342 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:06:48 +00:00
Vikram S. Adve
5f2180c533 (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

(3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
    and related functions and flags.  Fixed several bugs where only
    "isDef" was being checked, not "isDefAndUse".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:05:23 +00:00
Vikram S. Adve
49cab03c81 Renamed opIsDef to opIsDefOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6340 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:03:17 +00:00
Vikram S. Adve
78a4f23a8e Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.
Moved some machine-independent reg-class code to class TargetRegInfo
from SparcReg{Class,}Info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6339 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:02:22 +00:00
Chris Lattner
bd4ecf769d Fix bug: InstCombine/2003-05-26-CastMiscompile.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6338 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-26 23:41:32 +00:00
Vikram S. Adve
645fea33be Bug fix: right shift for int divide-by-power-of-2 was incorrect for
negative values.  Need to add one to a negative value before right shift!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6334 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-25 21:59:47 +00:00
Vikram S. Adve
9e49824d70 Bug fix: padding bytes within a structure should go after each field!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6333 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-25 21:59:09 +00:00
Vikram S. Adve
c2f0939320 Bug fix: sign-extension was not happening for C = -MININT since C == -C!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6332 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-25 21:58:11 +00:00
Chris Lattner
9608c81d01 Fix problem with last checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6328 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-25 16:15:32 +00:00
Vikram S. Adve
5b1b47b824 Add support for compiling varargs functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6325 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-25 15:59:47 +00:00
Misha Brukman
12745c55e1 Reword to remove reference to how things worked in the past.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6323 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 01:08:43 +00:00
Misha Brukman
e9d883828a Implement the TargetInstrInfo's createNOPinstr() and isNOPinstr() interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6320 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 00:09:50 +00:00
Chris Lattner
02ec5ede6c Fix Bug: Linker/2003-04-26-NullPtrLinkProblem.ll
This was a problem with constants having their types resolved to some new type,
but there was already a constant of the new type created.  Before, these types
were never merged together, now they are.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 20:03:32 +00:00
Misha Brukman
f96eb64666 Cleaned up code layout; no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 19:20:57 +00:00
Chris Lattner
de579f11ff Remove using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 22:00:07 +00:00
Chris Lattner
01e770a9e5 Add using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6305 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:59:35 +00:00
Misha Brukman
6b77ec4156 Cleaned up code layout. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:49:18 +00:00
Chris Lattner
e3d3219f76 Remove using declarations and extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6303 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:47:17 +00:00
Chris Lattner
950273b3e7 Fix static constructor ordering problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:31:52 +00:00
Misha Brukman
c2312df45c Kill `using' directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:24:35 +00:00
Chris Lattner
47697a18d2 Remove using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:21:43 +00:00
Chris Lattner
88c7c3295d Make the list accept comma separated names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6295 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 20:27:13 +00:00
Chris Lattner
72fb8e5082 Add new CommaSeparated option modifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6294 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 20:26:17 +00:00
Chris Lattner
ca6433f233 Destroy using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 20:06:43 +00:00
Chris Lattner
2345d71853 * Revert to old behavior of ignoring a module if it doesn't contain a main
function and no symbols were explicitly marked to be externalized.
* Add new -internalize-public-api-list option that can be used if the symbol
  list is small, and making a new file is annoying.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6289 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 19:48:00 +00:00
Chris Lattner
c7a2c7f0c9 Add option to internalize to allow it to read a file to determine which symbols
should not be internalized


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 19:34:49 +00:00
Chris Lattner
c54e2b8f84 Minor cleanups.
This hunk:
-    } else if (Src->getNumOperands() == 2 && Src->use_size() == 1) {
+    } else if (Src->getNumOperands() == 2) {

Allows GEP folding to be more aggressive, which reduces the number of instructions
and can dramatically speed up BasicAA in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6286 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 19:07:21 +00:00
Chris Lattner
f69315bd79 Fix bug: Assembler/2003-05-03-BytecodeReaderProblem.llx
by emitting the type planes before any constants (which could be constant
expressions involving undefined types!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6285 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 18:35:38 +00:00
Chris Lattner
a2602f3dfd Do not assert fail or crash when a bytecode parse fails!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6284 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 18:26:48 +00:00
Chris Lattner
12e6465d89 Eliminate the uchar typedef, use unsigned char explicitly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6283 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 18:08:30 +00:00
Chris Lattner
c52b30dcfb Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 20:51:52 +00:00
Chris Lattner
9098f64ccc Fix Bug: BasicAA/2003-05-21-GEP-Problem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6270 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 20:23:26 +00:00
Misha Brukman
c97a2075d9 Fixed `volatile' typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6266 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 19:34:28 +00:00
Misha Brukman
81b0686f09 Cleaned up code layout, spacing, etc. for readability purposes and to be more
consistent with the style of LLVM's code base (and itself! it's inconsistent in
some places.)

No functional changes were made.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 18:48:06 +00:00
Chris Lattner
4e840d4db7 * Fix divide by zero error with empty structs
* Empty structs should have ALIGNMENT 1, not SIZE 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6263 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 18:08:44 +00:00
Misha Brukman
77c9fcb797 Cleaned up code layout, spacing, etc. for readability purposes and to be more
consistent with the style of LLVM's code base (and itself! it's inconsistent in
some places.)

No functional changes were made.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 18:05:35 +00:00
Misha Brukman
ee563cb978 Namespacified vector' and cerr' to always use the `std::' namespace.
Eliminated `using' directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6261 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 17:59:06 +00:00