Brian Gaeke
29723ca977
Support constant casting constant pointers to ints/uints, and/or
...
the other way around, instead of failing a large, tumor-like assertion.
llvm-svn: 10171
2003-11-22 07:18:25 +00:00
Brian Gaeke
296546cf0c
Constant shift expressions, meet InstSelectSimple. Yow!!
...
llvm-svn: 10170
2003-11-22 06:49:41 +00:00
Brian Gaeke
8c4c9f6f1e
Stub for constant shift expr support.
...
llvm-svn: 10168
2003-11-22 05:18:35 +00:00
Misha Brukman
1d9ac83d82
* Add code to flush the ICache, which any self-respecting SMC must do
...
* Restore registers *after* everything else to avoid any possible side effects
This fixes McCat-imp.
llvm-svn: 10147
2003-11-21 23:48:54 +00:00
Chris Lattner
6677af8dee
Fix PR123
...
llvm-svn: 10069
2003-11-18 17:47:05 +00:00
Misha Brukman
1c95e95551
Include the file before we close the llvm namespace.
...
llvm-svn: 9954
2003-11-13 00:23:05 +00:00
Misha Brukman
58f9d30da4
Substantially re-organized this file:
...
* There is now only one pass to print out assembly instead of two
* It is a FunctionPass
* The Module-level printing of globals is now in doFinalization() method of the
FunctionPass
* The code has been reformatted to follow LLVM coding standards
* Some comments, not all, were doxygenified
* Last but not least, the function to create an instance of this pass is also no
longer a method in the UltraSparc class.
llvm-svn: 9953
2003-11-13 00:22:19 +00:00
Misha Brukman
5c858a33cb
The function to create an instance of this pass is no longer a method of
...
the UltraSparc class.
llvm-svn: 9952
2003-11-13 00:19:02 +00:00
Misha Brukman
e3afd442f1
The functions to create new instances of passes are no longer methods in the
...
UltraSparc class. Comments are also doxygen-compatible now.
llvm-svn: 9951
2003-11-13 00:17:20 +00:00
Misha Brukman
aa553825b1
* Put command-line switches in their own namespace
...
* Pass creation functions are no longer in the UltraSparc class
llvm-svn: 9950
2003-11-13 00:16:28 +00:00
Misha Brukman
310200f573
Force a dependency on the .inc file, which must be generated!
...
llvm-svn: 9949
2003-11-13 00:05:09 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
d542ca6af1
Fix PR103
...
llvm-svn: 9830
2003-11-09 07:08:34 +00:00
Brian Gaeke
5159888ea4
Fix two typos I found in comments.
...
llvm-svn: 9806
2003-11-08 18:12:24 +00:00
Misha Brukman
feb806084d
For some reason, LICM and GCSE like to crash the FunctionPassManager when they
...
are being added as FunctionPasses... Sigh.
llvm-svn: 9798
2003-11-08 00:01:39 +00:00
Misha Brukman
9ddec59660
Implement branching to a PC-relative constant (not a BasicBlock).
...
llvm-svn: 9793
2003-11-07 21:07:30 +00:00
Misha Brukman
fbd3f16961
PreSelection is not optional, it performs a necessary and vital transformation
...
for the Sparc backend: breaking up constant expressions. Thus, we cannot have it
guarded by a conditional, it should never be disabled.
Also, it's now available for the JIT since it is a FunctionPass.
llvm-svn: 9791
2003-11-07 20:33:25 +00:00
Misha Brukman
d04d2ef54d
Switch to emitting MachineConstantPool the way it was meant to be done.
...
llvm-svn: 9777
2003-11-07 18:06:26 +00:00
Misha Brukman
8fe318a705
Switch to using the standard representation of the constant pool -- namely, the
...
MachineConstantPool. This involved refactoring the two classes involved in
printing out Sparc assembly. In fact, they should share all this code anyway.
llvm-svn: 9776
2003-11-07 17:45:28 +00:00
Misha Brukman
3f43ed6586
We accept TargetMachine as a const reference.
...
llvm-svn: 9775
2003-11-07 17:44:18 +00:00
Misha Brukman
c866cfb251
PreSelection and PeepholeOpts are now FunctionPasses.
...
llvm-svn: 9774
2003-11-07 17:43:43 +00:00
Misha Brukman
1c726348d1
* Stop making a global for each constant that cannot live in an instruction;
...
it will be converted to a MachineConstantPool index during instruction
selection
* This is now eligible to become a FunctionPass since it does not have any side
effects outside of the function it is processing.
llvm-svn: 9773
2003-11-07 17:31:22 +00:00
Misha Brukman
575a02e8db
* Use the MachineConstantPool for storing constants instead of a hash_set;
...
* Do not create new globals for constants!
Also, order #includes as per coding style guide
llvm-svn: 9772
2003-11-07 17:29:48 +00:00
Misha Brukman
ccdf8e85e0
Use basename $<
to get just the filename, not full path, for ease of reading.
...
llvm-svn: 9770
2003-11-07 17:26:27 +00:00
Chris Lattner
8f8109ebdb
Hopefully this will fix PR98
...
llvm-svn: 9762
2003-11-07 00:38:09 +00:00
Chris Lattner
ca7a346fce
Hopefully fix the objdir != srcdir issue
...
llvm-svn: 9761
2003-11-07 00:34:33 +00:00
Chris Lattner
e060df5b2c
Fix warnings building on sparc
...
llvm-svn: 9758
2003-11-06 21:30:05 +00:00
Misha Brukman
de3f241f5f
* Make the comment header 80 columns long
...
* Alphabetize #includes
llvm-svn: 9751
2003-11-06 18:06:13 +00:00
Misha Brukman
c7c4e197fc
We know exactly what the value of $< is, so instead of using basename $<
to
...
get just the filename and not the full path, just use the filename directly.
llvm-svn: 9730
2003-11-05 06:43:36 +00:00
Alkis Evlogimenos
c6a7c83333
Change all machine basic block modifier functions in MRegisterInfo to
...
return the number of instructions added to/removed from the basic block
passed as their first argument.
Note: This is only needed because we use a std::vector instead of an
ilist to keep MachineBasicBlock instructions. Inserting an instruction
to a MachineBasicBlock invalidates all iterators to the basic
block. The return value can be used to update an index to the machine
basic block instruction vector and circumvent the iterator elimination
problem but this is really not needed if we move to a better
representation.
llvm-svn: 9704
2003-11-04 22:57:09 +00:00
Chris Lattner
c4cfc20335
Fix problems in previous changes. This fixes several regressions last night.
...
llvm-svn: 9694
2003-11-04 16:04:32 +00:00
Chris Lattner
414e572f11
Significantly simplify constant emission by unifying the stuff which used to build up
...
strings with the stuff that used to print to an ostream directly. We now NEVER build
up big strings, only to print them once they are formed.
llvm-svn: 9686
2003-11-03 20:19:49 +00:00
Chris Lattner
f100e90240
Incorporate printSingleConstantValue into its single caller
...
llvm-svn: 9684
2003-11-03 19:44:05 +00:00
Chris Lattner
2943114bfd
* Reformat some code
...
* Emit bools as 1/0 instead of true/false, fixing compilation of eon and
PR 83 & Jello/2003-11-03-GlobalBool.llx
llvm-svn: 9683
2003-11-03 19:33:45 +00:00
Brian Gaeke
0d26a4c53d
Tweak sed commands so that they filter out more # stuff and also
...
work on Mac OS X. Also turn ${...} into $(...); we do not speak BSD
Make.
llvm-svn: 9589
2003-10-29 20:07:35 +00:00
Chris Lattner
0e32494c79
Delete unused EmitByteSwap method
...
Implement mul/div/rem constant expressions
llvm-svn: 9424
2003-10-23 17:21:43 +00:00
Misha Brukman
6a1c1640f5
Make code layout more consistent.
...
llvm-svn: 9418
2003-10-23 16:48:30 +00:00
Misha Brukman
0f649c0045
* Order includes according to style guide
...
* Convert tabs to spaces
* Make code fit within 80 columns
llvm-svn: 9416
2003-10-23 16:22:08 +00:00
Misha Brukman
55695cc963
Add comments to describe what these functions actually do.
...
llvm-svn: 9370
2003-10-22 05:50:40 +00:00
Misha Brukman
f79e50487f
* Use <cmath> instead of <math.h>
...
* Order #includes according to LLVM coding standards
llvm-svn: 9369
2003-10-22 05:09:56 +00:00
Misha Brukman
7456b8a58d
Removed completely duplicated function comment (an identical one appears later).
...
llvm-svn: 9368
2003-10-22 04:55:09 +00:00
Misha Brukman
ed0f9660bc
No, really, order the #includes correctly.
...
llvm-svn: 9367
2003-10-22 04:51:36 +00:00
Misha Brukman
c40b8306f6
* Fix order of #includes to follow style guide
...
* It's no longer a BasicBlock pass: update comment on run() method
* Fix placement of braces to be consistent
* Delete extraneous whitespace
llvm-svn: 9361
2003-10-22 03:27:45 +00:00
Misha Brukman
f8d45938f8
Converted tabs to spaces.
...
llvm-svn: 9360
2003-10-22 03:10:26 +00:00
Chris Lattner
7a75f6b7d4
Hrm, unbreak stuph :(
...
llvm-svn: 9334
2003-10-21 17:22:23 +00:00
Chris Lattner
19f471f002
Fix preselection/lowerswitches bug
...
llvm-svn: 9333
2003-10-21 16:29:23 +00:00
Chris Lattner
2c063c848d
Pull the PHI special case into it's own visit* method
...
llvm-svn: 9332
2003-10-21 16:09:23 +00:00
Chris Lattner
4b8ce1c80d
The lastOp operand is never used
...
llvm-svn: 9331
2003-10-21 16:06:07 +00:00
John Criswell
4746befea3
Added LLVM copyright notice.
...
llvm-svn: 9324
2003-10-21 15:29:18 +00:00
John Criswell
de34542f41
Added LLVM copyright header.
...
llvm-svn: 9321
2003-10-21 15:17:13 +00:00