oota-llvm.git
20 years agoInitial checking of the zlib library.
John Criswell [Fri, 6 Feb 2004 16:36:42 +0000 (16:36 +0000)]
Initial checking of the zlib library.

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

20 years agoAdd information about the piece I forgot to write: parameterized tablegen classes
Chris Lattner [Fri, 6 Feb 2004 06:37:00 +0000 (06:37 +0000)]
Add information about the piece I forgot to write: parameterized tablegen classes

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

20 years agoSyntax hilight examples and add note about emacs/vim mode files
Chris Lattner [Fri, 6 Feb 2004 06:04:25 +0000 (06:04 +0000)]
Syntax hilight examples and add note about emacs/vim mode files

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

20 years agoAdd a new document describing TableGen
Chris Lattner [Fri, 6 Feb 2004 05:42:53 +0000 (05:42 +0000)]
Add a new document describing TableGen

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

20 years agoPrint the record NAME not the record ADDRESS
Chris Lattner [Fri, 6 Feb 2004 03:19:17 +0000 (03:19 +0000)]
Print the record NAME not the record ADDRESS

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

20 years agoEliminate uneeded lookups by passing a Virt2PhysMap::iterator instead
Alkis Evlogimenos [Fri, 6 Feb 2004 03:15:40 +0000 (03:15 +0000)]
Eliminate uneeded lookups by passing a Virt2PhysMap::iterator instead
of the virtual register to certain functions.

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

20 years agoFix another dominator update bug. These bugs keep getting exposed because GCSE
Chris Lattner [Thu, 5 Feb 2004 23:20:59 +0000 (23:20 +0000)]
Fix another dominator update bug.  These bugs keep getting exposed because GCSE
keeps finding more code motion opportunities now that the dominators are correct!

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

20 years agoChange live interval representation. Machine instructions now have two
Alkis Evlogimenos [Thu, 5 Feb 2004 22:55:25 +0000 (22:55 +0000)]
Change live interval representation. Machine instructions now have two
slots each. As a concequence they get numbered as 0, 2, 4 and so
on. The first slot is used for operand uses and the second for
defs. Here's an example:

0: A = ...
2: B = ...
4: C = A + B ;; last use of A

The live intervals should look like:

A = [1, 5)
B = [3, x)
C = [5, y)

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

20 years agoFix bug updating dominators
Chris Lattner [Thu, 5 Feb 2004 22:33:26 +0000 (22:33 +0000)]
Fix bug updating dominators

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

20 years agoAdd debug output
Chris Lattner [Thu, 5 Feb 2004 22:33:19 +0000 (22:33 +0000)]
Add debug output

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

20 years agoBug fixed
Chris Lattner [Thu, 5 Feb 2004 21:16:42 +0000 (21:16 +0000)]
Bug fixed

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

20 years agoFix PR223: Loopsimplify incorrectly updates dominator information
Chris Lattner [Thu, 5 Feb 2004 21:12:24 +0000 (21:12 +0000)]
Fix PR223: Loopsimplify incorrectly updates dominator information

The problem is that the dominator update code didn't "realize" that it's
possible for the newly inserted basic block to dominate anything.  Because
it IS possible, stuff was getting updated wrong.

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

20 years agoNew testcase for PR223: Loopsimplify incorrectly updates dominator information
Chris Lattner [Thu, 5 Feb 2004 21:11:38 +0000 (21:11 +0000)]
New testcase for PR223: Loopsimplify incorrectly updates dominator information

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

20 years agoWe don't need to scan the blocks that we are live-in on every
Alkis Evlogimenos [Thu, 5 Feb 2004 20:45:40 +0000 (20:45 +0000)]
We don't need to scan the blocks that we are live-in on every
access. Rather we only have to do it on the creation of the interval.

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

20 years agos/gcse/scalarrepl
Chris Lattner [Thu, 5 Feb 2004 17:31:37 +0000 (17:31 +0000)]
s/gcse/scalarrepl

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

20 years agoIn a "seeing the forest through the trees" kinda situation, I realized that a
Chris Lattner [Thu, 5 Feb 2004 17:20:00 +0000 (17:20 +0000)]
In a "seeing the forest through the trees" kinda situation, I realized that a
complete rewrite of load-vn will make it a bit faster.  This changes speeds up
the gcse pass (which uses load-vn) from 25.45s to 0.42s on the testcase in
PR209.

