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

82 Commits

Author SHA1 Message Date
Chris Lattner
0eb72353e4 Refactor the setName stuff, moving it down the inheritance hierarchy, to
solve a crash in -instcombine -debug that was hit while investigating PR1217

llvm-svn: 34544
2007-02-24 00:55:48 +00:00
Chris Lattner
134ae17654 make mayWriteToMemory a non-virtual function
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Chris Lattner
4534d3fc6e Switch UnaryOperators to default to passing names up by const char* when possible.
This speeds up bcreading by 1.5%.

llvm-svn: 34233
2007-02-13 07:54:42 +00:00
Reid Spencer
591bfa1e0b Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Chris Lattner
29a821859e Now that setcondinst has been eliminated, we can mark Value::SubclassID
const and remove the ugly mutator methods.

llvm-svn: 32860
2007-01-04 02:15:37 +00:00
Reid Spencer
4428c3483b For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.

llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Bill Wendling
7f6a73eb5c Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.

llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Reid Spencer
992d9788b3 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.

llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Chris Lattner
1ab553b24d Override use_back in instruction/basicblock to provide more type information.
llvm-svn: 30678
2006-09-30 22:20:34 +00:00
Chris Lattner
8aa718b0ed Add new SetCondInst::isRelational/isEquality methods. Rename
Instruction::isRelational to Instruction::isComparison.

llvm-svn: 30444
2006-09-17 19:14:47 +00:00
Chris Lattner
a396e6d9ba Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.

llvm-svn: 28898
2006-06-21 16:53:47 +00:00
Chris Lattner
adef4bbf27 This method doesn't need to be virtual, thanks to Reid for pointing this out.
llvm-svn: 28206
2006-05-09 17:29:17 +00:00
Jeff Cohen
19d804b6d6 Fix VC++ level 4 warnings. Because a base class has declared these private, VC++ complains it cannot automatically generate this methods.
llvm-svn: 24751
2005-12-17 00:19:22 +00:00
Chris Lattner
6d5166d861 Remove some dead argument names which irritates GCC at certain warning levels.
llvm-svn: 23979
2005-10-25 17:59:28 +00:00
Chris Lattner
cb28e2f105 add a new helper method
llvm-svn: 22697
2005-08-08 05:21:33 +00:00
Misha Brukman
3f0aa3dbf8 Remove trailing whitespace
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Chris Lattner
1b4201e69f Fix problems compiling with G++ 4.x.x with -pedantic. Thanks to
Vladimir Merzliakov for the patch!

llvm-svn: 20513
2005-03-07 20:35:45 +00:00
Chris Lattner
b177010d51 remove all of the various setName implementations, consolidating them into
Value::setName, which is no longer virtual.

llvm-svn: 20464
2005-03-05 19:51:50 +00:00
Chris Lattner
93642ede7d Remove the second argument to Value::setName, it is never needed.
llvm-svn: 20457
2005-03-05 18:59:36 +00:00
Chris Lattner
d8266ae3dd Adjust to changes in the User class.
llvm-svn: 19888
2005-01-29 00:33:00 +00:00
Chris Lattner
e561ef0261 Add method
llvm-svn: 18368
2004-11-30 02:51:53 +00:00
Chris Lattner
70197d8f29 Add long overdue methods
llvm-svn: 16921
2004-10-11 22:21:13 +00:00
Chris Lattner
78e3b3650e Now that the SparcV9 specific MachineCodeForInstruction class uses it's own
map on the side, Instruction no longer has to be Annotable.  This reduces
the size of the Instruction class by another 4 bytes (on a 32-bit system).

llvm-svn: 14439
2004-06-27 18:57:34 +00:00
Chris Lattner
dd7c37af2e Eliminate the Instruction::iType field, folding it into the Value::VTy field.
This reduces the size of the instruction class by 4 bytes, and means that
isa<CallInst>(V) (for example) only needs to do one load from memory instead
of two.

llvm-svn: 14434
2004-06-27 18:38:24 +00:00
Chris Lattner
b6833e4a48 Consider anything with a ValueType that is >= Instruction to be an instruction
llvm-svn: 14429
2004-06-26 20:51:50 +00:00
Reid Spencer
7172b26a18 Revert an unneeded interface change to Instruction.h
llvm-svn: 14137
2004-06-11 03:06:43 +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
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
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
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
7c46021fe7 Assert if Instruction is being deleted before being removed from BasicBlock.
llvm-svn: 12982
2004-04-16 15:46:43 +00:00
Chris Lattner
252e887094 Ugh, the old sparc backend attaches MachineCodeForInstruction annotations on
LLVM instructions.  Because it contains an explicit cast, we didn't catch it.
I guess instruction's will be annotable for the duration of the sparcv9's
existence.

llvm-svn: 11999
2004-02-29 18:54:23 +00:00
Chris Lattner
ebdd628dbf Add new method
llvm-svn: 10809
2004-01-12 23:18:06 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
8d2a791804 Expose new print methods
llvm-svn: 9620
2003-10-30 23:41:19 +00:00
John Criswell
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
394f190dab Remove unneeded dtors
llvm-svn: 8896
2003-10-06 17:36:49 +00:00
Tanya Lattner
f3da6ac76f Renamed trapping instruction function to be more consistent with other functions in the file.
llvm-svn: 7448
2003-07-31 05:08:02 +00:00
Tanya Lattner
8c2ac118ce Added function to determine if an Instruction may trap.
llvm-svn: 7442
2003-07-31 04:05:50 +00:00
Misha Brukman
88c077722e Removed extra parenthesis and fixed spelling.
llvm-svn: 7359
2003-07-28 16:53:28 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
6c12776232 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
John Criswell
4781723de6 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Chris Lattner
19e35f5a22 Revert modulo scheduling change that should be part of the modulo-sched pass itself,
not part of the Instruction class.

llvm-svn: 5787
2003-04-16 20:30:02 +00:00
Guochun Shi
62370b42ad added some memory for clone function
llvm-svn: 5765
2003-04-06 23:58:44 +00:00
Chris Lattner
497c0d443c Rename Instruction::hasSideEffects() -> mayWriteToMemory()
llvm-svn: 5620
2003-02-24 20:48:32 +00:00
Chris Lattner
2ce9a55285 New isAssociative/isCommutative inspection methods, graciously contributed by
Casey Carter.

llvm-svn: 4459
2002-10-31 04:14:01 +00:00
Chris Lattner
fdf2ca9468 - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.

llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner
7636598d94 Implement support for inserting an instruction into a basic block right when it
is created.

llvm-svn: 3651
2002-09-10 15:36:11 +00:00
Chris Lattner
85cf7de5b9 * Clean up some comments
* Move code out of header file to .cpp files, to make future changes easier
* Add arguments to classes so that they can be automatically inserted into their
  parent structure upon creation.

llvm-svn: 3604
2002-09-06 21:31:57 +00:00