Commit Graph

2972 Commits

Author SHA1 Message Date
Chris Lattner
8b1b4e20a9 * 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
2002-07-16 18:35:16 +00:00
Chris Lattner
a66c7bfa51 Bugfix to previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2924 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 18:12:55 +00:00
Chris Lattner
0af0dff8a0 Bug fix to RUN line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2923 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 18:02:43 +00:00
Mehwish Nagda
3115540870 Now will profile all Basic Blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2922 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 17:48:27 +00:00
Chris Lattner
9713c4ef46 * 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
2002-07-16 17:42:54 +00:00
Chris Lattner
131454e91d * 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
2002-07-16 17:33:13 +00:00
Chris Lattner
b39df57bf3 New testcase distilled from olden-tsp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2919 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 17:32:17 +00:00
Chris Lattner
c5debd4337 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2918 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 05:38:33 +00:00
Anand Shukla
3edfb64902 added std:: to pair
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2917 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 00:04:57 +00:00
Anand Shukla
18be6fb716 added std:: to vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2916 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 00:04:15 +00:00
Anand Shukla
6c5ed410b2 added std:: to string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2915 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 00:03:10 +00:00
Anand Shukla
4d2da0d7a7 added std:: to cerr and endl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2914 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-16 00:02:17 +00:00
Mehwish Nagda
634cd1c4b4 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
2002-07-15 23:58:21 +00:00
Mehwish Nagda
0226fdb6e7 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2912 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-15 23:56:27 +00:00
Mehwish Nagda
b43086b4b7 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
2002-07-15 23:08:49 +00:00
Vikram S. Adve
ab6317a1e5 Ensure ConstExpr constants are unique.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2910 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-15 18:20:50 +00:00
Vikram S. Adve
d0b1bb01f2 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
2002-07-15 18:19:33 +00:00
Vikram S. Adve
0850978368 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
2002-07-15 18:18:45 +00:00
Chris Lattner
5659dd1af8 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
2002-07-15 00:10:33 +00:00
Chris Lattner
38c42725fe 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
2002-07-14 23:48:42 +00:00
Chris Lattner
98482c3ba7 Minor rename of output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2905 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-14 23:25:23 +00:00
Chris Lattner
161036fd22 New testcase to track opaque type bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2904 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-14 23:25:14 +00:00
Vikram S. Adve
b26ff625f2 Minor additions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2903 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-14 23:18:33 +00:00
Vikram S. Adve
b4dbb4445c 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
2002-07-14 23:14:45 +00:00
Vikram S. Adve
345e0cfb86 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
2002-07-14 23:13:17 +00:00
Vikram S. Adve
c105645c16 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
2002-07-14 23:09:40 +00:00
Vikram S. Adve
a24a0bb0e2 Add support for writing ConstantExpr nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2899 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-14 23:08:30 +00:00
Vikram S. Adve
a7dac3db79 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
2002-07-14 23:07:51 +00:00
Vikram S. Adve
054bd689db Use a helper function outputConstantsInPlane in outputConstants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2897 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-14 23:05:53 +00:00
Vikram S. Adve
c668b7c3ae 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
2002-07-14 23:05:09 +00:00
Vikram S. Adve
c1e4a813a2 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
2002-07-14 23:04:18 +00:00
Vikram S. Adve
d3f7eb0aa4 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
2002-07-14 22:59:28 +00:00
Vikram S. Adve
f946bcdc23 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
2002-07-14 22:49:40 +00:00
Vikram S. Adve
5814008f4b 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
2002-07-14 22:48:20 +00:00
Vikram S. Adve
29ab9f8348 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
2002-07-14 22:47:54 +00:00
Vikram S. Adve
4a717d4a47 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
2002-07-14 22:46:32 +00:00
Vikram S. Adve
37d0e7e3fe Test the handling of constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2889 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-14 22:39:02 +00:00
Chris Lattner
a2fb8c7338 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
2002-07-14 22:32:59 +00:00
Chris Lattner
29acd75af5 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
2002-07-14 22:30:45 +00:00
Anand Shukla
0135729303 initial version: for emitfuncs pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2886 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-12 20:28:22 +00:00
Anand Shukla
45db2c77b5 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
2002-07-12 20:14:27 +00:00
Anand Shukla
0ec220ca37 Added emitfuncs pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2884 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-12 20:12:59 +00:00
Anand Shukla
135b75db49 Added EmitFunctions directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2883 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-12 20:12:07 +00:00
Anand Shukla
41059bc530 Initial makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2882 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-12 20:11:24 +00:00
Anand Shukla
09ba7b34c4 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
2002-07-12 20:10:50 +00:00
Chris Lattner
76d5b489e3 * 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
2002-07-11 20:33:32 +00:00
Chris Lattner
f9ae4c5cb6 * 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
2002-07-11 20:32:22 +00:00
Chris Lattner
c314ac49d7 * 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
2002-07-11 20:32:02 +00:00
Chris Lattner
1dc15b7997 * 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
2002-07-11 20:30:18 +00:00
Anand Shukla
e683f773a4 added std:: to endl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2875 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 00:17:17 +00:00