1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

331 Commits

Author SHA1 Message Date
Chris Lattner
2e20403fad * s/Method/Function
* Fix bug where the character after a % was being discarded

llvm-svn: 2248
2002-04-14 06:15:24 +00:00
Chris Lattner
983272ba58 Turn off debug output
llvm-svn: 2247
2002-04-14 06:14:41 +00:00
Chris Lattner
3b7f72e4e4 * Allow datasize to be specified on the commandline
* Build new datatypes correctly
* Transform instructions that return null pointers from functions to return
  a null index.

llvm-svn: 2244
2002-04-13 23:13:18 +00:00
Chris Lattner
47b17915d5 * Give alloca's for pool descriptors better names than "pool<n>".
* Fill in the pool descriptor links in the pool descriptors.

llvm-svn: 2239
2002-04-13 19:52:54 +00:00
Chris Lattner
249f5243f1 * Add names to the symbol table for pool types and modified types
* Handle more complex structure so that power works almost
* Fix bug with pooldestroy call where we passed in the size of the object
  instead of the pool to destroy.  bisort is now pool allocated successfully!

llvm-svn: 2238
2002-04-13 19:25:57 +00:00
Chris Lattner
24f4497fe9 Implement function rewriting to use offsets instead of pointers in programs.
This now works with treeadd at least, and perhaps other programs as well.

llvm-svn: 2233
2002-04-12 20:23:15 +00:00
Chris Lattner
3b04124abd * Add documentation
* Split the CleanGCC pass into two passes, a global pass and an IP pass.
  Before it was just a global pass, but it did illegal things to the
  module, which broke other passes that were being scheduled with it by
  gccld.

llvm-svn: 2224
2002-04-10 20:33:11 +00:00
Chris Lattner
150fc89dcd Implement TODO, fixing bug:
test/Regression/Transforms/LevelRaise/2002-04-09-MissedRaise.ll

llvm-svn: 2219
2002-04-09 20:53:36 +00:00
Chris Lattner
5e12c7caf5 Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.

llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
b2038512b2 Add explicit #includes of Function.h to make up for the removed #include
in iOther.h

llvm-svn: 2209
2002-04-09 19:08:28 +00:00
Chris Lattner
7ae20d642d Add #includes to make up for #includes pruned out of header files.
llvm-svn: 2207
2002-04-09 18:37:46 +00:00
Chris Lattner
31e5838296 s/Method/Function
Remove extraneous #includes of llvm/Assembly/Writer

llvm-svn: 2178
2002-04-08 22:03:00 +00:00
Chris Lattner
44f14449c4 ConstantHandling moved into VMCore library
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner
0cfa70b083 Eliminate explicit use of Writer library, using debug dump output instead.
llvm-svn: 2147
2002-04-07 22:31:23 +00:00
Chris Lattner
bc15ae64dd Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
8afff0c29a s/MethodType/FunctionType
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
1ee6bf5249 PATypeHolder is now not a template
llvm-svn: 2106
2002-04-04 19:24:34 +00:00
Chris Lattner
2e3a4dece6 Allow scalars that point to multiple nodes when building the scalar map.
llvm-svn: 2087
2002-04-01 01:26:53 +00:00
Chris Lattner
99da111daf Add extra case here to avoid getting spurious output
llvm-svn: 2086
2002-04-01 00:45:33 +00:00
Chris Lattner
c620b825b6 Add debug output
llvm-svn: 2066
2002-03-31 07:17:46 +00:00
Chris Lattner
4c4a273f43 * Catch and ignore (for now) return instructions in tranformed functions
* Add more debugging output
* Fix problems refering to wrong versions of various graphs
* Build the pool descriptor map!
* Clear the nodemapping map after building pool descriptor to avoid assert
* Transform the NEw function body, not the old one...
* Matrix.ll now works!

llvm-svn: 2058
2002-03-30 20:53:14 +00:00
Chris Lattner
410c6394d3 * Clean up data structures [AllocDSNode -> DSNode]
* TransformFunctionInfo now has call field form field mapping.  May be
  removed in the future.
* Moved the computation of "Scalars" into transformFunctionBody so
  transformFunction didn't have to recompute it.
* Implement the node mapping calculation in preparation to calculate
  PoolDescriptors to pass to transformFunctionBody
* Print out the node mapping [it looks right!]
* Other minor changes

llvm-svn: 2056
2002-03-30 09:12:35 +00:00
Chris Lattner
36d50d01ab Maintain enough information so that the pools for all of the nodes of
the graph can be passed around.

