oota-llvm.git
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

20 years agoFinegrainify namespacification, use new MRegisterInfo::isVirtualRegister
Chris Lattner [Sat, 31 Jan 2004 21:27:19 +0000 (21:27 +0000)]
Finegrainify namespacification, use new MRegisterInfo::isVirtualRegister
method

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

20 years agoFix, correctly this time, the computation of the return value
Chris Lattner [Sat, 31 Jan 2004 21:21:43 +0000 (21:21 +0000)]
Fix, correctly this time, the computation of the return value
Fix a spello
Tighten up the assertion checking

No functionality changes.

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

20 years ago* Fix incorrect computation of the runOnMachineFunction return value
Chris Lattner [Sat, 31 Jan 2004 21:14:04 +0000 (21:14 +0000)]
* Fix incorrect computation of the runOnMachineFunction return value
* Turn a bunch of instance variables into automatic variables

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

20 years agoRemove unneeded #includes
Chris Lattner [Sat, 31 Jan 2004 21:07:15 +0000 (21:07 +0000)]
Remove unneeded #includes
Move Passes.h (which defines the interface to this file) to the top.
Move statistics to the top of the file.
Add a comment

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

20 years agoAvoid referencing deleted DSgraphs when merging an SCC into a larger SCC. This
Chris Lattner [Sat, 31 Jan 2004 21:02:18 +0000 (21:02 +0000)]
Avoid referencing deleted DSgraphs when merging an SCC into a larger SCC.  This
fixes the crash in 176.gcc.

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

20 years agoMerge safe parts from last night's buggy commit. These do not break
Alkis Evlogimenos [Sat, 31 Jan 2004 19:59:32 +0000 (19:59 +0000)]
Merge safe parts from last night's buggy commit. These do not break
any test cases :-)

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

20 years agoAdd two static methods to avoid having client code explicitly compare against
Chris Lattner [Sat, 31 Jan 2004 19:57:11 +0000 (19:57 +0000)]
Add two static methods to avoid having client code explicitly compare against
FirstVirtualRegister

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

20 years agoOptimize liveAt() and overlaps(). We now use a binary search instead
Alkis Evlogimenos [Sat, 31 Jan 2004 16:54:54 +0000 (16:54 +0000)]
Optimize liveAt() and overlaps(). We now use a binary search instead
of a linear search to find the first range for comparisons. This cuts
down the linear scan register allocator running time by a factor of 3
in 254.perlbmk and by a factor of 2.2 in 176.gcc.

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

20 years agoRevert last night's changes as they broke some tests. Will remerge parts of the patch.
Alkis Evlogimenos [Sat, 31 Jan 2004 14:37:41 +0000 (14:37 +0000)]
Revert last night's changes as they broke some tests. Will remerge parts of the patch.

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

20 years agoSeveral performance enhancements and cleanups from Chris.
Alkis Evlogimenos [Sat, 31 Jan 2004 04:56:07 +0000 (04:56 +0000)]
Several performance enhancements and cleanups from Chris.

Simplification of LiveIntervals::Interval::overlaps() and addition of
examples to overlaps() and liveAt() to make them clearer.

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

20 years agoFix thinko
Chris Lattner [Fri, 30 Jan 2004 22:48:02 +0000 (22:48 +0000)]
Fix thinko

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

20 years agoAdd some comments sketching out how this is to work eventually.
Chris Lattner [Fri, 30 Jan 2004 22:25:18 +0000 (22:25 +0000)]
Add some comments sketching out how this is to work eventually.

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

20 years agoAdd a new flag, which is only used for symmetry.
Chris Lattner [Fri, 30 Jan 2004 22:24:18 +0000 (22:24 +0000)]
Add a new flag, which is only used for symmetry.

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

20 years agoForward method request to chained aa implementation
Chris Lattner [Fri, 30 Jan 2004 22:20:55 +0000 (22:20 +0000)]
Forward method request to chained aa implementation

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

20 years agoNew testcase for better mod/ref information that basicaa can provide
Chris Lattner [Fri, 30 Jan 2004 22:18:47 +0000 (22:18 +0000)]
New testcase for better mod/ref information that basicaa can provide

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

20 years agoImplement the pointsToConstantMemory() method.
Chris Lattner [Fri, 30 Jan 2004 22:17:24 +0000 (22:17 +0000)]
Implement the pointsToConstantMemory() method.

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

20 years agoImprove mod/ref information based on the pointsToConstantMemory method.
Chris Lattner [Fri, 30 Jan 2004 22:16:42 +0000 (22:16 +0000)]
Improve mod/ref information based on the pointsToConstantMemory method.

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

