Commit Graph

3057 Commits

Author SHA1 Message Date
Chris Lattner 784d54ba4b * Remove lots of dead stuff
* Register Pass

llvm-svn: 3011
2002-07-23 18:01:39 +00:00
Chris Lattner a073fe167c Break part of Pass.h out into PassAnalysisSupport.h
Add PassSupport.h which contains code for Pass registration

llvm-svn: 3010
2002-07-23 17:59:55 +00:00
Chris Lattner 301dd0e990 Allow comparison against null
llvm-svn: 3009
2002-07-23 17:59:02 +00:00
Chris Lattner 5d33f9d4f3 *** empty log message ***
llvm-svn: 3008
2002-07-23 17:58:44 +00:00
Chris Lattner 5be9f9b357 Pass creator requires a TargetData member
llvm-svn: 3007
2002-07-23 17:58:42 +00:00
Chris Lattner 1201ce53fc Regularize the Print*Passes so they have default ctors.
llvm-svn: 3006
2002-07-23 17:58:09 +00:00
Chris Lattner 2c54a0db79 Initial checkin
llvm-svn: 3005
2002-07-23 17:56:53 +00:00
Chris Lattner 79e5e0009e Ignore the boost #include files
llvm-svn: 3004
2002-07-23 17:56:32 +00:00
Chris Lattner 76d98ba598 Enable USEDLIBS to contain .a and .o files
llvm-svn: 3003
2002-07-23 17:56:16 +00:00
Chris Lattner a896b08b5c *** empty log message ***
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Chris Lattner 2a77d8a7aa Convert over to new style makefile where libraries by default build .o files
unless they specify BUILD_ARCHIVE to also build a .a file.

llvm-svn: 3001
2002-07-23 17:52:24 +00:00
Chris Lattner 0af07b48f2 Convert over to new style of Makefile, where there is a difference between .o and .a libraries.
llvm-svn: 3000
2002-07-23 17:50:41 +00:00
Chris Lattner 494c0b07de *** empty log message ***
llvm-svn: 2999
2002-07-23 17:15:12 +00:00
Chris Lattner ee49ae0626 Add support for removing an option from a genericparser
llvm-svn: 2998
2002-07-23 17:15:09 +00:00
Chris Lattner c0c03be046 Change to avoid bug in GCC 3.0.4
llvm-svn: 2997
2002-07-23 00:44:37 +00:00
Chris Lattner 38773cd86f initial checkin
llvm-svn: 2996
2002-07-23 00:17:55 +00:00
Chris Lattner d4a73fe927 *** empty log message ***
llvm-svn: 2995
2002-07-23 00:17:22 +00:00
Chris Lattner 4c1ab7f2c3 Initial checkin
llvm-svn: 2994
2002-07-23 00:17:14 +00:00
Mehwish Nagda c4ffab60d5 moving to the Reoptimizer/Mapping dir
llvm-svn: 2993
2002-07-22 22:10:55 +00:00
Mehwish Nagda f6f772b1af moved from CodeGen to this dir
llvm-svn: 2992
2002-07-22 22:09:35 +00:00
Mehwish Nagda 08580d4f91 Moved to Reoptimizer/Mapping directory
llvm-svn: 2991
2002-07-22 22:06:56 +00:00
Chris Lattner aaf425bb4d Always create a shadow node for a store instruction, even if it's storing
a scalar value.  Likewise for load instructions.

llvm-svn: 2990
2002-07-22 16:35:53 +00:00
Chris Lattner d49ea88488 Minor bugfix, prevents error in LLI
llvm-svn: 2989
2002-07-22 02:21:57 +00:00
Chris Lattner 17570e182a Fix synopsis
llvm-svn: 2988
2002-07-22 02:18:09 +00:00
Chris Lattner de88ac4f45 Add description to Enum options.
llvm-svn: 2987
2002-07-22 02:18:00 +00:00
Chris Lattner df7633fb5f Hide extra argument
llvm-svn: 2986
2002-07-22 02:17:27 +00:00
Chris Lattner f5cad15a67 *** empty log message ***
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Chris Lattner bf30a91f94 Convert command line option processing code over to use the syntax supported
by the CommandLine 2.0 library

