1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

135 Commits

Author SHA1 Message Date
Reid Spencer
d414793dbc For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Reid Spencer
370c74131e For PR778:
Move file-scoped documentation to class-scoped so it is more readily
accessible.

llvm-svn: 28689
2006-06-05 16:29:06 +00:00
Chris Lattner
a3d00d1780 Allow use of isa<InlineAsm>(X) without #including InlineAsm.h
llvm-svn: 25632
2006-01-26 01:54:21 +00:00
Chris Lattner
50ba79e71b Initial checkin of the InlineAsm class
llvm-svn: 25570
2006-01-24 04:13:11 +00:00
Reid Spencer
57db434426 Make ValueSymbolTable (temporarily) a friend of Value so it can mod the
Name of Value instances.

llvm-svn: 25174
2006-01-10 09:45:57 +00:00
Jeff Cohen
0998a3e70e Fix VC++ level 4 warnings.
llvm-svn: 24750
2005-12-17 00:18:06 +00:00
Chris Lattner
2800856064 remove a comma to compile with pedantic gcc
llvm-svn: 23667
2005-10-08 01:24:19 +00:00
Chris Lattner
92616caa1a Split SimpleConstantVal up into its components, so each Constant subclass gets
a different enum value.  This allows 'classof' for these to be really simple,
not needing to call getType() anymore.

This speeds up isa/dyncast/etc for constants, and also makes them smaller.
For example, the text section of a release build of InstCombine.cpp shrinks
from 230037 bytes to 216363 bytes, a 6% reduction.

llvm-svn: 23466
2005-09-27 06:08:32 +00:00
Chris Lattner
9838157648 remove a dead enum value, making a comment above correct again
llvm-svn: 22810
2005-08-16 22:04:58 +00:00
Misha Brukman
3f0aa3dbf8 Remove trailing whitespace
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Misha Brukman
d5e8033d4a Convert tabs to spaces
llvm-svn: 20634
2005-03-16 03:46:55 +00:00
Chris Lattner
60929fdff1 Add a new method, allow symtab to poke name.
llvm-svn: 20468
2005-03-06 02:10:40 +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
fb1c36cdb3 Add new method.
llvm-svn: 20287
2005-02-23 16:50:59 +00:00
Chris Lattner
de2bf4ed11 SubclassID is really a small field. Split it into half and let subclasses
play with the unused part.

llvm-svn: 20043
2005-02-05 01:37:44 +00:00
Chris Lattner
fdbedbbb45 Switch from using an ilist for uses to using a custom doubly linked list.
This list does not provide the ability to go backwards in the list (its
more of an unordered collection, stored in the shape of a list).

This change means that use iterators are now only forward iterators, not
bidirectional.

This improves the memory usage of use lists from '5 + 4*#use' per value to
'1 + 4*#use'.  While it would be better to reduce the multiplied factor,
I'm not smart enough to do so.  This list also has slightly more efficient
operators for manipulating list nodes (a few less loads/stores), due to not
needing to be able to iterate backwards through the list.

This change reduces the memory footprint required to hold 176.gcc from
66.025M -> 57.687M, a 14% reduction.  It also speeds up the compiler,
7.73% in the case of bytecode loading alone (release build loading 176.gcc).

llvm-svn: 19956
2005-02-01 01:22:06 +00:00
Chris Lattner
91422cffe4 Adjust to User.h changes.
llvm-svn: 19884
2005-01-29 00:30:52 +00:00
Reid Spencer
fe4882b78e Added a size_type typedef to LLVM containers to make Visual Studio shut up
(and possibly to make LLVM more x86 64bit friendly).

llvm-svn: 18891
2004-12-13 16:28:53 +00:00
Chris Lattner
dd0094e4ed Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!

llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Chris Lattner
6dd0bb3d27 Add new UndefValueVal type
llvm-svn: 17038
2004-10-16 18:06:07 +00:00
Reid Spencer
67f6472f19 Change Value from a "struct" to a "class" so that VC 7.1 doesn't generate
missing symbols when its referenced as a class.

llvm-svn: 16496
2004-09-23 14:49:45 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
a5d89de2da New methods
llvm-svn: 15462
2004-08-04 04:45:42 +00:00
Chris Lattner
a5e7a83fa9 I demand the ability to say 'if (isa<Value>(V))'!
llvm-svn: 15340
2004-07-30 06:59:15 +00:00
Chris Lattner
07963adecb Add new enum entries for ConstantAggregateZeroVal/ConstantExprVal and
rename ConstantVal to SimpleConstantVal