llvm-svn: 2053
2002-03-30 04:02:31 +00:00
Chris Lattner
a4b9a9f573 Implement the first batch of transformations to the methods. So far it:
* Converts malloc instructions to poolalloc
 * Converts free instructions to poolfree
 * Convert calls to call the new cloned hacked up versions

Note that this does not modify hacked up stuff yet, just the top level
function

llvm-svn: 2052
2002-03-29 21:25:19 +00:00
Chris Lattner
9166ac0b3f Correctly clone the function with the extra argument types. Now we need
to modify the function next.

This also properly recycles functions so that we don't get exponential
code blowup in the common case.

llvm-svn: 2049
2002-03-29 19:05:48 +00:00
Chris Lattner
b6b7c3fe60 s/Method/Function
llvm-svn: 2048
2002-03-29 19:04:45 +00:00
Chris Lattner
57dd5ed245 New clone function routine
llvm-svn: 2045
2002-03-29 19:03:54 +00:00
Chris Lattner
6b1ce137c2 Find out which calls in the function we need to transform and how.
Next step is to start hacking functions up.

llvm-svn: 2044
2002-03-29 17:13:46 +00:00
Chris Lattner
5df9c977e1 s/Method/Function
llvm-svn: 2043
2002-03-29 17:08:29 +00:00
Chris Lattner
3a9f1dd66a Modularize code a bit
llvm-svn: 2040
2002-03-29 06:21:38 +00:00
Chris Lattner
7c2529076a Implement the first step of pool allocation - Creating, initialization, and
destruction of the pools.

llvm-svn: 2039
2002-03-29 05:50:20 +00:00
Chris Lattner
084601e6f4 s/Method/Function
llvm-svn: 2034
2002-03-29 03:44:36 +00:00
Chris Lattner
a2d3c99dfc Simplify code a bit by using Module::getOrInsertFunction
llvm-svn: 2032
2002-03-29 03:43:24 +00:00
Chris Lattner
815e2f4daa Flesh out a bunch more code, print allocations that are poolable.
llvm-svn: 2031
2002-03-29 03:40:59 +00:00
Chris Lattner
e46e35806a s/method/function
llvm-svn: 2030
2002-03-29 03:40:25 +00:00
Chris Lattner
4ca6fd00f2 s/Method/Function/g
llvm-svn: 2029
2002-03-29 03:39:36 +00:00
Chris Lattner
b7f4043df7 Simplify code a lot by using the Module::getFunction & getOrInsertFunction
llvm-svn: 2028
2002-03-29 03:38:05 +00:00
Chris Lattner
0336a78488 Initial checkin of Noop pass that will be the pool allocator
llvm-svn: 2014
2002-03-28 18:08:31 +00:00
Cameron Buschardt
49c09d5b24 * Move classes around
* rename constructor function
* Move stuff into anonymous namespaces

llvm-svn: 2007
2002-03-27 23:28:40 +00:00
Cameron Buschardt
bcff69b0f4 Implemented promote mem->reg pass.
llvm-svn: 2005
2002-03-27 23:17:37 +00:00
Chris Lattner
849c762b02 Change references from Method to Function
change references from MethodARgument to FunctionArgument

llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Vikram S. Adve
bd1e4e8bd8 Moved to directory Scalar/ and renamed.
llvm-svn: 1977
2002-03-24 03:55:06 +00:00
Vikram S. Adve
1f5e8f93cc Major overhaul to support arbitrary mixed array and structure indices.
Also moved to the Scalar/ directory and renamed to "MultiDim".

llvm-svn: 1961
2002-03-24 03:21:18 +00:00
Chris Lattner
c481e92886 Rename Method to Function
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
3294262573 New pass to decompose multi-dimensional array references into
a sequence of 1-D references, using a sequence of getElementPtrs.

llvm-svn: 1948
2002-03-23 20:43:39 +00:00
Chris Lattner
2ed4beefea Fix bug test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll
llvm-svn: 1943
2002-03-21 23:02:37 +00:00
Chris Lattner
ad241cc3ea Fix test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll
llvm-svn: 1941
2002-03-21 22:39:59 +00:00
Chris Lattner
a80b65c208 Fix test/Regression/Other/2002-03-21-LevelRaiseMiss.ll
llvm-svn: 1933
2002-03-21 21:21:13 +00:00
Chris Lattner
c2b5cb5619 Make ConvertableToGEP handle cases where the user is indexing into the
first element of a structure type.  Before this would not be handled because
getStructOffset would either stop immediately (because StopEarly was true
and Offset = 0), or blast past the level we wanted.

Now ConvertableToGEP steps down through the type one level at a time, checking
the Offset and Scale conditions at each step