llvm-svn: 2984
2002-07-22 02:10:07 +00:00
Chris Lattner 341ce63dd4 Convert Command Line option handling code to use the CommandLine 2.0 interface
llvm-svn: 2983
2002-07-22 02:08:59 +00:00
Chris Lattner 5df56c47fc Checkin CommandLine 2.0
llvm-svn: 2982
2002-07-22 02:07:59 +00:00
Chris Lattner 6635edfee4 Print the contents, not the pointer...
llvm-svn: 2981
2002-07-22 02:06:50 +00:00
Anand Shukla 2a78633b4a comeented out debug printing
llvm-svn: 2980
2002-07-21 09:41:18 +00:00
Anand Shukla 889faf8bc9 Adding code for outputing length in .s
llvm-svn: 2979
2002-07-21 09:35:01 +00:00
Anand Shukla b3f6bfe0df changed first arg of parseBytecodeBuffer to unsigned char
llvm-svn: 2978
2002-07-21 09:31:59 +00:00
Anand Shukla dc7e934edb changed first arg og parseBytecodeBuffer to uchar
llvm-svn: 2977
2002-07-21 09:26:32 +00:00
Chris Lattner 45da3c7618 *** empty log message ***
llvm-svn: 2976
2002-07-20 08:20:00 +00:00
Chris Lattner aaac44a560 Check in the boost type_traits library, because it is now used by the CommandLine library.
llvm-svn: 2975
2002-07-20 08:19:52 +00:00
Mehwish Nagda 0644a84a5f changed size computation
llvm-svn: 2974
2002-07-19 22:54:08 +00:00
Chris Lattner 20695cba3c Ignore some common varargs functions.
llvm-svn: 2973
2002-07-19 18:11:43 +00:00
Chris Lattner cf71a85974 New testcase
llvm-svn: 2972
2002-07-19 03:51:49 +00:00
Anand Shukla fd61c60864 minor corrections
llvm-svn: 2971
2002-07-18 20:56:47 +00:00
Chris Lattner b6d2dc48c9 * Inline CopyFunctionCallsList
* Don't clone OrigCallList
* Rename removeDeadNodes -> removeTriviallyDeadNodes
* Implement new removeDeadNodes method

llvm-svn: 2970
2002-07-18 18:22:40 +00:00
Chris Lattner 4f99733c8c Rename removeDeadNodes to removeTriviallyDeadNodes
llvm-svn: 2969
2002-07-18 18:19:09 +00:00
Chris Lattner c04eeaaded Rename removeDeadNodes to removeTriviallyDeadNodes
Add new removeDeadNodes method

llvm-svn: 2968
2002-07-18 18:18:40 +00:00
Chris Lattner 8211ada36a Simplify saveOrigFunctionCalls
llvm-svn: 2967
2002-07-18 16:23:02 +00:00
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
Anand Shukla 09da3b881f added std:: to vector
llvm-svn: 2916
2002-07-16 00:04:15 +00:00
Anand Shukla d862545ad2 added std:: to string
llvm-svn: 2915
2002-07-16 00:03:10 +00:00
Anand Shukla 991873fc5c added std:: to cerr and endl
llvm-svn: 2914
2002-07-16 00:02:17 +00:00
Mehwish Nagda 382f286ae7 Added the Mapping Pass to out put Mapping Info to .s file
llvm-svn: 2913
2002-07-15 23:58:21 +00:00
Mehwish Nagda bbe64808db *** empty log message ***
llvm-svn: 2912
2002-07-15 23:56:27 +00:00
Mehwish Nagda 6c9544a2a0 Initial checking : Writes LLVM - MI mappiing to the .s file
llvm-svn: 2911
2002-07-15 23:08:49 +00:00
Vikram S. Adve 47265143a9 Ensure ConstExpr constants are unique.
llvm-svn: 2910
2002-07-15 18:20:50 +00:00
Vikram S. Adve 4c48533b57 Ensure ConstExpr constants are unique using a
map of <opcode, operands> to ConstExpr.

llvm-svn: 2909
2002-07-15 18:19:33 +00:00
Vikram S. Adve 417ad4f124 Added duplicate constant expressions to test uniqueness support.
llvm-svn: 2908
2002-07-15 18:18:45 +00:00
Chris Lattner 8445b41ddd Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx
llvm-svn: 2907
2002-07-15 00:10:33 +00:00
Chris Lattner a831f61fab Check in tests that have been in my tree for a long time
llvm-svn: 2906
2002-07-14 23:48:42 +00:00
Chris Lattner 9afe4d03b2 Minor rename of output
llvm-svn: 2905
2002-07-14 23:25:23 +00:00
Chris Lattner 8cf7777267 New testcase to track opaque type bug
llvm-svn: 2904
2002-07-14 23:25:14 +00:00
Vikram S. Adve a6b6b0c7f8 Minor additions.
llvm-svn: 2903
2002-07-14 23:18:33 +00:00
Vikram S. Adve b952b5485f Added support to write out ConstantExpr nodes.
Also, avoid asserting out when writing out an invalid tree
since the assembly writer is used when debugging.