I've also verified that this gives the exact same results as the old one.

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

20 years agoThis is a big diff with no functionality change. We just reorder some code,
Chris Lattner [Thu, 5 Feb 2004 05:56:23 +0000 (05:56 +0000)]
This is a big diff with no functionality change.  We just reorder some code,
which causes big reindentation.  While I'm at it, I fix the fixme by removing
some dead code.

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

20 years agofinegrainify namespacification
Chris Lattner [Thu, 5 Feb 2004 05:51:40 +0000 (05:51 +0000)]
finegrainify namespacification

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

20 years agoAdded missing include.
Tanya Lattner [Thu, 5 Feb 2004 05:04:39 +0000 (05:04 +0000)]
Added missing include.

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

20 years agoFixed Chris' typo.
Tanya Lattner [Thu, 5 Feb 2004 04:45:21 +0000 (04:45 +0000)]
Fixed Chris' typo.

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

20 years agoqoi bug fixed
Chris Lattner [Thu, 5 Feb 2004 00:48:41 +0000 (00:48 +0000)]
qoi bug fixed

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

20 years agoImplement optimizations for handling large basic blocks.
Chris Lattner [Thu, 5 Feb 2004 00:36:43 +0000 (00:36 +0000)]
Implement optimizations for handling large basic blocks.

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

20 years agoModify the two address instruction pass to remove the duplicate
Alkis Evlogimenos [Wed, 4 Feb 2004 22:17:40 +0000 (22:17 +0000)]
Modify the two address instruction pass to remove the duplicate
operand of the instruction and thus simplify the register allocation.

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

20 years agoMinor speedup, don't query ValueMap each time through the loop
Chris Lattner [Wed, 4 Feb 2004 21:44:26 +0000 (21:44 +0000)]
Minor speedup, don't query ValueMap each time through the loop

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

20 years agoAlways replace instead of appending when creating archive files. It may be
Brian Gaeke [Wed, 4 Feb 2004 21:41:23 +0000 (21:41 +0000)]
Always replace instead of appending when creating archive files. It may be
slightly slower, but I think we can handle it, especially if it means
BytecodeLibs are correctly regenerated.

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

20 years agoInclude <iosfwd> and <string> instead of <iostream>.
Brian Gaeke [Wed, 4 Feb 2004 21:41:10 +0000 (21:41 +0000)]
Include <iosfwd> and <string> instead of <iostream>.
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.

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

20 years agoTake away the default iostream argument of createMachineFunctionPrinterPass(),
Brian Gaeke [Wed, 4 Feb 2004 21:41:01 +0000 (21:41 +0000)]
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.

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

20 years agoClean out DESTLIBBYTECODE when making clean in runtime.
Brian Gaeke [Wed, 4 Feb 2004 21:40:49 +0000 (21:40 +0000)]
Clean out DESTLIBBYTECODE when making clean in runtime.

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

20 years agoTwo changes:
Chris Lattner [Wed, 4 Feb 2004 21:33:42 +0000 (21:33 +0000)]
Two changes:
  1. Don't scan to the end of alloca instructions in the caller function to
     insert inlined allocas, just insert at the top.  This saves a lot of
     time inlining into functions with a lot of allocas.
  2. Use splice to move the alloca instructions over, instead of remove/insert.
     This allows us to transfer a block at a time, and eliminates a bunch of
     silly symbol table manipulations.

This speeds up the inliner on the testcase in PR209 from 1.73s -> 1.04s (67%)

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

20 years agoIMULri* instructions do not require their first two registers operands
Alkis Evlogimenos [Wed, 4 Feb 2004 17:21:04 +0000 (17:21 +0000)]
IMULri* instructions do not require their first two registers operands
to be the same (IOW they are not two address instructions).

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

20 years agoOptimize the case where we are inlining a function that contains only one basic block,
Chris Lattner [Wed, 4 Feb 2004 04:17:06 +0000 (04:17 +0000)]
Optimize the case where we are inlining a function that contains only one basic block,
and that basic block ends with a return instruction.  In this case, we can just splice
the cloned "body" of the function directly into the source basic block, avoiding a lot
of rearrangement and splitBasicBlock's linear scan over the split block.  This speeds up
the inliner on the testcase in PR209 from 2.3s to 1.7s, a 35% reduction.

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

20 years agoCheck in header file I forgot before.
Chris Lattner [Wed, 4 Feb 2004 03:59:08 +0000 (03:59 +0000)]
Check in header file I forgot before.

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

