1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
Commit Graph

1998 Commits

Author SHA1 Message Date
Chris Lattner
5f0e00c8b2 Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
why this one was)

Add new method proto

llvm-svn: 10950
2004-01-22 15:26:52 +00:00
Chris Lattner
f2a7d96dde Specialize std::swap correctly
llvm-svn: 10949
2004-01-22 15:26:15 +00:00
Misha Brukman
38664cbb8b To materialize a module, you need to know what functions NEED to be read and
which ones don't, which is state that the parent class doesn't know without
knowing the implementation. Let the children classes implement
materializeModule().

llvm-svn: 10942
2004-01-21 22:54:10 +00:00
Misha Brukman
26b6be3053 If you call abort(), #include <cstdlib>
llvm-svn: 10941
2004-01-21 22:50:12 +00:00
Brian Gaeke
4838716cc4 Regenerated using autoconf-2.57 and autoheader-2.57.
llvm-svn: 10934
2004-01-21 19:39:29 +00:00
Chris Lattner
3910d21d01 Move SlotCalculator.h from include/llvm to include/llvm/Analysis
llvm-svn: 10930
2004-01-20 19:50:12 +00:00
Tanya Lattner
33079fad04 Moved iterators to common file.
llvm-svn: 10925
2004-01-20 17:49:42 +00:00
Chris Lattner
64a4d5c1e4 add a method proto, make a method not inline
llvm-svn: 10921
2004-01-20 00:54:47 +00:00
Chris Lattner
d9e314f73e Add enum for compaction table.
llvm-svn: 10916
2004-01-18 21:09:23 +00:00
Chris Lattner
695d454b4f Add support for representing the "compaction table"
Change protected members to private.  Nothing should subclass SlotCalculator

llvm-svn: 10912
2004-01-18 21:03:49 +00:00
Chris Lattner
9108f1462c fix copy-and-pasto
llvm-svn: 10907
2004-01-17 22:48:06 +00:00
Chris Lattner
c5d5cc7b8f Revision of Brian's threading support library to be a bit more generic and
platform independent.  This code is completely untested (but never used),
and needs autoconf support for detecting pthreads, but it's a start, and
deletes two emails from my inbox.  :)

llvm-svn: 10906
2004-01-17 19:54:29 +00:00
Alkis Evlogimenos
38f0f867b3 Fold open interval ends handling into
LiveIntervals::Interval::expiredAt() and simplify regalloc code.

llvm-svn: 10894
2004-01-16 20:17:05 +00:00
Alkis Evlogimenos
61db3621bd Use a list instead of a vector to store intervals. This will be needed
when we join intervals and one of the two will need to be removed.

llvm-svn: 10892
2004-01-16 16:06:59 +00:00
Brian Gaeke
1c65ca3a84 Remove configure support for endianness checking, the need for which
Chris has helpfully expunged.

llvm-svn: 10873
2004-01-15 06:22:37 +00:00
Chris Lattner
0184383aa7 Remove ENDIAN_* support. LLVM does not need it anymore.
llvm-svn: 10872
2004-01-15 06:13:58 +00:00
Chris Lattner
4a78294f54 Remove broken doxygen comments
llvm-svn: 10869
2004-01-15 04:37:10 +00:00
Chris Lattner
71acf2763d Improve comments, add support for remembering the constants strings that
are to be emitted.

llvm-svn: 10866
2004-01-14 23:37:43 +00:00
Chris Lattner
7ad2ec9e20 add support for -- for symmetry
llvm-svn: 10865
2004-01-14 23:37:22 +00:00
Chris Lattner
599ab961c4 Add new ConstantArray::isString(), as the conditions for using getString()
are complex enough to check that it should be a seperate method.

While I'm here, improve ConstantArray::getNullValue a bit, though the
FIXME is still quite valid.

llvm-svn: 10850
2004-01-14 17:06:21 +00:00
Chris Lattner
bcd7372d19 The only clients of the slot calculator are now the asmwriter and bcwriter.
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not.  This makes it
reasonable to add bcwriter specific stuff to it as necessary.

llvm-svn: 10837
2004-01-14 02:49:34 +00:00
Alkis Evlogimenos
c73c31a496 Remove allocatable registers vector. It is already provided by
LiveVariables.