llvm-svn: 14984
2004-07-19 00:57:40 +00:00
Reid Spencer
a9c7165018 Add a missing space to align comments.
llvm-svn: 14955
2004-07-18 00:56:58 +00:00
Reid Spencer
fe177d219a bug 122:
- Add ValueListTy to TypeTy so that the bcreader can have its own User
  category that won't get factored into any optimizations or cleanup.
- Correct an isa_impl to correctly include GlobalValue now that it isa
  Constant.

llvm-svn: 14925
2004-07-17 23:34:47 +00:00
Chris Lattner
c19f2134fc Final fix for PR341: eliminate operator<<(ostream, Value*). Clients should
now send references to ostreams instead of pointers.  Sending pointers to
ostreams will print their addresses.

llvm-svn: 14849
2004-07-15 02:54:36 +00:00
Chris Lattner
528291513f Add a missing #include
llvm-svn: 14773
2004-07-12 20:25:33 +00:00
Reid Spencer
3e8a01d80f Remove definition and use of OtherVal enumerator. This just fixes a thinko.
llvm-svn: 14634
2004-07-06 01:30:36 +00:00
Reid Spencer
678b551d2b - Remove enumerator TypeVal since Values can't be types any more
- Remove isa_impl relationship between Types and Values
- Add OtherVal so "other" users can interact with Values.

llvm-svn: 14596
2004-07-04 10:52:28 +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
e7d0c7576f Rearrange some code.
llvm-svn: 14427
2004-06-26 20:33:27 +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
Chris Lattner
f7cc508c0a Annotations are evil. This makes Value not derive from Annotable, which makes
all dynamically allocated LLVM values 4 bytes smaller, eliminate some vtables, and
make Value's destructor faster.

This makes Function derive from Annotation now because it is the only core LLVM
class that still has an annotation stuck onto it: MachineFunction.
MachineFunction is obviously horrible and gross (like most other annotations), but
will be the subject of refactorings later in the future.  Besides many fewer
Function objects are dynamically allocated that instructions blocks, constants,
types, etc... :)

llvm-svn: 11878
2004-02-26 08:08:38 +00:00
Chris Lattner
95db39508d Minor cleanup
llvm-svn: 10752
2004-01-10 21:40:29 +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
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
0493113344 Completely rewrite support for the Value::use_* list. Now, all operations on
this list (except use_size()) are constant time.  Before the killUse method
(used whenever something stopped using a value) was linear time, and thus
very very slow for large programs.

This speeds GCCAS up _substantially_ on large programs: almost 2x for 176.gcc:

176.gcc:     77.07s -> 37.38s
177.mesa:     7.59s ->  5.57s
252.eon:     21.02s -> 19.52s (*)
253.perlbmk: 11.40s -> 13.05s
254.gap:      7.25s -> 7.42s

252.eon would speed up a whole lot more, but optimization time is being
dominated by the inlining pass, which needs to be fixed.

llvm-svn: 9159
2003-10-16 16:53:04 +00:00
Chris Lattner
27a1330106 Add new hasOneUse() method. Remove explicit inline qualifiers
llvm-svn: 9132
2003-10-15 16:39:04 +00:00
Chris Lattner
564dbbf299 There is no reason for Value to be an AbstractTypeUser. This just makes things
significantly more complete.  Instead, just make DerivedType's AbstractTypeUser's,
and make Value contain a PATypeHolder.  This will also be more efficient in the
future.

llvm-svn: 8827
2003-10-02 19:44:23 +00:00
Chris Lattner
4e4c763dfc Standardize header file comments
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
d5c685b6fc Add new method
llvm-svn: 8204
2003-08-29 05:08:31 +00:00
Chris Lattner
75e1e892a6 Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
llvm-svn: 6774
2003-06-18 19:22:36 +00:00
Chris Lattner
ab69d9da2f Move annotation to support library
llvm-svn: 5268
2003-01-14 21:29:58 +00:00
Chris Lattner
f4a42d7fb9 - Detemplatize UseTy<> in Value.h, because it's only instantiated for one
type!

llvm-svn: 4093
2002-10-09 00:42:03 +00:00
Chris Lattner
bdb409390d - Remove Value::use_push_back & Value::use_remove
llvm-svn: 4089
2002-10-09 00:25:01 +00:00
Chris Lattner
8e66cea1a7 Group #includes better
llvm-svn: 3887
2002-09-23 17:45:52 +00:00
Chris Lattner
9146e3b8e4 Eliminate setType method
Now the only way to set the type of a value is in the ctor for an object

