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

20 years agoIn updateFromGlobalsGraph, instead of iterating over all of the scalars in the
Chris Lattner [Wed, 28 Jan 2004 03:03:06 +0000 (03:03 +0000)]
In updateFromGlobalsGraph, instead of iterating over all of the scalars in the
function to find the globals, iterate over all of the globals directly.  This
speeds the function up from 14s to 6.3s on perlbmk, reducing DSA time from
53->46s.

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

20 years agoKeep track of all of the globals inserted into the scalar map
Chris Lattner [Wed, 28 Jan 2004 03:01:22 +0000 (03:01 +0000)]
Keep track of all of the globals inserted into the scalar map

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

20 years agoPull the ScalarMap out into something that is more structured than what we had
Chris Lattner [Wed, 28 Jan 2004 02:42:12 +0000 (02:42 +0000)]
Pull the ScalarMap out into something that is more structured than what we had
before.  This allows us to have a place to implement optimizations in a
structured way.

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

20 years agoMinor tweaks, eliminate useless integer pruning optimziation, turn on
Chris Lattner [Wed, 28 Jan 2004 02:41:32 +0000 (02:41 +0000)]
Minor tweaks, eliminate useless integer pruning optimziation, turn on
timers by default

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

20 years agoFurther reduce the number of nodes cloned with getClonedNH, using merge instead.
Chris Lattner [Wed, 28 Jan 2004 02:11:49 +0000 (02:11 +0000)]
Further reduce the number of nodes cloned with getClonedNH, using merge instead.
This reduces the number of nodes allocated, then immediately merged and DNE'd
from 2193852 to 1298049.  unfortunately this only speeds DSA up by ~1.5s (of
53s), because it's spending most of its time waddling through the scalar map :(

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

20 years agoAdd a timer, fix a minor bug.
Chris Lattner [Wed, 28 Jan 2004 02:05:05 +0000 (02:05 +0000)]
Add a timer, fix a minor bug.

Also, use RC::merge when possible, reducing the number of nodes allocated, then immediately merged away from 2985444 to 2193852 on perlbmk.

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

20 years agoAnother bugfix, disable "spurious" output.
Chris Lattner [Wed, 28 Jan 2004 01:19:52 +0000 (01:19 +0000)]
Another bugfix, disable "spurious" output.

You gotta love spurious

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

20 years agofix bug in previous checkin
Chris Lattner [Tue, 27 Jan 2004 22:54:56 +0000 (22:54 +0000)]
fix bug in previous checkin

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

20 years ago* Add a new commandline argument to control the "global roots hack". Default
Chris Lattner [Tue, 27 Jan 2004 22:03:40 +0000 (22:03 +0000)]
* Add a new commandline argument to control the "global roots hack".  Default
  it to be off.  If it looks like it's completely unnecessary after testing, I
  will remove it completely (which is the hope).
* Callers of the DSNode "copy ctor" can not choose to not copy links.
* Make node collapsing not create a garbage node in some cases, avoiding a
  memory allocation, and a subsequent DNE.
* When merging types, allow two functions of different types to be merged
  without collapsing.
* Use DSNodeHandle::isNull more often instead of DSNodeHandle::getNode() == 0,
  as it is much more efficient.
*** Implement the new, more efficient reachability cloner class
    In addition to only cloning nodes that are reachable from interesting
    roots, this also fixes the huge inefficiency we had where we cloned lots
    of nodes, only to merge them away immediately after they were cloned.
    Now we only actually allocate a node if there isn't one to merge it into.
* Eliminate the now-obsolete cloneReachable* and clonePartiallyInto methods
* Rewrite updateFromGlobalsGraph to use the reachability cloner
* Rewrite mergeInGraph to use the reachability cloner
* Disable the scalar map scanning code in removeTriviallyDeadNodes.  In large
  SCC's, this is extremely expensive.  We need a better data structure for the
  scalar map, because we really want to scan the unique node handles, not ALL
  of the scalars.
* Remove the incorrect SANER_CODE_FOR_CHECKING_IF_ALL_REFERRERS_ARE_FROM_SCALARMAP code.
* Move the code for eliminating integer nodes from the trivially dead
  eliminator to the dead node eliminator.