20 years agoAdjust to the new BasicBlock ctor, which requires a function parameter
Chris Lattner [Wed, 4 Feb 2004 03:58:28 +0000 (03:58 +0000)]
Adjust to the new BasicBlock ctor, which requires a function parameter

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

20 years agoAdjust to the new BB ctor
Chris Lattner [Wed, 4 Feb 2004 03:57:50 +0000 (03:57 +0000)]
Adjust to the new BB ctor

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

20 years agoDelete the BasicBlock ctor that only takes a BasicBlock to insert before. This
Chris Lattner [Wed, 4 Feb 2004 03:57:34 +0000 (03:57 +0000)]
Delete the BasicBlock ctor that only takes a BasicBlock to insert before.  This
fails when the basic block points to the function->end.  Instead, require that
the client pass in the function AND the basicblock to insert into.

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

20 years agoRemove unneeded code now that splitBasicBlock does the "right thing"
Chris Lattner [Wed, 4 Feb 2004 03:21:51 +0000 (03:21 +0000)]
Remove unneeded code now that splitBasicBlock does the "right thing"

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

20 years agoWhen splitting a basic block, insert the new half immediately after the first
Chris Lattner [Wed, 4 Feb 2004 03:21:31 +0000 (03:21 +0000)]
When splitting a basic block, insert the new half immediately after the first
half.

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

20 years agoMore refactoring. Move alloca instructions and handle invoke instructions
Chris Lattner [Wed, 4 Feb 2004 02:51:48 +0000 (02:51 +0000)]
More refactoring.  Move alloca instructions and handle invoke instructions
before we delete the original call site, allowing slight simplifications of
code, but nothing exciting.

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

20 years agoMove the cloning of the function body much earlier in the inlinefunction
Chris Lattner [Wed, 4 Feb 2004 01:41:09 +0000 (01:41 +0000)]
Move the cloning of the function body much earlier in the inlinefunction
process.  The only optimization we did so far is to avoid creating a
PHI node, then immediately destroying it in the common case where the
callee has one return statement.  Instead, we just don't create the return
value.  This has no noticable performance impact, but paves the way for
future improvements.

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

20 years agoGive CloneBasicBlock an optional function argument to specify which function
Chris Lattner [Wed, 4 Feb 2004 01:19:43 +0000 (01:19 +0000)]
Give CloneBasicBlock an optional function argument to specify which function
to add the cloned block to.  This allows the block to be added to the function
immediately, and all of the instructions to be immediately added to the function
symbol table, which speeds up the inliner from 3.7 -> 3.38s on the PR209.

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

20 years agoIf changing a parent, don't add then remove the object from the leak detector
Chris Lattner [Wed, 4 Feb 2004 01:06:38 +0000 (01:06 +0000)]
If changing a parent, don't add then remove the object from the leak detector

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

20 years agoIn BasicBlock::splitBasicBlock, just use islist::splice to move the instructions,
Chris Lattner [Tue, 3 Feb 2004 23:11:21 +0000 (23:11 +0000)]
In BasicBlock::splitBasicBlock, just use islist::splice to move the instructions,
instead of a loop that is really inefficient with large basic blocks.

This speeds up the inliner pass on the testcase in PR209 from 13.8s to 2.24s
which still isn't exactly speedy, but is a lot better.  :)

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

20 years agoRevised version of a patch for PR222 that works with my version of gmake.
Chris Lattner [Tue, 3 Feb 2004 23:05:24 +0000 (23:05 +0000)]
Revised version of a patch for PR222 that works with my version of gmake.

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

20 years agoBug fixed
Chris Lattner [Tue, 3 Feb 2004 22:59:56 +0000 (22:59 +0000)]
Bug fixed

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

20 years agoApply Michael Kahl's patch to fix the 'make tools-only' target when OBJDIR != SRCDIR.
Chris Lattner [Tue, 3 Feb 2004 22:56:40 +0000 (22:56 +0000)]
Apply Michael Kahl's patch to fix the 'make tools-only' target when OBJDIR != SRCDIR.

See PR222.

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

20 years agoBunch up all locally used allocas by the block they are allocated in, and
Chris Lattner [Tue, 3 Feb 2004 22:34:12 +0000 (22:34 +0000)]
Bunch up all locally used allocas by the block they are allocated in, and
process them all as a group.  This speeds up SRoA/mem2reg from 28.46s to
0.62s on the testcase from PR209.

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

