Commit Graph

904 Commits

Author SHA1 Message Date
Misha Brukman
bd272999dd The classes F4_3 and F4_4 have an `rd' operand that needs to be set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7073 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 18:27:47 +00:00
Misha Brukman
a8fcdd8d04 Properly fix instruction syntax in comments, using `imm' for instructions that
use an immediate value instead of a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7072 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 18:15:43 +00:00
Misha Brukman
69bf93081f Fixed instruction syntax in the comments (specifies how instr is used).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7071 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 18:02:58 +00:00
Vikram S. Adve
ea28dd3392 Force fixed-size but large alloca objects to the dynamically allocated
area to avoid using up precious stack space within the 4095 offset limit
from %fp.  Such objects that would themselves live at a large offset
were being put there already so this is a simple change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7066 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 06:59:22 +00:00
Vikram S. Adve
65b2f401af Minor beautification: fold a couple of lines of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:24:00 +00:00
Vikram S. Adve
799ffeede1 (1) Major bug fix: DecomposeArrayRef() replaces its argument instr. and
deletes it, but we were merrily trying to fix the operands of that
    instruction anyway!  Instead, fix the replacement instruction.

(2) An Improvement: Check for and extract global values in all operands,
    not just in known pointer operands.  For example, they can occur in
    call arguments, and probably other unforeseeable places as well.
    This also eliminates the special-case handling of Load and Store.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7053 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:23:15 +00:00
Vikram S. Adve
74d15d36f5 A def. operand of a machine instruction may be an ordinary Value*,
not just an Instruction*, at least in one unfortunate case:
the first operand to the va_arg instruction.
Modify ValueToDefVecMap to map from Value*, not Instruction*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7052 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:16:01 +00:00
Vikram S. Adve
784a18b8ba Bug/case fixes:
(1) select: Ok to convert a pointer to a float or double.
(2) regalloc: Some MachineInstr* for caller-saving code before a call
    were being inserted before and after the call!
(3) Don't insert the caller-saving instructions in the
    MachineCodeForInstruction for the Call instruction.
    *All* instructions generated by register allocation need to be
    recorded in those maps, but it needs to be done uniformly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7051 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:13:57 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Vikram S. Adve
80544444a3 Add the padding needed for variable-size alloca's, which should work now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6859 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-23 02:13:57 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
Chris Lattner
c901e8bd9e Some preprocessors doen't support // comments and get confused
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6821 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-20 23:14:50 +00:00
Vikram S. Adve
ddafa49edc RDCCR defines arg. #1, not arg. #2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6796 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-20 11:32:11 +00:00
Brian Gaeke
2e2f2dcd6a lib/Target/Sparc/Sparc.cpp:
Move LowerAllocations, PrintFunction, and SymbolStripping passes, and
  the corresponding -disable-strip and -d options, over here to the SPARC
  target-specific bits of llc. Rename -d to -dump-asm.

tools/llc/Makefile:
 Reindent. Add x86 library so that llc compiles again.

tools/llc/llc.cpp:
 Remove support for running arbitrary optimization passes. Use opt instead.
 Remove LowerAllocations, PrintFunction, and SymbolStripping passes, as noted
  above.
 Allow user to select a backend (x86 or SPARC); default to guessing from
  the endianness/pointer size of the input bytecode file.
 Fix typos.
 Delete empty .s file and exit with error status if target does not support
  static compilation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6776 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:14:23 +00:00
