Commit Graph

2167 Commits

Author SHA1 Message Date
Anand Shukla
3383b1d3bb Changed to external global var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4120 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-12 20:33:47 +00:00
Nick Hildenbrandt
98360a1752 Instead of adding stdlib we just prototype malloc correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4118 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 21:40:44 +00:00
Nick Hildenbrandt
c7140e9bd9 Sun requires you to include stdlib to use malloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4117 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 18:41:44 +00:00
Vikram S. Adve
cb202e3de5 Major bug fix: spill code for an instruction in a delay slot was
merrily being inserted before/after the instruction!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4116 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:12:40 +00:00
Vikram S. Adve
cde3982b02 Don't pad variables in stack slots for performance!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:10:53 +00:00
Vikram S. Adve
6e0bb63264 Use PARALLEL_DIRS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4114 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:08:17 +00:00
Misha Brukman
a27229013f Added capability to get execution count of a loop if it is a predictable
number of iterations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:34:32 +00:00
Misha Brukman
6b290a5440 Added helper functions in LoopInfo: isLoopExit and numBackEdges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:31:10 +00:00
Chris Lattner
7a11a94183 Stop using DataStructureGraph.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4106 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-10 20:33:46 +00:00
Chris Lattner
c67ebfa788 - Dramatically simplify the ConstantMerge code now that
Value::replaceAllUsesWith works with constants correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4104 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:16:04 +00:00
Chris Lattner
28eca8bb56 - Make Value::replaceAllUsesWith work with constants correctly. This fixes
bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4103 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:12:59 +00:00
Chris Lattner
c251f9e0ae - Add new Constant::replaceUsesOfWithOnConstant which has an end result
similar to User::replaceUsesOfWith but actually does the right thing for
    constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4102 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:12:25 +00:00
Chris Lattner
a45ec54a02 Almost a complete rewrite of FunctionResolution to now resolve functions
and global variables.

This fixes bug: FuncResolve/2002-08-19-ResolveGlobalVarsEasier.ll
And bug: SingleSource/UnitTests/2002-10-09-ArrayResolution.c

Note that this does not fix bug:
FunctionResolve/2002-08-19-ResolveGlobalVars.ll because replaceAllUsesWith
breaks when a constantexpr is pointing to the thing being replaced.  This
is more of an infrastructure problem than anything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4099 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 21:10:06 +00:00
Chris Lattner
e43f40bc17 Minor, non-functionality changing, formatting fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4091 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 00:25:32 +00:00
Chris Lattner
61d295aa29 - Remove Value::use_remove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4090 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 00:25:05 +00:00
Chris Lattner
cd484a47ea - Rename MTy to FTy (no methods exist anymore)
- Fix bug: LevelRaise/2002-10-08-VarArgCallInfLoop.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4088 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 00:16:00 +00:00
Chris Lattner
d1c657e2c7 Fix NASTY N^2 behavior that was causing the gzip benchmark to take forever to
assemble.  Now we scan the use-list from the back when removing users instead
of from the front.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4086 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 23:46:55 +00:00
Chris Lattner
d43c7d2077 Fix bug: Assembler/2002-10-08-LargeArrayPerformance.ll by using
std::vector::reserve when possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4085 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 23:33:52 +00:00
Chris Lattner
61b92c02b4 - Fix bug: LevelRaise/2002-10-08-VarArgCall.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4083 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 22:19:25 +00:00
Chris Lattner
d3d06a5cd8 - Fix bug: cee/2002-10-07-NoImmediateDominator.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4081 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:53:51 +00:00
Chris Lattner
dee430d26e Changes to support PHINode::removeIncoming changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4080 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:36:34 +00:00
Chris Lattner
bb190ac8da Changes to support PHINode::removeIncoming changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4079 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:36:33 +00:00
Chris Lattner
8bcb768a9c - Change PHINode::removeIncomingValue to delete the phi node if the last
incoming value is removed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4078 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:34:58 +00:00
Chris Lattner
f7f009d9a5 - Checkin LARGE number of Changes to CEE pass that will make it much more
powerful, but that are largely disabled.  The basic idea here is that it
    is trying to forward branches across basic blocks that have PHI nodes in
    it, which are crucial to be able to handle cases like whet.ll.
    Unfortunately we are not updating SSA correctly, causing sim.c to die, and I
    don't have time to fix the regression now, so I must disable the
    functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4077 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:34:15 +00:00