20 years agoHandle extremely trivial cases extremely efficiently. This speeds up
Chris Lattner [Tue, 3 Feb 2004 22:00:33 +0000 (22:00 +0000)]
Handle extremely trivial cases extremely efficiently.  This speeds up
SRoA/mem2reg from 41.2s to 27.5s on the testcase in PR209.

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

20 years agoGenerate ftst instructions for comparison against zero
Chris Lattner [Tue, 3 Feb 2004 18:54:04 +0000 (18:54 +0000)]
Generate ftst instructions for comparison against zero

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

20 years agobug fixed
Chris Lattner [Tue, 3 Feb 2004 08:03:41 +0000 (08:03 +0000)]
bug fixed

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

20 years agoAdd the ftst instruction
Chris Lattner [Tue, 3 Feb 2004 07:27:50 +0000 (07:27 +0000)]
Add the ftst instruction

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

20 years agoAdd support for one argument OneArgFP instructions
Chris Lattner [Tue, 3 Feb 2004 07:27:34 +0000 (07:27 +0000)]
Add support for one argument OneArgFP instructions

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

20 years agoWhen an instruction like: A += B had both A and B virtual registers
Alkis Evlogimenos [Tue, 3 Feb 2004 01:13:07 +0000 (01:13 +0000)]
When an instruction like: A += B had both A and B virtual registers
spilled, A was loaded from its stack location twice. This fixes the bug.

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

20 years agoRevert changes. Will implement this using a different set of primitives
Alkis Evlogimenos [Mon, 2 Feb 2004 23:08:58 +0000 (23:08 +0000)]
Revert changes. Will implement this using a different set of primitives

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

20 years agoFix debugging output.
Alkis Evlogimenos [Mon, 2 Feb 2004 22:00:32 +0000 (22:00 +0000)]
Fix debugging output.

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

20 years agoCorrectly update def/use information for modified machine operands.
Alkis Evlogimenos [Mon, 2 Feb 2004 21:56:40 +0000 (21:56 +0000)]
Correctly update def/use information for modified machine operands.

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

20 years agoAdd MachineOperand::setDef() and MachineOperand::setUse() so that the
Alkis Evlogimenos [Mon, 2 Feb 2004 21:55:18 +0000 (21:55 +0000)]
Add MachineOperand::setDef() and MachineOperand::setUse() so that the
TwoAddressInstructionPass can correctly update use/def information.

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

20 years agoShould be more careful. The previously applied change made all counts
Alkis Evlogimenos [Mon, 2 Feb 2004 20:29:57 +0000 (20:29 +0000)]
Should be more careful. The previously applied change made all counts
outside of loops = 0.

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

20 years agoFloating point negates are -0.0 - X, not 0.0 - X
Chris Lattner [Mon, 2 Feb 2004 20:21:29 +0000 (20:21 +0000)]
Floating point negates are -0.0 - X, not 0.0 - X

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

20 years agoDisable (x - (y - z)) => (x + (z - y)) optimization for floating point.
Chris Lattner [Mon, 2 Feb 2004 20:09:56 +0000 (20:09 +0000)]
Disable (x - (y - z)) => (x + (z - y)) optimization for floating point.

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

20 years agoUpdate comment
Chris Lattner [Mon, 2 Feb 2004 20:09:22 +0000 (20:09 +0000)]
Update comment

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

20 years agoNo need to declare implicit uses/defs of ST0
Chris Lattner [Mon, 2 Feb 2004 19:57:45 +0000 (19:57 +0000)]
No need to declare implicit uses/defs of ST0

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

20 years agoBug fixed
Chris Lattner [Mon, 2 Feb 2004 19:40:06 +0000 (19:40 +0000)]
Bug fixed

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

20 years agoMake deadarghaX0r warning louder.
Brian Gaeke [Mon, 2 Feb 2004 19:32:27 +0000 (19:32 +0000)]
Make deadarghaX0r warning louder.

(I just love typing haX0r.   haX0r haX0r haX0r.)

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

20 years agoGenerate the fchs instruction to negate a floating point number
Chris Lattner [Mon, 2 Feb 2004 19:31:38 +0000 (19:31 +0000)]
Generate the fchs instruction to negate a floating point number

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

