Chris Lattner
18a08e702d
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
9a60c532a8
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
c85535c8be
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
449af59c7e
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
a47455dbd3
Instance var no longer exists
...
llvm-svn: 14520
2004-07-01 06:02:07 +00:00
Chris Lattner
6c375e4926
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
7c77fd50e7
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
b9125f462d
Fix indentation to be 2 spaces.
...
llvm-svn: 14512
2004-06-30 22:11:03 +00:00
Misha Brukman
0648a903c7
* 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
299fa1b147
* 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
fee5a22f8a
* 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
04f07b4589
visitSetCondInst() takes a parameter of type `SetCondInst'
...
llvm-svn: 14508
2004-06-30 21:47:40 +00:00
Misha Brukman
2b9106f808
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
351646f31e
* 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
c794feab51
* 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
d409669877
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
7454c6fff0
* 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
5459dfb47b
Only allocate non-volatile registers R13-31 (for now).
...
llvm-svn: 14500
2004-06-29 23:35:32 +00:00
Misha Brukman
4efe3da794
Lower ConstantExpressions before the code generator.
...
llvm-svn: 14497
2004-06-29 23:33:20 +00:00
Reid Spencer
fddebf7ff2
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
f4ec6383c0
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
284b7c7174
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
891cb9d925
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
351f6bf714
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
c7b9419add
Analyzer moved to ../Reader directory.
...
llvm-svn: 14491
2004-06-29 23:21:53 +00:00
Reid Spencer
75923a4f93
Remove newly defunct Analyzer directory.
...
llvm-svn: 14490
2004-06-29 23:21:16 +00:00
Misha Brukman
887fd23dfc
Fix associativity of parameters to assert(): now it actually makes sense.
...
llvm-svn: 14483
2004-06-29 19:43:20 +00:00
Misha Brukman
c968b87d94
Convert tabs to spaces.
...
llvm-svn: 14482
2004-06-29 19:28:53 +00:00
Misha Brukman
802403723b
* 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
811f5c2c4c
Assembly syntax/comment fixes by Nate Begeman.
...
llvm-svn: 14479
2004-06-29 17:13:26 +00:00
Vikram S. Adve
1097ed8467
Restoring this file.
...
llvm-svn: 14478
2004-06-29 14:20:27 +00:00
Chris Lattner
c5f9b356af
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
e6e1b48023
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
4cda555346
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
49b34f3f51
Do not dereference end iterators. It hurts when you do that.
...
llvm-svn: 14474
2004-06-29 06:56:51 +00:00
Chris Lattner
1a920d49f6
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
15c10883ff
Can't print out machine code before it is constructed.
...
llvm-svn: 14472
2004-06-28 21:16:57 +00:00
Misha Brukman
3aad397726
Fix the assembly opcode on LOADLoAddr, courtesy of Nate Begeman.
...
llvm-svn: 14470
2004-06-28 18:27:08 +00:00
Misha Brukman
767fa11096
Set isBranch and isTerminator bits on all branch instructions.
...
llvm-svn: 14469
2004-06-28 18:23:35 +00:00
Misha Brukman
2f0cda8b2a
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
75985d725c
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
8455e0177b
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
9cb88aae40
Fix spacing around function arguments.
...
llvm-svn: 14463
2004-06-28 15:53:27 +00:00
Chris Lattner
26dff501a4
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
3b11d3b294
Remove unused file
...
llvm-svn: 14460
2004-06-28 00:46:58 +00:00
Chris Lattner
924882f775
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
9b55c11c56
Moved IPModRef out of the public include dir
...
llvm-svn: 14455
2004-06-28 00:41:23 +00:00
Chris Lattner
32c79788cc
Move DependenceGraph.* to lib/Analysis/DataStructure
...
llvm-svn: 14452
2004-06-28 00:32:33 +00:00
Chris Lattner
135fb4be7c
Moving to lib/Analysis/DataStructure
...
llvm-svn: 14450
2004-06-28 00:29:42 +00:00
Chris Lattner
dfe8056225
Move MemoryDepAnalysis.h into lib/Analysis/DataStructure
...
llvm-svn: 14448
2004-06-28 00:27:16 +00:00