Commit Graph

298797 Commits

Author SHA1 Message Date
Chris Lattner
75c9f9f958 Expose more xforms to the opt utility
llvm-svn: 900
2001-10-18 20:06:45 +00:00
Chris Lattner
b9acf7e49e Bytecode writer is yanked out of Module printer
llvm-svn: 899
2001-10-18 20:06:31 +00:00
Chris Lattner
e2c61267ad Refix bugs, stop using deprecated strstream header
llvm-svn: 898
2001-10-18 20:06:03 +00:00
Chris Lattner
4816d63844 Initial checkin
llvm-svn: 897
2001-10-18 20:05:37 +00:00
Chris Lattner
eaf039a94b Initial Checkin
llvm-svn: 896
2001-10-18 20:05:30 +00:00
Chris Lattner
689dccca31 Pull bytecode writing out of Module writer pass. Prepare to move to seperate file
llvm-svn: 895
2001-10-18 20:05:07 +00:00
Chris Lattner
c063e73879 Add operator[] accessors
llvm-svn: 894
2001-10-18 20:04:40 +00:00
Vikram S. Adve
71f16ecf13 Move malloc/free lowering after tracing until lli supports
calls to external malloc/free functions.

llvm-svn: 893
2001-10-18 18:20:20 +00:00
Vikram S. Adve
a0db1c9a0e Only print values live at BB or method exit, and insert loads at each
BB exit to read and print values stored in that BB.   Note that only
these stored values are live at method exit!.  Also, print messages at
method entry and exit.

llvm-svn: 892
2001-10-18 18:16:11 +00:00
Vikram S. Adve
7c15313822 Add option to print per module instead of per method, so that
global declarations are also printed.

llvm-svn: 891
2001-10-18 18:13:49 +00:00
Chris Lattner
8c8b9d10c0 Only output code if file open is successful
llvm-svn: 890
2001-10-18 17:07:22 +00:00
Vikram S. Adve
b2ac1e76b4 Trace code should always be exported just before code generation;
this is not a debugging option.  But we can export it as assembly
instead of bytecode if -debugtrace is specified.

llvm-svn: 889
2001-10-18 13:51:20 +00:00
Vikram S. Adve
7ac553aa12 Handle multiple exit blocks correctly.
Restore string variable cache.
Resurrect code to use formatted printing instead of PrintVal
but leave it turned off for now.

llvm-svn: 888
2001-10-18 13:49:22 +00:00
Vikram S. Adve
fe2f987d5e Add option to print as bytecode instead of assembly.
llvm-svn: 887
2001-10-18 13:47:49 +00:00
Chris Lattner
ed8947fb11 Use the standard header not the old one
llvm-svn: 886
2001-10-18 06:13:08 +00:00
Chris Lattner
5055730379 Dang, we were losing the Constant bit on globals. Fix this
llvm-svn: 885
2001-10-18 06:11:23 +00:00
Chris Lattner
6fc7ff4db8 Add support to insert trace code as an "optimization"
llvm-svn: 884
2001-10-18 06:05:15 +00:00
Chris Lattner
5309e10be1 Convert to be compatible with lli.
Need to eliminate duplicate \n entries

llvm-svn: 883
2001-10-18 06:03:05 +00:00
Chris Lattner
d054fae5f1 Convert to new simpler, more powerful pass structure
llvm-svn: 882
2001-10-18 05:28:44 +00:00
Chris Lattner
a0a8b5bc26 Massive hacks to try to fix subtle logic bugs. I think it's all working now,
at least what used to.  I should disable method exit code completely because
it's broken (doesn't insert just post dominating values)

llvm-svn: 881
2001-10-18 05:28:08 +00:00
Chris Lattner
6fea0324d7 Convert to new simpler pass itf
llvm-svn: 880
2001-10-18 05:27:33 +00:00
Chris Lattner
fb742a58ee Convert to new simpler Pass structure
Componentize better

llvm-svn: 879
2001-10-18 05:22:27 +00:00
Chris Lattner
b0b04facf0 Convert to new simpler Pass structure
llvm-svn: 878
2001-10-18 05:22:15 +00:00
Chris Lattner
92f1951e5b Convert to new simpler pass structure
llvm-svn: 877
2001-10-18 05:21:56 +00:00
Chris Lattner
e3ad91c7ae Simplify Pass by removing silly subclasses
Fix an iterator problem