llvm-svn: 1931
2002-03-21 06:27:20 +00:00
Chris Lattner
559c71f6f4 Implement the new InsertInstBeforeInst function
llvm-svn: 1930
2002-03-21 06:24:00 +00:00
Chris Lattner
14fe793707 Fix the: test/Regression/Other/2002-03-20-LevelRaiseCrash.ll bug. It turned
out that almost always the result of the add was the same as the GEP that
would be generated.  In this case, however, it wasn't, so bad things happened.

llvm-svn: 1929
2002-03-21 06:22:23 +00:00
Chris Lattner
e9ec6058e4 Declare the new InsertInstBeforeInst function
llvm-svn: 1927
2002-03-21 06:15:53 +00:00
Chris Lattner
72367834b0 1. Fix bug test/Regression/Other/2002-03-20-LevelRaiseBadCodegen.ll
2. Allow negative scales in ConvertableToGEP, so that this loop from
   alloc_tree in the Olden health benchmark is correctly raised:

       for (i = 3; i >= 0; i--)
         fval[i] = alloc_tree(level - 1, label*4 + i + 1, new);

   Stepping through the array backwards caused a negative scale.

llvm-svn: 1922
2002-03-21 03:04:38 +00:00
Chris Lattner
db90f5f6ea Namespace qualify debugging code
llvm-svn: 1921
2002-03-21 03:02:07 +00:00
Vikram S. Adve
308f672ac8 Just a comment.
llvm-svn: 1908
2002-03-18 03:40:25 +00:00
Vikram S. Adve
5f910def00 New pass to decompose multi-dimensional array references into
a sequence of 1-D references, using a sequence of getElementPtrs.

llvm-svn: 1907
2002-03-18 03:39:09 +00:00
Chris Lattner
88ccdcd73e Remove code designed to compensate for a bug in GCC. The bug has since
been fixed.

llvm-svn: 1881
2002-03-15 20:35:21 +00:00
Chris Lattner
55aff5c433 Cleanup error message output a bit
llvm-svn: 1879
2002-03-15 20:21:29 +00:00
Chris Lattner
2ecc9a337c Fix bug: test/Regression/Other/2002-03-14-LevelRaiseHang.ll
llvm-svn: 1869
2002-03-14 16:37:04 +00:00
Chris Lattner
b0128957b1 Fix bug: test/Regression/Other/2002-03-11-InstCombineHang.ll
llvm-svn: 1864
2002-03-11 23:28:45 +00:00
Chris Lattner
ba4660ff3d update comments
llvm-svn: 1862
2002-03-11 22:21:04 +00:00
Chris Lattner
0f8d0257f9 * Fix bug: test/Regression/Other/2002-03-11-LevelRaiseIterInvalidate.ll
* Use more concise form of ReplaceInstWithInst to make code simpler
* Output nicer message for dead code eliminated when debugging

llvm-svn: 1861
2002-03-11 22:19:48 +00:00
Chris Lattner
889b1e5b00 Fix bug: test/Regression/Other/2002-03-11-ConstPropCrash.ll
llvm-svn: 1858
2002-03-11 22:11:07 +00:00
Chris Lattner
34eab0d19c Fix bug: test/Regression/Other/2002-03-11-LevelRaiseCalls.ll
llvm-svn: 1844
2002-03-11 17:27:34 +00:00
Chris Lattner
60cb774b66 We were not correctly burrowing down multiple levels to get to a leaf. Fix this now
llvm-svn: 1833
2002-03-07 21:18:00 +00:00
Chris Lattner
09424811e9 Support changing the pointer type of a store for the case where we are
storing into the first element of the structure type.

llvm-svn: 1832
2002-03-07 21:17:35 +00:00
Chris Lattner
962e012ad5 Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
llvm-svn: 1820
2002-03-06 17:16:43 +00:00
Chris Lattner
e2383e8592 Change over to use new style pass mechanism, now passes only expose small
creation functions in their public header file, unless they can help it.

llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner
1b9b843452 Move ProfilePaths class into ProfilePaths library, only expose a creation function
llvm-svn: 1812
2002-02-26 20:04:59 +00:00
Chris Lattner
6693158d06 Pass stuff by reference instead of by copy. Copying entire graphs seems like
a bad idea

llvm-svn: 1810
2002-02-26 19:49:45 +00:00
Chris Lattner
6145c5df9d Move processGraph down lower in the file so all of the forward declarations
can be eliminated.

