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
Reid Spencer
976bae4918
Remove newly defunct Analyzer directory.
...
llvm-svn: 14490
2004-06-29 23:21:16 +00:00
Misha Brukman
9e015dddb8
Fix associativity of parameters to assert(): now it actually makes sense.
...
llvm-svn: 14483
2004-06-29 19:43:20 +00:00
Misha Brukman
b3e4179f42
Convert tabs to spaces.
...
llvm-svn: 14482
2004-06-29 19:28:53 +00:00
Misha Brukman
01841234e8
* Fix saving LR in function prologue
...
* Adjust epilogue restore sequence to match the PowerPC documentation
llvm-svn: 14480
2004-06-29 17:14:42 +00:00
Misha Brukman
08f6a46ce2
Assembly syntax/comment fixes by Nate Begeman.
...
llvm-svn: 14479
2004-06-29 17:13:26 +00:00
Vikram S. Adve
5ad9c7dd34
Restoring this file.
...
llvm-svn: 14478
2004-06-29 14:20:27 +00:00
Chris Lattner
dda82ce624
The code generator should work with unreachable blocks. If not, then this
...
is a bug that should be fixed in the code generator, not papered over with
the simplifycfg pass. Eliminating this makes bugpoint much more useful
llvm-svn: 14477
2004-06-29 07:20:16 +00:00
Chris Lattner
2abf0134d0
I believe that the code generator now properly handles dead basic blocks. If not,
...
this is a bug, and should be fixed.
llvm-svn: 14476
2004-06-29 07:17:12 +00:00
Chris Lattner
41c3157c70
In line with the previous patch, do not assert out if analyzing a dead basic block.
...
llvm-svn: 14475
2004-06-29 07:16:23 +00:00
Chris Lattner
27c176234c
Do not dereference end iterators. It hurts when you do that.
...
llvm-svn: 14474
2004-06-29 06:56:51 +00:00
Chris Lattner
cd1a39bbec
Fix a regression from r1.224. In particular, codegen a cast from double ->
...
float as a truncation by going through memory. This truncation was being
skipped, which caused 175.vpr to fail after aggressive register promotion.
llvm-svn: 14473
2004-06-29 00:14:38 +00:00
Misha Brukman
7627e1ff1a
Can't print out machine code before it is constructed.
...
llvm-svn: 14472
2004-06-28 21:16:57 +00:00
Misha Brukman
92cc94a0e5
Fix the assembly opcode on LOADLoAddr, courtesy of Nate Begeman.
...
llvm-svn: 14470
2004-06-28 18:27:08 +00:00
Misha Brukman
2f7332b752
Set isBranch and isTerminator bits on all branch instructions.
...
llvm-svn: 14469
2004-06-28 18:23:35 +00:00
Misha Brukman
8f1e58dfe3
Fix loading and storing PC-relative static variables, courtesy of Nate Begeman.
...
llvm-svn: 14468
2004-06-28 18:20:59 +00:00
Misha Brukman
2eccf504e2
No need to generate a lazy-linking stub for internal functions, they can be
...
resolved by the static linker.
llvm-svn: 14467
2004-06-28 18:03:37 +00:00
Misha Brukman
5a52b7aa36
Do not set the `link' bit when branching to the first BB of a function, as it
...
will cause an infinite loop. The link bit is only used for calling functions.
llvm-svn: 14466
2004-06-28 17:57:40 +00:00
Misha Brukman
02ac5488d5
Fix spacing around function arguments.
...
llvm-svn: 14463
2004-06-28 15:53:27 +00:00
Chris Lattner
7d6a9bf05c
Initial checkin of a simple mod/ref analysis for global variables. This is
...
still overly conservative and uses very simple data structures, but it is a
start, and allows elimination of a lot of loads.
llvm-svn: 14462
2004-06-28 06:33:13 +00:00
Chris Lattner
7d0108c315
Remove unused file
...
llvm-svn: 14460
2004-06-28 00:46:58 +00:00
Chris Lattner
975c95e99a
These passes are long dead/obsolete. They never worked in the first place
...
and are a maintenence burden. Nuke nuke nuke
llvm-svn: 14457
2004-06-28 00:44:18 +00:00
Chris Lattner
548171248d
Moved IPModRef out of the public include dir
...
llvm-svn: 14455
2004-06-28 00:41:23 +00:00
Chris Lattner
6eb1e76227
Move DependenceGraph.* to lib/Analysis/DataStructure
...
llvm-svn: 14452
2004-06-28 00:32:33 +00:00
Chris Lattner
a77dd6edec
Moving to lib/Analysis/DataStructure
...
llvm-svn: 14450
2004-06-28 00:29:42 +00:00
Chris Lattner
f914ccfa2a
Move MemoryDepAnalysis.h into lib/Analysis/DataStructure
...
llvm-svn: 14448
2004-06-28 00:27:16 +00:00
Chris Lattner
244d5fba00
Move PgmDependenceGraph.h out of the public include hierarchy
...
llvm-svn: 14446
2004-06-28 00:20:04 +00:00
Brian Gaeke
92bba4c696
Allow saving and restoring of double and float registers.
...
Allow copying of float registers.
llvm-svn: 14445
2004-06-27 22:59:56 +00:00
Brian Gaeke
6edb16d8cd
Add FITOS, FITOD, and F{ADD,SUB,MUL,DIV}{S,D}.
...
llvm-svn: 14444
2004-06-27 22:53:56 +00:00
Chris Lattner
8cfa7ad533
Implement InstCombine/add.ll:test21
...
llvm-svn: 14443
2004-06-27 22:51:36 +00:00
Brian Gaeke
5b14de32c6
Support printing constant pool indices.
...
If we see an "unknown operand", abort so it's easier to fix it.
llvm-svn: 14441
2004-06-27 22:50:44 +00:00
Brian Gaeke
0cee4d2fb9
Trim whitespace.
...
Support cast of ints (and narrower) to float and double.
Support cast double to double (using load and store).
Abort if we see a CallInst or SetCondInst with long/fp args, instead
of producing bad code.
Support add, sub, mul, div of float and double.
llvm-svn: 14440
2004-06-27 22:47:33 +00:00
Chris Lattner
fd25f66f50
Do not find these ugly sparc-specific objects by using the annotation API on
...
instructions. Instead, keep a map of instructions -> MCFI objects in the
already sparc-specific class MachineFunctionInfo. This will slow down the
sparc backend a bit, but it does not penalize the rest of LLVM!
llvm-svn: 14438
2004-06-27 18:52:17 +00:00
Chris Lattner
3d1c32ce27
Fold iType into Value::VTy
...
llvm-svn: 14435
2004-06-27 18:38:48 +00:00
Chris Lattner
56d4c0c8b2
User ctor is now inline
...
llvm-svn: 14431
2004-06-27 18:01:38 +00:00
Chris Lattner
476eace8f4
Instancevar was renamed
...
llvm-svn: 14428
2004-06-26 20:33:39 +00:00
Chris Lattner
ed76ea9025
Don't call getValueType directly. the LLVM optimizer will turn it into the same code anyway :)
...
llvm-svn: 14426
2004-06-26 19:40:40 +00:00
Chris Lattner
680ff7de4a
There is no reason to print ValueType here
...
llvm-svn: 14425
2004-06-26 19:36:34 +00:00
Chris Lattner
850f1967b6
Simplify code
...
llvm-svn: 14424
2004-06-26 19:31:26 +00:00
Chris Lattner
2c7b54fea3
No functionality changes here:
...
* Some warning fixes for MSVC
* Minor simplification to the deque scanning code
llvm-svn: 14417
2004-06-25 20:52:10 +00:00