llvm-svn: 10830
2004-01-13 22:10:43 +00:00
Brian Gaeke
fafbbe908d Regenerated using autoheader-2.57.
llvm-svn: 10817
2004-01-13 07:09:57 +00:00
Chris Lattner
ebdd628dbf Add new method
llvm-svn: 10809
2004-01-12 23:18:06 +00:00
Chris Lattner
f6f9aafee4 Move this file to lib/VMCore
llvm-svn: 10804
2004-01-12 20:47:29 +00:00
Chris Lattner
0c243f5c04 Eliminate a lot of out-of-date comments, and all of the wierd overloaded
operator constant folding stuff.

llvm-svn: 10803
2004-01-12 20:43:44 +00:00
Chris Lattner
cf1d9df549 The getShift method is no obsolete
llvm-svn: 10797
2004-01-12 19:37:26 +00:00
Chris Lattner
98a45667fb llvm::ConstantFoldInstruction
llvm-svn: 10787
2004-01-12 18:25:56 +00:00
Chris Lattner
28e5347635 Move prototype of llvm::ConstantFoldInstruction
llvm-svn: 10786
2004-01-12 18:25:44 +00:00
Alkis Evlogimenos
ef7c077e63 Make LiveVariables::HandlePhysRegUse and
LiveVariables::HandlePhysRegDef private they use information that is
not in memory when LiveVariables finishes the analysis.

Also update the TwoAddressInstructionPass to not use this interface.

llvm-svn: 10755
2004-01-11 09:18:45 +00:00
Chris Lattner
95db39508d Minor cleanup
llvm-svn: 10752
2004-01-10 21:40:29 +00:00
Chris Lattner
852fe1861f Remove standard C file wrapper
llvm-svn: 10746
2004-01-10 19:15:00 +00:00
Chris Lattner
362ac0817b Remove wrapper for standard C file, use <cstdlib> instead
llvm-svn: 10745
2004-01-10 19:12:44 +00:00
Chris Lattner
67ad3eb9f0 Dead file, use <cstring> instead of this.
llvm-svn: 10743
2004-01-10 19:10:22 +00:00
Chris Lattner
00f2e379c6 remove obsolete file
llvm-svn: 10740
2004-01-10 19:00:26 +00:00
Chris Lattner
d9020d0485 Remove an obsolete method, including its _long_ out of date comment.
This is an incremental step towards fixing PR82

llvm-svn: 10723
2004-01-09 05:45:58 +00:00
Chris Lattner
1013a3ae58 Remove yet another obsolete comment :)
llvm-svn: 10720
2004-01-08 22:28:45 +00:00
Brian Gaeke
4fecad2bb2 Fix typos. Rewrite head-of-file comment.
llvm-svn: 10719
2004-01-08 22:21:59 +00:00
Brian Gaeke
a1f8f69add Fix typos. Regularize include guard.
llvm-svn: 10718
2004-01-08 22:21:58 +00:00
Chris Lattner
1736f44b1d Improve encapsulation in the Loop and LoopInfo classes by eliminating the
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.

llvm-svn: 10714
2004-01-08 00:09:44 +00:00
Chris Lattner
2ef279d638 add new intrinsic
llvm-svn: 10700
2004-01-06 05:32:17 +00:00
Chris Lattner
455225f717 add new method
llvm-svn: 10699
2004-01-06 05:31:57 +00:00
Chris Lattner
d3277ccf56 /me slaps forehead
llvm-svn: 10693
2004-01-05 05:45:25 +00:00
Chris Lattner
f9d6642d90 Add some intrinsics
llvm-svn: 10690
2004-01-05 05:35:34 +00:00
Chris Lattner
0aaaa6b6b0 Initial implementation of some source-level debugging stuff
llvm-svn: 10684
2004-01-05 05:23:38 +00:00
Chris Lattner
d11cffdfc6 Add new ExecutionEngine::getGlobalValueAtAddress method, which can efficiently
turn a memory address back into the LLVM global object that starts at that
address.  Note that this won't cause any additional datastructures to be built
for clients of the EE that don't need this information.

llvm-svn: 10673
2003-12-31 20:19:31 +00:00
Chris Lattner
a00f627c1d * Add a new helper progress method
* Make sure that the user sees the 100% mark
* Don't bother printing out X.0%, just print out X%

llvm-svn: 10672
2003-12-31 10:20:38 +00:00
Chris Lattner
167644f2e1 Add some comments, add a new getGlobalVariable method
llvm-svn: 10670
2003-12-31 08:42:27 +00:00
Chris Lattner
3f6af8506e * Make Module::getTypeName const
* Add new Module::getTypeByName method
* Group methods in Module.cpp better