llvm-svn: 1809
2002-02-26 19:43:49 +00:00
Chris Lattner
12573def64 * Changes to compile successfully with GCC 3.0
* Eliminated memory leak in processGraph
* Pass vectors by const reference to moveDummyCode instead of by copy

llvm-svn: 1808
2002-02-26 19:40:28 +00:00
Anand Shukla
3644255181 Makefile for profile-paths
llvm-svn: 1807
2002-02-26 19:36:43 +00:00
Anand Shukla
b9e67e748a Initial checkin: functions on Graph used for path profile pass
llvm-svn: 1806
2002-02-26 19:02:16 +00:00
Anand Shukla
d3ce435557 Initial checkin: instrument code to get path execution frequency
llvm-svn: 1805
2002-02-26 19:00:48 +00:00
Anand Shukla
d5d415f609 Initial checkin: helper file to insert instrumentation code along edges
llvm-svn: 1804
2002-02-26 18:59:46 +00:00
Anand Shukla
4f842414ae Initial check in of graph.cpp: implements graph interface used in path profiles
llvm-svn: 1803
2002-02-26 18:58:39 +00:00
Anand Shukla
d7f2b91c9b New makefile to include ProfilePaths dir
llvm-svn: 1799
2002-02-26 18:20:27 +00:00
Chris Lattner
11d689e99a When inlining basic blocks and instructions, give them a name!
llvm-svn: 1796
2002-02-25 00:31:02 +00:00
Chris Lattner
b4e6953fc0 Namespaces
llvm-svn: 1791
2002-02-24 23:03:09 +00:00
Chris Lattner
3d83ea4268 Handle more cases in the linker
llvm-svn: 1771
2002-02-18 19:05:15 +00:00
Chris Lattner
a87f4f1b13 Bug fix for test/Regression/Other/2002-02-14-LevelRaiseBadAssert.ll
llvm-svn: 1767
2002-02-14 22:21:40 +00:00
Chris Lattner
6ae007b43e Implement conversion of method pointer parameter in Call instruction
to clean up MST benchmark.

llvm-svn: 1763
2002-02-14 19:44:09 +00:00
Chris Lattner
1ae58c1268 * Check in fix for: llvm/test/Regression/Other/2002-02-14-LevelRaiseInstDelete.ll
* Minor reformatting.

llvm-svn: 1760
2002-02-14 18:55:22 +00:00
Chris Lattner
8e9be000a7 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
  InstrTypes.h anymore

llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner
b0a2c5546b Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h

llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
5276164ac4 Add neccesary #include
llvm-svn: 1742
2002-02-12 20:19:06 +00:00
Chris Lattner
20edcad40a I forgot to provide dominance frontier information. Now it's available.
Also add more comments.

llvm-svn: 1741
2002-02-12 18:27:41 +00:00
Chris Lattner
326b548cd4 Initial checkin of new memory -> register promotion pass
llvm-svn: 1739
2002-02-12 17:16:22 +00:00
Chris Lattner
43ed408912 General cleanup
llvm-svn: 1628
2002-02-01 04:53:48 +00:00
Chris Lattner
0d3eaa9575 Eliminate SimplifyCFG.h file, pull everything into the UnifyMethodExitNodes class
llvm-svn: 1613
2002-01-31 01:12:06 +00:00
Chris Lattner
dc15bb209d MethodPass's are now guaranteed to not be run on external methods!
llvm-svn: 1611
2002-01-31 00:51:24 +00:00
Chris Lattner
2e463f5dbe Convert xforms over to new pass structure.
llvm-svn: 1605
2002-01-31 00:45:11 +00:00
Chris Lattner
15c05486cc Convert analyses to new pass structure
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner
2cab187296 Remove extraneous #includes
llvm-svn: 1588
2002-01-26 22:47:32 +00:00
Chris Lattner
0fea9f487b Remove opt namespace
llvm-svn: 1587
2002-01-26 22:47:07 +00:00
Chris Lattner
71ee02c009 Implement new DeadInstElmination pass
remove old comment

llvm-svn: 1555
2002-01-23 05:48:24 +00:00
Chris Lattner
e12b9f9277 Don't insert a useless cast
llvm-svn: 1527
2002-01-22 03:30:06 +00:00
Chris Lattner
4cecd63a42 Rename LowerAllocations.h to ChangeAllocations.h since it now contains the
RaiseAllocations pass as well.

llvm-svn: 1525
2002-01-22 01:04:08 +00:00
Chris Lattner
83056c99ec Pull RaiseAllocations stuff out of the CleanGCC pass into it's own pass in
the ChangeAllocations.h header file.

llvm-svn: 1522
2002-01-22 00:13:51 +00:00