1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

2406 Commits

Author SHA1 Message Date
Chris Lattner
a8fd205112 It is no longer 2001
llvm-svn: 14157
2004-06-11 21:12:22 +00:00
Misha Brukman
4fdc92647b Fix grammar: 's is for possessive only.
llvm-svn: 14155
2004-06-11 16:50:21 +00:00
Reid Spencer
efdd7cd3ac Implement tracking of bytecode instruction size and the number of long
instructions generated.

llvm-svn: 14154
2004-06-11 15:10:38 +00:00
Reid Spencer
7172b26a18 Revert an unneeded interface change to Instruction.h
llvm-svn: 14137
2004-06-11 03:06:43 +00:00
Chris Lattner
b07bf147cd I misled Alkis: LLVM should have isnan, not isunordered.
isunordered(X, Y) === isnan(X) | isnan(Y)

Remove isunordered, add isnan.

llvm-svn: 14132
2004-06-11 02:29:43 +00:00
Alkis Evlogimenos
1ae8b4e7c4 Add the isunordered intrinsic.
llvm-svn: 14127
2004-06-11 01:08:18 +00:00
Reid Spencer
b2f8a70990 Updated the BytecodeAnalysis data structure to contain additional fields
needed for analysis of individual functions.

llvm-svn: 14125
2004-06-10 22:28:11 +00:00
Reid Spencer
aa6ccbcdee Added an isPhiNode(unsigned) static method to determine if an opcode is
a PhiNode or not. Needed by Bytecode Analyzer.

llvm-svn: 14124
2004-06-10 22:27:10 +00:00
Misha Brukman
d3374cf482 Remove extra space.
llvm-svn: 14117
2004-06-10 12:51:35 +00:00
Reid Spencer
ce1adf1ff0 Implemented the bulk of the functionality. Cleaned up the code.
llvm-svn: 14113
2004-06-10 08:09:13 +00:00
Chris Lattner
9a3779e0a0 Add new BinaryOperator::createAdd/Sub/... methods to avoid having to type
llvm::Instruction:: all of the time.

llvm-svn: 14105
2004-06-10 01:43:29 +00:00
Reid Spencer
149dc84ce8 Add some new fields for bytecode analysis.
llvm-svn: 14092
2004-06-09 06:18:53 +00:00
Reid Spencer
323cc6283d Cleaned up a dead header file to prevent duplicate definition warnings
in doxygen.

llvm-svn: 14084
2004-06-09 04:38:34 +00:00
Chris Lattner
2e3aa45491 I checked and no clients expect this to return null for unconditional branches
Simplify code and make it more uniform.

llvm-svn: 14077
2004-06-08 22:03:05 +00:00
Brian Gaeke
fb83999991 Add a forwarding method pop_front() that allows you to delete instructions
from the beginning of a MBB.

llvm-svn: 14074
2004-06-08 18:52:47 +00:00
Brian Gaeke
4b0b12c188 Add a TmpInstruction ctor that doesn't take a MCFI.
llvm-svn: 14073
2004-06-08 18:52:46 +00:00
Chris Lattner
95ac084df9 Apparently a particular vendor compiler uses the struct/class tag to MANGLE
symbols with.  Therefore, if you do not use struct/class consistently, you can
get LINK ERRORS.  grr.

This fixes the link errors for libsupport and vmcore.

-Chris