llvm-svn: 10668
2003-12-31 07:09:33 +00:00
Chris Lattner
24a9176b66 Make the lookup method const.
llvm-svn: 10667
2003-12-31 07:08:19 +00:00
Chris Lattner
bb7e1ba75c add new function
llvm-svn: 10665
2003-12-31 06:16:02 +00:00
Chris Lattner
4665cfa458 clarify comments
llvm-svn: 10663
2003-12-31 05:45:16 +00:00
Chris Lattner
ef4810619d New class, useful for command-line interactive programs.
llvm-svn: 10662
2003-12-31 05:40:02 +00:00
Chris Lattner
fa545f3641 doxygenify
llvm-svn: 10661
2003-12-31 04:42:00 +00:00
Chris Lattner
ad4af70911 Add new function
llvm-svn: 10648
2003-12-30 07:35:47 +00:00
Chris Lattner
412295aeaa Further revisions of the FDHandle idea. In this version we use ownership
semantics that are the same as those used by std::auto_ptr.  This allows
copying of FDHandle's, but copying transfers ownership.

llvm-svn: 10646
2003-12-30 02:45:16 +00:00
Chris Lattner
bbc20a4d18 Add a new class useful for providing fully materialized modules to ExecutionEngine's
llvm-svn: 10645
2003-12-30 02:44:04 +00:00
Chris Lattner
9024121340 Add trivial exception specs to produce better code since the methods cannot
be inlined.

llvm-svn: 10643
2003-12-29 21:43:58 +00:00
Chris Lattner
6317315a2f Factor FDHandle out of the bytecode reader into the FileUtilities.h support
routines.

llvm-svn: 10642
2003-12-29 21:35:05 +00:00
Chris Lattner
f1cec019d4 add new function
llvm-svn: 10638
2003-12-29 05:06:38 +00:00
Chris Lattner
c37577eb9f Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.

llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Alkis Evlogimenos
fc01aac4d8 Add coalescing to register allocator. A hint is added to each interval
which denotes the register we would like to be assigned to (virtual or
physical). In register allocation, if this hint exists and we can map
it to a physical register (it is either a physical register or it is a
virtual register that already got assigned to a physical one) we use
that register if it is available instead of a random one in the free
pool.

llvm-svn: 10634
2003-12-28 17:58:18 +00:00
Alkis Evlogimenos
24b3159dfc Add TargetInstrInfo::isMoveInstr() to support coalescing in register
allocation.

llvm-svn: 10633
2003-12-28 17:35:08 +00:00
Chris Lattner
869549f54b We may now pass IntrinsicLowering implementations into these methods
llvm-svn: 10630
2003-12-28 09:48:17 +00:00
Chris Lattner
215d4146fe add argument
llvm-svn: 10625
2003-12-28 09:42:49 +00:00
Chris Lattner
cd11b985ba ABC's must have virtual dtors! Shame on me!
llvm-svn: 10624
2003-12-28 08:55:50 +00:00
Chris Lattner
00a54b7c00 Move header into top-level llvm dir
llvm-svn: 10622
2003-12-28 08:30:07 +00:00
Chris Lattner
8bc92e92ee Add new interface that allows removal of some code from the code generators,
provides for future extensibility, might help the LLVA project avoid having to
hack their own LLI, and provides support required for the experimental Venus
project.

llvm-svn: 10620
2003-12-28 08:19:13 +00:00
Chris Lattner
7e4c7347ad New method
llvm-svn: 10615
2003-12-26 06:50:15 +00:00
Chris Lattner
4f8b788c30 Rename 'run' to 'runFunction' to emphasize that it is usable to run any
function in a module, not just main

llvm-svn: 10608
2003-12-26 06:12:25 +00:00
Chris Lattner
e462353594 Hrm is a really nasty ommission. The lack of this destructor was causing abstract
types to never be deleted, manifesting itself as many OpaqueType objects being
leaked.  Whoops.

llvm-svn: 10601
2003-12-23 23:25:21 +00:00
Chris Lattner
6ecac445aa Rename ClassifyExpression -> ClassifyExpr
llvm-svn: 10591
2003-12-23 08:03:40 +00:00
Chris Lattner
07a17d5ffe Doxygenize methods, add new getIntPtrType method
llvm-svn: 10578
2003-12-22 05:00:45 +00:00
Chris Lattner
ddc02fd15d fix grammao
llvm-svn: 10576
2003-12-22 04:08:12 +00:00
Alkis Evlogimenos
4401d0a7a3 Change weight into a float so that we can take into account the
nesting level when computing it. Right now the allocator uses:

    w = sum_over_defs_uses( 10 ^ nesting level );