* removeDeadNodes no longer uses removeTriviallyDeadNodes, as it contains a
  superset of the node removal power.
* Only futz around with the globals graph in removeDeadNodes if it is modified

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

20 years agoRewrite to use the reachability cloner interface. Also, make this much more
Chris Lattner [Tue, 27 Jan 2004 21:53:14 +0000 (21:53 +0000)]
Rewrite to use the reachability cloner interface.  Also, make this much more
efficient in the case where a function calls into the same graph multiple times
(ie, it either contains multiple calls to the same function, or multiple calls
to functions in the same SCC graph)

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

20 years agominor cleanups
Chris Lattner [Tue, 27 Jan 2004 21:51:19 +0000 (21:51 +0000)]
minor cleanups

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

20 years agoGet clone flags right, so we don't build InlinedGlobals only to clear them
Chris Lattner [Tue, 27 Jan 2004 21:50:41 +0000 (21:50 +0000)]
Get clone flags right, so we don't build InlinedGlobals only to clear them

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

20 years agoMinor tweaks
Chris Lattner [Tue, 27 Jan 2004 21:49:42 +0000 (21:49 +0000)]
Minor tweaks

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

20 years agoAdd comments, allow DSNode "copy ctor" to ignore outgoing links, add more
Chris Lattner [Tue, 27 Jan 2004 21:49:25 +0000 (21:49 +0000)]
Add comments, allow DSNode "copy ctor" to ignore outgoing links, add more
structured access to the globals list, add a couple helper methods.

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

20 years ago* cloneReachable* and clonePartiallyInto are not obsolete
Chris Lattner [Tue, 27 Jan 2004 21:48:35 +0000 (21:48 +0000)]
* cloneReachable* and clonePartiallyInto are not obsolete
* Make AssertNodeInGraph not be HORRIBLY time consuming
* Eliminate the dead mergeInGlobalsGraph method
*** Add the definition for the new ReachabilityCloner class

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

20 years agoStart counting projects
Chris Lattner [Tue, 27 Jan 2004 21:46:23 +0000 (21:46 +0000)]
Start counting projects

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

20 years agoFixed PR#197. The libcrtend library is removed from the library linking list
John Criswell [Mon, 26 Jan 2004 23:51:10 +0000 (23:51 +0000)]
Fixed PR#197.  The libcrtend library is removed from the library linking list
when creating native executables.

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

20 years agoClarified the extension to shared library objects.
John Criswell [Mon, 26 Jan 2004 21:26:54 +0000 (21:26 +0000)]
Clarified the extension to shared library objects.

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

20 years agoUpdating release notes for PR214.
John Criswell [Mon, 26 Jan 2004 21:03:54 +0000 (21:03 +0000)]
Updating release notes for PR214.

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

20 years agoFixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
John Criswell [Mon, 26 Jan 2004 20:59:41 +0000 (20:59 +0000)]
Fixes for PR214.  Use the SHLIBEXT variable instead of hardcoding .so into
every file.

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

20 years agoFix a couple of places I noticed where "X86" was hard-coded.
Brian Gaeke [Sat, 24 Jan 2004 09:23:46 +0000 (09:23 +0000)]
Fix a couple of places I noticed where "X86" was hard-coded.

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

20 years agoFix failing test cases with joined live intervals. It turns out that
Alkis Evlogimenos [Fri, 23 Jan 2004 13:37:51 +0000 (13:37 +0000)]
Fix failing test cases with joined live intervals. It turns out that
when joining we need to check if we overlap with the second interval
or any of its aliases.

Also make joining intervals the default.

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

20 years agoAdd the JITInfo object, accessor & initializer.
Brian Gaeke [Fri, 23 Jan 2004 06:39:30 +0000 (06:39 +0000)]
Add the JITInfo object, accessor & initializer.

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

20 years agoAdd CodeEmitter and JITInfo stubs. Dump the old
Brian Gaeke [Fri, 23 Jan 2004 06:35:43 +0000 (06:35 +0000)]
Add CodeEmitter and JITInfo stubs. Dump the old
PowerPCTargetMachine::addPassesToJITCompile() method, in favor of the
TargetJITInfo interface.

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

