oota-llvm.git
21 years agoSeperate stats for DCE'd functions and vars
Chris Lattner [Thu, 18 Jul 2002 06:40:04 +0000 (06:40 +0000)]
Seperate stats for DCE'd functions and vars

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2961 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Code cleanups
Chris Lattner [Thu, 18 Jul 2002 05:18:37 +0000 (05:18 +0000)]
* Code cleanups
* Fix a REALLY misleading error message

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2960 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago*** empty log message ***
Chris Lattner [Thu, 18 Jul 2002 04:43:20 +0000 (04:43 +0000)]
*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2959 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* s/method/function
Chris Lattner [Thu, 18 Jul 2002 04:43:16 +0000 (04:43 +0000)]
* s/method/function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2958 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* s/method/function
Chris Lattner [Thu, 18 Jul 2002 04:42:35 +0000 (04:42 +0000)]
* 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2957 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Thu, 18 Jul 2002 04:25:11 +0000 (04:25 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2956 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcases for bug in globaldce
Chris Lattner [Thu, 18 Jul 2002 04:01:02 +0000 (04:01 +0000)]
New testcases for bug in globaldce

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2955 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoOnly functions with external linkage can be resolved to function declarations.
Chris Lattner [Thu, 18 Jul 2002 03:01:24 +0000 (03:01 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2954 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Rewrite loop to be slightly more efficient (arguably)
Chris Lattner [Thu, 18 Jul 2002 02:31:03 +0000 (02:31 +0000)]
* Rewrite loop to be slightly more efficient (arguably)
* Fix a MAJOR thinko that was causing bad links to happen on Spec

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2953 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoThe graph is more accurate when I don't completely ignore the return value.
Chris Lattner [Thu, 18 Jul 2002 01:58:24 +0000 (01:58 +0000)]
The graph is more accurate when I don't completely ignore the return value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2952 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Correctly get prototype for void*malloc(size_t)
Chris Lattner [Thu, 18 Jul 2002 00:18:01 +0000 (00:18 +0000)]
* Correctly get prototype for void*malloc(size_t)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2951 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixes to be LP64 correct
Chris Lattner [Thu, 18 Jul 2002 00:15:29 +0000 (00:15 +0000)]
Fixes to be LP64 correct

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2950 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* ConstExpr::getelementptr now takes a vector of Constants not Values
Chris Lattner [Thu, 18 Jul 2002 00:14:50 +0000 (00:14 +0000)]
* ConstExpr::getelementptr now takes a vector of Constants not Values
* Assert things instead of printing an error and returning null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2949 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoConstExpr::getelementptr now takes a vector of Constants not Values
Chris Lattner [Thu, 18 Jul 2002 00:14:27 +0000 (00:14 +0000)]
ConstExpr::getelementptr now takes a vector of Constants not Values

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2948 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd a hack to check for a subset of true dominance properties
Chris Lattner [Thu, 18 Jul 2002 00:13:42 +0000 (00:13 +0000)]
Add a hack to check for a subset of true dominance properties

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2947 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoImplement linking of ConstExprs
Chris Lattner [Thu, 18 Jul 2002 00:13:08 +0000 (00:13 +0000)]
Implement linking of ConstExprs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2946 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoLots of bug fixes, add BottomUpClosure, which has bugs, but is a start.
Chris Lattner [Thu, 18 Jul 2002 00:12:30 +0000 (00:12 +0000)]
Lots of bug fixes, add BottomUpClosure, which has bugs, but is a start.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2945 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFirst cut at implementing bottom up analysis
Chris Lattner [Thu, 18 Jul 2002 00:11:28 +0000 (00:11 +0000)]
First cut at implementing bottom up analysis

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2944 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMake getelementptr ConstExpr take a vector of constants not values
Chris Lattner [Thu, 18 Jul 2002 00:11:08 +0000 (00:11 +0000)]
Make getelementptr ConstExpr take a vector of constants not values

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2943 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded check for Function with 0 BB
Mehwish Nagda [Wed, 17 Jul 2002 23:40:33 +0000 (23:40 +0000)]
added  check for Function with 0 BB

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2942 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago*** empty log message ***
Guochun Shi [Wed, 17 Jul 2002 23:05:56 +0000 (23:05 +0000)]
*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2941 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Wed, 17 Jul 2002 22:19:30 +0000 (22:19 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2940 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix prototype to make function.
Chris Lattner [Wed, 17 Jul 2002 21:34:20 +0000 (21:34 +0000)]
Fix prototype to make function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2939 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase, unanalyzed.
Chris Lattner [Wed, 17 Jul 2002 20:04:07 +0000 (20:04 +0000)]
New testcase, unanalyzed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2938 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAnand forgot to check in the makefile corresponding to his previous change
Chris Lattner [Wed, 17 Jul 2002 17:13:01 +0000 (17:13 +0000)]
Anand forgot to check in the makefile corresponding to his previous change
which eliminated the EmitFunctions directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2937 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Remove dead code from ExprTypeConvert.cpp
Chris Lattner [Wed, 17 Jul 2002 17:11:33 +0000 (17:11 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2936 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase finally identified!!
Chris Lattner [Wed, 17 Jul 2002 02:36:02 +0000 (02:36 +0000)]
New testcase finally identified!!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2935 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Add a bunch of debugging features to LevelRaise
Chris Lattner [Tue, 16 Jul 2002 23:49:24 +0000 (23:49 +0000)]
* 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2934 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAvoid !sized assertion failure if Ty is not a sized type
Chris Lattner [Tue, 16 Jul 2002 22:29:37 +0000 (22:29 +0000)]
Avoid !sized assertion failure if Ty is not a sized type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2933 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix bug: test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll
Chris Lattner [Tue, 16 Jul 2002 21:41:31 +0000 (21:41 +0000)]
Fix bug: test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2932 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Tue, 16 Jul 2002 21:33:27 +0000 (21:33 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2931 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd testcase for raise opportunity missed.
Chris Lattner [Tue, 16 Jul 2002 19:10:00 +0000 (19:10 +0000)]
Add testcase for raise opportunity missed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2930 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemoved emitfuncs: now its part of instrument library
Anand Shukla [Tue, 16 Jul 2002 18:59:55 +0000 (18:59 +0000)]
Removed emitfuncs: now its part of instrument library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2929 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMoved over EmitFunctions to this library
Anand Shukla [Tue, 16 Jul 2002 18:58:08 +0000 (18:58 +0000)]
Moved over EmitFunctions to this library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2928 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoremoved this directory
Anand Shukla [Tue, 16 Jul 2002 18:56:29 +0000 (18:56 +0000)]
removed this directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2927 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMoved EmitFunctions.cpp up to instrumentation directory
Anand Shukla [Tue, 16 Jul 2002 18:55:55 +0000 (18:55 +0000)]
Moved EmitFunctions.cpp up to instrumentation directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2926 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Make global variables with external linkage get emitted correctly
Chris Lattner [Tue, 16 Jul 2002 18:35:16 +0000 (18:35 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2925 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBugfix to previous checkin
Chris Lattner [Tue, 16 Jul 2002 18:12:55 +0000 (18:12 +0000)]
Bugfix to previous checkin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2924 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBug fix to RUN line
Chris Lattner [Tue, 16 Jul 2002 18:02:43 +0000 (18:02 +0000)]
Bug fix to RUN line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2923 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNow will profile all Basic Blocks
Mehwish Nagda [Tue, 16 Jul 2002 17:48:27 +0000 (17:48 +0000)]
Now will profile all Basic Blocks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2922 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Cleanup pass
Chris Lattner [Tue, 16 Jul 2002 17:42:54 +0000 (17:42 +0000)]
* 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2921 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Add assertion to ExprTypeConvert to detect error earlier than without it
Chris Lattner [Tue, 16 Jul 2002 17:33:13 +0000 (17:33 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2920 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase distilled from olden-tsp.
Chris Lattner [Tue, 16 Jul 2002 17:32:17 +0000 (17:32 +0000)]
New testcase distilled from olden-tsp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2919 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Tue, 16 Jul 2002 05:38:33 +0000 (05:38 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2918 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded std:: to pair
Anand Shukla [Tue, 16 Jul 2002 00:04:57 +0000 (00:04 +0000)]
added std:: to pair

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2917 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded std:: to vector
Anand Shukla [Tue, 16 Jul 2002 00:04:15 +0000 (00:04 +0000)]
added std:: to vector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2916 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded std:: to string
Anand Shukla [Tue, 16 Jul 2002 00:03:10 +0000 (00:03 +0000)]
added std:: to string

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2915 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded std:: to cerr and endl
Anand Shukla [Tue, 16 Jul 2002 00:02:17 +0000 (00:02 +0000)]
added std:: to cerr and endl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2914 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded the Mapping Pass to out put Mapping Info to .s file
Mehwish Nagda [Mon, 15 Jul 2002 23:58:21 +0000 (23:58 +0000)]
Added the Mapping Pass to out put Mapping Info to .s file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2913 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago*** empty log message ***
Mehwish Nagda [Mon, 15 Jul 2002 23:56:27 +0000 (23:56 +0000)]
*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2912 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoInitial checking : Writes LLVM - MI mappiing to the .s file
Mehwish Nagda [Mon, 15 Jul 2002 23:08:49 +0000 (23:08 +0000)]
Initial checking  : Writes LLVM - MI mappiing to the .s file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2911 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoEnsure ConstExpr constants are unique.
Vikram S. Adve [Mon, 15 Jul 2002 18:20:50 +0000 (18:20 +0000)]
Ensure ConstExpr constants are unique.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2910 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoEnsure ConstExpr constants are unique using a
Vikram S. Adve [Mon, 15 Jul 2002 18:19:33 +0000 (18:19 +0000)]
Ensure ConstExpr constants are unique using a
map of <opcode, operands> to ConstExpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2909 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded duplicate constant expressions to test uniqueness support.
Vikram S. Adve [Mon, 15 Jul 2002 18:18:45 +0000 (18:18 +0000)]
Added duplicate constant expressions to test uniqueness support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2908 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx
Chris Lattner [Mon, 15 Jul 2002 00:10:33 +0000 (00:10 +0000)]
Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2907 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCheck in tests that have been in my tree for a long time
Chris Lattner [Sun, 14 Jul 2002 23:48:42 +0000 (23:48 +0000)]
Check in tests that have been in my tree for a long time

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2906 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMinor rename of output
Chris Lattner [Sun, 14 Jul 2002 23:25:23 +0000 (23:25 +0000)]
Minor rename of output

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2905 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase to track opaque type bug
Chris Lattner [Sun, 14 Jul 2002 23:25:14 +0000 (23:25 +0000)]
New testcase to track opaque type bug

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2904 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMinor additions.
Vikram S. Adve [Sun, 14 Jul 2002 23:18:33 +0000 (23:18 +0000)]
Minor additions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2903 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded support to write out ConstantExpr nodes.
Vikram S. Adve [Sun, 14 Jul 2002 23:14:45 +0000 (23:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2902 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded subclass ConstantExpr to represent expressions consructed from
Vikram S. Adve [Sun, 14 Jul 2002 23:13:17 +0000 (23:13 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2901 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCreate a static version of Instruction::getOpcodeName(opCode) that
Vikram S. Adve [Sun, 14 Jul 2002 23:09:40 +0000 (23:09 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2900 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd support for writing ConstantExpr nodes.
Vikram S. Adve [Sun, 14 Jul 2002 23:08:30 +0000 (23:08 +0000)]
Add support for writing ConstantExpr nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2899 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoWrite out the plane for types first, since values of primitive types
Vikram S. Adve [Sun, 14 Jul 2002 23:07:51 +0000 (23:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2898 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoUse a helper function outputConstantsInPlane in outputConstants.
Vikram S. Adve [Sun, 14 Jul 2002 23:05:53 +0000 (23:05 +0000)]
Use a helper function outputConstantsInPlane in outputConstants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2897 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd support for reading ConstantExpr nodes.
Vikram S. Adve [Sun, 14 Jul 2002 23:05:09 +0000 (23:05 +0000)]
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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2896 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd support for reading ConstantExpr nodes.
Vikram S. Adve [Sun, 14 Jul 2002 23:04:18 +0000 (23:04 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2895 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded support for parsing expressions constructed from constant values.
Vikram S. Adve [Sun, 14 Jul 2002 22:59:28 +0000 (22:59 +0000)]
Added support for parsing expressions constructed from constant values.
(Major new non-terminal is ConstExpr.)

Add YYERROR_VERBOSE and print additional information on errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2894 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDeclare globals llvmAsmtext and llvmAsmleng for use in the parser.
Vikram S. Adve [Sun, 14 Jul 2002 22:49:40 +0000 (22:49 +0000)]
Declare globals llvmAsmtext and llvmAsmleng for use in the parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2893 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCreate a static version of Instruction::getOpcodeName(opCode) that
Vikram S. Adve [Sun, 14 Jul 2002 22:48:20 +0000 (22:48 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2892 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded subclass ConstantExpr to represent expressions consructed from
Vikram S. Adve [Sun, 14 Jul 2002 22:47:54 +0000 (22:47 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2891 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd a couple of virtual functions to support subclass ConstantExpr.
Vikram S. Adve [Sun, 14 Jul 2002 22:46:32 +0000 (22:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2890 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoTest the handling of constant expressions.
Vikram S. Adve [Sun, 14 Jul 2002 22:39:02 +0000 (22:39 +0000)]
Test the handling of constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2889 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAllow tests that use custom commands to run
Chris Lattner [Sun, 14 Jul 2002 22:32:59 +0000 (22:32 +0000)]
Allow tests that use custom commands to run

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2888 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoTest to make sure that 'internal' flags don't get dropped accidentally!
Chris Lattner [Sun, 14 Jul 2002 22:30:45 +0000 (22:30 +0000)]
Test to make sure that 'internal' flags don't get dropped accidentally!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2887 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoinitial version: for emitfuncs pass
Anand Shukla [Fri, 12 Jul 2002 20:28:22 +0000 (20:28 +0000)]
initial version: for emitfuncs pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2886 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded emitfuncs pass, and disabled reassociate pass (needs fixing)
Anand Shukla [Fri, 12 Jul 2002 20:14:27 +0000 (20:14 +0000)]
added emitfuncs pass, and disabled reassociate pass (needs fixing)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2885 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded emitfuncs pass
Anand Shukla [Fri, 12 Jul 2002 20:12:59 +0000 (20:12 +0000)]
Added emitfuncs pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2884 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded EmitFunctions directory
Anand Shukla [Fri, 12 Jul 2002 20:12:07 +0000 (20:12 +0000)]
Added EmitFunctions directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2883 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoInitial makefile
Anand Shukla [Fri, 12 Jul 2002 20:11:24 +0000 (20:11 +0000)]
Initial makefile

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2882 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoInitial version: adds a function table to output code
Anand Shukla [Fri, 12 Jul 2002 20:10:50 +0000 (20:10 +0000)]
Initial version: adds a function table to output code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2881 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Pass the DSGraph around instead of the Function to printing fns
Chris Lattner [Thu, 11 Jul 2002 20:33:32 +0000 (20:33 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2880 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Nodes now keep track of any global variables in them
Chris Lattner [Thu, 11 Jul 2002 20:32:22 +0000 (20:32 +0000)]
* Nodes now keep track of any global variables in them

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2879 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Nodes now keep track of any global variables in them
Chris Lattner [Thu, 11 Jul 2002 20:32:02 +0000 (20:32 +0000)]
* 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2878 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Nodes now keep track of any global variables contained within them
Chris Lattner [Thu, 11 Jul 2002 20:30:18 +0000 (20:30 +0000)]
* Nodes now keep track of any global variables contained within them

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2877 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded std:: to endl
Anand Shukla [Thu, 11 Jul 2002 00:17:17 +0000 (00:17 +0000)]
added std:: to endl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2875 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadded std:: to vector
Anand Shukla [Thu, 11 Jul 2002 00:16:28 +0000 (00:16 +0000)]
added std:: to vector

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2874 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRename DataStructure to LocalDataStructures
Chris Lattner [Wed, 10 Jul 2002 22:42:53 +0000 (22:42 +0000)]
Rename DataStructure to LocalDataStructures

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2873 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew implementation of data structure analysis
Chris Lattner [Wed, 10 Jul 2002 22:42:17 +0000 (22:42 +0000)]
New implementation of data structure analysis
This diff is completely meaningless because this is a replacement
implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2872 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew implementation of data structure analysis. Only local analysis has been
Chris Lattner [Wed, 10 Jul 2002 22:38:08 +0000 (22:38 +0000)]
New implementation of data structure analysis.  Only local analysis has been
implemented so far.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2871 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDisable folding g-e-p instructions into loads and stores.
Chris Lattner [Wed, 10 Jul 2002 22:37:17 +0000 (22:37 +0000)]
Disable folding g-e-p instructions into loads and stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2870 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDisable pool allocation stuff until data structure analysis is sorted back out
Chris Lattner [Wed, 10 Jul 2002 22:36:47 +0000 (22:36 +0000)]
Disable pool allocation stuff until data structure analysis is sorted back out

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2869 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoReimplement data structure analysis
Chris Lattner [Wed, 10 Jul 2002 22:36:26 +0000 (22:36 +0000)]
Reimplement data structure analysis

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2868 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix broken test
Chris Lattner [Wed, 10 Jul 2002 22:31:09 +0000 (22:31 +0000)]
Fix broken test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2867 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoInclude Makefile.singlesrc in order to compile .c tests.
Vikram S. Adve [Wed, 10 Jul 2002 22:02:37 +0000 (22:02 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2866 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSome of these are feature tests, not regression tests.
Vikram S. Adve [Wed, 10 Jul 2002 21:54:05 +0000 (21:54 +0000)]
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...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2865 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBug fix: cast (bool) has higher precedence than %... who knew!
Vikram S. Adve [Wed, 10 Jul 2002 21:51:46 +0000 (21:51 +0000)]
Bug fix: cast (bool) has higher precedence than %... who knew!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2864 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd support for marking each operand as a %hh, %hm, %lm or %lo.
Vikram S. Adve [Wed, 10 Jul 2002 21:50:57 +0000 (21:50 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2863 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded a few more methods for creating instructions.
Vikram S. Adve [Wed, 10 Jul 2002 21:49:38 +0000 (21:49 +0000)]
Added a few more methods for creating instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2862 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix print of BB name in dump().
Vikram S. Adve [Wed, 10 Jul 2002 21:45:30 +0000 (21:45 +0000)]
Fix print of BB name in dump().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2861 91177308-0d34-0410-b5e6-96231b3b80d8