llvm-svn: 2902
2002-07-14 23:14:45 +00:00
Vikram S. Adve 4e537b27d8 Added subclass ConstantExpr to represent expressions consructed from
constants using operators such as cast, getelementptr, add, shl, etc.
Note that a ConstantExpr can be of any type, so classof() in most
other subclasses (that discriminate by type) have to check that it
is also not a ConstantExpr.

llvm-svn: 2901
2002-07-14 23:13:17 +00:00
Vikram S. Adve 8aee7962aa Create a static version of Instruction::getOpcodeName(opCode) that
can be invoked with only an opcode (i.e., without an instruction).
Move all opCode->opCodeName translations there.

llvm-svn: 2900
2002-07-14 23:09:40 +00:00
Vikram S. Adve 590bc74ca4 Add support for writing ConstantExpr nodes.
llvm-svn: 2899
2002-07-14 23:08:30 +00:00
Vikram S. Adve c1b6474a60 Write out the plane for types first, since values of primitive types
may be constructed by expressions of other types (and so the
contents of the primitive type planes must come after all types).
Use a helper function outputConstantsInPlane in outputConstants to
do this.

llvm-svn: 2898
2002-07-14 23:07:51 +00:00
Vikram S. Adve 827d91f257 Use a helper function outputConstantsInPlane in outputConstants.
llvm-svn: 2897
2002-07-14 23:05:53 +00:00
Vikram S. Adve a336afd5d9 Add support for reading ConstantExpr nodes.
Add class ConstantFwdRefs to resolve forward references to constants
and to globals. (Hmm... this class could be renamed I guess.)

llvm-svn: 2896
2002-07-14 23:05:09 +00:00
Vikram S. Adve 16bcca5ee4 Add support for reading ConstantExpr nodes.
Add class ConstantFwdRefs to resolve forward references to constants
and to globals (unified old code for globals into this).

llvm-svn: 2895
2002-07-14 23:04:18 +00:00
Vikram S. Adve 7064eaf80b Added support for parsing expressions constructed from constant values.
(Major new non-terminal is ConstExpr.)

Add YYERROR_VERBOSE and print additional information on errors.

llvm-svn: 2894
2002-07-14 22:59:28 +00:00
Vikram S. Adve 9f835b82fc Declare globals llvmAsmtext and llvmAsmleng for use in the parser.
llvm-svn: 2893
2002-07-14 22:49:40 +00:00
Vikram S. Adve 249f9ad3dc Create a static version of Instruction::getOpcodeName(opCode) that
can be invoked with only an opcode (i.e., without an instruction).
Move all opCode->opCodeName translations there.

llvm-svn: 2892
2002-07-14 22:48:20 +00:00
Vikram S. Adve 83500260ae Added subclass ConstantExpr to represent expressions consructed from
constants using operators such as cast, getelementptr, add, shl, etc.
Note that a ConstantExpr can be of any type, so classof() in most
other subclasses (that discriminate by type) have to check that it
is also not a ConstantExpr.   This is why isConstantExpr() is needed.

llvm-svn: 2891
2002-07-14 22:47:54 +00:00
Vikram S. Adve eacabece8d Add a couple of virtual functions to support subclass ConstantExpr.
Note that a ConstantExpr can be of any type, so classof() in most
other subclasses (that discriminate by type) have to check that it
is also not a ConstantExpr.   This is why isConstantExpr() is needed.

