Commit Graph

6294 Commits

Author SHA1 Message Date
Chris Lattner b561e7c6da New testcase for PHI handling
llvm-svn: 6621
2003-06-05 05:38:30 +00:00
Chris Lattner 3cc301834e Use a constant expr GEP instead of an actual instruction
llvm-svn: 6620
2003-06-05 04:48:18 +00:00
Misha Brukman cbbe7ac699 All store instructions really want 'rd' in the first field.
Special cases: STFSRx and STXFSRx - they operate on predefined rd=0 or rd=1, and
expect %fsr as the parameter in assembly. They are disabled (since not used)
until an encoding, both for code generation and output, is chosen.

llvm-svn: 6619
2003-06-05 01:06:10 +00:00
Misha Brukman 98467a7a18 Added missing 'rs1' field to F3_rdrs1imm13, 'rd' to F3_rdrs1rs2.
llvm-svn: 6618
2003-06-05 00:39:45 +00:00
Brian Gaeke 98eee41e0e lib/CodeGen/Mapping/MappingInfo.cpp:
Update file comment to contain a bunch of the overview mapping-info
  documentation previously buried within the file.
 Remove some unnecessary include/using stmts.
 Rename pass to MappingInfoCollector.
 Rewrite a lot of it so it doesn't use global instance variables and so
  it outputs into MappingInfo objects and then dumps those out, instead of going
  straight to an assembly file.
 Change name of factory to getMappingInfoCollector.
 Fold prologue & epilogue writers into MappingInfo methods.

lib/Target/Sparc/FInfo.cpp:
 Correct file comment to reflect above change

lib/Target/Sparc/Sparc.cpp:
 Change name of factory to getMappingInfoCollector.

llvm-svn: 6617
2003-06-04 22:07:12 +00:00
Brian Gaeke 44b2d7a56f Add file comment. Include <vector> and <string>. Update include guards
to reflect file's current location.  Add definition of class
MappingInfo.

llvm-svn: 6616
2003-06-04 22:02:47 +00:00
Chris Lattner 365a47bdbb Revert brians patch to get mapping info working again
sorry dude

llvm-svn: 6615
2003-06-04 21:01:12 +00:00
Tanya Lattner cbf828dd0d Had to comment out a line in outByte() to get it to compile because Out and tmp were
undeclared. I was not sure what Brian wanted, so I will let him fix this. But now it compiles.

llvm-svn: 6614
2003-06-04 20:53:46 +00:00
Chris Lattner a485efa141 Make this work with counter > 127
llvm-svn: 6613
2003-06-04 20:08:47 +00:00
Misha Brukman efafdf8046 * Instead of re-inventing the MachineConstantPool emitter that's already given
in Emitter.cpp, just convert the Sparc version of the constant pool into
  what's already supported and inter-operate.
* Implemented a first pass at lazy function resolution in the JITResolver. That
  required adding a SparcV9CodeEmitter pointer to simplify generating
  bit-patterns of the instructions.
* SparcV9CodeEmitter now creates and destroys static TheJITResolver, which makes
  sense because the SparcV9CodeEmitter is the only user of TheJITResolver, and
  lives for the entire duration of the JIT (via PassManager which lives in VM).
* Changed all return values in the JITResolver to uint64_t because of the 64-bit
  Sparc architecture.
* Added a new version of getting the value of a GlobalValue in the
  SparcV9CodeEmitter, which now works for already-generated functions (JITted or
  library functions).
* Removed little-used and unused functions, cleaning up the internal view of the
  SparcV9CodeEmitter.

llvm-svn: 6612
2003-06-04 20:01:13 +00:00
Chris Lattner 8439388cb2 Add prerelease license to cvs
llvm-svn: 6611
2003-06-04 19:46:36 +00:00
Misha Brukman 1d443d1250 * Institute a hack for the Sparc call to mmap() to get our generated code to be
laid out closer to the VM so that calls to library functions (e.g. puts()) and
  callback (e.g.  JITResolver::CompilationCallback) fit into 30 bits of the call
  instruction.
* Abort if architecture is not yet supported (not X86 or Sparc) because it
  likely requires a different set of parameters to mmap() .
* Stop using hard-coded values for page size; use sysconf(_SC_PAGESIZE) instead.

llvm-svn: 6610
2003-06-04 19:45:25 +00:00
Brian Gaeke 49833da4bf Make writeNumber() void. Get ready to decouple it from .byte directive output.
llvm-svn: 6609
2003-06-04 18:17:22 +00:00
Vikram S. Adve 1f5392eb1e Modify tracing rules to use opt -trace[m] instead of llc -trace[m].
llvm-svn: 6607
2003-06-04 14:24:52 +00:00
Sumant Kowshik c318ca1a51 Made changes suggested by Chris
llvm-svn: 6606
2003-06-04 08:03:57 +00:00
Sumant Kowshik 061d15551f Made changes suggested by Chris; Renamed 'union' function to unionSetsWith
llvm-svn: 6605
2003-06-04 08:00:05 +00:00
Chris Lattner e967b348bf Clean up previous code.
Add new combination to turn seteq X, 0 -> not(cast X to bool)

llvm-svn: 6604
2003-06-04 05:10:11 +00:00
Chris Lattner d1f91d0660 Add new setCondition member
llvm-svn: 6603
2003-06-04 05:08:31 +00:00
Misha Brukman 4e7bad01ff I have finally seen the light. The code to change the opcode must live higher in
the loop, and in both cases. In the first case, it is a VReg that is a constant
so it may be actually converted to a constant. In the second case, it is already
a constant, but then if it doesn't change its type (e.g. to become a register
and have the value loaded from memory if it is too large to live in its
instruction field), we must change the opcode BEFORE the 'continue', otherwise
we miss the opportunity.