llvm-svn: 10569
2003-12-21 20:19:10 +00:00
Alkis Evlogimenos
4f98b79ef0 Add support for inactive intervals. This effectively reuses registers
for live ranges that fall into assigned registers' holes.

llvm-svn: 10566
2003-12-21 05:43:40 +00:00
Chris Lattner
58d2beb555 Rearrange code, indent for the namespace, add the createMachineFunctionPrinterPass
to passes.h, and add the machien destruction pass to Passes.h

llvm-svn: 10557
2003-12-20 10:18:58 +00:00
Chris Lattner
f987d900a4 Remove sparc specific passes from public headers
llvm-svn: 10552
2003-12-20 09:15:21 +00:00
Chris Lattner
1963b162db Remove a horrible API
llvm-svn: 10551
2003-12-20 09:15:01 +00:00
Chris Lattner
cfa59c4d89 Cleanups to implement PR135
llvm-svn: 10548
2003-12-20 03:35:50 +00:00
Chris Lattner
8fdf8b8d71 Simple refactorings to prepare for lazy global emission
llvm-svn: 10546
2003-12-20 02:45:16 +00:00
Chris Lattner
1cb1efedb3 Rip JIT specific stuff out of TargetMachine, as per PR176
llvm-svn: 10542
2003-12-20 01:22:19 +00:00
Chris Lattner
c1952a1fd6 Add new function
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
Alkis Evlogimenos
9181e0ab5b Remove TwoAddressInstruction from the public headers and add an ID
instead, since this pass doesn't expose any state to its users.

llvm-svn: 10520
2003-12-18 22:40:24 +00:00
Alkis Evlogimenos
90aeecae42 Add TwoAddressInstructionPass to handle instructions that have two or
more operands and the two first operands are constrained to be the
same. The pass takes an instruction of the form:

        a = b op c

and transforms it into:

        a = b
        a = a op c

and also preserves live variables.

llvm-svn: 10512
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
befef566f6 Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
llvm-svn: 10511
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
8e2fcc7d79 Handle multiple virtual register definitions gracefully.
Move some of the longer LiveIntervals::Interval method out of the
header and add debug information to them. Fix bug and simplify range
merging code.

llvm-svn: 10509
2003-12-18 08:48:48 +00:00
Chris Lattner
457dd0b6c7 Add a new AliassetTracker::remove method. Because we need to be able to remove
a pointer from an AliasSet, maintain the pointer values on a doubly linked
list instead of a singly linked list, to permit efficient removal from the
middle of the list.

llvm-svn: 10506
2003-12-18 08:11:56 +00:00
Brian Gaeke
98cfeec17b Fix typo in comment.
llvm-svn: 10487
2003-12-16 21:55:45 +00:00
Chris Lattner
5956155f00 This header is dead
llvm-svn: 10470
2003-12-15 06:39:18 +00:00
Alkis Evlogimenos
ac4fe24ed8 I wonder how this didn't cause any tests to fail...
llvm-svn: 10462
2003-12-14 13:30:19 +00:00
Alkis Evlogimenos
29127b8825 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.

llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Chris Lattner
69a2e9985d Add capability to represent volatile AliasSet's
llvm-svn: 10456
2003-12-14 04:51:34 +00:00
Alkis Evlogimenos
f84f86137b Ignore non-allocatable physical registers in live interval analysis.
llvm-svn: 10449
2003-12-13 11:11:02 +00:00
Chris Lattner
18e6e48ff0 Add new getJITStubForFunction method, which may optionally be implemented by
targets for better performance.

llvm-svn: 10429
2003-12-12 07:10:32 +00:00
Chris Lattner
f0ded5c697 Doxygenify comments, remove extraneous #include
llvm-svn: 10428
2003-12-12 06:31:42 +00:00
Brian Gaeke
a7db493d85 Use uintptr_t for pointer values in the ExecutionEngine.
llvm-svn: 10425
2003-12-12 05:06:09 +00:00
Brian Gaeke
7e09b6d2a7 Fix typo in comment
llvm-svn: 10424
2003-12-12 04:58:13 +00:00
Brian Gaeke
9b3f9806a2 IncludeFile hack to pull in BasicValueNumbering whenever ValueNumbering.h
is included.

llvm-svn: 10397
2003-12-11 05:05:56 +00:00
Brian Gaeke
045d32a78d IncludeFile hack to pull in BasicAliasAnalysis whenever AliasAnalysis.h
is included.

llvm-svn: 10396
2003-12-11 05:05:02 +00:00