llvm-svn: 2890
2002-07-14 22:46:32 +00:00
Vikram S. Adve a916f2c8a7 Test the handling of constant expressions.
llvm-svn: 2889
2002-07-14 22:39:02 +00:00
Chris Lattner 290ea13b34 Allow tests that use custom commands to run
llvm-svn: 2888
2002-07-14 22:32:59 +00:00
Chris Lattner a1efe55957 Test to make sure that 'internal' flags don't get dropped accidentally!
llvm-svn: 2887
2002-07-14 22:30:45 +00:00
Anand Shukla ede97432ae initial version: for emitfuncs pass
llvm-svn: 2886
2002-07-12 20:28:22 +00:00
Anand Shukla 1a26e82bd5 added emitfuncs pass, and disabled reassociate pass (needs fixing)
llvm-svn: 2885
2002-07-12 20:14:27 +00:00
Anand Shukla e9f685d397 Added emitfuncs pass
llvm-svn: 2884
2002-07-12 20:12:59 +00:00
Anand Shukla 9a3e4649d5 Added EmitFunctions directory
llvm-svn: 2883
2002-07-12 20:12:07 +00:00
Anand Shukla 5bdc8b6326 Initial makefile
llvm-svn: 2882
2002-07-12 20:11:24 +00:00
Anand Shukla 127412b0da Initial version: adds a function table to output code
llvm-svn: 2881
2002-07-12 20:10:50 +00:00
Chris Lattner 83ce4f9298 * Pass the DSGraph around instead of the Function to printing fns
* Print the globals list in the node
* Print the scalars in the scalar node
* Eliminate Scalar "label" edges in the graph
* Print fake edges lighter instead of dotted

llvm-svn: 2880
2002-07-11 20:33:32 +00:00
Chris Lattner 228163059b * Nodes now keep track of any global variables in them
llvm-svn: 2879
2002-07-11 20:32:22 +00:00
Chris Lattner 7d0dafc0dc * Nodes now keep track of any global variables in them
* Only dead-node-eliminate nodes with no flags
* Don't merge scalars, only merge what they point to.

llvm-svn: 2878
2002-07-11 20:32:02 +00:00
Chris Lattner 46e10fc3b9 * Nodes now keep track of any global variables contained within them
llvm-svn: 2877
2002-07-11 20:30:18 +00:00
Anand Shukla 3de6fcfdec added std:: to endl
llvm-svn: 2875
2002-07-11 00:17:17 +00:00
Anand Shukla cf764680ad added std:: to vector
llvm-svn: 2874
2002-07-11 00:16:28 +00:00
Chris Lattner 4734a1cd00 Rename DataStructure to LocalDataStructures
llvm-svn: 2873
2002-07-10 22:42:53 +00:00
Chris Lattner fdbd7241c9 New implementation of data structure analysis
This diff is completely meaningless because this is a replacement
implementation.

llvm-svn: 2872
2002-07-10 22:42:17 +00:00
Chris Lattner c0dab43c31 New implementation of data structure analysis. Only local analysis has been
implemented so far.

llvm-svn: 2871
2002-07-10 22:38:08 +00:00
Chris Lattner b2c5cb2525 Disable folding g-e-p instructions into loads and stores.
llvm-svn: 2870
2002-07-10 22:37:17 +00:00
Chris Lattner 87d180e7c6 Disable pool allocation stuff until data structure analysis is sorted back out
llvm-svn: 2869
2002-07-10 22:36:47 +00:00
Chris Lattner 3e35cef186 Reimplement data structure analysis
llvm-svn: 2868
2002-07-10 22:36:26 +00:00
Chris Lattner b723f9fc25 Fix broken test
llvm-svn: 2867
2002-07-10 22:31:09 +00:00
Vikram S. Adve 2a5085af8c Include Makefile.singlesrc in order to compile .c tests.
Some of these are not regression tests and this directory needs
to be reorganized, but the tests are important.

llvm-svn: 2866
2002-07-10 22:02:37 +00:00
Vikram S. Adve 253d9e40a2 Some of these are feature tests, not regression tests.
This directory needs to be reorganized and some of the tests
need changes to make them executable.  Also comments would help...

llvm-svn: 2865
2002-07-10 21:54:05 +00:00
Vikram S. Adve 72623d57e4 Bug fix: cast (bool) has higher precedence than %... who knew!
llvm-svn: 2864
2002-07-10 21:51:46 +00:00
Vikram S. Adve 546b6ac3e3 Add support for marking each operand as a %hh, %hm, %lm or %lo.
Represent previous bools and these ones with flags in a single byte
per operand.

llvm-svn: 2863
2002-07-10 21:50:57 +00:00
Vikram S. Adve a7f736eeea Added a few more methods for creating instructions.
llvm-svn: 2862
2002-07-10 21:49:38 +00:00
Vikram S. Adve 6a36c8f2b9 Fix print of BB name in dump().
llvm-svn: 2861
2002-07-10 21:45:30 +00:00
Vikram S. Adve f089faa7f6 Add support for marking each operand as a %hh, %hm, %lm or %lo.
Represent previous bools and these ones with flags in a single byte
per operand.