llvm-svn: 6602
2003-06-04 04:54:06 +00:00
Misha Brukman 7be5063ccc Added the 4.7 instruction class and all the FMOVcc instructions in them.
llvm-svn: 6601
2003-06-04 04:48:31 +00:00
Chris Lattner d3ce33c422 Modernize testcase
llvm-svn: 6600
2003-06-04 04:47:40 +00:00
Chris Lattner 9eef8a78b4 Implement combination of boolean not with branch
llvm-svn: 6599
2003-06-04 04:46:00 +00:00
Chris Lattner e1957a34f8 Add new test for inverting branches
llvm-svn: 6598
2003-06-04 04:37:46 +00:00
Misha Brukman 11cfb6f7dc Comment out opcodes currently unused in the Sparc backend.
llvm-svn: 6597
2003-06-04 02:57:55 +00:00
Chris Lattner fee44070a1 No really, you _cannot use_ getelementptr on an unsized type: that makes
no sense.

llvm-svn: 6595
2003-06-04 02:35:35 +00:00
Misha Brukman 37586db4b5 Added instruction format class 3.15 and floating-point compare instructions.
llvm-svn: 6594
2003-06-04 02:26:14 +00:00
Vikram S. Adve 680ee9f634 Undo one of those last fixes -- it was incorrect.
llvm-svn: 6593
2003-06-04 02:10:37 +00:00
Misha Brukman 905496e94f Sparc's dlsym() requires the special operand RTLD_SELF to find a symbol in the
currently-running process.

llvm-svn: 6592
2003-06-04 01:57:22 +00:00
Chris Lattner 46666cfcdd Avoid generating a getelementptr instruction of a function
llvm-svn: 6591
2003-06-04 01:24:40 +00:00
Misha Brukman a6c3f896da Pass through the emitConstantPool() call to the real emitter.
llvm-svn: 6590
2003-06-03 20:00:49 +00:00
Brian Gaeke 49e14432c2 Make the write*map methods more self-contained. Document some more.
llvm-svn: 6589
2003-06-03 19:30:15 +00:00
Vikram S. Adve de9d6a41b6 Improved how tracing can be used:
-- added new targets %.trace-out-llc and %.trace-out-cbe
-- either TRACE=yes or TRACEM=yes is still needed and chooses how to trace

llvm-svn: 6585
2003-06-03 18:56:57 +00:00
Chris Lattner 9109b41a00 Minor cleanups:
* Document the MOTy namespace correctly for doxygen
  * Eliminate usage of the MachineOpCode typedef, which should eventually
    be eliminated entirely.

llvm-svn: 6584
2003-06-03 15:42:53 +00:00
Chris Lattner fd2a8f5868 Remove usage of typedef
llvm-svn: 6583
2003-06-03 15:41:58 +00:00
Chris Lattner a87bab4e4c Remove use of enum
llvm-svn: 6582
2003-06-03 15:41:45 +00:00
Chris Lattner 0addbab5e2 Add namespace comments for doxygen
llvm-svn: 6581
2003-06-03 15:31:23 +00:00
Chris Lattner be9cef8af4 There are now no uses of NonCopyableV
llvm-svn: 6580
2003-06-03 15:30:48 +00:00
Chris Lattner 46a1892c68 Add doxygen comment for namespace
llvm-svn: 6579
2003-06-03 15:30:37 +00:00
Chris Lattner f3dce0882f Add comment for doxygen for namespace
llvm-svn: 6578
2003-06-03 15:30:13 +00:00
Chris Lattner cee7ced058 Minor cleanups:
* LLVM #include should use "", not <>
  * Fix line wrapping
  * Remove noncopyable base class to improve doxygen output

llvm-svn: 6577
2003-06-03 15:30:01 +00:00
Chris Lattner 58f2b4c5bc Remove noncopyable base class as it was making the doxygen docs harder to read
llvm-svn: 6576
2003-06-03 15:29:12 +00:00
Chris Lattner fb29f4e173 Remove noncopyableV base classes, as they were confusing the doxygen documentation,
making it harder to read.

llvm-svn: 6575
2003-06-03 15:28:40 +00:00
Brian Gaeke 71ab329f08 I documented this file, in an attempt to understand it, with a view toward
rewriting it.  I also vacuumed out all the commented-out code and
inaccurate comments, etc.

(We need to put the mapping information in a data structure so that we can
pass it out to the JIT, instead of automagically converting it to .byte
directives.)

llvm-svn: 6574
2003-06-03 07:56:05 +00:00
Chris Lattner 1580a96e2a Spiff up options a bit
llvm-svn: 6573
2003-06-03 05:07:28 +00:00
Chris Lattner 0521493aa9 Use the new -o tablegen option
llvm-svn: 6572
2003-06-03 05:06:33 +00:00
Chris Lattner 5ef4cf863b Add -o support for TableGen
I figure that misha has done a lot of things on my todo list, the least I
can do is reciprocate a bit.  :)

llvm-svn: 6571
2003-06-03 05:04:42 +00:00
Chris Lattner 6dc6f066bc Make tablegen use more structured command line options
llvm-svn: 6570
2003-06-03 04:56:29 +00:00
Chris Lattner 3b8f3da50a Fix minor bug
llvm-svn: 6569
2003-06-03 04:40:06 +00:00
Misha Brukman 2712333e5f Constants are laid out in memory in PC-relative form.
llvm-svn: 6568
2003-06-03 03:24:12 +00:00
Misha Brukman c8728a147e Added opcode conversion for conditional move of integers.
llvm-svn: 6567
2003-06-03 03:23:35 +00:00