Chris Lattner
2ab04f7a41
Add argument to DAE to allow operation on non-internal functions
...
llvm-svn: 6895
2003-06-25 04:12:49 +00:00
Brian Gaeke
7610971759
It seems likely that floats would need a cast too, because they are
...
ordinarily promoted to doubles.
llvm-svn: 6894
2003-06-25 03:05:33 +00:00
Chris Lattner
ee967711e9
Fix bug: ADCE/2003-06-24-BadSuccessor.ll
...
llvm-svn: 6891
2003-06-24 23:02:45 +00:00
Chris Lattner
8bd8bc8399
Make assertion more descriptive
...
llvm-svn: 6889
2003-06-24 22:20:19 +00:00
Chris Lattner
834105502d
Do not mark ALL terminators live if any instruciton in the block is live. We only
...
want to mark it live if it is an unconditional branch. This fixes bug:
ADCE/2002-05-28-Crash.ll and makes this pass _much_ more useful.
llvm-svn: 6887
2003-06-24 21:49:45 +00:00
Chris Lattner
7e270580c8
Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.ll
...
llvm-svn: 6883
2003-06-24 20:29:52 +00:00
Chris Lattner
f7544873de
Fix bug: TailDup/2003-06-24-Simpleloop.ll
...
llvm-svn: 6881
2003-06-24 19:48:06 +00:00
Chris Lattner
55d4bda861
Implement new transforms:
...
Replace (cast (sub A, B) to bool) -> (setne A, B)
Replace (cast (add A, B) to bool) -> (setne A, -B)
llvm-svn: 6873
2003-06-23 21:59:52 +00:00
Brian Gaeke
04bdfe624c
Fix 2003-06-23-PromotedExprs.llx -- if we are adding two bytes we better
...
explicitly cast the result to be a byte, or C will gleefully promote it
to int.
llvm-svn: 6869
2003-06-23 20:00:51 +00:00
Brian Gaeke
fcd72643fa
Include <cmath> instead of <math.h>
...
Remove isnan; it's too unportable to handle cleanly at this point.
llvm-svn: 6866
2003-06-23 19:41:55 +00:00
Chris Lattner
4c9cd8262a
Add support for GCC 3.3
...
llvm-svn: 6865
2003-06-23 19:16:20 +00:00
Chris Lattner
bf2c46254a
avoid dividing by zero when dealing with zero sized types (like [0 x double])
...
llvm-svn: 6862
2003-06-23 17:36:49 +00:00
Vikram S. Adve
50b1d41ad4
Add the padding needed for variable-size alloca's, which should work now.
...
llvm-svn: 6859
2003-06-23 02:13:57 +00:00
Chris Lattner
22ced56476
Fix bug: InstCombine/2003-06-22-ConstantExprCrash.ll
...
llvm-svn: 6857
2003-06-22 20:48:30 +00:00
Chris Lattner
92963de6fa
Add paranoia checking
...
llvm-svn: 6856
2003-06-22 20:46:00 +00:00
Chris Lattner
268c1392da
Test change
...
llvm-svn: 6852
2003-06-22 20:25:27 +00:00
Chris Lattner
a5434caa5c
Initial checkin of Tail duplication pass.
...
llvm-svn: 6846
2003-06-22 20:10:28 +00:00
Chris Lattner
53b843fc04
Do not use the inefficient, fixed function, CBW, CDQ, ... instructions
...
llvm-svn: 6844
2003-06-22 03:31:18 +00:00
Chris Lattner
52de05c6b3
Remove a ton of extraneous #includes
...
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
Chris Lattner
d791d8e427
Remove support for the MultiObject flag, which was fundamentally broken
...
llvm-svn: 6840
2003-06-22 03:03:52 +00:00
Chris Lattner
d0d51605b2
Instcombine cast (getelementptr Ptr, 0, 0, 0) to ... into: cast Ptr to ...
...
This fixes type safety problems in a variety of benchmarks that were confusing
DSA.
llvm-svn: 6837
2003-06-21 23:12:02 +00:00
Chris Lattner
6e1ec2394f
Minor simplification to 64-bit instsel
...
llvm-svn: 6831
2003-06-21 18:15:27 +00:00
Chris Lattner
22f54501be
For 16 and 32-bit multiplies, use the IMUL instruction instead of the MUL instruction.
...
This allows us to not force the use of the EAX/AX registers!
llvm-svn: 6830
2003-06-21 17:16:58 +00:00
Chris Lattner
2a67e0cf02
Add IMULr16 & IMULr32 instructions
...
llvm-svn: 6829
2003-06-21 17:13:35 +00:00
Chris Lattner
df1230ecf2
Generate code for LONG indexes to getelementptr instructions more efficiently
...
llvm-svn: 6828
2003-06-21 16:01:24 +00:00
Chris Lattner
9cb6b02dc9
Some preprocessors doen't support // comments and get confused
...
llvm-svn: 6821
2003-06-20 23:14:50 +00:00
Chris Lattner
0024dff76f
Fix the build. :(
...
llvm-svn: 6797
2003-06-20 14:36:52 +00:00
Vikram S. Adve
f6aaa90e8d
RDCCR defines arg. #1 , not arg. #2 .
...
llvm-svn: 6796
2003-06-20 11:32:11 +00:00
Chris Lattner
d01460495e
Changes to privatize NodeType
...
llvm-svn: 6795
2003-06-19 21:15:26 +00:00
Chris Lattner
4853d162af
* Changes to make NodeType be private to DSNode.
...
* Add new MultiObject flag to DSNode which keeps track of whether or not
multiple objects have been merged into the node, allowing must-alias info
to be tracked.
llvm-svn: 6794
2003-06-19 21:15:11 +00:00
Brian Gaeke
272c8871d7
Fix output bug: Intel asm comment character is #, not ;.
...
llvm-svn: 6792
2003-06-19 19:58:32 +00:00
Brian Gaeke
2181d1f1a2
RECAPITALIZE all the names of pseudo-instructions, and add a comment explaining
...
the convention.
:-)
llvm-svn: 6791
2003-06-19 19:41:13 +00:00
Brian Gaeke
f6de19a095
Rename many instructions to their Intel asm-compatible names. This
...
involves removing the [bwl] suffixes from instruction names, as well
as some other distinguishing marks (32/64/80 on fp insns, _i suffixes, etc.)
Lowercase all instr. names as well for consistency's sake.
llvm-svn: 6790
2003-06-19 19:34:44 +00:00
Brian Gaeke
259fdbc230
Add Initialization and Finalization methods for the Printer pass,
...
to print various things on a module-by-module basis (currently, only the
former is used).
Don't print < > around names. The assembler can't take it.
Print pseudoinstructions only as comments. The poor little assembler can't
take that, either.
llvm-svn: 6789
2003-06-19 19:32:32 +00:00
Chris Lattner
0cfcaf0cc3
Remove usage of sys/unistd.h
...
llvm-svn: 6788
2003-06-19 18:42:09 +00:00
Chris Lattner
970c33abb1
Implement the functionality of InstCombine/call.ll
...
llvm-svn: 6783
2003-06-19 17:00:31 +00:00
Chris Lattner
bbe2dab909
Remove a bunch of complicated code. The functionality is implemented in instcombine instead
...
llvm-svn: 6782
2003-06-19 16:59:19 +00:00
Brian Gaeke
ac94bab876
lib/Target/X86/X86TargetMachine.{cpp,h}: Add initial version
...
(non-working) of llc guts for X86, and add a prototype for it.
llvm-svn: 6779
2003-06-18 21:43:21 +00:00
Brian Gaeke
cf8c4f5fe4
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.
llvm-svn: 6776
2003-06-18 21:14:23 +00:00
Chris Lattner
8826647168
Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
...
llvm-svn: 6774
2003-06-18 19:22:36 +00:00
Chris Lattner
5d3c145d4e
Handle arguments passed in through the va_arg area
...
llvm-svn: 6769
2003-06-18 16:25:51 +00:00
Chris Lattner
d768c51f1b
These instructions really take three operands. This fixes some assertions
...
llvm-svn: 6765
2003-06-18 15:09:02 +00:00
Brian Gaeke
87b4f0765c
lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
...
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.
lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.
llvm-svn: 6762
2003-06-17 23:55:35 +00:00
Brian Gaeke
a7cf81bc75
Add #ifdef hack for MAP_ANONYMOUS being spelled MAP_ANON on some platforms.
...
(We're already talking about autoconf'ing this, so I'm assuming this hack
will be short-lived...I just don't want it to get lost in my working files.)
llvm-svn: 6761
2003-06-17 23:14:06 +00:00
Chris Lattner
13bf28c00a
Initial checkin of DAE pass
...
llvm-svn: 6759
2003-06-17 22:21:05 +00:00
Brian Gaeke
e38c7d9f2d
Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms where
...
it is needed.
llvm-svn: 6753
2003-06-17 20:09:18 +00:00
Brian Gaeke
44a4adfad2
Use std::isnan instead of isnan. Brought back to you from the
...
future, by the reconciliation of the C++ and C99 standards. Someday.
llvm-svn: 6751
2003-06-17 19:59:17 +00:00
Brian Gaeke
ad3aabd47a
Put ifdefs around use of malloc.h/mallinfo, which isn't available on FreeBSD.
...
llvm-svn: 6750
2003-06-17 19:54:00 +00:00
Chris Lattner
dcd6bcb71d
Life is too short. Link in too much stuff on Linux to make building on sun easier
...
llvm-svn: 6748
2003-06-17 19:14:59 +00:00
Chris Lattner
eba0e9930d
The never-ending odyssey trying to get sparc to link
...
llvm-svn: 6747
2003-06-17 18:19:52 +00:00