llvm-svn: 2860
2002-07-10 21:45:04 +00:00
Vikram S. Adve c5f8b52bd0 Changed interface to insertCallerSavingCode().
llvm-svn: 2859
2002-07-10 21:42:42 +00:00
Vikram S. Adve e997a11251 Stop using pseudo-instructions (SETX, SETUW, SETSW)
and generate actual machine instruction sequences directly.

llvm-svn: 2858
2002-07-10 21:42:13 +00:00
Vikram S. Adve 4e1ee14694 Add support to print %hh, %hm, %lm, or %lo in an operand field.
llvm-svn: 2857
2002-07-10 21:41:21 +00:00
Vikram S. Adve 58c904ace6 Major overhaul to stop using pseudo-instructions (SETX, SETUW, SETSW)
and generate actual machine instruction sequences directly.

Also a couple of bug fixes in code for putting constants into registers:
-- Do *not* sign-extend unsigned constant that is shorter than int reg size
-- Fix handling of address constant (a GlobalValue) vs. constant that
   must be loaded.

llvm-svn: 2856
2002-07-10 21:39:50 +00:00
Vikram S. Adve 4aee77c70b More important fixes:
-- FP argument to a function with no prototype going on stack
   was not being copied to the stack in colorCallArgs().
-- Put caller-saving code *before* argument copying code so that
   we don't trash a register before saving it!
-- Two other minor fixes.

llvm-svn: 2855
2002-07-10 21:36:00 +00:00
Vikram S. Adve 9423a4d0a5 Put caller-saving code *before* argument copying code!
(This file has a minor change required for this fix.)

llvm-svn: 2854
2002-07-10 21:30:17 +00:00
Vikram S. Adve 075ee8a836 Minor change in comments.
llvm-svn: 2853
2002-07-10 21:29:22 +00:00
Chris Lattner 5a9f63ef4e *** empty log message ***
llvm-svn: 2852
2002-07-10 16:48:17 +00:00
Chris Lattner fd5e6e0fb8 Allow specifying a module for context instead of a slot calculator directly
llvm-svn: 2851
2002-07-10 16:48:14 +00:00
Chris Lattner 54ef5ab8a0 Add a new testcase. It actually is not infinite looping. It just takes
FOREVER to run.  That's the bug.  :)

llvm-svn: 2850
2002-07-09 19:58:06 +00:00
Vikram S. Adve acceb1edff Disabling reassociate pass until it is fixed.
llvm-svn: 2849
2002-07-09 19:53:09 +00:00
Chris Lattner 2c13d473ef New testcase for problem effecting mst
llvm-svn: 2848
2002-07-09 19:41:21 +00:00
Anand Shukla 046fe57511 changed mem_fun to std::mem_fun
llvm-svn: 2847
2002-07-09 19:18:56 +00:00
Anand Shukla 4ddf053a63 added std:: to hash_set
llvm-svn: 2846
2002-07-09 19:18:16 +00:00
Anand Shukla 7e882db2f4 Added std:: to mem_fun for 64-bit gcc
llvm-svn: 2845
2002-07-09 19:16:59 +00:00
Chris Lattner f6d3cb95cf Implementing shift left & shift right on pointers
llvm-svn: 2844
2002-07-09 18:42:36 +00:00
Chris Lattner d6e237ff52 Include header in the compiler-neutral location
llvm-svn: 2843
2002-07-09 16:50:24 +00:00
Vikram S. Adve a3697666eb Added support for printing constant global references to
assembly.

llvm-svn: 2842
2002-07-09 12:30:29 +00:00
Vikram S. Adve 24132e8983 Add makefile-mode flag for emacs.
llvm-svn: 2841
2002-07-09 12:04:21 +00:00
Vikram S. Adve 4b581be494 Fix iteration and InsertPos bugs introduced when Chris changed over to ilist.
llvm-svn: 2840
2002-07-08 23:37:07 +00:00
Vikram S. Adve 5eb69429aa Numerous changes in interface to class SparcRegInfo corresponding to
changes in class MachineRegInfo (see MachineRegInfo.h for details).

Added {LD,ST}[X]FSR instructions.

