Commit Graph

2813 Commits

Author SHA1 Message Date
Vikram S. Adve 94c8e5da41 Add support for a top-down propagation pass:
-- Save a copy of the original call nodes in DSGraph before inlining bottom-up.
-- Also, save a list of the callers of each function in DSGraph.

llvm-svn: 2966
2002-07-18 16:13:52 +00:00
Vikram S. Adve 4eac78e660 Add support for a top-down propagation pass.
Each DSGraph now keeps a list of pending callers that have not
been inlined into the function represented by that graph.
It also keeps a copy of the original call nodes before the BU pass
eliminates some of them.

llvm-svn: 2965
2002-07-18 16:12:08 +00:00
Chris Lattner db7a680aec Implement cast nodes correctly.
llvm-svn: 2964
2002-07-18 15:54:42 +00:00
Chris Lattner 93dc95fc7d Add support for bottom up closure of ds analysis
llvm-svn: 2963
2002-07-18 06:40:56 +00:00
Chris Lattner f2fbd00804 Build globaldce tests
llvm-svn: 2962
2002-07-18 06:40:31 +00:00
Chris Lattner 6801fdf009 Seperate stats for DCE'd functions and vars
llvm-svn: 2961
2002-07-18 06:40:04 +00:00
Chris Lattner 8eedb941d3 * Code cleanups
* Fix a REALLY misleading error message

llvm-svn: 2960
2002-07-18 05:18:37 +00:00
Chris Lattner 6f21961d67 *** empty log message ***
llvm-svn: 2959
2002-07-18 04:43:20 +00:00
Chris Lattner 79b0c7d016 * s/method/function
llvm-svn: 2958
2002-07-18 04:43:16 +00:00
Chris Lattner f31527cd6f * s/method/function
* BIG CHANGE: The root of the call "graph" is considered to be the external
  node, not the "Root".  This means that users using graph iterators like
  df_begin() will start from the external node.

llvm-svn: 2957
2002-07-18 04:42:35 +00:00
Chris Lattner a6c6d78805 New testcase
llvm-svn: 2956
2002-07-18 04:25:11 +00:00
Chris Lattner 6c0ebfd065 New testcases for bug in globaldce
llvm-svn: 2955
2002-07-18 04:01:02 +00:00
Chris Lattner 72f9a86d1e Only functions with external linkage can be resolved to function declarations.
This change fixes programs that have multiple functions named the same thing,
where are least one of them is static/internal.

llvm-svn: 2954
2002-07-18 03:01:24 +00:00
Chris Lattner f0cfe654d7 * Rewrite loop to be slightly more efficient (arguably)
* Fix a MAJOR thinko that was causing bad links to happen on Spec

llvm-svn: 2953
2002-07-18 02:31:03 +00:00
Chris Lattner 140153f357 The graph is more accurate when I don't completely ignore the return value.
llvm-svn: 2952
2002-07-18 01:58:24 +00:00
Chris Lattner dfe041880d * Correctly get prototype for void*malloc(size_t)
llvm-svn: 2951
2002-07-18 00:18:01 +00:00
Chris Lattner 4f6a098c84 Fixes to be LP64 correct
llvm-svn: 2950
2002-07-18 00:15:29 +00:00
Chris Lattner d9f4ac6680 * ConstExpr::getelementptr now takes a vector of Constants not Values
* Assert things instead of printing an error and returning null.

llvm-svn: 2949
2002-07-18 00:14:50 +00:00
Chris Lattner 980ddf5854 ConstExpr::getelementptr now takes a vector of Constants not Values
llvm-svn: 2948
2002-07-18 00:14:27 +00:00
Chris Lattner 7af3ee9840 Add a hack to check for a subset of true dominance properties
llvm-svn: 2947
2002-07-18 00:13:42 +00:00
Chris Lattner 0b0758f916 Implement linking of ConstExprs
llvm-svn: 2946
2002-07-18 00:13:08 +00:00
Chris Lattner 4c0d620a82 Lots of bug fixes, add BottomUpClosure, which has bugs, but is a start.
llvm-svn: 2945
2002-07-18 00:12:30 +00:00
Chris Lattner c63bbd9332 First cut at implementing bottom up analysis
llvm-svn: 2944
2002-07-18 00:11:28 +00:00
Chris Lattner 24684379fb Make getelementptr ConstExpr take a vector of constants not values
llvm-svn: 2943
2002-07-18 00:11:08 +00:00
Mehwish Nagda 98b9e48981 added check for Function with 0 BB
llvm-svn: 2942
2002-07-17 23:40:33 +00:00
Guochun Shi b65a78eaae *** empty log message ***
llvm-svn: 2941
2002-07-17 23:05:56 +00:00
Chris Lattner 99ac90bbc6 New testcase
llvm-svn: 2940
2002-07-17 22:19:30 +00:00
Chris Lattner 586afe7398 Fix prototype to make function.
llvm-svn: 2939
2002-07-17 21:34:20 +00:00
Chris Lattner 745f640c06 New testcase, unanalyzed.
llvm-svn: 2938
2002-07-17 20:04:07 +00:00
Chris Lattner 963b68afb8 Anand forgot to check in the makefile corresponding to his previous change
which eliminated the EmitFunctions directory

