Chris Lattner
76e51a87e7
Enable buidling of programs on Linux again
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3984 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:58:51 +00:00
Vikram S. Adve
bbac47893f
Added several more helper functions for construction MachineInstrs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3983 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:55:45 +00:00
Vikram S. Adve
aebdbe6988
Bug fix in folding getElementPtr instructions: don't fold one into
...
a predecessor if it has a non-zero first index and the predecessor
ends with a struct index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3982 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:55:05 +00:00
Chris Lattner
3f00ef9660
Fix a problem that was caused by stale analyses being in CurrentAnalyses
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3981 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:50:22 +00:00
Chris Lattner
b461373fbc
Fix bug in LICM that caused the previous big win. :(
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3980 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:26:07 +00:00
Vikram S. Adve
9d0168d2d5
Minor change to interface for Create{Zero,Sign}ExtensionsInstructions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3979 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:53:31 +00:00
Chris Lattner
952eaee239
Hoist the contents of Loops in depth first order in the dominator tree,
...
rather than in random order. This causes LICM to be DRAMATICALLY more
effective. For example, on bzip2.c, it is able to hoist 302 loads and
2380 total instructions, as opposed to 44/338 before. This obviously
makes other transformations much more powerful as well!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3978 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:46:09 +00:00
Chris Lattner
b1f8aebc67
Fix printing of loop information
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3977 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:43:04 +00:00
Chris Lattner
4d7a75a9e3
Improve printing of dominator sets
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3976 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:42:42 +00:00
Chris Lattner
4d01892e36
Fix major bugs in dominator set & tree information updating
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3975 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:41:38 +00:00
Chris Lattner
934487a9cc
Simplify code a bit, add an assertion
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3974 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:37:08 +00:00
Joel Stanley
4b28793c85
Fixed errors in ReplaceInstWithValue/ReplaceInstWithInst examples.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3973 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 17:31:54 +00:00
Vikram S. Adve
4117459567
Convert DIRS to PARALLEL_DIRS. They can be built independently.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3972 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 11:52:14 +00:00
Vikram S. Adve
d28c8c801e
Regression test for llc bug that was folding two getelementptrs illegally.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3971 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 18:09:05 +00:00
Vikram S. Adve
1c397aae8e
Added a couple of helper methods for live range construction.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:43 +00:00
Vikram S. Adve
9d67cd1468
Live ranges for Return value and return address of a Call are now
...
created here, simply by handling all implicit operands (which should
have been done anyway).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3969 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:22 +00:00
Vikram S. Adve
f425884e27
Fixed method getReturnValue(): it should return NULL if the
...
callee does not return a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:03:54 +00:00
Vikram S. Adve
ad9c978874
Fixed incorrect assertion: spill code for function ptr should be
...
handled like normal operands, not like other call arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3967 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:02:40 +00:00
Vikram S. Adve
ac67006bed
Return address register should be marked as "result" for the JMPL instruction
...
since it is defined by the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3966 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:00:15 +00:00
Vikram S. Adve
87817653fe
Live ranges for Return value and return address of a Call are no longer
...
created here. Instead they are created in LiveRangeInfo.cpp. This
simplifies the code here quite a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:59:05 +00:00
Vikram S. Adve
106604ea6d
Simplified code that handles call args and rets, so it no longer
...
needs the RegClass list to be passed in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:56:59 +00:00
Vikram S. Adve
4a8bb2bf23
Simplify Call translation slightly.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3963 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:55:41 +00:00
Vikram S. Adve
0188ce4543
Regression test for live range bug for call arguments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3962 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:51:47 +00:00
Vikram S. Adve
94c408104a
Overhaul integer conversions to match C++ ISO standard.
...
Don't allow direct FP-to-uint conversion (must be eliminated by preselection).
Address arithmetic for arrays is now entirely 64-bit so no sign-ext needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3961 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:33:08 +00:00
Vikram S. Adve
5cededee92
Modify operand order for Create{Sign,Zero}ExtensionInstructions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3960 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:29:45 +00:00
Vikram S. Adve
7e5167a3e2
Bug fix: some redundant copies were not being deleted after detection :-|.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3959 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:27:37 +00:00
Vikram S. Adve
1c10f17552
Sign-extend integer constants from original type size to 64 bits!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:26:20 +00:00
Vikram S. Adve
e9cb735131
Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:24:45 +00:00
Vikram S. Adve
6ec010a680
Simple test for constant expressions constructed from global addresses.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3956 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 13:27:14 +00:00
Vikram S. Adve
3c94e48722
Overhauled completely.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3955 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 13:26:36 +00:00
Chris Lattner
009cc3d2e8
First try at implementing the AliasSetTracker class. I'm sure it will need
...
revision as I start to use it though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3954 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 21:49:07 +00:00
Chris Lattner
5817b4e117
* Run preheaders pass tests
...
* Linearize list of directories so I don't have to keep dealing with
wrapping problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3953 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 19:53:02 +00:00
Chris Lattner
0a4e422d07
Checkin the simple features tests for the preheader insertion pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3952 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 19:50:11 +00:00
Chris Lattner
99a57216a9
- Further cleanups of LICM pass, remove extra work from previous implementation
...
- Do not clone instructions then insert clone outside of loop. Just move them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3951 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 19:40:25 +00:00
Chris Lattner
94170596b7
Improve comments, doxygenize more
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3950 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:52:07 +00:00
Chris Lattner
695766dd08
Don't hardcode path to dot in the doxygen config file. Let doxygen search the PATH
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3949 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:45:59 +00:00
Chris Lattner
6d4d3e9641
Don't hardcode path to doxygen
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3948 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:38:42 +00:00
Chris Lattner
9646e6b6af
Clean up LICM significantly now that it is guaranteed to have loop preheaders
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3947 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:38:03 +00:00
Chris Lattner
0bd3616b0b
Change pass name to something sane
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3946 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:37:37 +00:00
Chris Lattner
eb53ae4f2d
Loop invariant code motion now depends on the LoopPreheader pass. Dead code
...
has not yet been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3945 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:19:31 +00:00
Chris Lattner
c178d9459a
- Cleanup break-crit-edges pass by making SplitCriticalEdge a member method.
...
- break-crit-edges pass does not invalidate loop-preheader pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3944 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:18:51 +00:00
Chris Lattner
f6b684c505
Checkin new loop-preheader insertion pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3943 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:17:33 +00:00
Chris Lattner
38acf9e85d
Checkin new loop-preheader insertion pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3942 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:17:31 +00:00
Chris Lattner
fce46ef803
Fix printing of loop information
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3941 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:15:54 +00:00
Chris Lattner
de39b71455
- Fix bug in LoopInfo causing ParentLoop to be garbage
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3940 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:15:19 +00:00
Chris Lattner
d74472ed21
- Add methods to ImmediateDominators & DominatorTree to allow updates
...
- Make DominatorTree::Node not inherit from std::vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3939 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:14:41 +00:00
Chris Lattner
3a294d6085
- Add methods to ImmediateDominators & DominatorTree to allow updates
...
- Make DominatorTree::Node not inherit from std::vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3938 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:14:37 +00:00
Chris Lattner
b51bf39b93
Add a new "DominatorSet::addDominator" method to allow updates
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3937 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 05:42:47 +00:00
Chris Lattner
699b305c86
- Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
...
These allow extra information to be easily gathered, and loopinfo to be
updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3936 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 05:32:50 +00:00
Chris Lattner
2b7bb7a986
- Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
...
These allow extra information to be easily gathered, and loopinfo to be
updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3935 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 05:32:43 +00:00