1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

1607 Commits

Author SHA1 Message Date
Chris Lattner
3710b0d6d1 * Correctly get prototype for void*malloc(size_t)
llvm-svn: 2951
2002-07-18 00:18:01 +00:00
Chris Lattner
6be9ee3029 * 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
3f60c43a80 ConstExpr::getelementptr now takes a vector of Constants not Values
llvm-svn: 2948
2002-07-18 00:14:27 +00:00
Chris Lattner
9b1f5682b5 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
b121676038 Implement linking of ConstExprs
llvm-svn: 2946
2002-07-18 00:13:08 +00:00
Chris Lattner
9c49e62315 Lots of bug fixes, add BottomUpClosure, which has bugs, but is a start.
llvm-svn: 2945
2002-07-18 00:12:30 +00:00
Mehwish Nagda
219eac01f4 added check for Function with 0 BB
llvm-svn: 2942
2002-07-17 23:40:33 +00:00
Chris Lattner
d842f9ff2d 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
20c6eeb1e2 * 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
85a9f9c4b3 * 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
ee9a9d8017 Avoid !sized assertion failure if Ty is not a sized type
llvm-svn: 2933
2002-07-16 22:29:37 +00:00
Chris Lattner
a221573dba Fix bug: test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll
llvm-svn: 2932
2002-07-16 21:41:31 +00:00
Anand Shukla
4bb7a17266 Moved over EmitFunctions to this library
llvm-svn: 2928
2002-07-16 18:58:08 +00:00
Anand Shukla
4da4e0ba0a removed this directory
llvm-svn: 2927
2002-07-16 18:56:29 +00:00
Anand Shukla
03970aa8bf Moved EmitFunctions.cpp up to instrumentation directory
llvm-svn: 2926
2002-07-16 18:55:55 +00:00
Chris Lattner
a01e139a76 * 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
22958b2e75 Bugfix to previous checkin
llvm-svn: 2924
2002-07-16 18:12:55 +00:00
Mehwish Nagda
01b0cf5ea1 Now will profile all Basic Blocks
llvm-svn: 2922
2002-07-16 17:48:27 +00:00
Chris Lattner
0be1cc0f00 * 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
43cfac7e68 * 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
Anand Shukla
14f0ab662d added std:: to pair
llvm-svn: 2917
2002-07-16 00:04:57 +00:00
Anand Shukla
c01ca9bfd4 added std:: to vector
llvm-svn: 2916
2002-07-16 00:04:15 +00:00
Anand Shukla
1c8b99ff5a added std:: to string
llvm-svn: 2915
2002-07-16 00:03:10 +00:00
Anand Shukla
a8a95f234b added std:: to cerr and endl
llvm-svn: 2914
2002-07-16 00:02:17 +00:00
Mehwish Nagda
131db97ea3 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
b73d836e54 Initial checking : Writes LLVM - MI mappiing to the .s file
llvm-svn: 2911
2002-07-15 23:08:49 +00:00
Vikram S. Adve
45eeb8e738 Ensure ConstExpr constants are unique using a
map of <opcode, operands> to ConstExpr.

llvm-svn: 2909
2002-07-15 18:19:33 +00:00
Chris Lattner
1b99c09b2c Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx
llvm-svn: 2907
2002-07-15 00:10:33 +00:00
Vikram S. Adve
ca1f1c58e1 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
d670638ee6 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
846a1514c8 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
e182dd58ae Add support for writing ConstantExpr nodes.
llvm-svn: 2899
2002-07-14 23:08:30 +00:00
Vikram S. Adve
155a8ec344 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
c5355ed343 Use a helper function outputConstantsInPlane in outputConstants.
llvm-svn: 2897
2002-07-14 23:05:53 +00:00
Vikram S. Adve
83551932d4 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
81fee7fa10 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
01595dd6af 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
f2d95b3976 Declare globals llvmAsmtext and llvmAsmleng for use in the parser.
llvm-svn: 2893
2002-07-14 22:49:40 +00:00
Anand Shukla
a10f139779 Added EmitFunctions directory
llvm-svn: 2883
2002-07-12 20:12:07 +00:00
Anand Shukla
d4dae682bc Initial makefile
llvm-svn: 2882
2002-07-12 20:11:24 +00:00
Anand Shukla
edba9ad8a9 Initial version: adds a function table to output code
llvm-svn: 2881
2002-07-12 20:10:50 +00:00
Chris Lattner
f528333ecf * 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
61d394e66f * Nodes now keep track of any global variables in them
llvm-svn: 2879
2002-07-11 20:32:22 +00:00
Chris Lattner
809bd75ead * 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
Anand Shukla
d70cde528d added std:: to endl
llvm-svn: 2875
2002-07-11 00:17:17 +00:00
Anand Shukla
3d7a9691cc added std:: to vector
llvm-svn: 2874
2002-07-11 00:16:28 +00:00
Chris Lattner
5d62e136c5 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
83577a047e Disable folding g-e-p instructions into loads and stores.
llvm-svn: 2870
2002-07-10 22:37:17 +00:00
Chris Lattner
a6842aa353 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
d00a93318e Reimplement data structure analysis
llvm-svn: 2868
2002-07-10 22:36:26 +00:00