20 years agoAdd support for OneArgFPRW instructions, fix a couple of typeos
Chris Lattner [Mon, 2 Feb 2004 19:23:15 +0000 (19:23 +0000)]
Add support for OneArgFPRW instructions, fix a couple of typeos

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

20 years agoInclude PowerPC.h. Flesh out the stub versions of addPassesToEmitAssembly()
Brian Gaeke [Mon, 2 Feb 2004 19:06:36 +0000 (19:06 +0000)]
Include PowerPC.h.  Flesh out the stub versions of addPassesToEmitAssembly()
and addPassesToJITCompile() slightly.

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

20 years agoAdd a -march=powerpc option. Automatically select it if this looks like a
Brian Gaeke [Mon, 2 Feb 2004 19:06:12 +0000 (19:06 +0000)]
Add a -march=powerpc option. Automatically select it if this looks like a
big-endian, 32-bit module, or if __ppc__, __POWERPC__, or __APPLE__ are
defined.

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

20 years agoLink in the PowerPC back-end.
Brian Gaeke [Mon, 2 Feb 2004 19:05:52 +0000 (19:05 +0000)]
Link in the PowerPC back-end.

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

20 years agoAdd comments describing how you would add prototypes for factory methods for
Brian Gaeke [Mon, 2 Feb 2004 19:05:28 +0000 (19:05 +0000)]
Add comments describing how you would add prototypes for factory methods for
PowerPC-specific passes here.

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

20 years agoAdd prototype for llvm::allocatePowerPCTargetMachine().
Brian Gaeke [Mon, 2 Feb 2004 19:05:08 +0000 (19:05 +0000)]
Add prototype for llvm::allocatePowerPCTargetMachine().

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

20 years agoCodegen -0.0 correctly. Do not use fldz! This is another -0.0 == +0.0 problem,...
Chris Lattner [Mon, 2 Feb 2004 18:56:30 +0000 (18:56 +0000)]
Codegen -0.0 correctly.  Do not use fldz!  This is another -0.0 == +0.0 problem, arg.

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

20 years agoCorrect the method I just added to actually return false sometimes
Chris Lattner [Mon, 2 Feb 2004 18:53:04 +0000 (18:53 +0000)]
Correct the method I just added to actually return false sometimes

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

20 years agoAdd a new method to ConstantFP
Chris Lattner [Mon, 2 Feb 2004 18:40:29 +0000 (18:40 +0000)]
Add a new method to ConstantFP

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

20 years agoBug fixed
Chris Lattner [Mon, 2 Feb 2004 17:48:56 +0000 (17:48 +0000)]
Bug fixed

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

20 years agoCreate an object for tracking physical register usage. This will look
Alkis Evlogimenos [Mon, 2 Feb 2004 07:30:36 +0000 (07:30 +0000)]
Create an object for tracking physical register usage. This will look
much better when I get rid of the reserved registers.

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

20 years agoBug fixed
Chris Lattner [Sun, 1 Feb 2004 22:52:12 +0000 (22:52 +0000)]
Bug fixed

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

20 years agoSecond half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero...
Chris Lattner [Sun, 1 Feb 2004 22:49:04 +0000 (22:49 +0000)]
Second half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx.
Basically we store floating point values as their integral components, instead of relying
on the semantics of floating point < to differentiate between values.  This is likely to
make the map search be faster anyway.

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

20 years agoThe first half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx
Chris Lattner [Sun, 1 Feb 2004 22:48:09 +0000 (22:48 +0000)]
The first half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx

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

20 years agoAdd another test
Chris Lattner [Sun, 1 Feb 2004 22:47:16 +0000 (22:47 +0000)]
Add another test

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

20 years agoChange weight array into a vector and make it as big as the number of
Alkis Evlogimenos [Sun, 1 Feb 2004 20:13:26 +0000 (20:13 +0000)]
Change weight array into a vector and make it as big as the number of
registers (not as the max number of registers).

Change toSpill from a std::set into a std::vector<bool>.

Use the reverse iterator adapter to do a reverse scan of allocatable
registers.

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

20 years agoUse std::map::count() instead of std::map::find() != std::map::end()
Alkis Evlogimenos [Sun, 1 Feb 2004 18:39:53 +0000 (18:39 +0000)]
Use std::map::count() instead of std::map::find() != std::map::end()
where appropriate.

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

20 years agoNew testcase for PR218
Chris Lattner [Sun, 1 Feb 2004 18:16:06 +0000 (18:16 +0000)]
New testcase for PR218

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

