Commit Graph

1860 Commits

Author SHA1 Message Date
Vikram S. Adve 72213c9a66 Major enhancements to how array and structure indices are handled.
Improve checking for constants in Multiply.
Simpler method to keep track of when a node is folded into its parent.
Several other bug fixes.

llvm-svn: 1964
2002-03-24 03:33:02 +00:00
Vikram S. Adve 650ad5e881 Change treeRoots data structure to make enumeration deterministic.
Also, add a flag to marked nodes that do not need code because they
have been folded into the user (parent in the BURG tree).

llvm-svn: 1963
2002-03-24 03:25:17 +00:00
Vikram S. Adve 3228f9cc42 Change treeRoots data structure to make enumeration deterministic.
llvm-svn: 1962
2002-03-24 03:24:00 +00:00
Vikram S. Adve 1ee0658a07 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
Vikram S. Adve 025fdf98b6 Rename pass to DecomposeMultiDimRefs.
llvm-svn: 1960
2002-03-24 03:19:54 +00:00
Vikram S. Adve 2d3ea22379 Fix out-of-date name.
llvm-svn: 1959
2002-03-24 03:18:49 +00:00
Vikram S. Adve ec4a8205a7 Regression tests for DecomposeMultiDimRefs pass.
llvm-svn: 1958
2002-03-24 03:17:16 +00:00
Chris Lattner 4e8c4877aa Rename Method to Function
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Chris Lattner 2c8c163103 Remove extranous forward decl
llvm-svn: 1956
2002-03-23 22:48:21 +00:00
Chris Lattner 26fdff788c Remove unneccesary forward definitions
llvm-svn: 1955
2002-03-23 22:48:07 +00:00
Chris Lattner e03002e772 Add transition header file
llvm-svn: 1954
2002-03-23 22:47:43 +00:00
Chris Lattner d781ebd257 Update documentation, rename Method to Function, move typedef to Value.h for now.
llvm-svn: 1953
2002-03-23 22:47:28 +00:00
Chris Lattner 6485258d9c Change Method to Function
llvm-svn: 1952
2002-03-23 22:46:51 +00:00
Chris Lattner d39fd97f1e Add transition typedef to Function
llvm-svn: 1951
2002-03-23 21:59:53 +00:00
Vikram S. Adve 18ffd1a5e3 New pass to convert Convert multi-dimensional
array references into 1-D references.

llvm-svn: 1950
2002-03-23 20:46:18 +00:00
Vikram S. Adve 15352f6121 Moved to Scalar/ directory.
llvm-svn: 1949
2002-03-23 20:44:37 +00:00
Vikram S. Adve 5d218dff24 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 709829dba1 Remove compilation of __main because we now link -lgcc into programs
llvm-svn: 1947
2002-03-22 19:13:47 +00:00
Chris Lattner 220ef17a9e Add an assertion that would hopefully catch a problem that was tripping
cameron up

llvm-svn: 1944
2002-03-22 18:01:58 +00:00
Chris Lattner b39971dfa8 Fix bug test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll
llvm-svn: 1943
2002-03-21 23:02:37 +00:00
Chris Lattner 14a9a20771 New testcase
llvm-svn: 1942
2002-03-21 23:00:48 +00:00
Chris Lattner dc960a6d4d Fix test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll
llvm-svn: 1941
2002-03-21 22:39:59 +00:00
Chris Lattner ef7023bd94 New testcase
llvm-svn: 1940
2002-03-21 22:39:43 +00:00
Chris Lattner eae5096ebd * AllocationInst ctor moved here from iMemory.h
* AllocationInst now always has an array size operand

llvm-svn: 1939
2002-03-21 22:37:48 +00:00
Chris Lattner d713541ffd * Make AllocationInst ctor protected
* Move AllocationInst ctor to iMemory.cpp
* AllocationInst's always have one operand, even if it is a uint 1

llvm-svn: 1938
2002-03-21 22:37:01 +00:00
Chris Lattner 8a36ae8ab9 Rerun test if opt gets changed
llvm-svn: 1937
2002-03-21 21:29:47 +00:00
Chris Lattner 70ff2aedef Run all testcases
llvm-svn: 1936
2002-03-21 21:24:19 +00:00
Chris Lattner c5d2df184b Build LevelRaise subdirectory
llvm-svn: 1935
2002-03-21 21:24:13 +00:00
Chris Lattner 30c37c24e8 Add a debugging option to gccas to cause it to not do level raise or anything
after it.

llvm-svn: 1934
2002-03-21 21:21:50 +00:00
Chris Lattner 50f08078e6 Fix test/Regression/Other/2002-03-21-LevelRaiseMiss.ll
llvm-svn: 1933
2002-03-21 21:21:13 +00:00
Chris Lattner 70b130f27b Testcase for a missed level raise opportunity
llvm-svn: 1932
2002-03-21 21:20:04 +00:00
Chris Lattner 06707765fa 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 b874cd9560 Implement the new InsertInstBeforeInst function
llvm-svn: 1930
2002-03-21 06:24:00 +00:00
Chris Lattner 0d984ef719 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 261df367e0 Fix bug in testcase
llvm-svn: 1928
2002-03-21 06:19:43 +00:00
Chris Lattner 14d5ae1ac5 Declare the new InsertInstBeforeInst function
llvm-svn: 1927
2002-03-21 06:15:53 +00:00
Chris Lattner d1a7fe5062 Remove a misguided API extension
llvm-svn: 1926
2002-03-21 05:46:43 +00:00
Chris Lattner 8054a1cd14 New testcase for YALRB (yet another level raise bug)
llvm-svn: 1925
2002-03-21 05:39:20 +00:00
Chris Lattner 25c8f60b0a Add an assertion to catch a misuse of replaceAllUsesWith
llvm-svn: 1924
2002-03-21 05:38:15 +00:00
Chris Lattner 14bfd557f3 Checkin testcase that was just sitting in my tree. Looks like backreferences
have some problem in the parser, oh joy.

llvm-svn: 1923
2002-03-21 05:35:11 +00:00
Chris Lattner f6c6be2891 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 14fe4c60d4 Namespace qualify debugging code
llvm-svn: 1921
2002-03-21 03:02:07 +00:00
Chris Lattner 0f8a4bb762 New testcase
llvm-svn: 1920
2002-03-21 03:01:14 +00:00
Chris Lattner 2a0d27ad8e Allow implementation of all HANDLE_*_INST macros at once by defining HANDLE_INST
llvm-svn: 1919
2002-03-19 05:51:18 +00:00
Vikram S. Adve 5fecde7331 New pass to convert Convert multi-dimensional
array references into 1-D references.

llvm-svn: 1918
2002-03-19 02:10:34 +00:00
Vikram S. Adve 7e5120163c Big bug fix: killed uses were being inserted instead of erased!
Also added a set of debug options.

llvm-svn: 1917
2002-03-19 00:59:08 +00:00
Chris Lattner dddac0d29a Initial checkin of InstVisitor class
llvm-svn: 1916
2002-03-18 19:07:42 +00:00
Chris Lattner 6a19d49f51 Add isa,cast,dyncast support for AllocationInst.
llvm-svn: 1915
2002-03-18 05:00:51 +00:00
Vikram S. Adve 8280198b62 include Makefile.tests.
llvm-svn: 1914
2002-03-18 04:05:26 +00:00
Vikram S. Adve 5b7700028d Need rule for runtime.o. This is just temporary to provide
ll__main so that llc output can link.

llvm-svn: 1913
2002-03-18 04:04:25 +00:00