Commit Graph

3954 Commits

Author SHA1 Message Date
Vikram S. Adve 31dbda2a1c Add a test for folding a GEP into a load.
llvm-svn: 4139
2002-10-13 00:44:00 +00:00
Vikram S. Adve 9e5eb46362 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 f8c6e3db55 Major bug fix: was not adding CD edges for RETURNs!
llvm-svn: 4137
2002-10-13 00:39:22 +00:00
Vikram S. Adve d77030bd76 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 05ee0819a7 Run LICM before GCSE!
llvm-svn: 4135
2002-10-13 00:34:10 +00:00
Vikram S. Adve 10d8164013 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 78044fbc8e 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 f4f7292b4e Don't mark JMPLCALL and JMPLRET as branches.
llvm-svn: 4132
2002-10-13 00:22:32 +00:00
Nick Hildenbrandt 176245f782 *** empty log message ***
llvm-svn: 4131
2002-10-13 00:20:48 +00:00
Vikram S. Adve d2dc60e5d9 (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 d00beecb59 Eliminate duplicate target pointer in SparcRegInfo.
llvm-svn: 4129
2002-10-13 00:06:04 +00:00
Vikram S. Adve 879eac9fa1 Eliminate duplicate target pointer. Also add a few assertions.
llvm-svn: 4128
2002-10-13 00:05:30 +00:00
Vikram S. Adve ea31dc707f 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 4ef6cce821 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
Vikram S. Adve 46f21c4443 Added inline constant expressions, including uses in binary subtract.
llvm-svn: 4125
2002-10-12 23:47:36 +00:00
Chris Lattner 1a061216a0 New testcase that causes invalid llvm to be emitted by cfe
llvm-svn: 4124
2002-10-12 23:37:34 +00:00
Chris Lattner 66507d887a * Fix extract to work with constant pointer refs correctly
* Extract makes all global vars external, so they don't have initializers

llvm-svn: 4121
2002-10-12 20:50:16 +00:00
Anand Shukla 12b05f3880 Changed to external global var
llvm-svn: 4120
2002-10-12 20:33:47 +00:00
Nick Hildenbrandt 16b1cb08b1 *** empty log message ***
llvm-svn: 4119
2002-10-11 22:22:12 +00:00
Nick Hildenbrandt fa6e71e31d Instead of adding stdlib we just prototype malloc correctly.
llvm-svn: 4118
2002-10-11 21:40:44 +00:00
Nick Hildenbrandt 8d354423fc Sun requires you to include stdlib to use malloc
llvm-svn: 4117
2002-10-11 18:41:44 +00:00
Vikram S. Adve 3e54d6c3be 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 ffc9dd5c0d Don't pad variables in stack slots for performance!
llvm-svn: 4115
2002-10-11 16:10:53 +00:00
Vikram S. Adve b52220cd21 Use PARALLEL_DIRS.
llvm-svn: 4114
2002-10-11 16:08:17 +00:00
Misha Brukman 33022f07bb 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 3845be203d Added helper functions in LoopInfo: isLoopExit and numBackEdges.
llvm-svn: 4112
2002-10-11 05:31:10 +00:00
Chris Lattner d484dd8da4 Expose API to graph library to allow iteration over all nodes, even unreachable ones
llvm-svn: 4111
2002-10-10 22:31:31 +00:00
Chris Lattner 27abebe1b6 Change reference
llvm-svn: 4110
2002-10-10 22:31:02 +00:00
Chris Lattner e3336c72c0 * Don't only print out reachable nodes in the graph.
* use new api to get all nodes in the graph
  * Allow custom graph traits

llvm-svn: 4109
2002-10-10 22:29:51 +00:00
Chris Lattner f43f410dfb Add new getGraphProperties that may be specialized by graphs
llvm-svn: 4108
2002-10-10 22:29:10 +00:00
Chris Lattner 513401821c Rename DataStructureGraph.h to DSGraphTraits.h
llvm-svn: 4107
2002-10-10 20:36:37 +00:00
Chris Lattner 1a535e18cd Stop using DataStructureGraph.h
llvm-svn: 4106
2002-10-10 20:33:46 +00:00
Chris Lattner 07ca9a4b4d Switch over to the right sparc c frontend
llvm-svn: 4105
2002-10-10 19:28:10 +00:00
Chris Lattner eac4dcd0bd - 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 2c6abeac43 - 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 b1dd9bbc68 - 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 083a1f7890 Make isExtern() be a virtual function inherited from GlobalValue
llvm-svn: 4101
2002-10-09 23:11:33 +00:00
Nick Hildenbrandt 5aae36e3aa Table with current status of tests in the /test/Programs/ directory
llvm-svn: 4100
2002-10-09 21:49:44 +00:00
Chris Lattner 013eca003a 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 58cbb46b5f Add check to see if opt aborts
llvm-svn: 4098
2002-10-09 20:55:32 +00:00
Chris Lattner a6a9522180 New testcase
llvm-svn: 4097
2002-10-09 20:37:13 +00:00
Chris Lattner 004965bfd5 Avoid having testcases spit out bytecode on error
llvm-svn: 4096
2002-10-09 20:36:54 +00:00
Chris Lattner 19a2f08956 Cleanup testcase a lot to test JUST funcresolve of globals
llvm-svn: 4095
2002-10-09 17:44:34 +00:00
Chris Lattner 3d6c35b92e - Detemplatize UseTy<> in Value.h, because it's only instantiated for one
type!

llvm-svn: 4093
2002-10-09 00:42:03 +00:00
Misha Brukman 4fb75da532 Added a major mode for Emacs to edit LLVM assembler code with syntax
highlighting.

llvm-svn: 4092
2002-10-09 00:30:20 +00:00
Chris Lattner fa01a52149 Minor, non-functionality changing, formatting fix
llvm-svn: 4091
2002-10-09 00:25:32 +00:00
Chris Lattner 6023f638a1 - Remove Value::use_remove
llvm-svn: 4090
2002-10-09 00:25:05 +00:00
Chris Lattner 5cb6394287 - Remove Value::use_push_back & Value::use_remove
llvm-svn: 4089
2002-10-09 00:25:01 +00:00
Chris Lattner a4e2653cd7 - 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 57c420ea47 New testcase for infinite loop that the raise pass is getting into
llvm-svn: 4087
2002-10-09 00:09:59 +00:00