llvm-svn: 876
2001-10-18 05:20:53 +00:00
Chris Lattner
487374cffb Fix minor bug, update comments
llvm-svn: 875
2001-10-18 01:49:48 +00:00
Chris Lattner
ee6e199f0e Change Sources specifier to ExtraSources
llvm-svn: 874
2001-10-18 01:48:09 +00:00
Chris Lattner
5398a6eb6c Convert optimizations to the pass infrastructure
llvm-svn: 873
2001-10-18 01:32:34 +00:00
Chris Lattner
f71b827441 Pass's return true if they make a modification, not if they fail
llvm-svn: 872
2001-10-18 01:32:17 +00:00
Chris Lattner
8874d31d91 Convert optimizations to use the Pass infrastructure
llvm-svn: 871
2001-10-18 01:31:58 +00:00
Chris Lattner
5b6026a13a * Passes return true if they change something, not if they fail
* Convert opt to use Pass's and convert optimizations to pass structure

llvm-svn: 870
2001-10-18 01:31:43 +00:00
Chris Lattner
2fa0dabf9f Passes return true if they change something, not if they fail
llvm-svn: 869
2001-10-18 01:31:22 +00:00
Vikram S. Adve
6c697526bf 1. Move most of the constant-fixup code into machine-independent file
InstrSelectionSupport.cpp.  It now happens in a bottom-up pass on
   each BURG tree after the original top-down selection pass on the tree.
2. Handle global values as constants (viz., constant addresses).

llvm-svn: 868
2001-10-18 00:26:20 +00:00
Vikram S. Adve
595747054d Reverse previous change.
llvm-svn: 867
2001-10-18 00:23:32 +00:00
Vikram S. Adve
aad04c97e8 Generate assembly code for testcodegen.
llvm-svn: 866
2001-10-18 00:22:14 +00:00
Vikram S. Adve
757a67d389 Added several cases where a constant must be forwarded into a use.
llvm-svn: 865
2001-10-18 00:22:02 +00:00
Vikram S. Adve
cc776df39c Sparc-specific code shared between local files.
llvm-svn: 864
2001-10-18 00:03:20 +00:00
Vikram S. Adve
01e57a481e Moved implementation of class UltraSparcInstrInfo to SparcInstrInfo.cpp.
llvm-svn: 863
2001-10-18 00:02:32 +00:00
Vikram S. Adve
505130cb30 Added virtual function to generate an instruction sequence to
load a constant into a register.

llvm-svn: 862
2001-10-18 00:02:06 +00:00
Vikram S. Adve
4cc2b3b155 Moved implementation of class UltraSparcInstrInfo here.
llvm-svn: 861
2001-10-18 00:01:48 +00:00
Vikram S. Adve
af854b59c2 1. Add a bottom-up pass on BURG trees that is used to fix constant operands.
Needs to be bottom up because constant values may be forward-substituted
   to their uses (i.e., into the parent in the BURG tree).
2. Move most of the constant-fixup code into machine-indepedent file
   InstrSelectionSupport.cpp.

llvm-svn: 860
2001-10-17 23:59:09 +00:00
Vikram S. Adve
6d19dc9080 1. Add a bottom-up pass on BURG trees that is used to fix constant operands.
Needs to be bottom up because constant values may be forward-substituted
   to their uses (i.e., into the parent in the BURG tree).
2. Move most of the constant-fixup code into machine-indepedent file
   InstrSelectionSupport.cpp.

llvm-svn: 859
2001-10-17 23:57:50 +00:00
Vikram S. Adve
ad97e4ed84 Separate VM instruction that generates the instructions that compute a value
from the value itself (the one causing an edge) because the latter may be
a temporary used within the instruction sequence for the VM instruction.

llvm-svn: 858
2001-10-17 23:55:16 +00:00
Vikram S. Adve
59cbb6498c *** empty log message ***
llvm-svn: 857
2001-10-17 23:53:16 +00:00
Vikram S. Adve
21db313d7d Remove extra assert in dyn_cast_or_null.
llvm-svn: 856
2001-10-17 22:39:50 +00:00
Vikram S. Adve
72c1d99922 Disable codgen test for calltest.ll.
llvm-svn: 855
2001-10-17 20:14:34 +00:00
Vikram S. Adve
6b4ba47f31 Only list automatically generated .cpp files.
llvm-svn: 854
2001-10-17 12:34:26 +00:00
Vikram S. Adve
bd9cae260d Allow only extra Source files to be listed in a local Makefile.
Needed for automatically generated .cpp files.

llvm-svn: 853
2001-10-17 12:33:55 +00:00
Chris Lattner
322e49aa36 Simplify some code
Remove Method special case
Fix bug exposed by this testcase:

implementation

void "PtrFunc2"()
begin
bb1:
        %reg = add int(int)* null, null
        add int (int)* %reg, null
        ret void
end

llvm-svn: 852
2001-10-16 19:54:17 +00:00
Ruchira Sasanka
f42b65d898 added initializing regNum to -1 in both constructors of MachineOperand
llvm-svn: 851
2001-10-16 16:36:34 +00:00