20 years agoAdd MRegisterInfo::getNumRegs().
Alkis Evlogimenos [Sun, 1 Feb 2004 17:14:20 +0000 (17:14 +0000)]
Add MRegisterInfo::getNumRegs().

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

20 years agoChange string for joined intervals.
Alkis Evlogimenos [Sun, 1 Feb 2004 16:13:05 +0000 (16:13 +0000)]
Change string for joined intervals.

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

20 years agoFpMOV is also a move instruction.
Alkis Evlogimenos [Sun, 1 Feb 2004 08:22:16 +0000 (08:22 +0000)]
FpMOV is also a move instruction.

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

20 years agoChange xor to ^.
Alkis Evlogimenos [Sun, 1 Feb 2004 08:19:25 +0000 (08:19 +0000)]
Change xor to ^.

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

20 years agoNow that tailduplication does not bork SSA form, run mem2reg earlier in gccas.
Chris Lattner [Sun, 1 Feb 2004 07:24:53 +0000 (07:24 +0000)]
Now that tailduplication does not bork SSA form, run mem2reg earlier in gccas.
This tremendously improves the code generated by the LLVM optimizer, primarily
by making the inliner more aggressive.  For example, it improves the stepanov
benchmark from 55.56 mega-additions/sec to 98.04 Ma/s.  It also improves the
oopack/iterator benchmark from 338.3MFLOPS/s to 1103.4MFLOPS/s.  Less noteworthy,
it improves oopack/matrix from 573 -> 641 MFLOPS/s.

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

20 years agoDisable tail duplication in any "hard" cases, where it might break SSA form.
Chris Lattner [Sun, 1 Feb 2004 06:32:28 +0000 (06:32 +0000)]
Disable tail duplication in any "hard" cases, where it might break SSA form.

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

20 years agoFix a bug in a recent checkin
Chris Lattner [Sun, 1 Feb 2004 05:25:07 +0000 (05:25 +0000)]
Fix a bug in a recent checkin

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

20 years agoFix the count of the number of instructions removed
Chris Lattner [Sun, 1 Feb 2004 05:15:07 +0000 (05:15 +0000)]
Fix the count of the number of instructions removed

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

20 years agoMissed one silly assert :-)
Alkis Evlogimenos [Sun, 1 Feb 2004 02:21:31 +0000 (02:21 +0000)]
Missed one silly assert :-)

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

20 years agoSimplify joinIntervals() code.
Alkis Evlogimenos [Sun, 1 Feb 2004 02:18:31 +0000 (02:18 +0000)]
Simplify joinIntervals() code.

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

20 years agoRemove all of the annoying statistics now that I'm finished (for the near
Chris Lattner [Sun, 1 Feb 2004 01:50:31 +0000 (01:50 +0000)]
Remove all of the annoying statistics now that I'm finished (for the near
term) working on bytecode size stuff.

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

20 years agoUse MRegisterInfo::isPhysicalRegister and
Alkis Evlogimenos [Sun, 1 Feb 2004 01:27:01 +0000 (01:27 +0000)]
Use MRegisterInfo::isPhysicalRegister and
MRegisterInfo::isVirtualRegister.

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

20 years agoFix a crasher bug in my constant folding rewrite
Chris Lattner [Sun, 1 Feb 2004 01:23:19 +0000 (01:23 +0000)]
Fix a crasher bug in my constant folding rewrite

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

20 years agoPrint an error message if we can't materialize the bytecode file
Chris Lattner [Sun, 1 Feb 2004 01:07:25 +0000 (01:07 +0000)]
Print an error message if we can't materialize the bytecode file

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

20 years agoAdd comments
Chris Lattner [Sun, 1 Feb 2004 00:32:48 +0000 (00:32 +0000)]
Add comments

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

20 years agoPrint an error message if there is an error materialize the bc file.
Chris Lattner [Sun, 1 Feb 2004 00:32:35 +0000 (00:32 +0000)]
Print an error message if there is an error materialize the bc file.

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

20 years agoApply final part of Chris' patch.
Alkis Evlogimenos [Sat, 31 Jan 2004 23:48:47 +0000 (23:48 +0000)]
Apply final part of Chris' patch.

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

20 years agoBe a little smarter on the way we handle physical register defs.
Alkis Evlogimenos [Sat, 31 Jan 2004 23:13:30 +0000 (23:13 +0000)]
Be a little smarter on the way we handle physical register defs.

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