llvm-svn: 14070
2004-06-08 17:44:21 +00:00
Misha Brukman
db138d0f67 Fix case of doxygen directive `\p': it's lowercase.
llvm-svn: 14068
2004-06-08 13:49:17 +00:00
Chris Lattner
0c385225b2 Add documentation to the TargetFrameInfo class, contributed by Vladimir Prus
llvm-svn: 14060
2004-06-08 06:23:17 +00:00
Reid Spencer
03ec821b37 Clean up documentation and make it possible for the BytecodeAnalyzer to
store the output of the bytecode dumper.

llvm-svn: 14058
2004-06-08 05:55:53 +00:00
Reid Spencer
329505d08b Commit For New Tool: llvm-abcd (Analysis of ByteCode Dumper). This tool
will (eventually) provide statistical analysis of bytecode files as well
as the ability to dump them in a low level format (slot numbers not
resolved). The purpose of this is to aid in the Type!=Value change of
bug 122. With this initial release, llvm-abcd merely dumps out the
bytecode. However, the infrastructure for separating bytecode parsing from
handling the parsing events is in place. The style chosen is similar to
SAX XML parsing where a handler object is called to handlign the parsing
events. This probably isn't useful to anyone but me right now as there is
no analysis yet, and the dumper doesn't work on every bytecode file. It
will probably be useful by the end of this week. Note that there is some
duplication of code from the bytecode reader.  This was done to eliminate
errors from being introduced in the reader and to minimize the impact to
other LLVM developers. At some point, the Analyzer and the Reader will be
integrated to use the same infrastructure. Also, sorry for the minor change
to Instruction.h but I just couldn't bring myself to write code that
depends on Instruction internals.

llvm-svn: 14048
2004-06-07 17:53:43 +00:00
John Criswell
ed7b25499c Added checks for mkstemp and getrusage.
llvm-svn: 14047
2004-06-07 14:26:24 +00:00
Chris Lattner
169b067879 Macros are baaad.
llvm-svn: 14039
2004-06-05 00:54:11 +00:00
Chris Lattner
757a99eb41 Don't #include <unistd.h> directly, go through the config files
llvm-svn: 14038
2004-06-05 00:27:38 +00:00
Chris Lattner
202207c83f Warning foo
llvm-svn: 14035
2004-06-05 00:17:13 +00:00
Misha Brukman
b07dadab93 Revert ostream back to reference: the only user (llvm-tv) no longer needs it.
llvm-svn: 14029
2004-06-04 21:10:35 +00:00
Chris Lattner
6ec14eee8b Add some constants for VC
llvm-svn: 14028
2004-06-04 20:58:34 +00:00
Chris Lattner
1cfb453364 Fix a *really* dumb warning on VC
llvm-svn: 14025
2004-06-04 20:47:19 +00:00
Chris Lattner
68ee80d686 Fix more warnings
llvm-svn: 14024
2004-06-04 20:39:05 +00:00
Chris Lattner
192d223d78 Remove support for printing strings from the cached writer
llvm-svn: 14023
2004-06-04 20:34:51 +00:00
Chris Lattner
73c62c067f GCC doesn't like prefix form of cast with two identifiers I guess.
llvm-svn: 14021
2004-06-04 20:21:53 +00:00
Chris Lattner
db1b83334e Silence a warning
llvm-svn: 14019
2004-06-04 20:10:17 +00:00
Chris Lattner
494d2b2caa Add ssize_t for VC++
llvm-svn: 14018
2004-06-04 20:06:33 +00:00
Chris Lattner
0a5701bc3d <io.h> provides read/write/open/...
llvm-svn: 14017
2004-06-04 20:05:35 +00:00
Chris Lattner
52d1b9e247 Visual C has something resembling a stat function, but it doesn't provide S_ISREG
llvm-svn: 14016
2004-06-04 20:03:06 +00:00
Chris Lattner
4db85f02c4 Make this work on VC++, pull the HAVE_ALLOCA_H case out instead of duplicating
it.  This code can probably be dramatically simplified, as I suspect that the
pragma and other stuff is not needed with C++ compilers.

llvm-svn: 14015
2004-06-04 19:25:50 +00:00
Chris Lattner
646490b874 Add more needed typedefs
llvm-svn: 14014
2004-06-04 19:11:04 +00:00
Chris Lattner
bfe3149bf3 Add explicit casts to silence warnings. There is no need to use snprintf here.
llvm-svn: 14013
2004-06-04 19:10:30 +00:00
Chris Lattner
0dc2095242 Make this work with VC++
llvm-svn: 14012
2004-06-04 19:01:49 +00:00
Chris Lattner
11d0f8d30e Fix a nasty bug that caused areAliases to always return false.
Bug fix courtesy of Anshu Dasgupta

llvm-svn: 14011
2004-06-04 17:03:11 +00:00
Misha Brukman
d608ac24d7 Clarify documentation and use correct doxygen comment form /// vs. // .
Thanks to Vladimir Prus for corrections.

llvm-svn: 14009
2004-06-04 14:51:25 +00:00
Chris Lattner
ee9db04c44 The prototype for ParseCommandLineOptions changed at some point, but this
was never updated.  I guess GCC just ignores the prototype

llvm-svn: 13995
2004-06-03 22:07:26 +00:00
Chris Lattner
a079b13320 Adjust argument to match destination data type
llvm-svn: 13993
2004-06-03 21:14:56 +00:00
Chris Lattner
54280727f7 Don't use identifiers that start with an _
llvm-svn: 13992
2004-06-03 21:12:02 +00:00
Chris Lattner
00604592aa Only use the non-standards-compliant std::distance on the compiler that is
buggy, not for all compilers that are not GCC 3

llvm-svn: 13990
2004-06-03 18:48:59 +00:00
Misha Brukman
0366f47359 Fix case of doxygen directive \p.
llvm-svn: 13985
2004-06-03 15:14:00 +00:00
Brian Gaeke
e3e792cefa Collapse together the abstract superclass TargetRegInfo and SparcV9RegInfo, its
only concrete implementation.

llvm-svn: 13977
2004-06-03 02:45:09 +00:00
Chris Lattner
2963942e84 Delete the V9 specific findOptimalStorageSize method, inlining it into all callers.
Substantially clean up all target implementations by having the OPTIONAL get*Info
methods return a pointer instead of a reference.  This allows us to have default
implementations!

llvm-svn: 13950
2004-06-02 05:53:25 +00:00
Chris Lattner
4ce125fa2c Add a new CopyFile function
llvm-svn: 13944
2004-06-02 00:51:20 +00:00
Chris Lattner
3b0942f64e On win32, process.h provides some of the traditional stuff that unistd
provides.  This seems like a relatively clean way to get it.

llvm-svn: 13936
2004-06-01 23:47:00 +00:00
Alkis Evlogimenos
4ca4d3e7c9 Add comparator useful for natural comparisons on collections with
pointers to objects.

llvm-svn: 13909
2004-05-30 07:45:09 +00:00
Chris Lattner
6548651756 Fix bizzare problems when you include Config/dlfcn and Config/windows.h in
the same xlation unit

llvm-svn: 13885
2004-05-28 21:07:11 +00:00
Chris Lattner
66a81809ff Eliminate this form of SymbolTable::remove. It ignores the type argument
anyway.  Add a form that takes a type_iterator for the C backend.

llvm-svn: 13873
2004-05-28 05:30:29 +00:00
Chris Lattner
a691850f26 Add a new function for the JIT
llvm-svn: 13869
2004-05-28 00:58:48 +00:00
Chris Lattner
77bd6789a8 Add a pair of functions to hide system specific details of mapping a file in for reading.
llvm-svn: 13863
2004-05-28 00:23:48 +00:00
Chris Lattner
93ec1684c5 An "autoconf wrapper" for the infamous windows.h file
llvm-svn: 13849
2004-05-27 20:51:22 +00:00
John Criswell
4b96ba79aa Added a check for a new header file.
My apologies for changing config.h.in.  Now you will all have to
re-configure.

llvm-svn: 13846
2004-05-27 20:40:39 +00:00
Chris Lattner
60be6e4483 Beta-test moving a header from include/Support into the llvm hierarchy:
it seems to work :)

llvm-svn: 13814
2004-05-27 05:42:33 +00:00
Chris Lattner
04dd3fe76d Moved header from include/Support/ to include/llvm/System
llvm-svn: 13810
2004-05-27 05:30:18 +00:00
Alkis Evlogimenos
2c463a8a99 Add constructors that take a BasicBlock to append to, to the rest of
the llvm::Instruction hierarchy.

llvm-svn: 13800
2004-05-27 00:15:23 +00:00
Alkis Evlogimenos
bf27c54995 Inline trivial constructors.
llvm-svn: 13797
2004-05-26 22:07:18 +00:00
Reid Spencer
9a0451787d Provide the correct patch for bug 345. The solution is to add a setTypeName
function to llvmAsmParser.y and then use it in the one place in the grammar
that needs it. Also had to make Type::setName public because setTypeName
needs it in order to retain compatibility with setValueName.

llvm-svn: 13795
2004-05-26 21:48:31 +00:00
Reid Spencer
e4f0ec88eb Tighten up checking on SymbolTable interface to make it illegal to pass a
Type* where a Value* is expected.

llvm-svn: 13794
2004-05-26 21:46:18 +00:00
Alkis Evlogimenos
edff018f18 Refactor common initialization code in private init() functions.
This is a first step in supplying append to basic block constructors
for all instruction types.

llvm-svn: 13793
2004-05-26 21:41:09 +00:00
Misha Brukman
d6ce85d48c Fix spelling of doxygen directive.
llvm-svn: 13791
2004-05-26 17:42:51 +00:00
Reid Spencer
dccf1747a1 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).

llvm-svn: 13785
2004-05-26 07:37:11 +00:00
Reid Spencer
8e6d7148c1 Make the constructor explicit so we can't implicitly convert bool to
SlotTable.

llvm-svn: 13766
2004-05-25 19:09:25 +00:00
Reid Spencer
92adcaf58c Adding the initial implementation of the SlotTable class. This class is
the Abstract Data Type that holds slot number values and associates them
with Type* and Value*. The SlotTable is simply the holder of the slot
numbers and provides a controlled interface for building the table. It does
not enforce any particular idiom or functionality for manipulating the slot
numbers.

This is part of bug_122. The SlotCalculator and SlotMachine classes will
follow.

llvm-svn: 13764
2004-05-25 18:44:51 +00:00
Reid Spencer
122d536042 Removed unused, useless header file.
llvm-svn: 13757
2004-05-25 17:28:35 +00:00
Reid Spencer
495ac831bb Give Type its own dump() method in preparation for Type != Value.
llvm-svn: 13746
2004-05-25 08:46:04 +00:00
Reid Spencer
987a052f3a Completely rewrote the class. SymbolTable now separates Type* from Value* in preparation\
for making Type not derive from Value. There are now separate interfaces \
for looking up, finding, and inserting Types and Values. There are also \
three separate iterator interfaces, one for type planes, one for the types \
(type type plane), and one for values within a type plane. See the \
documentation in the Header file.

llvm-svn: 13745
2004-05-25 08:45:53 +00:00
Reid Spencer
33a58c0a10 Convert dump() method to call Type::dump() instead of Value::dump().
llvm-svn: 13744
2004-05-25 08:45:42 +00:00
Chris Lattner
0185a86e38 Add some helpers
llvm-svn: 13737
2004-05-25 05:32:13 +00:00
Tanya Lattner
7cf16701f7 Moved MachineBasicBlock deconstructor to cpp file and removed it from LeakDetector to fix memory leak bug.
llvm-svn: 13718
2004-05-24 07:14:35 +00:00
Tanya Lattner
aabaaec037 Added MachineFunction parent* to MachineBasicBlock. Customized ilist template
to set the parent when a MachineBasicBlock is added to a MachineFunction.

llvm-svn: 13716
2004-05-24 06:11:51 +00:00
Tanya Lattner
55477a5af1 Changed clone to be const.
Changed copy constructor to set parent, prev, and next pointers to null.

llvm-svn: 13706
2004-05-24 03:14:18 +00:00
Chris Lattner
a65df8b576 Add the new GC intrinsics
llvm-svn: 13686
2004-05-23 21:16:33 +00:00
Chris Lattner
f9d9fd95bd Add a new prototype
llvm-svn: 13685
2004-05-23 21:16:13 +00:00
Chris Lattner
bdc2cf6dec Several *major* changes to the AA interfaces:
1. Provide interfaces so that clients can update alias analyses to reflect
   the changes made by the transformations.
2. Change how alias analysis implementations work overall.  In particular,
   now clients will automatically forward to chained AA implementations: they
   don't have to remember to do it themselves.

llvm-svn: 13678
2004-05-23 21:12:38 +00:00
Chris Lattner
fe63a87a98 Add interfaces to update value numbering results
llvm-svn: 13677
2004-05-23 21:11:17 +00:00
Chris Lattner
0588bd19d2 Rename a method
llvm-svn: 13676
2004-05-23 21:10:58 +00:00
Tanya Lattner
e755fc6689 Fixed up my changes to add support for cloning Machine Instructions.
llvm-svn: 13665
2004-05-23 20:58:02 +00:00
Alkis Evlogimenos
b8938f3fec Remove virtual destructor from InstVisitor. This class should never be
used through a base pointer/reference so inproper destruction should
never be an issue. Removing this last virtual function also saves 4
bytes off each InstVisitor instance.

llvm-svn: 13664
2004-05-23 20:54:39 +00:00
Tanya Lattner
2848065a29 Adding support to clone MachineInstr
llvm-svn: 13661
2004-05-23 19:35:12 +00:00
Vikram S. Adve
35a7240e8a Remember the set of leaders. Also compute on demand and cache the equiv
class for each leader.   Finally, rename Elem2ECLeaderMap to Elem2LeaderMap
(most of the changed lines are only due to the latter).

llvm-svn: 13651
2004-05-23 08:05:14 +00:00
Vikram S. Adve
f4fed4aaa2 Add getCaller() method.
llvm-svn: 13650
2004-05-23 08:02:45 +00:00
Vikram S. Adve
893c53a559 Fix size/offset assertion to allow negative offsets and folded nodes.
llvm-svn: 13644
2004-05-23 07:34:53 +00:00
Brian Gaeke
f00f4ca846 Fix a typo in the head-of-file comment.
Rewrite the comments about the different versions of BuildMI, to
better emphasize their differences.

llvm-svn: 13642
2004-05-23 05:04:00 +00:00
Chris Lattner
628e839194 It's not clear to me whether the old version was correct C++ code, but in
any case it's not portable.

llvm-svn: 13621
2004-05-21 18:38:16 +00:00
Chris Lattner
068c3a1858 Starting an identifier with an _ is not legal C/C++ code.
llvm-svn: 13620
2004-05-21 18:37:13 +00:00
Alkis Evlogimenos
fd3b0971bf Declare function defined in namespace llvm as gcc-3.4 doesn't accept a definition in a namespace of a non-declared function.
llvm-svn: 13602
2004-05-19 19:17:48 +00:00
Misha Brukman
eb2d4f5589 Minor aesthetic alignments; no functional changes.
llvm-svn: 13593
2004-05-17 22:28:21 +00:00
Misha Brukman
d32edbdc09 * Minor aesthetic alignment of iterator declarations
* Removed redundant function comments

llvm-svn: 13592
2004-05-17 22:25:12 +00:00
Brian Gaeke
6e9dd8d3cc Define erase forwarding method on traces
llvm-svn: 13591
2004-05-17 21:17:21 +00:00
Brian Gaeke
b964085c4c Fix a comment.
llvm-svn: 13518
2004-05-12 21:57:23 +00:00
Brian Gaeke
0315644cd7 Add a NextMBBNumber field w/ incrementing accessor method, for
function-level unique numbering of MBBs.

llvm-svn: 13513
2004-05-12 21:35:21 +00:00
Brian Gaeke
a0d9f814da Add a Number field w/ accessor method, for function-level unique numbering
of MBBs.

Add non-const MachineBasicBlock::getParent() accessor method.

llvm-svn: 13512
2004-05-12 21:35:20 +00:00
Chris Lattner
337ea7709a Add support for inserting all prototypes up-front
llvm-svn: 13431
2004-05-09 04:29:49 +00:00
Tanya Lattner
c69bb49340 Fixed up sched graph.
llvm-svn: 13428
2004-05-08 16:14:24 +00:00
Tanya Lattner
9b4ee61855 Registering the ModuloScheduling pass.
llvm-svn: 13427
2004-05-08 16:14:02 +00:00