Vikram S. Adve
e18a54c249
Use vectors instead of hash_maps for issueGaps and conflictLists.
...
These hash lookups were a major sink of time because they happen so often!
Also, add option to disable scheduling.
llvm-svn: 4138
2002-10-13 00:40:37 +00:00
Vikram S. Adve
211f972d28
Major bug fix: was not adding CD edges for RETURNs!
...
llvm-svn: 4137
2002-10-13 00:39:22 +00:00
Vikram S. Adve
7387d96d6a
Use vectors instead of hash_maps for issueGaps and conflictLists.
...
These hash lookups were a major sink of time because they happen so often!
llvm-svn: 4136
2002-10-13 00:37:46 +00:00
Vikram S. Adve
7b920c5768
Run LICM before GCSE!
...
llvm-svn: 4135
2002-10-13 00:34:10 +00:00
Vikram S. Adve
7436df838d
Several major fixes, particularly in emitting constant aggregates:
...
(1) Padding bytes between structure fields (for alignment) were never
being emitted into the constant pool so the layout did not match!
(2) In printing constants, structures containing structures or arrays
were never handled.
(3) Support new model for external/uninitialized/initialized globals.
Uninitialized globals are no longer emitted since they are external.
Initialized globals may go either in .bss or in .data.
llvm-svn: 4134
2002-10-13 00:32:18 +00:00
Vikram S. Adve
032dee9564
Don't use %l0 for large operands to a SAVE since it is needed *before* SAVE!
...
We now use %g1 instead since that is shared and volatile.
llvm-svn: 4133
2002-10-13 00:24:06 +00:00
Vikram S. Adve
84fa49d0e5
Don't mark JMPLCALL and JMPLRET as branches.
...
llvm-svn: 4132
2002-10-13 00:22:32 +00:00
Vikram S. Adve
c78e160ede
(1) Try to evaluate constant when multiplying 2 constants.
...
(2) Use intelligent multiply selection code for array allocas.
(3) Don't use cache padding for alloca'd stack slots!
(4) Bug fix in handling call arguments: was not copying sixth FP arg
to int reg. when calling a function with no prototype.
llvm-svn: 4130
2002-10-13 00:18:57 +00:00
Vikram S. Adve
df4ed78bc9
Eliminate duplicate target pointer in SparcRegInfo.
...
llvm-svn: 4129
2002-10-13 00:06:04 +00:00
Vikram S. Adve
6b459791f7
Eliminate duplicate target pointer. Also add a few assertions.
...
llvm-svn: 4128
2002-10-13 00:05:30 +00:00
Vikram S. Adve
dc9d94262d
Make sure to handle small negative values hiding as large unsigned longs --
...
this is a common case created by the front-end.
llvm-svn: 4127
2002-10-13 00:04:26 +00:00
Vikram S. Adve
29dd99d98b
Major fix: extract ConstantExpr nodes and decompose them into symbolic
...
instructions so that (a) constant folding is done automatically before
code generation, and (b) selection does not have to deal with them.
Also, check for ConstantPointerRefs in additional to GlobalValues
when creating a GEP to load a global address.
llvm-svn: 4126
2002-10-13 00:01:57 +00:00
Anand Shukla
d80a46cb42
Changed to external global var
...
llvm-svn: 4120
2002-10-12 20:33:47 +00:00
Nick Hildenbrandt
8dba342c37
Instead of adding stdlib we just prototype malloc correctly.
...
llvm-svn: 4118
2002-10-11 21:40:44 +00:00
Nick Hildenbrandt
27d9b87ed1
Sun requires you to include stdlib to use malloc
...
llvm-svn: 4117
2002-10-11 18:41:44 +00:00
Vikram S. Adve
be4905b56a
Major bug fix: spill code for an instruction in a delay slot was
...
merrily being inserted before/after the instruction!
llvm-svn: 4116
2002-10-11 16:12:40 +00:00
Vikram S. Adve
f19f08c3ab
Don't pad variables in stack slots for performance!
...
llvm-svn: 4115
2002-10-11 16:10:53 +00:00
Vikram S. Adve
5b3555bdd3
Use PARALLEL_DIRS.
...
llvm-svn: 4114
2002-10-11 16:08:17 +00:00
Misha Brukman
b4940744de
Added capability to get execution count of a loop if it is a predictable
...
number of iterations.
llvm-svn: 4113
2002-10-11 05:34:32 +00:00
Misha Brukman
d55cfa6b94
Added helper functions in LoopInfo: isLoopExit and numBackEdges.
...
llvm-svn: 4112
2002-10-11 05:31:10 +00:00
Chris Lattner
8cd34b84b2
Stop using DataStructureGraph.h
...
llvm-svn: 4106
2002-10-10 20:33:46 +00:00
Chris Lattner
42547124d0
- Dramatically simplify the ConstantMerge code now that
...
Value::replaceAllUsesWith works with constants correctly.
llvm-svn: 4104
2002-10-09 23:16:04 +00:00
Chris Lattner
266bacb650
- Make Value::replaceAllUsesWith work with constants correctly. This fixes
...
bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better.
llvm-svn: 4103
2002-10-09 23:12:59 +00:00
Chris Lattner
0acdba0025
- Add new Constant::replaceUsesOfWithOnConstant which has an end result
...
similar to User::replaceUsesOfWith but actually does the right thing for
constants.
llvm-svn: 4102
2002-10-09 23:12:25 +00:00
Chris Lattner
83d105d986
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.
llvm-svn: 4099
2002-10-09 21:10:06 +00:00
Chris Lattner
0e7fbf7025
Minor, non-functionality changing, formatting fix
...
llvm-svn: 4091
2002-10-09 00:25:32 +00:00
Chris Lattner
a8dd29787b
- Remove Value::use_remove
...
llvm-svn: 4090
2002-10-09 00:25:05 +00:00
Chris Lattner
51d98b38f2
- Rename MTy to FTy (no methods exist anymore)
...
- Fix bug: LevelRaise/2002-10-08-VarArgCallInfLoop.ll
llvm-svn: 4088
2002-10-09 00:16:00 +00:00
Chris Lattner
88de60dd26
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.
llvm-svn: 4086
2002-10-08 23:46:55 +00:00
Chris Lattner
4a72e094f9
Fix bug: Assembler/2002-10-08-LargeArrayPerformance.ll by using
...
std::vector::reserve when possible
llvm-svn: 4085
2002-10-08 23:33:52 +00:00
Chris Lattner
e8160b4dd1
- Fix bug: LevelRaise/2002-10-08-VarArgCall.ll
...
llvm-svn: 4083
2002-10-08 22:19:25 +00:00
Chris Lattner
d68e6d1718
- Fix bug: cee/2002-10-07-NoImmediateDominator.ll
...
llvm-svn: 4081
2002-10-08 21:53:51 +00:00
Chris Lattner
c35f54df86
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4080
2002-10-08 21:36:34 +00:00
Chris Lattner
9c236351fd
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4079
2002-10-08 21:36:33 +00:00
Chris Lattner
f868df40b9
- Change PHINode::removeIncomingValue to delete the phi node if the last
...
incoming value is removed!
llvm-svn: 4078
2002-10-08 21:34:58 +00:00
Chris Lattner
40df2d9d4c
- 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.
llvm-svn: 4077
2002-10-08 21:34:15 +00:00
Chris Lattner
3cf20c3f14
Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
...
llvm-svn: 4075
2002-10-08 21:06:27 +00:00
Chris Lattner
b9f59f1533
Expose new "recalculate" method from dominatorset
...
llvm-svn: 4074
2002-10-08 19:12:08 +00:00
Chris Lattner
b32252aa71
It is illegal for PHI nodes to have zero values, delete the code to handle them
...
llvm-svn: 4071
2002-10-08 17:07:39 +00:00
Chris Lattner
55c7ae3cdc
Fold ashr -1, X into -1
...
llvm-svn: 4070
2002-10-08 16:16:40 +00:00
Chris Lattner
c532e35cce
Non-functionality change just to make it more clear what is going on
...
llvm-svn: 4060
2002-10-07 18:34:32 +00:00
Chris Lattner
4e19009255
Global variables are now external if they don't have initializers, not
...
"uninitialized"
llvm-svn: 4052
2002-10-06 22:48:09 +00:00
Chris Lattner
d8244f43d4
Check that we don't have external varaibles with internal linkage
...
llvm-svn: 4051
2002-10-06 22:47:32 +00:00
Chris Lattner
6408586b7b
The parser now accepts "external" global variables, in addition to the backwards
...
compatible "uninitialized" global variables
llvm-svn: 4050
2002-10-06 22:45:09 +00:00
Chris Lattner
53a414c3c4
PHI nodes are not allowed to exist with zero incoming values, check that
...
there aren't any like this.
llvm-svn: 4044
2002-10-06 21:00:31 +00:00
Vikram S. Adve
6932399f9b
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).
llvm-svn: 4043
2002-10-05 23:43:10 +00:00
Anand Shukla
d49d35f562
Added #include<unistd.h> to compile with solaris gcc3.2
...
llvm-svn: 4042
2002-10-04 23:57:01 +00:00
Anand Shukla
02acbe2c93
added cast to unsigned to compile with gcc3.2 (sparc)
...
llvm-svn: 4041
2002-10-04 23:56:18 +00:00
Chris Lattner
a923b0f49f
Handle post dominance correctly in the case where blocks do not have a path to
...
the exit node.
llvm-svn: 4038
2002-10-04 14:50:20 +00:00
Chris Lattner
85ba0832e5
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.
llvm-svn: 4037
2002-10-04 14:45:48 +00:00