20 years agoInitial support for implementing clonePartiallyInto in terms of cloneReachableSubgrap...
Chris Lattner [Fri, 23 Jan 2004 01:44:53 +0000 (01:44 +0000)]
Initial support for implementing clonePartiallyInto in terms of cloneReachableSubgraph, though this support is currently disabled.

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

20 years agoAdd new flag, other minor modifications
Chris Lattner [Fri, 23 Jan 2004 01:42:32 +0000 (01:42 +0000)]
Add new flag, other minor modifications

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

20 years agoFix grammar
Chris Lattner [Fri, 23 Jan 2004 01:42:16 +0000 (01:42 +0000)]
Fix grammar

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

20 years agoFix a problem brian ran into with the bytecode reader asserting. It turns
Chris Lattner [Fri, 23 Jan 2004 00:55:21 +0000 (00:55 +0000)]
Fix a problem brian ran into with the bytecode reader asserting.  It turns
out that the problem was actually the writer writing out a 'null' value
because it didn't normalize it.  This fixes:
test/Regression/Assembler/2004-01-22-FloatNormalization.ll

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

20 years agoNew testcase for problem brian ran into
Chris Lattner [Fri, 23 Jan 2004 00:54:26 +0000 (00:54 +0000)]
New testcase for problem brian ran into

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

20 years agoAdd option to join live intervals. Two intervals are joined if there
Alkis Evlogimenos [Thu, 22 Jan 2004 23:08:45 +0000 (23:08 +0000)]
Add option to join live intervals. Two intervals are joined if there
is a move between two registers, at least one of the registers is
virtual and the two live intervals do not overlap.

This results in about 40% reduction in intervals, 30% decrease in the
register allocators running time and a 20% increase in peephole
optimizations (mainly move eliminations).

The option can be enabled by passing -join-liveintervals where
appropriate.

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

20 years agoMove bytecode_libdir def'n to Makefile.config.in from Makefile.rules, so it
Brian Gaeke [Thu, 22 Jan 2004 22:53:48 +0000 (22:53 +0000)]
Move bytecode_libdir def'n to Makefile.config.in from Makefile.rules, so it
lives near the other installation dirs (like libdir, bindir, etc.).

Move the rule for making bytecode_libdir out of the ifdef LIBRARYNAME...endif.

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

20 years agoAdd autoconf check for the version of etags we have detected, and select
Brian Gaeke [Thu, 22 Jan 2004 21:55:15 +0000 (21:55 +0000)]
Add autoconf check for the version of etags we have detected, and select
appropriate "force C++" command-line option.

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

20 years agoRegenerated using autoconf-2.57.
Brian Gaeke [Thu, 22 Jan 2004 21:55:02 +0000 (21:55 +0000)]
Regenerated using autoconf-2.57.

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

20 years agoGet autoconf'd ETAGSFLAGS value from configure.
Brian Gaeke [Thu, 22 Jan 2004 21:55:01 +0000 (21:55 +0000)]
Get autoconf'd ETAGSFLAGS value from configure.

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

20 years agoMove support for building tags database from Makefile.rules to Makefile, because
Brian Gaeke [Thu, 22 Jan 2004 21:54:51 +0000 (21:54 +0000)]
Move support for building tags database from Makefile.rules to Makefile, because
it's only used in the top-level directory.

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

20 years agoRemove unneeded check. An interval in active, by definition overlaps
Alkis Evlogimenos [Thu, 22 Jan 2004 20:07:18 +0000 (20:07 +0000)]
Remove unneeded check. An interval in active, by definition overlaps
with the current one.

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

20 years agoImprove debugging output. Remove unneeded virtReg->0 mapping when
Alkis Evlogimenos [Thu, 22 Jan 2004 19:24:43 +0000 (19:24 +0000)]
Improve debugging output.  Remove unneeded virtReg->0 mapping when
virtReg lives on the stack. Now a virtual register has an entry in the
virtual->physical map or the virtual->stack slot map but never in
both.

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