Chris Lattner
c8621e6f28 These instructions really take three operands. This fixes some assertions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6765 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 15:09:02 +00:00
Chris Lattner
2eb9a257c8 Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:29:09 +00:00
Chris Lattner
0bf9476701 Remove two using decls
Remove usage of alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6725 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:18:28 +00:00
Brian Gaeke
ad95d9ef50 Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 21:54:01 +00:00
Chris Lattner
ff97fbc527 Rename FInfo.cpp to FunctionInfo.cpp, eliminate FInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6712 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 15:31:52 +00:00
Chris Lattner
fb4d20bad8 move contents of include/llvm/Reoptimizer/Mapping/FInfo.h into here, it is sparc internal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6711 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 15:31:09 +00:00
Chris Lattner
84c9d5c3c0 Fix invalid number of arguments problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6692 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 12:03:00 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
John Criswell
9aa2639370 Updated for the new projects Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6678 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 13:49:11 +00:00
Guochun Shi
0e93687cca add some comments
add a function ModuloScheduling::dumpFinalSchedule() to print out final schedule


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6677 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:04:30 +00:00
Guochun Shi
e95b827db2 add an brief instruction what this pass is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6676 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:03:39 +00:00
Guochun Shi
0b970dad72 a simple introduction to this pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6675 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:02:16 +00:00
Guochun Shi
f325261856 cleaned code
add some comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6674 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 19:09:00 +00:00
Guochun Shi
8f1d4ab409 delete useless functions
add comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6673 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-08 23:16:07 +00:00
Guochun Shi
33280524f4 change DEBUG to DEBUG_PRINT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6672 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-08 20:40:47 +00:00
Misha Brukman
6fe6905df2 Do not hastily change the Opcode from 'r' to 'i' type if we're not actually
SETTING the operand to be an immediate or have verified that one of the operands
is really a SignExtended or Unextended immediate value already, which warrants
an 'i' opcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6662 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-07 02:34:43 +00:00
Misha Brukman
8631ac4b76 Print address out as hex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6657 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 09:53:28 +00:00
Misha Brukman
f75bab7756 Added 'r' and 'i' versions to WRCCR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6656 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 09:52:58 +00:00
Misha Brukman
d36e30e623 * Changed Bcc instructions to behave like BPcc instructions
* BPA and BPN do not take a %cc register as a parameter
* SLL/SRL/SRA{r,i}5 are there for a reason - they are ONLY 32-bit instructions
* Likewise, SLL/SRL/SRAX{r,i}6 are only 64-bit
* Added WRCCR{r,i} opcodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6655 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 09:52:23 +00:00
Misha Brukman
a51245036e * Removed PreSelection pass because that is now done in the JIT
* Removed instruction scheduling as it is too slow to run in a JIT environment
* Removed other passes because they aren't necessary and can slow JIT down


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6652 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 07:11:16 +00:00
Misha Brukman
de07be3b78 Fixed a bunch of test cases in test/Regression/Jello which could not get the
address of a floating-point (allocated via ConstantPool) correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6647 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 04:41:22 +00:00
Misha Brukman
3339459e48 * If a global is not a function, just ask the MachineCodeEmitter for the addr
* Do not block a print statement with a DEBUG() guard if we're going to abort()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6645 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 03:35:37 +00:00
Misha Brukman
82c9e55913 The SUB*i instructions belong to a different class than their SUB*r brethren.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6644 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 03:34:47 +00:00
Misha Brukman
8f1222245e Put all debug print statements under the DEBUG() guard to make output clean so
that tests can automatically diff the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 00:26:11 +00:00
Misha Brukman
6994dab12a Fixed confusion between register classes and register types.
Now %fcc registers are recognized correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6640 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 23:51:10 +00:00
Misha Brukman
432fba5572 Added missing directive to store the instruction name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 23:35:11 +00:00
Misha Brukman
ce50542179 Moved predict and annul fields to the end of each individual instruction
class, because they are currently unused.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6638 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 23:33:15 +00:00
Misha Brukman
d4ad1d10bc Do not preset the cc register, the instructions actually use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6637 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 23:30:27 +00:00
Vikram S. Adve
cf819454e4 Minor tuning -- avoid a non-inlinable function call on every operand.
Also, reorder a couple of functions for inlining.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 21:12:56 +00:00
Misha Brukman
f47d9c28d9 Added lazy function resolution to the JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6633 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 20:52:06 +00:00
Misha Brukman
e77d65a8ed * The textual output of (non-)predicted FP branches is the same.
* Stop mapping FBcc instructions to deprecated opcodes, map to FBPcc instead.
* Fixed opf in FCMPxy instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6632 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 20:51:37 +00:00
Misha Brukman
406d9abc9e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 01:06:10 +00:00
Misha Brukman
2e7e8fadf8 Added missing 'rs1' field to F3_rdrs1imm13, 'rd' to F3_rdrs1rs2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 00:39:45 +00:00
Brian Gaeke
aeab1e163f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 22:07:12 +00:00
Brian Gaeke
c86b8d5c46 Add file comment. Include <vector> and <string>. Update include guards
to reflect file's current location.  Add definition of class
MappingInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 22:02:47 +00:00
Chris Lattner
e5d4293cba Revert brians patch to get mapping info working again
sorry dude


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6615 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 21:01:12 +00:00