llvm-svn: 2839
2002-07-08 23:34:10 +00:00
Vikram S. Adve 1ce4096033 class MachineCodeForBasicBlock is now an annotation on BasicBlock.
llvm-svn: 2838
2002-07-08 23:31:24 +00:00
Vikram S. Adve 3bb830d337 BA no longer has the unused CC operand.
llvm-svn: 2837
2002-07-08 23:30:59 +00:00
Vikram S. Adve 82190d3e73 Have to save a boolean (setCC) value whenever use is outside the current
basic block.

Mark setCCInstr used as dest. of conditional-move as both a def and a use.

BA instruction no longer has the unused CC argument.

llvm-svn: 2836
2002-07-08 23:30:14 +00:00
Vikram S. Adve c564520c5c BA has only one argument.
Added LDFSR, LDXFSR, STFSR and STXFSR.
Fixed operands info for RDCCR, WRCCR.

llvm-svn: 2835
2002-07-08 23:25:17 +00:00
Vikram S. Adve aee6701e63 Significant changes to correctly spill CC registers and to correctly
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
   Also, cpMem<->Reg functions now return a vector of machine instructions.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
   needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
   since regs used to save values *across* an instruction are not obvious
   either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
   This is needed for conditional move operations.
   So an operand may need spill code both before and after the instruction.

Other changes:
-- Added several get{Class,Type} functions.
-- Added unified-to-local register number conversion.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.
-- Suggest/Color methods may modify the MachineInstr (and always did),
   so don't make that argument const!
-- Caller-saving code doesn't need its special purpose code for
   handling CC registers since cpMem<->Reg handle those correctly now.

llvm-svn: 2834
2002-07-08 23:23:12 +00:00
Vikram S. Adve 7228f0c404 Significant changes to correctly spill CC registers and to correctly
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
   needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
   since regs used to save values *across* an instruction are not obvious
   either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
   This is needed for conditional move operations.
   So an operand may need spill code both before and after the instruction.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.

llvm-svn: 2833
2002-07-08 23:15:32 +00:00
Vikram S. Adve 1dfb4079b7 MachineInstr* in vector are not const (and never really were)
because operands may be modified directly to set register.
Also, class MachineCodeForBasicBlock is now an annotation on BasicBlock.

llvm-svn: 2832
2002-07-08 23:07:26 +00:00
Vikram S. Adve 35bac4a658 Rename static struct Initializer to avoid name conflict with BB.
llvm-svn: 2831
2002-07-08 23:04:31 +00:00
Vikram S. Adve 4180fe41c2 Fix printing of BB in dump.
llvm-svn: 2830
2002-07-08 23:03:54 +00:00
Vikram S. Adve 2bd7ae169d Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.h.
This class is now an annotation on BasicBlock.

llvm-svn: 2829
2002-07-08 23:03:10 +00:00
Vikram S. Adve a9c93af49f MachineInstr::dump() now takes no arguments.
llvm-svn: 2828
2002-07-08 23:01:46 +00:00
Vikram S. Adve f0b84cefb0 Implementation of class MachineCodeForBasicBlock.
Moved here from MachineInstr.cpp to make it an annotation on BasicBlock.

llvm-svn: 2827
2002-07-08 23:01:11 +00:00
Vikram S. Adve 19c55db0d9 A single MachineInstr operand may now be both a def and a use,
so additional dep. edges have to be added.
This was needed to correctly handle conditional move instructions!
MachineCodeForBasicBlock is now an annotation on BasicBlock.
Renamed "earliestForNode" to "earliestReadyTimeForNode".

llvm-svn: 2826
2002-07-08 22:59:23 +00:00
Vikram S. Adve ae219e24ba A single MachineInstr operand may now be both a def and a use.
llvm-svn: 2825
2002-07-08 22:56:34 +00:00
Vikram S. Adve 00ee3ee0d3 cpMem<->Reg functions now support CC registers (int and FP) correctly.
A scratch register has to be provided when needed to do the copy.
Also, cpMem<->Reg functions now return a vector of machine instructions.

Added several get{Class,Type} functions.

Suggest/Color methods may modify the MachineInstr (and always did),
so don't make that argument const!

llvm-svn: 2824
2002-07-08 22:44:14 +00:00
Vikram S. Adve dc21fb7775 Interface to class MachineCodeForBasicBlock.
Moved here from MachineInstr.h to make it an annotation on BasicBlock.

llvm-svn: 2823
2002-07-08 22:40:34 +00:00
Vikram S. Adve beb364051b getUsableUniRegAtMI interface simplified slightly.
llvm-svn: 2822
2002-07-08 22:39:36 +00:00
Vikram S. Adve 6c013a9689 Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.{cpp,h}.
An (explicit or implicit) operand may now be both a def and a use.
Also add a set of regs used by each instruction.
dump() no longer takes an optional argument, which doesn't work in gdb.

