Commit Graph

1721 Commits

Author SHA1 Message Date
Misha Brukman
452db67a0e Fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8687 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 17:28:11 +00:00
Misha Brukman
8b2fe1943c Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8686 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 17:27:28 +00:00
Chris Lattner
8474f6fcda Move getAnalysisUsage method from header to .cpp file. Add a normal file
header comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8679 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 15:13:04 +00:00
Vikram S. Adve
4d436c1a41 Fix assertion so it doesn't not trip incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8650 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 07:55:27 +00:00
Brian Gaeke
bd353fb662 Use C++ math header instead of C version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8648 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 03:57:37 +00:00
Brian Gaeke
37bc4cce9b Erase now-unused prototypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8647 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:51:00 +00:00
Brian Gaeke
874f423f54 Rearrange #includes ... since there are fewer now I guess it's a win.
(I also zapped printMachineCode() and printLabel() at the previous checkin,
but forgot to mention it.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:50:21 +00:00
Brian Gaeke
5779ef2ce0 Standardize the names of include guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8645 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:37 +00:00
Brian Gaeke
fdb2596c77 Standardize the names of include guards.
Remove more excess whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8644 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:25 +00:00
Brian Gaeke
6264fb70c1 Standardize the names of include guards.
Fix typos in file header comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8643 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:15 +00:00
Brian Gaeke
43ce8fe477 I tried to standardize the formatting and tidy up the huge amount of
excess whitespace a little. Also improved some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:24:09 +00:00
Brian Gaeke
4efe342424 Convert PhyRegAlloc into a proper pass.
PhyRegAlloc.cpp:
 Don't include TargetMachine.h or TargetRegInfo.h, because these are provided
  by PhyRegAlloc.h.
 Merge class RegisterAllocator into class PhyRegAlloc.
 Simplify & move ctor, dtor to PhyRegAlloc.h.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 MarkAllocatedRegs() becomes a member method, with fewer args.

PhyRegAlloc.h:
 Include Pass.h, TargetMachine.h and TargetRegInfo.h. Don't declare
  TargetRegInfo forward.
 Give AddedInstrns the obvious clear() method.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 Add prototype for markAllocatedRegs().
 Remove unused inline void constructLiveRanges().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8641 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 01:23:46 +00:00
Chris Lattner
02a3be020a Rename Function::getEntryNode -> getEntryBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:39:18 +00:00
Brian Gaeke
79c980399e Fix a typo in Sparc.cpp.
Update names of some pass creator fns in addPassesToEmitAssembly().
FunctionInfo is gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8599 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:46 +00:00
Brian Gaeke
b92c5c0c15 Rename the pass creator fn to mimic the other creator fn names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8598 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:35 +00:00
Brian Gaeke
866dc1def7 Fix (and properly doxygenify) some comments. Incorporate
functionality of FunctionInfo pass as doFinalization method.
Rename pass to match names of other passes like it.
Rename the pass creator fn to mimic the other creator fn names.
Include StringExtras for utostr().
Make symbol prologue/epilogue stuff redundant with
 EmitBytecodeToAssembly, in preparation for refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:25 +00:00
Brian Gaeke
bb7cd97d53 Make the symbol prologue/epilogue stuff redundant with MappingInfo, in
preparation for refactoring.
Rename the pass creator fn to mimic the other creator fn names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8596 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:14 +00:00
Misha Brukman
6eba07a6a3 Fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8588 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 21:34:23 +00:00
Brian Gaeke
305f02dd64 Fix typo in comment. Take out some random whitespace.
(Partial merge from my working file)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8564 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 15:38:05 +00:00
Brian Gaeke
d0534a863a Edit comment for accuracy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8562 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 15:36:50 +00:00
Vikram S. Adve
5be7434c8b Fix longjmp case so that, along with the call to abort(), we also
generate the appropriate CallArgsDescriptor and tmp. virtual regs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8554 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 05:56:22 +00:00
Vikram S. Adve
bed4effb84 Add flag to control whether or not delay slots are filled during
instruction scheduling (this is off by default).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 05:55:15 +00:00
Chris Lattner
bdbecac051 Fix problems with programs that prototype printf to something unusual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8538 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 16:47:12 +00:00
Brian Gaeke
41de073b04 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8523 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 05:28:42 +00:00
Misha Brukman
37f92e2568 Fixed spelling and grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8489 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 22:34:13 +00:00
Misha Brukman
2f2d06506c Fixed spelling and grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8478 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 18:14:24 +00:00
Chris Lattner
d0b52cf3e7 Remove a bunch of warnings from the CBE generated C code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8455 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:12:09 +00:00
Chris Lattner
4b2a71d621 "the one true solution for compatibility with GCC 3.3+"
... or so I hope


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8454 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:08:00 +00:00
Chris Lattner
b787e13e73 Be a little more specific about what is begin generated. Only print
command line if VERBOSE=1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8453 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:52:54 +00:00
Chris Lattner
b3aad5d28f Only emit inter-field-padding if the amount of padding is != 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:52:24 +00:00
John Criswell
1a51956d11 Don't explicitly use $SourceDir to find the tblgen files. This causes make
some confusion when trying to generate files (it probably couldn't tell that
./file and $(SourceDir)/file may be the same file).
Now, just let VPATH find everything, and list the primary tblgen file first in
the list of dependencies so that we can just use $< to reference it in the make
rule.

This should hopefully fix the nightly tester.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8433 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 14:10:44 +00:00
John Criswell
410d1b5dea Updated to find source files using VPATH. This makes writing build rules
much cleaner and easier.
Labeled .td as a suffix for tblgen files in Makefile.rules.
Modified build rules so that source files generated during the build are placed
in the build directory and not the source directory (and not in a Debug
directory).  This makes the system cleaner and allows us to have a read-only
source tree.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8424 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-09 20:57:03 +00:00
Chris Lattner
ad20071559 * Simplify printConstantValueOnly by moving the tail padding stuff directly
into the struct case.
* Extend printConstantValueOnly to print .zero's if the initializer is zero
* Delete dead isConstantFunctionPointerRef function
* Emit the appropriate assembly for the various linkage types!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8417 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-09 16:23:36 +00:00
Chris Lattner
ee5457cbe8 Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8411 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 19:44:26 +00:00
Chris Lattner
36143fc444 Add support for the unwind instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8408 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 18:54:55 +00:00
John Criswell
69077e28d7 Checkin of autoconf-style object root.
Adjusted Makefile to work with new autoconf-style object root.
Specifically, use the new -I option of tblgen to find include files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8379 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-06 14:50:22 +00:00
Misha Brukman
103f0c3472 Added some optimizations:
* Generate a single BA instead of 6-instruction JUMP if possible
  (this occurs both in the creation and overwriting of the stub code)
* If possible, rewrite the ORIGINAL call to call the generated function
  directly, thus bypassing the stub entirely

Also added some statistics on how often calls are overwritten and how often the
CompilationCallback is invoked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8376 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 22:59:31 +00:00
Chris Lattner
b7f7296cd9 OptInfo is no longer required
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:41:07 +00:00
Chris Lattner
84be5ad94a No longer provide an optinfo, noone uses it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8311 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:40:59 +00:00
Chris Lattner
a89d8f7468 Inline simple comparison which is sparc specific anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8309 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:38:03 +00:00
Chris Lattner
67699ffe7f Move private interfaces into private .h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:33:07 +00:00
Chris Lattner
e96e2630f3 Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:24:06 +00:00
Chris Lattner
84681f1184 LiveRange.h is now in lib/CodeGen/RegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8299 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:17:13 +00:00
Chris Lattner
47c97513a8 This file is hopelessly out of date
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:14:00 +00:00
Chris Lattner
893f9541dc LiveRangeInfo got moved into the lib/CodeGen/RegAlloc directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8297 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:12:17 +00:00
Chris Lattner
70b2f56e76 PhyRegAlloc.h got moved to lib/CodeGen/RegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8296 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:09:04 +00:00
Chris Lattner
c083dcccbf Move IGNode from public include directory to here. Minor cleanups like adding std:: namespace qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8295 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:05:47 +00:00
Chris Lattner
bcc6dec741 IGNode got moved to lib/CodeGen/RegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8294 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:00:08 +00:00
Chris Lattner
fdba393cc0 This file just needs LiveRange.h not IGNode.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8293 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 19:58:02 +00:00
Chris Lattner
87d50f0566 No longer include IGNode.h in the Sparc global header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8292 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 19:56:48 +00:00
Misha Brukman
cfd67c96dc * Use alloca() to force GCC not to eliminate frame pointer
* Break apart saving and restoring registers into separate functions
* Instead of saving single and double FP registers, just save the double
  registers -- aliasing helps preserve the single FP registers as well.
* Request just as much memory for a stub as we actually use


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8200 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 04:22:54 +00:00
John Criswell
c9afb499f6 Fixed two double free bugs that caused llc to segfault or run forever.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8191 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 21:43:17 +00:00
Chris Lattner
aeb54b882c Add support for the llvm.unwind intrinsic, which we codegen to just do an abort
until we implement unwinding.
Add support for the invoke instruction, which codegens just like a call with
a branch after it.

The end effect of this change is that programs using the invoke instruction,
but never unwinding, will work fine.  Programs that unwind will abort until
we get unwind support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8187 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 21:23:43 +00:00
Chris Lattner
fd04561e1b Fix really nasty bugs in the CWriter, handling invoke instructions. Tracking
these down was NOT phun.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8181 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 19:56:10 +00:00
Tanya Lattner
3b6b6ba4be Removing README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8180 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 17:17:59 +00:00
Tanya Lattner
4f839ccf49 Putting my revised version of ModuloScheduling in cvs. This is not complete...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8179 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 17:12:14 +00:00
Tanya Lattner
8dc9982e2e Moved index into BB to common graph class because its needed by ModuloSchedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8174 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 15:30:40 +00:00
Tanya Lattner
d6d863392f Added/removed header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8160 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 15:12:24 +00:00
Tanya Lattner
c50ee556e5 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8153 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 02:42:58 +00:00
Tanya Lattner
b6489f3153 First version of SchedGraph common class and refactoring of SchedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8148 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-25 22:42:20 +00:00
Chris Lattner
5864da0871 Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8139 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 21:00:22 +00:00
Chris Lattner
bb144a892b Targets should configure themselves based on a Module, not some wierd flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8132 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:49:48 +00:00
Chris Lattner
58c41fe687 Implement: Jello/test-constantexpr.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8127 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:19:47 +00:00
Chris Lattner
030574fd35 Add support for 'any' pointer size and endianness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8120 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 13:49:22 +00:00
Chris Lattner
e55497cd04 Implement support for the unwind intrinsic in the CBE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8116 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 13:06:10 +00:00
Misha Brukman
ef6a6a69ff The word dependent' has no a'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8030 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:14:26 +00:00
Chris Lattner
e287cfdfd0 Fix spello
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8029 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:05:57 +00:00
Chris Lattner
f3526e2207 Change all #include'd files to be :: rules instead of : rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8019 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 20:37:17 +00:00
Chris Lattner
72af6b8e5d Add support for the sig(set|long)jmp intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7951 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 16:06:09 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
7540565863 Fix ABI issue: Longs really do need to be only 4 byte aligned on X86.
This bug caused miscompilation of programs using 'struct stat', but only if
compiled with support for 64-bit filesystems.  This could in theory effect
other things, but only if the LLVM code shared data structures with native code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7928 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-17 23:20:40 +00:00
Brian Gaeke
77d2f511c0 Rename -emitmaps to -enable-maps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7913 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-16 00:23:16 +00:00
Misha Brukman
d2dfc9628d Now that the JIT memory manager allocates as many bytes as necessary rather than
rounding up to a page, we need to request (num instrs * 4) bytes. However, I
think that 64 bytes is overkill for the stub function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7888 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 18:03:06 +00:00
Misha Brukman
15d1d57f61 Fix register and parameter numbers in saving double FP registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7884 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 16:15:28 +00:00
Chris Lattner
e3561c23c2 Remove uses of the NonCopyable class, to make the doxygen output look better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7880 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 05:20:06 +00:00
Chris Lattner
f3c274d4a6 Adjust to new API, add expandCall stub
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7873 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:51:59 +00:00
Chris Lattner
51970b2734 Add support for unconditional branches and for emitting JE instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7872 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:50:49 +00:00
Chris Lattner
b6ef5c860c Add a bunch of new node types, including a new Void dummy register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7870 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:35:14 +00:00
Misha Brukman
fad4929ee2 * Must save FP registers when calling CompilationCallback(), because FP
registers are global, are NOT windowed, and hence can be clobbered!
* Removed unused register shorthand notations
* Fixed and cleaned up comments in inline assembly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7853 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 00:26:50 +00:00
Vikram S. Adve
891bd82e79 Improvement to the previous fix: branch following a delay slot of
another delayed instr. would cause the later sanity-check (assertion)
in PhyRegAlloc.cpp to fail, even though there is really no error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7848 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 20:45:56 +00:00
Chris Lattner
2925592230 Stop annoying warnings about mismatched types with the argument of a free
implement more constant expressions so that 176.gcc compiles with the CBE


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7847 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 19:19:53 +00:00
Misha Brukman
640b9280d5 Since we now have TableGen editing modes for VIM and (X)Emacs, we no longer need
to mark TableGen description files with "C++ mode".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7841 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 15:16:28 +00:00
Chris Lattner
a8e40f54e5 Restore 'nice name' to pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7840 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 14:43:24 +00:00
Brian Gaeke
bf3c4cfaad Factory methods for function passes now return type FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7839 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:09:32 +00:00
Brian Gaeke
e69f72758b Unbreak SPARC backend: addPassesToJITCompile and
addPassesToEmitMachineCode now both take a FunctionPassManager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7837 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:04:59 +00:00
Brian Gaeke
277aad2655 Factory methods for function passes now return type FunctionPass *.
Get rid of RegisterLLC, which can't handle FunctionPasses anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7836 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:04:49 +00:00
Brian Gaeke
d7d6bbe697 Unbreak SPARC backend: addPassesToJITCompile and
addPassesToEmitMachineCode now both take a FunctionPassManager.
Factory methods for function passes now return type FunctionPass *.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7835 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:04:29 +00:00
Brian Gaeke
3e3c805a82 X86 static backend: smacked
Function at a time: smacked

Who you gonna call!!!  :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7826 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 19:02:09 +00:00
Brian Gaeke
19df3876e6 Factory methods for FunctionPasses now return type FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7823 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:18:15 +00:00
Brian Gaeke
8844a0ba89 addPassesToJITCompile and addPassesToEmitMachineCode now take a
FunctionPassManager, to support function-at-a-time compilation and
 emission of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7821 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:17:27 +00:00
Brian Gaeke
b428654076 addPassesToJITCompile now takes a FunctionPassManager, to support
function-at-a-time compilation and emission of code.
Separate addPassesToEmitAssembly from addPassesToJITCompile, because
 the latter requires you to use FunctionPasses, and the former might
 diverge anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7817 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:15:52 +00:00
Brian Gaeke
9826bdb7d8 Factory methods for FunctionPasses now return type FunctionPass *.
Correct one of the functions' comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7816 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:15:29 +00:00
Brian Gaeke
9d99b43fbc Factory methods for FunctionPasses now return type FunctionPass *.
Revert (to v1.55) one of the hunks of Chris's change that messed up the
 %-register workaround.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7815 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:15:15 +00:00
Chris Lattner
48e6079478 Adjust files for move of mapping info stuff into the Sparc directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7802 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:38:16 +00:00
Brian Gaeke
99c27d7686 Just incorporating some notes I wrote for myself into a place where they won't
get lost...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7798 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 00:30:48 +00:00
Vikram S. Adve
feb3298fca For instructions in a delay slot of another instruction,
we no longer need to find the live-before set of the delayed
branch since that set is now included the live-before/after
set of the instructions in each delay slot.  Just assert that instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7796 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 22:22:24 +00:00
Vikram S. Adve
88d962aa58 For an instruction with delay slots, mark all live values before
the instruction as being live before/after the delay slot
instructions as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7795 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 22:19:59 +00:00
Vikram S. Adve
20a3be3ba8 Disable emitting LLVM-to-MI maps, by default.
Add -emitmaps options to turn this back on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7774 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 15:51:02 +00:00
Chris Lattner
c12a61463a Rename DNVT_bool to DNVT_i1 to be consistent with type system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 04:28:21 +00:00
Chris Lattner
c8477960b0 Add support for basicblocks, setCC instructions, and branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7767 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 04:17:29 +00:00
Vikram S. Adve
9d27514a21 Fix va_arg to generate LDDFi for floating point values, instead of LDXi.
All non-FP cases use LDXi as before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7765 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 03:04:05 +00:00
Chris Lattner
00b40943ab Add basic support for 16 and 32 bit function arguments!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7755 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 21:30:00 +00:00
Chris Lattner
c0bb13dc82 add frameidx support
Make load work
Make type inference infer from Arg1 to arg0 as well as from arg0 to arg1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 21:29:40 +00:00
Chris Lattner
d59414fc85 Sort #includes, eliminate #include of "llvm/Type.h" which was redundant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7746 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:06:16 +00:00
Chris Lattner
67488a9236 Cygwin apparently works with %'s on registers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7745 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:04:57 +00:00
Chris Lattner
2bcee3400f Whoops, accidental checkin. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7743 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:35:46 +00:00
Chris Lattner
93c1afacd1 Add a new -enable-cygwin-compatible-output argument, which make the output more
consumably by the cygwin assembler.  This is really just a nasty hack until we
get real target triple support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7742 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:35:26 +00:00
Brian Gaeke
2a09877519 Print % signs before register names; turn off "noprefix" mode in gas output.
Fixes test case test/Programs/LLVMSource/2003-08-03-ReservedWordGlobal.ll.

Also: Refactor implicit-uses printing into its own method.
Remove a couple of unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7737 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:05:46 +00:00
Vikram S. Adve
4ecff5df8c Register argument to va_start must be marked as defined!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7734 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 18:42:47 +00:00
Chris Lattner
e7e33c0543 Add (ret int) expander so that we can at least write testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7730 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:48:00 +00:00
Misha Brukman
bf2f8a9963 Converted tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7728 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:38:50 +00:00
Misha Brukman
859e5cc1f7 Removed `-debug' so that spurious printouts of patterns are not seen at
compilation time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:30:20 +00:00
Chris Lattner
7c2af6e93a Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7726 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:24:02 +00:00
Chris Lattner
b84fe1c636 Add patterns for multiply, and, or, and xor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7725 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:23:25 +00:00
Chris Lattner
622003fd74 add support for more nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:23:05 +00:00
Chris Lattner
2aa3a66fb1 Until the pattern matching instruction selector is finished, enable debug output from it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7722 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:11:01 +00:00
Chris Lattner
ac0c8680ad Add support for a pattern matching instruction selector. This is still in
the early implementation phases, so it is disabled by default


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7719 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:59:22 +00:00
Chris Lattner
f8dfa6ff9b Make imm be a leaf instead of a nonterminal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7708 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 19:51:16 +00:00
Misha Brukman
b8db66eb17 Implement LLVM intrinsics llvm.setjmp' and llvm.longjmp' as follows:
* setjmp() simply returns 0
* longjmp() simply calls abort()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7676 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:43:46 +00:00
Vikram S. Adve
97a95bdbdd Fix sanity-checking in 'maskUnsigned' code to be more precise:
use or def-and-use operands can be substituted after one def-only
operand has been substituted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7674 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:01:26 +00:00
Chris Lattner
ec4f523178 Update tablegen interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7672 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 13:52:22 +00:00
Chris Lattner
69666e552e This register is never used, disable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7661 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 04:49:16 +00:00
Misha Brukman
fe8a796833 Changing command-line option formats to be more consistent with LLVM style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 23:25:25 +00:00
Misha Brukman
58ba50fea7 * Renamed option from nopreselect' to nopreopt' since it disables more than
just PreSelection
* Wrapped code at 80 columns
* Added the DecomposeMultiDimRefs Pass to the JIT compilation path


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7657 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 23:06:21 +00:00
Misha Brukman
0870e970ff Use the registers g1 and g5 as temporaries for making far jumps and far calls,
because saving i1 and i2 to their ``designated'' stack slots corrupts unknown
memory in other functions, standard libraries, and worse.

In addition, this has the benefit of improving JIT performance because we
eliminate writing out 4 instructions in CompilationCallback() and 2 loads and 2
stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7653 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 22:19:18 +00:00
Vikram S. Adve
e895a740c7 1. Bug fix: was using SLL instead of SLLX for ULongTy. Chump.
2. Handle fp-to-uint conversions directly here instead of relying on
   a pre-transformation to replace them with the 2-step conversion.
3. Use size rather than explicitly checking types when deciding what
   opcodes to use, wherever possible.  This is less error prone (the
   bug fix above was not the first time!).
4. Float-to-pointer casts shd now work though this hasn't been tested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7645 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:48:40 +00:00
Vikram S. Adve
5ac1175ada Remove conversion of fp-to-uint cast into a multi-step cast:
this is not an optional transformation on SPARC and is now handled
directly by instruction selection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7644 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:42:49 +00:00
Chris Lattner
326e40aa8b The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:04:40 +00:00
Misha Brukman
0897c60822 SparcV9CodeEmitter.cpp:
* Doxygen-ified comments
* Added capability to make far calls (i.e., beyond 30 bits in CALL instr)
  which implies that we need to delete function references that were added by
  the call to addFunctionReference() because the actual call instruction is 10
  instructions away (thanks to 64-bit address construction)
* Cleaned up code that generates far jumps by using an array+loop

SparcV9CodeEmitter.h:
* Explained more of the side-effects of emitFarCall()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 16:20:22 +00:00
Chris Lattner
2959b6ec49 Completely eliminate the isVoid TSFlag, shifting over all other fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:32:20 +00:00
Chris Lattner
d87b59c866 add a pattern for RET, immediates no longer need to be explicitly typed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:31:35 +00:00
Chris Lattner
3e77d6e44c Start adding usefulness to the DAG node definitions, add a new Expander
class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7634 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:31:02 +00:00
Chris Lattner
3fd1f5bb6a Use a new local data structure instead of the MachineInstr::regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:11:13 +00:00
Chris Lattner
c393c57afc Add a map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:09:31 +00:00
Chris Lattner
6ae3117582 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:03:27 +00:00
Chris Lattner
3bed95b628 Physical registers no longer live in the regsUsed set for each machine instr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:58 +00:00
Chris Lattner
907b7dc9bd This method has now been changed to preserve flags for us!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7603 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:59:24 +00:00
Chris Lattner
c9bbfbc04e Factor shared code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7600 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:34:44 +00:00
Misha Brukman
f4de783582 * Removed `using' declaration, now use full namespace qualifier std::string
* Simplified code by using an inline function instead of copy-pasted code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:01:50 +00:00
Misha Brukman
c3cd8afe96 * Set annul bit to be 0, because the Sparc backend currently does not use it.
* Use the name of the predict field instead of just the const 1 in the
  Instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7592 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 14:34:38 +00:00
Chris Lattner
02beda1221 This is the real fix for the previous register allocator problem.
Physical registers should not float around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7587 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:48:47 +00:00
Misha Brukman
b10cea86a9 Reformatted code to match the prevalent LLVM style; fit code into 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7586 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:02:06 +00:00
Misha Brukman
3683d9e842 ElectricFence found this bug where we were reading past the vector boundary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7585 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:48:40 +00:00
Chris Lattner
0bfd186db0 Add patterns for (mov R, R) (mov R, I) and subtracts. The moves are to enable
testing, the subtracts are because I was in the neighborhood.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7581 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:18:19 +00:00
Chris Lattner
c34921dc6a Change comments into something that TableGen can read!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7580 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:08:29 +00:00
Chris Lattner
244883e4af Allow instructions to have a DAG pattern associated with them.
Define a few preliminary node types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:07:37 +00:00
Chris Lattner
6770aedf7f Rename register classes to be upper case to make it obvious that they are X86
specific in the tree patterns


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7578 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 20:58:29 +00:00
Chris Lattner
e5bb2d94d9 There is nothing special about noops anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7568 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:11:37 +00:00
Chris Lattner
17d4d147dd There is nothing special about noops now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7567 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:11:19 +00:00
Chris Lattner
7cc7d987a4 Transition to using 'let X = y' instead of 'set X = y'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:03:18 +00:00