Reid Spencer
1b40b59651
Remove tabs. Move function declaration to Reader.h where it belongs.
...
llvm-svn: 14601
2004-07-04 11:03:03 +00:00
Reid Spencer
b342d41159
Add #include <iostream> which is needed now that Value.h doesn't include it
...
llvm-svn: 14600
2004-07-04 11:01:27 +00:00
Reid Spencer
43f703a636
Excise tabs.
...
llvm-svn: 14599
2004-07-04 11:00:39 +00:00
Alkis Evlogimenos
8ff35c1ce8
Add efficiency statistic.
...
llvm-svn: 14590
2004-07-04 07:59:06 +00:00
Chris Lattner
5d7966a0ea
Fix compilation on internix
...
llvm-svn: 14588
2004-07-03 01:21:05 +00:00
Chris Lattner
aafe5aea0d
Implement add.ll:test22, a common case in MSIL files
...
llvm-svn: 14587
2004-07-03 00:26:11 +00:00
Chris Lattner
f0af72ac49
Fix Type::isSized() to realize that "{ opaque }" is not sized
...
llvm-svn: 14585
2004-07-02 23:20:17 +00:00
Chris Lattner
1120899069
Do not call getTypeSize on a type that has no size
...
llvm-svn: 14584
2004-07-02 22:55:47 +00:00
Misha Brukman
607dd868a8
Add FIXME notes for spilling int/fp regs (need to calculate stack space).
...
llvm-svn: 14581
2004-07-02 17:54:38 +00:00
Brian Gaeke
318c4cf9c2
Fix use-before-def thinko
...
llvm-svn: 14570
2004-07-02 07:01:31 +00:00
Chris Lattner
5b96ed7d1b
Revert patches 1.79 and 1.80 which had to do with dead MBB's. Now that they
...
don't exist, we don't have to pretend to handle them.
llvm-svn: 14567
2004-07-02 05:52:23 +00:00
Chris Lattner
c83e510819
Fix potential problems with unreachable basic blocks.
...
Also, while noone's looking, add support for constant expressions. Wait,
I said not to look!
llvm-svn: 14566
2004-07-02 05:49:11 +00:00
Chris Lattner
a99a36881f
Fix all of those problems that the PPC backend has running 176.gcc :)
...
llvm-svn: 14565
2004-07-02 05:48:42 +00:00
Chris Lattner
6da0499f4b
Remove dead blocks
...
llvm-svn: 14564
2004-07-02 05:46:41 +00:00
Chris Lattner
1e20aefbcb
Add a trivially simple pass to delete unreachable blocks from the CFG. This
...
pass is required to paper over problems in the code generator (primarily
live variables and its clients) which doesn't really have any well defined
semantics for unreachable code.
The proper solution to this problem is to have instruction selectors not
select blocks that are unreachable. Until we have a instruction selection
framework available for use, however, we can't expect all instruction
selector writers to do this. Until then, this pass should be used.
llvm-svn: 14563
2004-07-02 05:46:10 +00:00
Brian Gaeke
96e0f832f8
Get rid of a dead variable, and fix a typo in a comment.
...
llvm-svn: 14560
2004-07-02 05:30:01 +00:00
Brian Gaeke
b92c136437
Add M_TERMINATOR_FLAG to terminator instructions (branches and returns).
...
Also, the RETURN instructions are not used in the sparcv9 backend.
llvm-svn: 14559
2004-07-02 04:57:37 +00:00
Brian Gaeke
62ceddefe8
RETURN instructions are not used in the sparc backend.
...
When in doubt, stamp it out!!
llvm-svn: 14558
2004-07-02 04:57:35 +00:00
Misha Brukman
c9ecaeb69d
* Follow the PowerPC convention of leaving 24 bytes for linking on the stack.
...
* Also leave space for spilling integer registers (this should be calculated)
llvm-svn: 14554
2004-07-01 21:35:00 +00:00
Misha Brukman
f5deab6100
* Get rid of constant-expr handling code: we use the ConstantExpr lowering pass
...
* Use the SetCC handling code in the format of Brian's V8
* Add FIXMEs where calls to functions are being made without adding them to the
Module first... they cause missing symbols at assembly-time.
llvm-svn: 14553
2004-07-01 21:34:10 +00:00
Misha Brukman
1546c2e9c0
Wrap long line
...
llvm-svn: 14552
2004-07-01 21:27:59 +00:00
Misha Brukman
e409874a9f
* Do not allocate r0 as we use it indiscriminantly in the instr selector.
...
* Do not define CR register class because we don't (yet) have the i4 type
llvm-svn: 14551
2004-07-01 21:24:50 +00:00
Misha Brukman
b296163bb1
Check if operand has an allocated reg before requesting it.
...
llvm-svn: 14550
2004-07-01 21:09:12 +00:00
Chris Lattner
f3e46315fb
Add much better assertion checking for load and store insts.
...
Contributed by Vladimir Merzliakov!
llvm-svn: 14546
2004-07-01 20:23:52 +00:00
Brian Gaeke
dbf4f13e85
Make this pass use a more specific debug message than "Processing:".
...
llvm-svn: 14541
2004-07-01 19:27:10 +00:00
Chris Lattner
3fd0ea69f6
Handle targets where alignment can be bigger than the size of the data.
...
Contributed by Vladimir Prus!
llvm-svn: 14534
2004-07-01 17:32:59 +00:00
Chris Lattner
91662f48b8
Make sure that we destroy the MBB's, with all of their instructions, before
...
any other data structures
llvm-svn: 14524
2004-07-01 06:29:07 +00:00
Chris Lattner
93bf3a5985
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
...
use them instead of a local LiveVariables numbering
llvm-svn: 14523
2004-07-01 06:15:32 +00:00
Chris Lattner
43e765d61c
Change MBB autonumber a bit to get the reverse mapping as well as a forward
...
mapping
llvm-svn: 14521
2004-07-01 06:02:27 +00:00
Chris Lattner
a2481b7e82
Instance var no longer exists
...
llvm-svn: 14520
2004-07-01 06:02:07 +00:00
Chris Lattner
ae4f21e30a
Start using MBB numbers directly instead of going through the live variables
...
map.
llvm-svn: 14518
2004-07-01 04:29:47 +00:00
Chris Lattner
0bb956cda7
Instead of building a private numbering of MBB's use brg's nifty auto-numbering.
...
Also convert df_iterator -> df_ext_iterator for subsequent stuff I'm doing.
llvm-svn: 14517
2004-07-01 04:24:29 +00:00
Misha Brukman
a691e0bff7
Fix indentation to be 2 spaces.
...
llvm-svn: 14512
2004-06-30 22:11:03 +00:00
Misha Brukman
efcb6b8c2c
* Coalesce the handy CALL* alias opcodes with the standard ones
...
* Congregate more branch-and-link opcodes together
* Mark FP, CPR, and special registers as volatile across calls
llvm-svn: 14511
2004-06-30 22:00:45 +00:00
Misha Brukman
7089b3d426
* Allow more registers to be allocated from the general register pool
...
* Define the condition register class
llvm-svn: 14510
2004-06-30 21:54:50 +00:00
Misha Brukman
08a07e969f
* Inquire about the number of operands from the instruction directly
...
* Only check for a register if we are sure the instruction has one allocated
llvm-svn: 14509
2004-06-30 21:54:12 +00:00
Misha Brukman
010e07078b
visitSetCondInst() takes a parameter of type `SetCondInst'
...
llvm-svn: 14508
2004-06-30 21:47:40 +00:00
Misha Brukman
49e6aa1ba7
Always assume a function may have calls because the printer may add `bl' to get
...
the PC in a code sequence for global variables.
llvm-svn: 14506
2004-06-30 00:09:12 +00:00
Misha Brukman
3422760e16
* Don't save LR when outputting globals: it's already saved on the stack once
...
for the function
* Registers aren't necessarily sequential wrt their enums, don't rely on it
when emitting function arguments into sequential registers
* Remove X86-specific comments about AL/BL/AH/BH/EDX/etc
* Add an abort() for an unimplemented signed right shift
* The src operand for a GEP was never emitted! Fixed.
* We can skip zero-valued GEP indices as they are no-ops.
"Hello, World!" now works.
llvm-svn: 14505
2004-06-29 23:45:05 +00:00
Misha Brukman
e9166fd352
* Stop using BBNumbering, we don't really need it
...
* Only increment labelNumber once, because it's used by both Load{hi,lo}Addr
* There is no .bss section on PowerPC
* Use .align 2 instead of other random numbers
llvm-svn: 14504
2004-06-29 23:40:57 +00:00
Misha Brukman
79a92e35b4
Set up the prologue and epilogue to be more like the manual and GCC output.
...
llvm-svn: 14502
2004-06-29 23:38:26 +00:00
Misha Brukman
2242e8d27f
* Use LA instead of LWZ for LoadLoAddr
...
* Specify the isCall bit and caller-save registers for some call instrs
llvm-svn: 14501
2004-06-29 23:37:36 +00:00
Misha Brukman
a0721ac147
Only allocate non-volatile registers R13-31 (for now).
...
llvm-svn: 14500
2004-06-29 23:35:32 +00:00
Misha Brukman
ddf07d1c08
Lower ConstantExpressions before the code generator.
...
llvm-svn: 14497
2004-06-29 23:33:20 +00:00
Reid Spencer
d15e874bb7
Remove files no longer needed. ConstantReader and InstructionReader were
...
integrated into Reader. Parser.* was just a bad idea. AnalyzerInternals.h
is no longer needed. ReaderPrimitives.h was integrated into Reader.h and
Reader.cpp. Dumper.cpp was integrated into Analyzer.cpp. ReaderInternals.h
became Reader.h. AnalyzerWrappers.cpp was integerated into
ReaderWrappers.cpp
llvm-svn: 14496
2004-06-29 23:32:41 +00:00
Reid Spencer
b8b9962dd1
This is a slimming down of the previous ReaderInternals.h that just
...
declares the BytecodeReader class.
llvm-svn: 14495
2004-06-29 23:31:01 +00:00
Reid Spencer
401a9df238
MAJOR REWRITE.
...
- stop passing Buf/BufEnd to every function (now member vars)
- internalize things that used to be in a header file that no one else
included/needed.
- Remove defunct BCR_TRACE lines
- Standardize error handling with the PARSE_ERROR macro.
- Integrate ConstantReader.cpp and InstructionReader.cpp and reorgnize
the definition order so that gcc has a chance at optimizing this module
- Standardize case and style of method names.
- Eliminate unneeded header files
- Prepare for Type != Value (bug122) change by splitting Types into their
own data structures.
- Implement the BytecodeHandler interface calls.
- Provide default implementation of BytecodeHandler interface.
llvm-svn: 14494
2004-06-29 23:29:38 +00:00
Reid Spencer
e0ce1743c6
Adjustments to allow Bytecode Reading to support the BytecodeHandler
...
interface which is called by the reader if a BytecodeHandler is provided.
llvm-svn: 14493
2004-06-29 23:24:14 +00:00
Reid Spencer
61cff86f35
Merge Dumper.cpp and AnalyzerWrappers.cpp into this file. Also, adjust the
...
dumping facility to produce useful output.
llvm-svn: 14492
2004-06-29 23:23:12 +00:00
Reid Spencer
21cbc878d9
Analyzer moved to ../Reader directory.
...
llvm-svn: 14491
2004-06-29 23:21:53 +00:00