Commit Graph

1607 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Anand Shukla
24787fa2ed added std:: to vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2874 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 00:16:28 +00:00
Chris Lattner
c68c31b2d3 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
2002-07-10 22:38:08 +00:00
Chris Lattner
43199a036d 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
2002-07-10 22:37:17 +00:00
Chris Lattner
11910cf7e3 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
2002-07-10 22:36:47 +00:00
Chris Lattner
2b0f739d57 Reimplement data structure analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2868 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 22:36:26 +00:00
Vikram S. Adve
975f6d4f44 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
2002-07-10 21:51:46 +00:00
Vikram S. Adve
cd13e7a5ee Fix print of BB name in dump().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2861 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:45:30 +00:00
Vikram S. Adve
3bc9ef9317 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@2860 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:45:04 +00:00
Vikram S. Adve
6a49a1e321 Changed interface to insertCallerSavingCode().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2859 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:42:42 +00:00
Vikram S. Adve
06019fc8ad Stop using pseudo-instructions (SETX, SETUW, SETSW)
and generate actual machine instruction sequences directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2858 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:42:13 +00:00
Vikram S. Adve
195a5d5093 Add support to print %hh, %hm, %lm, or %lo in an operand field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2857 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:41:21 +00:00
Vikram S. Adve
53fd400cdf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2856 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:39:50 +00:00
Vikram S. Adve
dcde95fbbc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2855 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:36:00 +00:00
Chris Lattner
607dc6880e *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2852 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 16:48:17 +00:00
Anand Shukla
d58290ed3b changed mem_fun to std::mem_fun
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2847 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 19:18:56 +00:00
Anand Shukla
b0ad8b002d Added std:: to mem_fun for 64-bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2845 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 19:16:59 +00:00
Chris Lattner
743cd3e2b8 Implementing shift left & shift right on pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2844 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 18:42:36 +00:00
Vikram S. Adve
ec0de5cb4b Added support for printing constant global references to
assembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2842 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-09 12:30:29 +00:00
Vikram S. Adve
f86b4c1982 Fix iteration and InsertPos bugs introduced when Chris changed over to ilist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2840 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 23:37:07 +00:00
Vikram S. Adve
fe09fb22aa Numerous changes in interface to class SparcRegInfo corresponding to
changes in class MachineRegInfo (see MachineRegInfo.h for details).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2839 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 23:34:10 +00:00
Vikram S. Adve
0b04064054 class MachineCodeForBasicBlock is now an annotation on BasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2838 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 23:31:24 +00:00
Vikram S. Adve
b2debdc5a9 BA no longer has the unused CC operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2837 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 23:30:59 +00:00
Vikram S. Adve
6418eac2f1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2836 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 23:30:14 +00:00