llvm-svn: 3646
2002-09-10 15:26:27 +00:00
Chris Lattner
69f833618d Convert comments to Doxygen style
llvm-svn: 3507
2002-08-25 22:54:55 +00:00
Chris Lattner
0d323f2cdf Disable the operator= in Value
Disable the copy ctor and operator= in Annotation.h

llvm-svn: 3048
2002-07-24 20:01:57 +00:00
Chris Lattner
e91a294e94 We must with with GCC 2.95 :(
llvm-svn: 2787
2002-06-25 20:33:28 +00:00
Anand Shukla
bddcd163a1 changes to make it compatible with 64bit gcc
llvm-svn: 2786
2002-06-25 20:22:25 +00:00
Chris Lattner
cee706572b *** empty log message ***
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
d8cb4cfb30 Module's are no longer Value's.
llvm-svn: 2347
2002-04-28 04:46:29 +00:00
Chris Lattner
4434e03eb6 Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.

llvm-svn: 2217
2002-04-09 19:59:31 +00:00
Chris Lattner
c49ebac684 * Move casting stuff out to Support/Casting.h
* Add top level virtual print function, disallows instantiating Value's
  directly.
* Provide operator<< for values here, instead of in Assembly/Writer.h

llvm-svn: 2168
2002-04-08 21:51:32 +00:00
Chris Lattner
a874026838 Transform uses of Method into uses of Function.
Rename MethodArgument to FunctionArgument
Fix some _really_ out of date comments

llvm-svn: 1986
2002-03-26 17:48:08 +00:00
Chris Lattner
c481e92886 Rename Method to Function
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Chris Lattner
3dc9a2a61f Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
f6b7da2bb5 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Vikram S. Adve
aff0c3b0f5 Remove extra assert in dyn_cast_or_null.
llvm-svn: 856
2001-10-17 22:39:50 +00:00
Chris Lattner
d9c11e528c Add cast_or_null & dyn_cast_or_null
llvm-svn: 824
2001-10-15 13:41:37 +00:00
Chris Lattner
b66d7f5416 Improve error messages on assertion failure.
llvm-svn: 821
2001-10-15 13:13:32 +00:00
Vikram S. Adve
ebdf1737c4 Cast NULL when requested.
llvm-svn: 803
2001-10-14 23:21:06 +00:00
Chris Lattner
7fc8835f8a Add use_back() methods
llvm-svn: 740
2001-10-13 06:18:19 +00:00
Chris Lattner
a01eda3091 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion

llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner
08b1dde37e Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
ad1b0a1a83 Convert more code to use new style casts
Eliminate old style casts from value.h

llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
4c684cde80 Add more support for new style casts
Convert more code to use them

llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
43781f1f96 Add support for new style casts
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
b59e92797b Add support for newer cleaner isa, cast, dyn_cast
llvm-svn: 693
2001-10-01 13:58:13 +00:00
Chris Lattner
2ab05b6f57 Remove debugging output stuff
llvm-svn: 641
2001-09-19 14:08:25 +00:00
Chris Lattner
7f96c71d97 Remove operator << to Assembly/Writer.h
llvm-svn: 625
2001-09-18 17:03:04 +00:00
Vikram S. Adve
8355be1b92 Added debugging support.
llvm-svn: 601
2001-09-18 12:23:40 +00:00
Chris Lattner
d6a98c11bc Chris seems fond of #include <vector>. Fix these. Also convert use list in
Value to a vector instead of a list.

Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling

llvm-svn: 572
2001-09-14 16:56:32 +00:00
Chris Lattner
9d1629d688 Implement global variable support
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
080104e2fe * Values are AbstactTypeUsers to support abstract types
* SetName now takes extra parameter to support naming types and constants without handles

llvm-svn: 428
2001-09-07 16:25:23 +00:00
Chris Lattner
0ecf68a068 Add annotation support to value
llvm-svn: 363
2001-08-23 17:06:21 +00:00
Chris Lattner
8131335c27 Made the following changes:
* ValueHolder became a 3 argument template.  This allows for BasicBlock to
  use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Module does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
  in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction

llvm-svn: 177
2001-07-14 06:07:58 +00:00
Chris Lattner
159093b8fe Add a new slew of functions to allow dynamic_cast<> like operation for
upcasting Value's to their subclasses.

llvm-svn: 80
2001-06-27 23:27:42 +00:00
Chris Lattner
c819db7005 Updates to support
* Changes in PHI node structure
* Fix to Predecessor iterator

llvm-svn: 23
2001-06-11 15:04:06 +00:00
Chris Lattner
0dcec884f6 Fixes for BB iterators, additional methods added for DCE pass
llvm-svn: 8
2001-06-07 16:58:36 +00:00
Chris Lattner
e6b9b382e2 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00