20 years agoAdd a new pointsToConstantMemory method to the AliasAnalysis interface
Chris Lattner [Fri, 30 Jan 2004 22:15:41 +0000 (22:15 +0000)]
Add a new pointsToConstantMemory method to the AliasAnalysis interface
which can be implemented to improve the quality of mod-ref information.

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

20 years agoAdd (currently disabled) support to the instruction selector to only insert
Chris Lattner [Fri, 30 Jan 2004 22:13:44 +0000 (22:13 +0000)]
Add (currently disabled) support to the instruction selector to only insert
FP_REG_KILL instructions at the end of blocks involved with critical edges.

Fix a bug where FP_REG_KILL instructions weren't inserted in fall through
unconditional branches.  Perhaps this will fix some linscan problems?

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

20 years agoFinegrainify namespacification
Chris Lattner [Fri, 30 Jan 2004 22:08:53 +0000 (22:08 +0000)]
Finegrainify namespacification
Implement LiveVariables::getIndexMachineBasicBlock

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

20 years agoAdd a new lazily constructed mapping from Idx's the MBB they represent
Chris Lattner [Fri, 30 Jan 2004 22:08:09 +0000 (22:08 +0000)]
Add a new lazily constructed mapping from Idx's the MBB they represent

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

20 years agoGive clients of MachineFunctionPrinter the ability to specify a banner and
Brian Gaeke [Fri, 30 Jan 2004 21:53:46 +0000 (21:53 +0000)]
Give clients of MachineFunctionPrinter the ability to specify a banner and
choose an ostream.

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

20 years agoOrder #includes alphabetically, per style guide.
Misha Brukman [Fri, 30 Jan 2004 17:26:24 +0000 (17:26 +0000)]
Order #includes alphabetically, per style guide.

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

20 years agoDoxygenify comments.
Misha Brukman [Fri, 30 Jan 2004 17:22:50 +0000 (17:22 +0000)]
Doxygenify comments.

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

20 years agoFix a bug aflicting 265.gap
Chris Lattner [Thu, 29 Jan 2004 08:36:22 +0000 (08:36 +0000)]
Fix a bug aflicting 265.gap

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

20 years agoMinor bugfixes
Chris Lattner [Thu, 29 Jan 2004 03:32:15 +0000 (03:32 +0000)]
Minor bugfixes

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

20 years agoI think this is a more robust fix for the Solaris wchar problems (PR206).
Brian Gaeke [Wed, 28 Jan 2004 20:54:41 +0000 (20:54 +0000)]
I think this is a more robust fix for the Solaris wchar problems (PR206).

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

20 years agoHyphenate `target-dependent'
Misha Brukman [Wed, 28 Jan 2004 20:43:01 +0000 (20:43 +0000)]
Hyphenate `target-dependent'

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

20 years agoAdd a new (static inline) std::ostream& << AllocInfo& method. Use it.
Brian Gaeke [Wed, 28 Jan 2004 19:05:43 +0000 (19:05 +0000)]
Add a new (static inline) std::ostream& << AllocInfo& method. Use it.

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

20 years agoRename DSGraph::ScalarMapTy -> DSScalarMap
Chris Lattner [Wed, 28 Jan 2004 09:15:42 +0000 (09:15 +0000)]
Rename DSGraph::ScalarMapTy -> DSScalarMap

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

20 years agoFix a bug
Chris Lattner [Wed, 28 Jan 2004 03:31:34 +0000 (03:31 +0000)]
Fix a bug

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

20 years agoEliminate the call to removeTriviallyDeadNodes from updateFromGlobals graph,
Chris Lattner [Wed, 28 Jan 2004 03:24:41 +0000 (03:24 +0000)]
Eliminate the call to removeTriviallyDeadNodes from updateFromGlobals graph,
moving it to the start of removeDeadNodes.  This speeds up DSA by 2s on perlbmk
from 41s

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

20 years agoIn the TD pass, iterate over globals directly instead of through the whole scalar
Chris Lattner [Wed, 28 Jan 2004 03:12:48 +0000 (03:12 +0000)]
In the TD pass, iterate over globals directly instead of through the whole scalar
map.  This saves 5s in the TD pass, from 22->17s on perlbmk

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

20 years agoIn the TD pass, don't iterate over the scalar map to find the globals, iterate over
Chris Lattner [Wed, 28 Jan 2004 03:07:30 +0000 (03:07 +0000)]
In the TD pass, don't iterate over the scalar map to find the globals, iterate over
the globals directly.  This doesn't save any substantial time, however, because the
globals graph only contains globals!

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