Chris Lattner
e802a023d9 Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4075 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:06:27 +00:00
Chris Lattner
7ca266fe1f Expose new "recalculate" method from dominatorset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4074 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 19:12:08 +00:00
Chris Lattner
57b314cfb1 It is illegal for PHI nodes to have zero values, delete the code to handle them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4071 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 17:07:39 +00:00
Chris Lattner
6eaeb5764c Fold ashr -1, X into -1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4070 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 16:16:40 +00:00
Chris Lattner
7c1faf0f59 Non-functionality change just to make it more clear what is going on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4060 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-07 18:34:32 +00:00
Chris Lattner
0c5e362118 Global variables are now external if they don't have initializers, not
"uninitialized"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4052 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:48:09 +00:00
Chris Lattner
61b91bc156 Check that we don't have external varaibles with internal linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4051 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:47:32 +00:00
Chris Lattner
08c0e6af4f The parser now accepts "external" global variables, in addition to the backwards
compatible "uninitialized" global variables


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4050 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:45:09 +00:00
Chris Lattner
f6ffcb6b71 PHI nodes are not allowed to exist with zero incoming values, check that
there aren't any like this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4044 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 21:00:31 +00:00
Vikram S. Adve
2a408f06b5 Bug fix: In preventing static global variables from being printed twice,
I also prevented external globals from being printed twice, but they
should (extern declaration and definition).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4043 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-05 23:43:10 +00:00
Anand Shukla
3400837374 Added #include<unistd.h> to compile with solaris gcc3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4042 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 23:57:01 +00:00
Anand Shukla
c1d4d79d93 added cast to unsigned to compile with gcc3.2 (sparc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4041 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 23:56:18 +00:00
Chris Lattner
7d821db958 Handle post dominance correctly in the case where blocks do not have a path to
the exit node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4038 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:50:20 +00:00
Chris Lattner
4e4caeffbd Fix a nasty problem with dominance calculation for unreachable blocks.
If we had a CFG that look like Entry -> B, Unreachable -> B, then we would
not correctly determine that Entry dominated B, because Entry did not
apparently dominate "unreachable".  This patch fixes this by making the entry
node dominate all blocks, including unreachable ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:45:48 +00:00
Chris Lattner
a00397e1ee Prune function nodes that are no longer referenced due to inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4036 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:28 +00:00
Chris Lattner
6727ec64e8 sgefa uses truely huge data structures nodes. Only print part of them if they
are so big


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:13 +00:00
Chris Lattner
62d928eac1 Handle bug exposed by power benchmark
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4033 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:06:38 +00:00
Nick Hildenbrandt
d2eb386c16 Add parens around constant calls to getelemptr to properly associate the reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4032 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:47:24 +00:00
Chris Lattner
55c1058135 Reimplement/port the Bottom Up Closure pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4031 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:38:41 +00:00
Chris Lattner
c5f21de2bc DataStructure.h doesn't include DSGraph.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4029 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 22:14:38 +00:00
Nick Hildenbrandt
ca626922bc I was wrong on the removing of those references on the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4023 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:14:33 +00:00
Chris Lattner
005cbce20e * Implement the getc() function
* Support usage of stdin, stdout & stderr correctly in LLI!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4022 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:12:13 +00:00
Chris Lattner
849735ce22 Cleanup #includes, expose module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4021 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:11:16 +00:00
Chris Lattner
dbaf74d108 Expose TD to ExternalFunctions.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4020 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:10:48 +00:00
Chris Lattner
061269be97 - Print the predecessors of a basic block instead of the number of uses of
the block in the AsmWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 19:38:55 +00:00
Chris Lattner
b6984558c5 Fix bug: 2002-10-02-SignExtensionProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4017 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:53:14 +00:00