llvm-svn: 2937
2002-07-17 17:13:01 +00:00
Chris Lattner 60ebba51c4 * Remove dead code from ExprTypeConvert.cpp
- I->use_empty() can never be true because of the IHolder's
* Fix bug: test/Regression/Transforms/LevelRaise/2002-07-16-SourceAndDestCrash.ll
   - Add a new NewCasts member to VMC to keep track of casts that have been
     created and to ensure there is always a reference to the cast.
   - Extend ValueHandle a bit so it can be used in an STL container
   - Make sure we destroy the ValueMapCache before verifying the function
     in LevelRaise.cpp

llvm-svn: 2936
2002-07-17 17:11:33 +00:00
Chris Lattner 2b3cc2e69c New testcase finally identified!!
llvm-svn: 2935
2002-07-17 02:36:02 +00:00
Chris Lattner 5ec260a714 * Add a bunch of debugging features to LevelRaise
- Verify the function every time it is exprconverted if DEBUG is on
  - Provide a way to start exprconversion AT a specific instruction.

llvm-svn: 2934
2002-07-16 23:49:24 +00:00
Chris Lattner 4cccad7555 Avoid !sized assertion failure if Ty is not a sized type
llvm-svn: 2933
2002-07-16 22:29:37 +00:00
Chris Lattner 811bd41229 Fix bug: test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll
llvm-svn: 2932
2002-07-16 21:41:31 +00:00
Chris Lattner b744c9ba24 New testcase
llvm-svn: 2931
2002-07-16 21:33:27 +00:00
Chris Lattner e47dea14e1 Add testcase for raise opportunity missed.
llvm-svn: 2930
2002-07-16 19:10:00 +00:00
Anand Shukla 4e25609b87 Removed emitfuncs: now its part of instrument library
llvm-svn: 2929
2002-07-16 18:59:55 +00:00
Anand Shukla d5f25dc1eb Moved over EmitFunctions to this library
llvm-svn: 2928
2002-07-16 18:58:08 +00:00
Anand Shukla 09038eec7b removed this directory
llvm-svn: 2927
2002-07-16 18:56:29 +00:00
Anand Shukla 506f8516c6 Moved EmitFunctions.cpp up to instrumentation directory
llvm-svn: 2926
2002-07-16 18:55:55 +00:00
Chris Lattner 3e751859ec * Make global variables with external linkage get emitted correctly
* Do NOT add a prefix to global variables that are external
* Add newline after emitting a constpointerref

llvm-svn: 2925
2002-07-16 18:35:16 +00:00
Chris Lattner 0610fc933c Bugfix to previous checkin
llvm-svn: 2924
2002-07-16 18:12:55 +00:00
Chris Lattner cd399a7f1d Bug fix to RUN line
llvm-svn: 2923
2002-07-16 18:02:43 +00:00
Mehwish Nagda 81264e6bed Now will profile all Basic Blocks
llvm-svn: 2922
2002-07-16 17:48:27 +00:00
Chris Lattner 6001a92926 * Cleanup pass
* The global variable cannot be internal or else we cannot use it!
* Always add a function to the table, even if it only has a single basic
  block.

llvm-svn: 2921
2002-07-16 17:42:54 +00:00
Chris Lattner 036a134528 * Add assertion to ExprTypeConvert to detect error earlier than without it
* Fix bug in LevelRaise.cpp, correcting this problem:
    test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash.ll

llvm-svn: 2920
2002-07-16 17:33:13 +00:00
Chris Lattner 4b933a253f New testcase distilled from olden-tsp.
llvm-svn: 2919
2002-07-16 17:32:17 +00:00
Chris Lattner 768846af41 New testcase
llvm-svn: 2918
2002-07-16 05:38:33 +00:00
Anand Shukla f7d7871656 added std:: to pair
llvm-svn: 2917
2002-07-16 00:04:57 +00:00