oota-llvm.git
20 years agoFix potential problems with unreachable basic blocks.
Chris Lattner [Fri, 2 Jul 2004 05:49:11 +0000 (05:49 +0000)]
Fix potential problems with unreachable basic blocks.

Also, while noone's looking, add support for constant expressions.  Wait,
I said not to look!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14566 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix all of those problems that the PPC backend has running 176.gcc :)
Chris Lattner [Fri, 2 Jul 2004 05:48:42 +0000 (05:48 +0000)]
Fix all of those problems that the PPC backend has running 176.gcc :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14565 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove dead blocks
Chris Lattner [Fri, 2 Jul 2004 05:46:41 +0000 (05:46 +0000)]
Remove dead blocks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14564 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a trivially simple pass to delete unreachable blocks from the CFG. This
Chris Lattner [Fri, 2 Jul 2004 05:46:10 +0000 (05:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14563 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a new pass for code generators to use
Chris Lattner [Fri, 2 Jul 2004 05:44:13 +0000 (05:44 +0000)]
Add a new pass for code generators to use

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14562 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake this testcase more interesting
Chris Lattner [Fri, 2 Jul 2004 05:43:51 +0000 (05:43 +0000)]
Make this testcase more interesting

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14561 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoGet rid of a dead variable, and fix a typo in a comment.
Brian Gaeke [Fri, 2 Jul 2004 05:30:01 +0000 (05:30 +0000)]
Get rid of a dead variable, and fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14560 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd M_TERMINATOR_FLAG to terminator instructions (branches and returns).
Brian Gaeke [Fri, 2 Jul 2004 04:57:37 +0000 (04:57 +0000)]
Add M_TERMINATOR_FLAG to terminator instructions (branches and returns).
Also, the RETURN instructions are not used in the sparcv9 backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14559 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRETURN instructions are not used in the sparc backend.
Brian Gaeke [Fri, 2 Jul 2004 04:57:35 +0000 (04:57 +0000)]
RETURN instructions are not used in the sparc backend.
When in doubt, stamp it out!!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14558 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agollvm-abcd tool name changed to llvm-bcanalyzer: see llvm-bcanalyzer.pod.
Reid Spencer [Fri, 2 Jul 2004 03:45:32 +0000 (03:45 +0000)]
llvm-abcd tool name changed to llvm-bcanalyzer: see llvm-bcanalyzer.pod.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14557 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPodified documentation for the llvm-bcanalyzer tool (nee llvm-abcd).
Reid Spencer [Fri, 2 Jul 2004 03:44:14 +0000 (03:44 +0000)]
Podified documentation for the llvm-bcanalyzer tool (nee llvm-abcd).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14556 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoName Change: llvm-abcd -> llvm-bcanalyzer
Reid Spencer [Fri, 2 Jul 2004 03:22:53 +0000 (03:22 +0000)]
Name Change: llvm-abcd -> llvm-bcanalyzer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14555 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Follow the PowerPC convention of leaving 24 bytes for linking on the stack.
Misha Brukman [Thu, 1 Jul 2004 21:35:00 +0000 (21:35 +0000)]
* Follow the PowerPC convention of leaving 24 bytes for linking on the stack.
* Also leave space for spilling integer registers (this should be calculated)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14554 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Get rid of constant-expr handling code: we use the ConstantExpr lowering pass
Misha Brukman [Thu, 1 Jul 2004 21:34:10 +0000 (21:34 +0000)]
* 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14553 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWrap long line
Misha Brukman [Thu, 1 Jul 2004 21:27:59 +0000 (21:27 +0000)]
Wrap long line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14552 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Do not allocate r0 as we use it indiscriminantly in the instr selector.
Misha Brukman [Thu, 1 Jul 2004 21:24:50 +0000 (21:24 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14551 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCheck if operand has an allocated reg before requesting it.
Misha Brukman [Thu, 1 Jul 2004 21:09:12 +0000 (21:09 +0000)]
Check if operand has an allocated reg before requesting it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14550 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Doxygenify comments
Misha Brukman [Thu, 1 Jul 2004 20:42:00 +0000 (20:42 +0000)]
* Doxygenify comments
* Tabs-to-spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14549 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix broken links
Chris Lattner [Thu, 1 Jul 2004 20:41:43 +0000 (20:41 +0000)]
Fix broken links

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14548 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agobug. point. pod.
Brian Gaeke [Thu, 1 Jul 2004 20:29:08 +0000 (20:29 +0000)]
bug. point. pod.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14547 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd much better assertion checking for load and store insts.
Chris Lattner [Thu, 1 Jul 2004 20:23:52 +0000 (20:23 +0000)]
Add much better assertion checking for load and store insts.
Contributed by Vladimir Merzliakov!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14546 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove init methods out of line to enable better assertions, contributed
Chris Lattner [Thu, 1 Jul 2004 20:22:31 +0000 (20:22 +0000)]
Move init methods out of line to enable better assertions, contributed
by Vladimir Merzliakov!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14545 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agobugpoint command guide has been designated a full-fledged "doc".
Brian Gaeke [Thu, 1 Jul 2004 20:10:40 +0000 (20:10 +0000)]
bugpoint command guide has been designated a full-fledged "doc".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14544 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoabcd pod document
Brian Gaeke [Thu, 1 Jul 2004 20:07:15 +0000 (20:07 +0000)]
abcd pod document

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14543 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agollvm-nm pod format man page.
Brian Gaeke [Thu, 1 Jul 2004 19:40:36 +0000 (19:40 +0000)]
llvm-nm pod format man page.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14542 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake this pass use a more specific debug message than "Processing:".
Brian Gaeke [Thu, 1 Jul 2004 19:27:10 +0000 (19:27 +0000)]
Make this pass use a more specific debug message than "Processing:".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14541 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix grammar: remove `our' as it no longer makes sense.
Misha Brukman [Thu, 1 Jul 2004 18:34:46 +0000 (18:34 +0000)]
Fix grammar: remove `our' as it no longer makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14540 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThis is more of an "llvm team" thing by now
Chris Lattner [Thu, 1 Jul 2004 18:25:59 +0000 (18:25 +0000)]
This is more of an "llvm team" thing by now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14539 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agollvm-db is in alpha stage, this document is a placeholder.
Misha Brukman [Thu, 1 Jul 2004 18:00:42 +0000 (18:00 +0000)]
llvm-db is in alpha stage, this document is a placeholder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14538 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix links to llvmgcc and llvmgxx
Misha Brukman [Thu, 1 Jul 2004 17:59:53 +0000 (17:59 +0000)]
Fix links to llvmgcc and llvmgxx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14537 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agogccld enters the Hall of POD.
Misha Brukman [Thu, 1 Jul 2004 17:53:27 +0000 (17:53 +0000)]
gccld enters the Hall of POD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14536 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake the text of the link to llvmgxx.html more appropriate: `llvmg++'.
Misha Brukman [Thu, 1 Jul 2004 17:52:58 +0000 (17:52 +0000)]
Make the text of the link to llvmgxx.html more appropriate: `llvmg++'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14535 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoHandle targets where alignment can be bigger than the size of the data.
Chris Lattner [Thu, 1 Jul 2004 17:32:59 +0000 (17:32 +0000)]
Handle targets where alignment can be bigger than the size of the data.
Contributed by Vladimir Prus!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14534 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix grammar in Stacker doc description.
Misha Brukman [Thu, 1 Jul 2004 17:20:53 +0000 (17:20 +0000)]
Fix grammar in Stacker doc description.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14533 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMention llvm-abcd, point out difference between it and `analyze'.
Misha Brukman [Thu, 1 Jul 2004 16:59:05 +0000 (16:59 +0000)]
Mention llvm-abcd, point out difference between it and `analyze'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14532 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange format of CommandGuide index page to look like other docs.
Misha Brukman [Thu, 1 Jul 2004 16:04:49 +0000 (16:04 +0000)]
Change format of CommandGuide index page to look like other docs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14531 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* `The' isn't necessary in front of LLVM
Misha Brukman [Thu, 1 Jul 2004 15:33:24 +0000 (15:33 +0000)]
* `The' isn't necessary in front of LLVM
* Wrap long line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14530 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFresh from the LLVM baker's oven: opt and analyze pods.
Misha Brukman [Thu, 1 Jul 2004 15:25:04 +0000 (15:25 +0000)]
Fresh from the LLVM baker's oven: opt and analyze pods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14529 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd llvm-g++ and llvm-gcc pod documentation.
Misha Brukman [Thu, 1 Jul 2004 14:51:26 +0000 (14:51 +0000)]
Add llvm-g++ and llvm-gcc pod documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14528 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix link to llvmgcc.
Misha Brukman [Thu, 1 Jul 2004 14:47:05 +0000 (14:47 +0000)]
Fix link to llvmgcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14527 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake links relative instead of absolute.
Misha Brukman [Thu, 1 Jul 2004 13:52:35 +0000 (13:52 +0000)]
Make links relative instead of absolute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14525 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake sure that we destroy the MBB's, with all of their instructions, before
Chris Lattner [Thu, 1 Jul 2004 06:29:07 +0000 (06:29 +0000)]
Make sure that we destroy the MBB's, with all of their instructions, before
any other data structures

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14524 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNow that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
Chris Lattner [Thu, 1 Jul 2004 06:15:32 +0000 (06:15 +0000)]
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
use them instead of a local LiveVariables numbering

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14523 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNow that we have happy mappings from MBBs->numbers, use them instead of keeping
Chris Lattner [Thu, 1 Jul 2004 06:14:57 +0000 (06:14 +0000)]
Now that we have happy mappings from MBBs->numbers, use them instead of keeping
a LV private map

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14522 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange MBB autonumber a bit to get the reverse mapping as well as a forward
Chris Lattner [Thu, 1 Jul 2004 06:02:27 +0000 (06:02 +0000)]
Change MBB autonumber a bit to get the reverse mapping as well as a forward
mapping

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14521 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoInstance var no longer exists
Chris Lattner [Thu, 1 Jul 2004 06:02:07 +0000 (06:02 +0000)]
Instance var no longer exists

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14520 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange the implementation of the autonumbering for MBB's a bit to provide
Chris Lattner [Thu, 1 Jul 2004 06:01:36 +0000 (06:01 +0000)]
Change the implementation of the autonumbering for MBB's a bit to provide
the reverse mapping as well as the mapping from MBB->unsigned

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14519 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoStart using MBB numbers directly instead of going through the live variables
Chris Lattner [Thu, 1 Jul 2004 04:29:47 +0000 (04:29 +0000)]
Start using MBB numbers directly instead of going through the live variables
map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14518 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoInstead of building a private numbering of MBB's use brg's nifty auto-numbering.
Chris Lattner [Thu, 1 Jul 2004 04:24:29 +0000 (04:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14517 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix testcase
Chris Lattner [Thu, 1 Jul 2004 04:11:35 +0000 (04:11 +0000)]
Fix testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14516 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago-debug option does not exist in a release build
Chris Lattner [Thu, 1 Jul 2004 04:10:15 +0000 (04:10 +0000)]
-debug option does not exist in a release build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14515 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix testcase. For some reason this was failing only with a release build and
Chris Lattner [Thu, 1 Jul 2004 04:09:14 +0000 (04:09 +0000)]
Fix testcase.  For some reason this was failing only with a release build and
not with a debug build?  Rather testrunner only caught it in that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14514 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdded a command page for the llvm-abcd tool.
Reid Spencer [Thu, 1 Jul 2004 02:32:42 +0000 (02:32 +0000)]
Added a command page for the llvm-abcd tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14513 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix indentation to be 2 spaces.
Misha Brukman [Wed, 30 Jun 2004 22:11:03 +0000 (22:11 +0000)]
Fix indentation to be 2 spaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14512 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Coalesce the handy CALL* alias opcodes with the standard ones
Misha Brukman [Wed, 30 Jun 2004 22:00:45 +0000 (22:00 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14511 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Allow more registers to be allocated from the general register pool
Misha Brukman [Wed, 30 Jun 2004 21:54:50 +0000 (21:54 +0000)]
* Allow more registers to be allocated from the general register pool
* Define the condition register class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14510 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Inquire about the number of operands from the instruction directly
Misha Brukman [Wed, 30 Jun 2004 21:54:12 +0000 (21:54 +0000)]
* Inquire about the number of operands from the instruction directly
* Only check for a register if we are sure the instruction has one allocated

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14509 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agovisitSetCondInst() takes a parameter of type `SetCondInst'
Misha Brukman [Wed, 30 Jun 2004 21:47:40 +0000 (21:47 +0000)]
visitSetCondInst() takes a parameter of type `SetCondInst'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14508 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFixed the tutorial to indicate that we needed to use the llvm namespace.
Jonathan Manton [Wed, 30 Jun 2004 18:10:30 +0000 (18:10 +0000)]
Fixed the tutorial to indicate that we needed to use the llvm namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14507 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAlways assume a function may have calls because the printer may add `bl' to get
Misha Brukman [Wed, 30 Jun 2004 00:09:12 +0000 (00:09 +0000)]
Always assume a function may have calls because the printer may add `bl' to get
the PC in a code sequence for global variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14506 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Don't save LR when outputting globals: it's already saved on the stack once
Misha Brukman [Tue, 29 Jun 2004 23:45:05 +0000 (23:45 +0000)]
* 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14505 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Stop using BBNumbering, we don't really need it
Misha Brukman [Tue, 29 Jun 2004 23:40:57 +0000 (23:40 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14504 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix order and line length of fixed bugs.
Reid Spencer [Tue, 29 Jun 2004 23:39:24 +0000 (23:39 +0000)]
Fix order and line length of fixed bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14503 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSet up the prologue and epilogue to be more like the manual and GCC output.
Misha Brukman [Tue, 29 Jun 2004 23:38:26 +0000 (23:38 +0000)]
Set up the prologue and epilogue to be more like the manual and GCC output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14502 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Use LA instead of LWZ for LoadLoAddr
Misha Brukman [Tue, 29 Jun 2004 23:37:36 +0000 (23:37 +0000)]
* Use LA instead of LWZ for LoadLoAddr
* Specify the isCall bit and caller-save registers for some call instrs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14501 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoOnly allocate non-volatile registers R13-31 (for now).
Misha Brukman [Tue, 29 Jun 2004 23:35:32 +0000 (23:35 +0000)]
Only allocate non-volatile registers R13-31 (for now).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14500 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement verification feature.
Reid Spencer [Tue, 29 Jun 2004 23:34:27 +0000 (23:34 +0000)]
Implement verification feature.
Ensure output occurs even in the face of an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14499 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe analyzer code now lives in the bcreader library. The bcanalyzer lib
Reid Spencer [Tue, 29 Jun 2004 23:33:31 +0000 (23:33 +0000)]
The analyzer code now lives in the bcreader library. The bcanalyzer lib
is no more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14498 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoLower ConstantExpressions before the code generator.
Misha Brukman [Tue, 29 Jun 2004 23:33:20 +0000 (23:33 +0000)]
Lower ConstantExpressions before the code generator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14497 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove files no longer needed. ConstantReader and InstructionReader were
Reid Spencer [Tue, 29 Jun 2004 23:32:41 +0000 (23:32 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14496 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThis is a slimming down of the previous ReaderInternals.h that just
Reid Spencer [Tue, 29 Jun 2004 23:31:01 +0000 (23:31 +0000)]
This is a slimming down of the previous ReaderInternals.h that just
declares the BytecodeReader class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14495 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMAJOR REWRITE.
Reid Spencer [Tue, 29 Jun 2004 23:29:38 +0000 (23:29 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14494 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdjustments to allow Bytecode Reading to support the BytecodeHandler
Reid Spencer [Tue, 29 Jun 2004 23:24:14 +0000 (23:24 +0000)]
Adjustments to allow Bytecode Reading to support the BytecodeHandler
interface which is called by the reader if a BytecodeHandler is provided.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14493 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMerge Dumper.cpp and AnalyzerWrappers.cpp into this file. Also, adjust the
Reid Spencer [Tue, 29 Jun 2004 23:23:12 +0000 (23:23 +0000)]
Merge Dumper.cpp and AnalyzerWrappers.cpp into this file. Also, adjust the
dumping facility to produce useful output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14492 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAnalyzer moved to ../Reader directory.
Reid Spencer [Tue, 29 Jun 2004 23:21:53 +0000 (23:21 +0000)]
Analyzer moved to ../Reader directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14491 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove newly defunct Analyzer directory.
Reid Spencer [Tue, 29 Jun 2004 23:21:16 +0000 (23:21 +0000)]
Remove newly defunct Analyzer directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14490 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoProvide support for the BytecodeHandler interface which will be called by
Reid Spencer [Tue, 29 Jun 2004 23:20:03 +0000 (23:20 +0000)]
Provide support for the BytecodeHandler interface which will be called by
the bcreader if one is supplied to the bytecode reader's interface
functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14489 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix include guard
Reid Spencer [Tue, 29 Jun 2004 23:18:52 +0000 (23:18 +0000)]
Fix include guard
Adjust comments
Make handlers for constants provide useful information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14488 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdjust comments to match code.
Reid Spencer [Tue, 29 Jun 2004 23:17:34 +0000 (23:17 +0000)]
Adjust comments to match code.
Allow analysis to return the module created by the bcreader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14487 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix associativity of parameters to assert(): now it actually makes sense.
Misha Brukman [Tue, 29 Jun 2004 19:43:20 +0000 (19:43 +0000)]
Fix associativity of parameters to assert(): now it actually makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14483 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoConvert tabs to spaces.
Misha Brukman [Tue, 29 Jun 2004 19:28:53 +0000 (19:28 +0000)]
Convert tabs to spaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14482 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago* Fix saving LR in function prologue
Misha Brukman [Tue, 29 Jun 2004 17:14:42 +0000 (17:14 +0000)]
* Fix saving LR in function prologue
* Adjust epilogue restore sequence to match the PowerPC documentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14480 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAssembly syntax/comment fixes by Nate Begeman.
Misha Brukman [Tue, 29 Jun 2004 17:13:26 +0000 (17:13 +0000)]
Assembly syntax/comment fixes by Nate Begeman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14479 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRestoring this file.
Vikram S. Adve [Tue, 29 Jun 2004 14:20:27 +0000 (14:20 +0000)]
Restoring this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14478 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe code generator should work with unreachable blocks. If not, then this
Chris Lattner [Tue, 29 Jun 2004 07:20:16 +0000 (07:20 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14477 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoI believe that the code generator now properly handles dead basic blocks. If not,
Chris Lattner [Tue, 29 Jun 2004 07:17:12 +0000 (07:17 +0000)]
I believe that the code generator now properly handles dead basic blocks.  If not,
this is a bug, and should be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14476 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIn line with the previous patch, do not assert out if analyzing a dead basic block.
Chris Lattner [Tue, 29 Jun 2004 07:16:23 +0000 (07:16 +0000)]
In line with the previous patch, do not assert out if analyzing a dead basic block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14475 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDo not dereference end iterators. It hurts when you do that.
Chris Lattner [Tue, 29 Jun 2004 06:56:51 +0000 (06:56 +0000)]
Do not dereference end iterators.  It hurts when you do that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14474 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a regression from r1.224. In particular, codegen a cast from double ->
Chris Lattner [Tue, 29 Jun 2004 00:14:38 +0000 (00:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14473 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCan't print out machine code before it is constructed.
Misha Brukman [Mon, 28 Jun 2004 21:16:57 +0000 (21:16 +0000)]
Can't print out machine code before it is constructed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14472 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agodocument new pass
Chris Lattner [Mon, 28 Jun 2004 19:19:47 +0000 (19:19 +0000)]
document new pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14471 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix the assembly opcode on LOADLoAddr, courtesy of Nate Begeman.
Misha Brukman [Mon, 28 Jun 2004 18:27:08 +0000 (18:27 +0000)]
Fix the assembly opcode on LOADLoAddr, courtesy of Nate Begeman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14470 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSet isBranch and isTerminator bits on all branch instructions.
Misha Brukman [Mon, 28 Jun 2004 18:23:35 +0000 (18:23 +0000)]
Set isBranch and isTerminator bits on all branch instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14469 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix loading and storing PC-relative static variables, courtesy of Nate Begeman.
Misha Brukman [Mon, 28 Jun 2004 18:20:59 +0000 (18:20 +0000)]
Fix loading and storing PC-relative static variables, courtesy of Nate Begeman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14468 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNo need to generate a lazy-linking stub for internal functions, they can be
Misha Brukman [Mon, 28 Jun 2004 18:03:37 +0000 (18:03 +0000)]
No need to generate a lazy-linking stub for internal functions, they can be
resolved by the static linker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14467 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDo not set the `link' bit when branching to the first BB of a function, as it
Misha Brukman [Mon, 28 Jun 2004 17:57:40 +0000 (17:57 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14466 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a link to the CFE build instrs next to the CFE download instructions
Chris Lattner [Mon, 28 Jun 2004 17:14:01 +0000 (17:14 +0000)]
Add a link to the CFE build instrs next to the CFE download instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14465 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBuilding the C FE is a user-level process
Chris Lattner [Mon, 28 Jun 2004 17:11:10 +0000 (17:11 +0000)]
Building the C FE is a user-level process

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14464 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix spacing around function arguments.
Misha Brukman [Mon, 28 Jun 2004 15:53:27 +0000 (15:53 +0000)]
Fix spacing around function arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14463 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoInitial checkin of a simple mod/ref analysis for global variables. This is
Chris Lattner [Mon, 28 Jun 2004 06:33:13 +0000 (06:33 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14462 91177308-0d34-0410-b5e6-96231b3b80d8