llvm-svn: 2821
2002-07-08 22:38:45 +00:00
Vikram S. Adve ff045b2e18 MachineInstr* in vector are not const (and never really were)
because operands may be modified directly to set register.

llvm-svn: 2820
2002-07-08 22:34:40 +00:00
Vikram S. Adve 50684c092d Added two more helper functions for instruction creation.
llvm-svn: 2819
2002-07-08 22:33:45 +00:00
Vikram S. Adve 6e792fca91 Moved MachineCodeForBB to be an annotation on BasicBlock.
llvm-svn: 2818
2002-07-08 22:31:11 +00:00
Anand Shukla 2d3d20b09f changes BBsorting and oredering
llvm-svn: 2817
2002-07-08 19:37:06 +00:00
Anand Shukla ff72c798ac small corrections
llvm-svn: 2816
2002-07-08 19:36:39 +00:00
Anand Shukla 11f4262874 changed function numbering
llvm-svn: 2815
2002-07-08 19:36:01 +00:00
Anand Shukla bc7054b466 Add new << to allow printing modules by reference.
llvm-svn: 2814
2002-07-03 16:52:15 +00:00
Chris Lattner 33422fedc2 *** empty log message ***
llvm-svn: 2813
2002-06-30 16:25:25 +00:00
Chris Lattner a3a1ba1d6a Clean up anands patch
llvm-svn: 2812
2002-06-30 16:25:21 +00:00
Chris Lattner e3e86f7027 Strip the symbols out of the bytecode to inflate generated executables less.
llvm-svn: 2811
2002-06-30 16:25:07 +00:00
Chris Lattner c19be16c7b YEs, we really do want to sort.
llvm-svn: 2810
2002-06-30 16:20:02 +00:00
Chris Lattner f119a2b1df Yes, we REALLY DO want to run the reassociate pass.
llvm-svn: 2809
2002-06-30 16:19:14 +00:00
Chris Lattner c28c7b9ccf Remove diff-cluttering tags
llvm-svn: 2808
2002-06-30 16:12:03 +00:00
Chris Lattner dec26513ad Remove tag that just clutters diffs
llvm-svn: 2807
2002-06-30 16:08:25 +00:00
Chris Lattner e8b6196f28 Fix anands changes
llvm-svn: 2806
2002-06-30 16:07:20 +00:00
Chris Lattner 0a30bda280 Convert tabs to spaces
llvm-svn: 2805
2002-06-30 16:04:37 +00:00
Chris Lattner 9e5b6904e5 Fix anand's last checkin
llvm-svn: 2804
2002-06-30 16:01:15 +00:00
Chris Lattner 03b18721be Fix comment
llvm-svn: 2803
2002-06-30 15:50:09 +00:00
Chris Lattner 0a0c5341da Cleanup
llvm-svn: 2802
2002-06-28 22:06:39 +00:00
Anand Shukla 8c37789a33 changes for 64bit gcc
llvm-svn: 2801
2002-06-25 22:07:38 +00:00
Anand Shukla 949659c0e2 added include<iostream> for cerr
llvm-svn: 2800
2002-06-25 22:04:00 +00:00
Anand Shukla fef3241cc6 Changes for 64bit gcc
llvm-svn: 2799
2002-06-25 21:57:48 +00:00
Anand Shukla dfe130c161 correcting makefile: incorrectly checked in wrong version earlier
llvm-svn: 2798
2002-06-25 21:44:44 +00:00
Anand Shukla 68c9977d7f Changes for 64bit gcc
llvm-svn: 2797
2002-06-25 21:43:28 +00:00
Anand Shukla 7e9d0710e6 added include<iostream> for cerr
llvm-svn: 2796
2002-06-25 21:29:10 +00:00
Anand Shukla 2ac04a0083 changes to make it compatible with 64bit gcc
llvm-svn: 2795
2002-06-25 21:18:19 +00:00
Anand Shukla 21906891d7 additions and bug fixes
llvm-svn: 2794
2002-06-25 21:14:58 +00:00
Anand Shukla af26b39bc5 added include<iostream> for cerr
llvm-svn: 2793
2002-06-25 21:12:25 +00:00
Anand Shukla 2bc6419a82 changes to make it compatible with 64bit gcc
llvm-svn: 2792
2002-06-25 21:07:58 +00:00
Anand Shukla 458496c060 changes to make it compatible with 64bit gcc
llvm-svn: 2791
2002-06-25 20:55:50 +00:00
Anand Shukla eaa2e7204e changes to make it compatible with 64bit gcc
llvm-svn: 2790
2002-06-25 20:44:04 +00:00
Anand Shukla ff4c42b7c3 changes to make it compatible with 64bit gcc
llvm-svn: 2789
2002-06-25 20:35:19 +00:00
Anand Shukla 4fc92edcc6 minor change in removing endl
llvm-svn: 2788
2002-06-25 20:34:54 +00:00
Chris Lattner 2d38db3b45 We must with with GCC 2.95 :(
llvm-svn: 2787
2002-06-25 20:33:28 +00:00
Anand Shukla f1c0d920e3 changes to make it compatible with 64bit gcc
llvm-svn: 2786
2002-06-25 20:22:25 +00:00
Chris Lattner 55d3b0d266 Avoid calling LLVM "Strongly typed"
llvm-svn: 2785
2002-06-25 20:20:08 +00:00
Anand Shukla f1aafa4236 Added setSuccessor() method to terminator instructions
llvm-svn: 2784
2002-06-25 20:17:40 +00:00
Chris Lattner 268e8dd791 New testcase
llvm-svn: 2783
2002-06-25 19:53:12 +00:00
Chris Lattner daf228fe8b Add borders to truth tables
llvm-svn: 2782
2002-06-25 18:06:50 +00:00
Chris Lattner d8f8ede5eb Minor tuning and fleshing out of the language reference.
llvm-svn: 2781
2002-06-25 18:03:17 +00:00
Chris Lattner 7965113d22 Build all subdirectories
llvm-svn: 2780
2002-06-25 16:16:20 +00:00
Chris Lattner 113f4f4609 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner 7076ff29ed MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner fda72b1aad *** empty log message ***
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner 6e3c5fada6 Description of a large patch that I checked in
llvm-svn: 2776
2002-06-25 16:09:22 +00:00
Chris Lattner 5aa3a0779e Simplify the code that adds passes so compilation can stop after any step
llvm-svn: 2775
2002-06-25 15:57:43 +00:00
Chris Lattner f8b0668cc1 * Update with MegaPatch
* Fix various bugs

llvm-svn: 2774
2002-06-25 15:57:03 +00:00
Chris Lattner 069a795940 * Update to work with Megapatch
* Add two new checks:
  * PHI nodes must be the first thing in a basic block, all grouped together
  * All basic blocks should only end with terminator insts, not contain them

llvm-svn: 2773
2002-06-25 15:56:27 +00:00
Chris Lattner 2ae9cda097 Remove DynamicConstantMerge pass, because it did not fit in with the Pass
system correctly.

llvm-svn: 2772
2002-06-25 15:55:29 +00:00
Chris Lattner 6eeda027c7 Remove "fixers" for problems in GCC generated code that cannot be generated
anymore.

llvm-svn: 2771
2002-06-25 15:55:03 +00:00
Anand Shukla 8c1c854022 Relocating Graph.h
llvm-svn: 2770
2002-06-25 14:28:55 +00:00
Chris Lattner 08dd46a661 Test more thoroughly
llvm-svn: 2769
2002-06-24 21:37:08 +00:00
Chris Lattner 0da785168b Expose the analyzer
llvm-svn: 2768
2002-06-24 21:35:50 +00:00
Chris Lattner e2d7896d9b Basic test of the inlinr
llvm-svn: 2767
2002-06-24 17:46:05 +00:00
Chris Lattner c917d106aa Testcase for unimplemented feature
llvm-svn: 2766
2002-06-24 17:45:37 +00:00
Chris Lattner 0df3511df9 Checkin descriptive note
llvm-svn: 2765
2002-06-24 16:49:55 +00:00
Chris Lattner 5d5824b77a Mark some stuff as done
llvm-svn: 2764
2002-06-10 21:15:48 +00:00
Chris Lattner 18b412df5e New testcases for verifier
llvm-svn: 2763
2002-06-08 17:33:16 +00:00
Chris Lattner 2152e03bfd Fix constness
llvm-svn: 2762
2002-06-05 18:11:37 +00:00
Chris Lattner c0b158b94d Fix Constness problems
llvm-svn: 2761
2002-06-05 18:08:26 +00:00