Commit Graph

2230 Commits

Author SHA1 Message Date
Chris Lattner
ad4705f055 fix grammao
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10576 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-22 04:08:12 +00:00
Alkis Evlogimenos
6b4edbaaf9 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 );


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10569 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21 20:19:10 +00:00
Alkis Evlogimenos
169cfd0196 Add support for inactive intervals. This effectively reuses registers
for live ranges that fall into assigned registers' holes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10566 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21 05:43:40 +00:00
Chris Lattner
3e200e6c3b Rearrange code, indent for the namespace, add the createMachineFunctionPrinterPass
to passes.h, and add the machien destruction pass to Passes.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10557 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:18:58 +00:00
Chris Lattner
73c1366ee2 Remove sparc specific passes from public headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:15:21 +00:00
Chris Lattner
61838824c2 Remove a horrible API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10551 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:15:01 +00:00
Chris Lattner
1514b5b334 Cleanups to implement PR135
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10548 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 03:35:50 +00:00
Chris Lattner
3ddc05bdde Simple refactorings to prepare for lazy global emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10546 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 02:45:16 +00:00
Chris Lattner
1e60a9165d Rip JIT specific stuff out of TargetMachine, as per PR176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:22:19 +00:00
Chris Lattner
abbc2dd779 Add new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10529 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 05:56:28 +00:00
Alkis Evlogimenos
4c080863de Remove TwoAddressInstruction from the public headers and add an ID
instead, since this pass doesn't expose any state to its users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10520 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 22:40:24 +00:00
Alkis Evlogimenos
71499ded4d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10512 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
485ec3c21e Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10511 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
dd2cc65f34 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10509 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:48:48 +00:00
Chris Lattner
2cffeec014 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10506 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:11:56 +00:00
Brian Gaeke
0f7d2e8b8d Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10487 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-16 21:55:45 +00:00
Alkis Evlogimenos
721b4e5715 I wonder how this didn't cause any tests to fail...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10462 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 13:30:19 +00:00
Alkis Evlogimenos
4d7af65903 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 13:24:17 +00:00
Chris Lattner
bb8f4769a2 Add capability to represent volatile AliasSet's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10456 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 04:51:34 +00:00
Alkis Evlogimenos
4c214d2bf0 Ignore non-allocatable physical registers in live interval analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13 11:11:02 +00:00
Chris Lattner
459ccab002 Add new getJITStubForFunction method, which may optionally be implemented by
targets for better performance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10429 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-12 07:10:32 +00:00
Chris Lattner
895be4bae2 Doxygenify comments, remove extraneous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10428 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-12 06:31:42 +00:00
Brian Gaeke
246372f35d Use uintptr_t for pointer values in the ExecutionEngine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10425 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-12 05:06:09 +00:00
Brian Gaeke
92c59d60c9 Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10424 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-12 04:58:13 +00:00
Brian Gaeke
8e32f5e46d IncludeFile hack to pull in BasicValueNumbering whenever ValueNumbering.h
is included.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10397 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-11 05:05:56 +00:00
Brian Gaeke
fc188b95b8 IncludeFile hack to pull in BasicAliasAnalysis whenever AliasAnalysis.h
is included.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10396 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-11 05:05:02 +00:00
Chris Lattner
18cb4c3c74 add two new virtual functions:
The first returns a function pointer or a stub if it's not already generated
  The second exposes what was previously JIT specific state to general clients


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10319 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-08 08:22:01 +00:00
Chris Lattner
a08bca95a7 Since ssaification of the varargs builtings, the vaarg instruction no longer
can write to memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10310 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-08 05:29:33 +00:00
Brian Gaeke
4768dc5705 Regenerated using autoheader-2.57
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10309 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-08 00:57:01 +00:00
Chris Lattner
eae45cf44b The recalclulate method was a nasty hack that was once used by the -cee pass,
which never worked itself.  The cee pass still doesn't work, but it doesn't use
this method anymore anyway, so eliminate the method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:55:32 +00:00
Chris Lattner
31b935357d Rewrite dominators implementation. Now domset is constructed from immdom,
instead of the other way around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:36:16 +00:00
Chris Lattner
677d027ace Move this method out of the generic dominators calculation code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:35:19 +00:00
Alkis Evlogimenos
b27ef248f5 Move operator<<(std::ostream&, const LiveInterval&) out of the header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10290 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-05 10:38:28 +00:00
Brian Gaeke
59e47e3ee1 Lock abstraction, introduced with a view toward making the JIT thread-safe.
Eventually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10284 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 21:33:31 +00:00
Chris Lattner
7f5dbcc9ea Add new block number
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10281 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 07:08:06 +00:00
Chris Lattner
d540e2c995 Remove unused enum value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10279 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 05:40:37 +00:00
Chris Lattner
786a518f47 Add some "useful" methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10277 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 05:30:29 +00:00
Chris Lattner
f17072b79c be GCC 3.4 clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10264 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:55:12 +00:00
Chris Lattner
d2aa7b8ee7 Hrm, how could this compile?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10263 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:55:02 +00:00
Chris Lattner
d423fb5cbf fix gcc 3.4 compatibility problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10248 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 01:46:06 +00:00
Chris Lattner
6c7901bd11 It is legal to index into sequential types with any integer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10227 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:20:19 +00:00
Chris Lattner
c4c6b9e5bc Work with gepi's and constant exprs. Also, add versions of iterator ctors that take references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10220 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 20:17:49 +00:00
Chris Lattner
94a28c6bc8 Rename class to be consistent with other iterator classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10213 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 19:58:35 +00:00
Chris Lattner
19ed305339 Initial checkin of gep_type_begin/end which will be used to address PR82
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10212 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 19:37:28 +00:00
Misha Brukman
a140b3c367 Expose functionality to query if a file is an ELF shared object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10194 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:28:39 +00:00
Brian Gaeke
9bb2188b0e A better way to get std::pair into the compiler's little, walnut-sized brain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10174 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-23 03:50:31 +00:00
Brian Gaeke
6de98f242a This is a hack to make this file compile under g++-3.0.x;
otherwise it can't decide what std::pair is. It seemed relatively
harmless.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10173 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-23 00:55:27 +00:00
Chris Lattner
593ba8f560 Somehow I forgot poor little UnwindInst
*sniff*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10108 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 18:11:56 +00:00
Chris Lattner
dd56927846 * Add new constructors to allow insertion of terminator instructions at the
end of basic blocks.
* Document some confusing constructor combinations
* Move a ReturnInst method out-of-line, so that the vtable and type info don't
  need to be emitted to every translation unit that uses the class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10106 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 17:44:37 +00:00
Alkis Evlogimenos
ff0cbe175d Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10103 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 03:32:25 +00:00
Brian Gaeke
ff336a4e7f Regenerated using autoheader-2.57
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10064 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-18 06:21:24 +00:00
Chris Lattner
5d5a714b24 Implement == and != correctly. Before they would incorrectly return !=
for some constant exprs when they could really be the same value


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10058 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 20:19:35 +00:00
Chris Lattner
48babfa60d The ConstantPointer class is now gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10057 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 19:47:21 +00:00
Chris Lattner
0dc396909e Constant folding shalt not be built on annotations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10052 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 19:05:17 +00:00
Chris Lattner
825b02d5ee Fix copy-and-pasteo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10049 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 01:07:58 +00:00
Chris Lattner
8b70b78ba4 Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 20:21:15 +00:00
Chris Lattner
60e9742e82 This is obviously illegal C++ code, but was apparently accepted by 3.3
bork


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9993 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-14 06:03:05 +00:00
Chris Lattner
21fc51daa5 Add methods for implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9963 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 05:05:34 +00:00
Chris Lattner
a3f5f80f2b Remove needless dependence on boost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9961 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 04:11:30 +00:00
Chris Lattner
de0579d946 Add namespace qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9959 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 02:30:22 +00:00
Chris Lattner
2d3e1ee93c Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9958 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 02:01:41 +00:00
Chris Lattner
7d26815d8d Add an initial version of the CompleteBUDataStructures pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9955 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 01:42:38 +00:00
Chris Lattner
e94e0edc3e Fix faulty namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9943 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 22:45:14 +00:00
John Criswell
fed0b2995e Regress to not using the llvm namespace.
This keeps Pool Allocation stuff from compiling.
We can re-visit it later when we have time to do it right.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9932 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 21:32:06 +00:00
Chris Lattner
f58aefcb20 Add argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9921 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 17:58:09 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
f33d00f0d8 Add prototypes for CheckMagic, IsArchive, and IsBytecode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9900 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:53:29 +00:00
Brian Gaeke
6a9127ec00 VS: ----------------------------------------------------------------------
Add prototype for FileOpenable().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9891 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:11 +00:00
Chris Lattner
3b120be94f Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9879 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 05:08:36 +00:00
Chris Lattner
aeef8c70f0 Include forms of SplitCriticalEdge which work correctly with pred/succ iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9856 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 04:42:13 +00:00
Chris Lattner
33e0a7575d No really, I'm not on crack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9855 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 04:23:52 +00:00
Chris Lattner
b977ef2d54 Helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9854 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 04:16:50 +00:00
Chris Lattner
d9c5c5e12f Move isCriticalEdge & SplitCritical into this file. While we're at it, change
the interface to SplitCriticalEdge so that it splits an edge if it is critical,
otherwise just returns false and noops if not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9852 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 04:10:27 +00:00
Chris Lattner
4a05ba0ab5 Move isCriticalEdge & SplitCritical edge out of this file, which is only
for passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9851 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 04:09:44 +00:00
Brian Gaeke
9058349aa4 Regenerated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9850 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 03:06:28 +00:00
Chris Lattner
d5b1245e8c Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up.  Thanks!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9832 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:39:48 +00:00
Chris Lattner
94db57024f Provide a specialization of _Alloc_traits, which allows the G++ runtime to avoid
storing an instance of the allocator in each data structure it uses.  Yaay.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9795 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 23:20:56 +00:00
Brian Gaeke
4ba0f57904 Add a warning about not "new"ing or "delete"ing CallSites
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 19:25:22 +00:00
Misha Brukman
12a3f843ff Added ability to register FunctionPasses as optimizations, with
TargetMachine-accepting constructors (thanks to Chris).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9781 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 18:56:32 +00:00
Misha Brukman
d24fdda8e9 Declare FunctionPasses as such.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9767 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:19:39 +00:00
Chris Lattner
f0d6b493f2 Add some ctors for this allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9766 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 15:20:06 +00:00
Chris Lattner
3323f2abbd Split the DAE pass into DAE and DAH passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9742 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 21:43:42 +00:00
Brian Gaeke
01f93a4712 A few handy methods that seem to mesh well with what CallSite already provides.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9737 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 20:25:33 +00:00
Misha Brukman
80f0b57b5d Since this function returns an int, let's actually return something.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9734 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 19:48:05 +00:00
Alkis Evlogimenos
e292da29bf Add std::pair tier. This is a much simplified version of boost::tie
that works only for std::pair.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 05:58:26 +00:00
Chris Lattner
d5e4918fa7 Fix spello
Add negate overload


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9709 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 23:37:40 +00:00
Alkis Evlogimenos
4dad76cea0 Update documentation since it was misleading: make it clear that a
negative instruction count is returned if instructions are removed
from a basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9705 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 23:07:00 +00:00
Alkis Evlogimenos
e668dab5b3 Change all machine basic block modifier functions in MRegisterInfo to
return the number of instructions added to/removed from the basic block
passed as their first argument.

Note: This is only needed because we use a std::vector instead of an
ilist to keep MachineBasicBlock instructions. Inserting an instruction
to a MachineBasicBlock invalidates all iterators to the basic
block. The return value can be used to update an index to the machine
basic block instruction vector and circumvent the iterator elimination
problem but this is really not needed if we move to a better
representation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9704 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 22:57:09 +00:00
Chris Lattner
c2630f7314 New file, for use by the pool allocator project
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9702 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 22:38:28 +00:00
Chris Lattner
ac50030f86 Allow CallSites to be used as the key of a map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9660 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 23:04:33 +00:00
Chris Lattner
15869aa2c7 All DSGraphs keep a reference to the targetdata they are created with. This is
used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9659 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 22:27:28 +00:00
Chris Lattner
ba12c23ca7 Including the symbol table in the FindUsedTypes analysis was the WRONG way
to fix test/Regression/CBackend/2003-10-23-UnusedType.ll.  This completely
neutered the deadtypeelim pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 01:28:41 +00:00
Chris Lattner
1926f69c53 Escape "'s, which are frequent visitors to C++ types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 22:16:41 +00:00
Chris Lattner
bc539434c5 Did I mention that I _HATE_ CPRs?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 18:38:06 +00:00
Chris Lattner
b10bed8a63 Constant pointer refs are causing these to fail unnecessarily, which is causing
a lot of code to be pessimized.  I hate CPRs.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 17:51:16 +00:00
Chris Lattner
072ddb1dac Expose new print methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:41:19 +00:00
Chris Lattner
0836bf7bcf New interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:39:52 +00:00
Brian Gaeke
0b64ca3cbd Apparently my Mac OS X fixes were not entirely compatible with SPARC...hmm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9612 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 15:03:49 +00:00
Chris Lattner
14fffaf6c1 When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9611 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 05:17:30 +00:00
Chris Lattner
9f6a519027 Tighten up what we consider to be first class types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9608 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 01:38:41 +00:00
Brian Gaeke
78e1dcc321 Add support for utostr(unsigned long)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9588 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 20:06:19 +00:00
Chris Lattner
a3a1c2de9d Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9570 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 23:10:44 +00:00
Brian Gaeke
20a277e162 ExecutionEngine::create no longer takes a TraceMode argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9488 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 19:58:38 +00:00
Chris Lattner
7c4098ee2b Add assertions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9443 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 19:33:49 +00:00
Chris Lattner
4a2c0e9259 Fix bug in eon hopefully
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9442 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 19:33:44 +00:00
Chris Lattner
815904d373 Include new prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9422 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 16:51:49 +00:00
Chris Lattner
d97487d1e0 Actually share constants local to a function!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9417 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 16:29:12 +00:00
Brian Gaeke
0bd2189e5f Fix apparent typo in head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9400 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 04:01:49 +00:00
Chris Lattner
c149c47d1f Add two new function stubs for viewing the CFG of a function inside of the
debugger


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9373 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 16:03:20 +00:00
Chris Lattner
5f7e61d226 Add a new map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9311 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:55:13 +00:00
Chris Lattner
60f1445cf2 This #include is no longer necessary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:29:44 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
John Criswell
1fc0d67e3e Oops. Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9303 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:16:14 +00:00
John Criswell
2efc5b5780 Added LLVM header notice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:11:43 +00:00
John Criswell
b2109ce978 Added LLVM notice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:46:57 +00:00
Brian Gaeke
a42649e3dd Make replaceMachineCodeForFunction return void.
Make it assert by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9287 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 15:14:33 +00:00
Chris Lattner
3b237fcd38 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9269 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 21:34:28 +00:00
Chris Lattner
4661dc6a6a Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
This allows removal of a special case from the instvisitor


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9268 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 21:34:11 +00:00
Chris Lattner
99e7ab72c8 New revised variable argument handling support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9219 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 05:53:13 +00:00
Misha Brukman
9573b91c32 Return the Module being materialized to avoid always calling getModule().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9198 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 18:26:51 +00:00
Brian Gaeke
5358bc39c1 Add stub version of replaceMachineCodeForFunction. It will live here until
we have a better place for it to go.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9197 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 18:26:45 +00:00
Alkis Evlogimenos
60596382aa Eliminate some extraneous code in SlotCalculator::insertVal().
Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(),
       SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(),
       SlotCalculator::insertVal() to SlotCalculator::insertValue(), and
       SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9190 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 02:02:40 +00:00
Brian Gaeke
661ab811d8 This file has funny include guards and funny extra whitespace.
Make this file less funny.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9186 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 23:43:35 +00:00
Misha Brukman
7034adbce2 If we move the constructors to the .cpp file, we can drop the #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9180 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 21:16:21 +00:00
Chris Lattner
e63540307d Add weak linking type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9168 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 18:27:04 +00:00
Chris Lattner
202884fd9b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9159 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 16:53:04 +00:00
Chris Lattner
ed60e1c939 Vector is my friend, do you like vector?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9147 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 22:10:10 +00:00
Chris Lattner
978e2cbfb2 lalala
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9146 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 22:09:57 +00:00
Chris Lattner
ea2c1dcb7c We'll need this soon as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9145 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 22:09:46 +00:00
Chris Lattner
803f03e217 This file uses assert and doesn't include anything which already #includes <cassert>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9142 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 21:55:37 +00:00
Chris Lattner
33922eb648 Remove usage of use_size()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9134 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 16:43:24 +00:00
Chris Lattner
14d9ce7892 Add new hasOneUse() method. Remove explicit inline qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9132 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 16:39:04 +00:00
Chris Lattner
eeed983821 Generalize abstract interpreter interface to allow linking in an arbitrary number of shared objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9129 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:52:52 +00:00
Misha Brukman
b6c54ed8f5 Enabling incremental bytecode loading in the JIT:
* ExecutionEngine can be constructed from a ModuleProvider
* Alphabetized order of forward-declared classes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9123 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:35:52 +00:00
Misha Brukman
deb1740615 Enabling incremental bytecode loading in the JIT:
* Add ModuleProvider as a parameter to FunctionPassManager


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9122 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:34:56 +00:00
Chris Lattner
7915a1e764 Substantial cleanups:
* Add header comment
 * Remove extraneous #includes
 * Move the FileType enum into the GCC class
 * The GCC class is not virtual.
 * Move all of the "constructor" functions into the classes themselves
 * Stop using cl::list as arguments, use std::vector instead (which cl::list
   derives from)
 * Improve comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9121 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:34:11 +00:00
Chris Lattner
1e79609e30 Add missing default argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9092 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 16:44:30 +00:00
Chris Lattner
9061e992d5 add support for "external" depth first iterators, which store the 'visited' set
outside of the iterator itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9090 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 16:34:26 +00:00
John Criswell
a0137d3d82 Added a macro and code that checks for the %a format string in sprintf().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9089 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 16:22:01 +00:00
Chris Lattner
4846f4b87a Extricate the "reverse" support from the depth-first iterator. This is really
a crappy form of post-order traversal which really does not belong here.  While
we are at it, improve documentation and use a vector instead of a stack.

This improves the post dominator analysis pass by ~5%, and probably also helps
other passes as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9084 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 15:45:33 +00:00
Chris Lattner
ba7beb084c Add operator= for type iterators to make them assignable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9083 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 15:34:17 +00:00
Chris Lattner
814f622526 Remove explicit inline qualifiers when the implicit ones work just as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9082 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 15:30:59 +00:00
Chris Lattner
d7db1fb944 Add new op_erase method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9068 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 03:29:26 +00:00
Chris Lattner
98bf436e2e Rename loop preheaders pass to loop simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9061 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-12 21:52:28 +00:00
Chris Lattner
7f9bb6e92c Rename method to indicate what it does
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-12 18:51:53 +00:00
Misha Brukman
d5d96b9fcd Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9021 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:42:19 +00:00
Misha Brukman
50f7129324 Use 'F' for Function instead of 'M'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9019 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:38:31 +00:00
Brian Gaeke
f212e47271 Add my abstracted dynamic linker support files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9008 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 16:55:42 +00:00
Chris Lattner
97622b1751 Add a method to reserve space for operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8992 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-09 22:45:59 +00:00
Chris Lattner
342be126ef Kill warning when compiling in optimized mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8989 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-09 20:43:55 +00:00
Chris Lattner
1bc33a5227 Make getContainedType more efficient by not returning null if out of range!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8987 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-09 20:35:15 +00:00
Alkis Evlogimenos
185a7ab2ed Forward declare class Type since it is used in this class and Type.h is not included
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8958 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-08 04:45:45 +00:00
Brian Gaeke
cbeedf73d4 Regenerated with (at top-level llvm directory):
% autoheader -I autoconf autoconf/configure.ac


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8956 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-07 23:39:51 +00:00
Chris Lattner
b0a994b4c0 Remove unneeded dtors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8896 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-06 17:36:49 +00:00
Chris Lattner
aacd3c8d86 Doxygenize class comments. Add new NamedRegionTimer class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8888 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-06 15:02:16 +00:00
Chris Lattner
43f820d1f7 Change the interface to PromoteMemToReg to also take a DominatorTree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8883 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 21:20:13 +00:00
Chris Lattner
5e5252b4c9 Add new prototype for createLowerInvokePass(). Make simplifycfg be a
functionpass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8870 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 19:15:13 +00:00
Chris Lattner
27db7e0472 Output a very high-precision number
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8856 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 00:41:07 +00:00
Chris Lattner
5133a5cf2e Add some new methods to forward to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8852 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 00:13:28 +00:00
Chris Lattner
00413e3d63 Rename AbstractModuleProvider -> ModuleProvider, to match the header file name,
and because, while the class used by the interface is abstract, the actual
concept is not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8850 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-04 20:14:59 +00:00
Chris Lattner
af6f93ce35 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8843 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 18:57:54 +00:00
Chris Lattner
7685ac8d35 This checkin basically amounts to a complete rewrite of the type-resolution
machinery.  This dramatically simplifies how things works, removes irritating
little corner cases, and overall improves speed and reliability.

Highlights of this change are:

1. The exponential algorithm built into the code is now gone.  For example
   the time to disassemble one bytecode file from the mesa benchmark went
   from taking 12.5s to taking 0.16s.
2. The linker bugs should be dramatically reduced.  The one remaining bug
   has to do with constant handling, which I actually introduced in
   "union-find" checkins.
3. The code is much easier to follow, as a result of fewer special cases.
   It's probably also smaller.  yaay.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 18:46:24 +00:00
Chris Lattner
1ad37b2b59 These methods are dead, remove them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8839 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 18:39:40 +00:00
Chris Lattner
1c5164e9cf Make the PATypeHolder use a simple union-find implementation to handle
merging of types.  This makes it MUCH more efficient than before, also
making things simpler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8833 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 23:35:57 +00:00
Chris Lattner
0dde36c4c7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8827 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 19:44:23 +00:00
Chris Lattner
df0c1a2189 There is no reason for the PATypeHolder class to derive from the
PATypeHandle class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8825 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 19:08:18 +00:00
Alkis Evlogimenos
7237ecef13 Moved enum and command-line option in separate file. Also added function that returns the user selected register allocator to the caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8819 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 16:57:49 +00:00
Alkis Evlogimenos
eed462b685 Change llc command line for register allocators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8815 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 06:13:19 +00:00
Chris Lattner
01ed1c0846 Remove obsolete scoped pred and succ iterator typedefs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8810 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 22:28:39 +00:00
Chris Lattner
22bca4dfb0 Use graph traits to perform generic interval construction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8809 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 22:28:00 +00:00
Chris Lattner
96f7b1bf32 Add graph traits specializations for intervals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8808 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 22:27:36 +00:00
Chris Lattner
e5d1a22ef2 Forward declare a class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8797 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 20:15:40 +00:00
Chris Lattner
799e0802b2 This got merged into Passes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8796 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 20:15:32 +00:00
Chris Lattner
086610926f Include the sparc register in this file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8794 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 20:14:43 +00:00
Chris Lattner
39882e847a Update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8783 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:44:27 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
f474449804 Add a file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8781 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:28:53 +00:00
Chris Lattner
c36e4f465c Fix header comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8779 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:12:25 +00:00
Chris Lattner
697ebcadbf Fix header, remove dead decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8777 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:06:51 +00:00
Chris Lattner
5259f8d030 Fix header file comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8776 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:05:30 +00:00
Chris Lattner
4c3a753a2e make the header comment more useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8774 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:53:30 +00:00
Misha Brukman
29afb64d5b Abstracted away the process of running our tools + gcc from bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8753 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:38:57 +00:00
Misha Brukman
516d4b1366 Tersified and fixed whitespace (tabs -> spaces).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8752 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:37:57 +00:00
Brian Gaeke
02dea4b355 Fix a typo I happened to notice.
Rename include guards in the "usual" manner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8695 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 04:09:50 +00:00
Misha Brukman
6ee548d337 Added doxygen comments for the streaming module provider.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8672 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-22 23:40:38 +00:00
Misha Brukman
2f00285b21 Added functions to perform streaming function loading, doxygenified comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8670 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-22 23:36:33 +00:00
Misha Brukman
4f901d6d99 Converted tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8669 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-22 23:35:54 +00:00
Misha Brukman
fdf148ea71 Materialize the module before releasing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8668 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-22 23:35:23 +00:00
Chris Lattner
628bf091e6 Add prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8640 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 00:28:18 +00:00
Chris Lattner
808a7aeec7 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 16:34:13 +00:00
Chris Lattner
02a3be020a Rename Function::getEntryNode -> getEntryBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:39:18 +00:00
Chris Lattner
894707117e Rename getEntryNode -> getEntryBlock()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8624 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:36:49 +00:00
Chris Lattner
b912491329 Cleanup header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8622 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:35:38 +00:00
Chris Lattner
3fc6ef1bb9 Expose the TCE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 05:14:13 +00:00
Chris Lattner
f091a53ad4 Fix header, fix broken friend decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 03:34:44 +00:00
Chris Lattner
51757155fa Unsquishify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8612 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 01:23:29 +00:00
Misha Brukman
b580232245 Abstract interface for module providers, e.g. streaming bytecode reader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8593 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 16:16:32 +00:00
John Criswell
e5b3e1559b In ExecWait(), made the child process exit if it can't execve() the new
program.
Added the use of const (which compiles and is hopefully correct).
Added comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8585 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 19:02:49 +00:00
John Criswell
e9ba8b3674 Added the ExecWait() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8578 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 15:14:25 +00:00
Chris Lattner
0c448e58d3 Add new deleteBody method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8571 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 04:58:43 +00:00
Chris Lattner
c72b249e9c Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8537 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 15:47:40 +00:00
Chris Lattner
370910d2a0 Add prototype for the lowersetjmp pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8522 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 05:05:23 +00:00
Chris Lattner
317a61b2db Get rid of the whole "Node2" business, rename getNode() ->getBlock() to
be more descriptive


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8468 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 16:25:06 +00:00
Chris Lattner
420a8bf2b2 Rework dominator and post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8459 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:36:51 +00:00
Chris Lattner
f46057be77 Expand the pass to unify all of the unwind blocks as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8456 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:34:51 +00:00
Brian Gaeke
053134a1ee Make createVerifierPass return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:37:04 +00:00
Chris Lattner
776f776838 Fix spello
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8432 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 05:30:09 +00:00
Chris Lattner
065a616ada Fix spell-o's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 05:29:43 +00:00
Chris Lattner
69ecd0d7e7 Spelling fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8429 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 05:24:09 +00:00
Chris Lattner
76b5f88c57 Fix bug: InstCombine/2003-09-09-VolatileLoadElim.ll
Loads "mayWriteToMemory" if they are volatile


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8422 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-09 18:16:08 +00:00
Chris Lattner
8d8d361e20 Eliminate the unwind intrinsic, it is now an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8412 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 19:44:47 +00:00
Chris Lattner
3cd5c1d7f1 add support for the unwind inst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8406 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 18:54:16 +00:00
Chris Lattner
47f3a942be Add the unwind instruction class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8405 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 18:54:09 +00:00
Chris Lattner
9b7f42dd6a Add new unwind instruction. Happily there was a slot leftover from when the
'not' instruction was removed long ago


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8404 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 18:54:01 +00:00
Chris Lattner
e5e475e09d Add support for volatile loads/stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8393 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 17:45:59 +00:00
Brian Gaeke
f10da33e21 No longer used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8374 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:43:45 +00:00
Brian Gaeke
29794cba81 Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8367 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 18:55:03 +00:00
Brian Gaeke
70975eef57 Make CreateArgv part of lli rather than part of ExecutionEngine.
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
 GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
 into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
 isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
 more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8366 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 18:42:01 +00:00
Brian Gaeke
f3c333e36f Zap some more unused static method decls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8364 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 06:10:50 +00:00
Chris Lattner
b1678c6132 Get friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8356 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:30:18 +00:00
Chris Lattner
f2bbe37610 Reshuffling of APIs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8354 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:15:36 +00:00
Chris Lattner
6f4e3854fd Remove method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8349 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:43:35 +00:00
Brian Gaeke
f58815e161 Interpreter cleanups:
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
 which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8344 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 22:21:24 +00:00
Brian Gaeke
82d8277ad5 ExecutionEngine.cpp: Move execution engine creation stuff into a new
static method here.
 Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.

Make creation method for each type of EE into a static method of its
own subclass.

Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
 Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8343 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 20:34:19 +00:00
Chris Lattner
2a4a4b54ad New method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8331 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:54:56 +00:00
Chris Lattner
ca371048a5 Remove the "recursive bit", not only is it unused by anyone, it was also
not correctly calculated, and calculating it wrong for fun seems rather
pointless.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8329 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:40:33 +00:00
John Criswell
66622be46a Added the MakeFileReadable() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:09:30 +00:00
John Criswell
6991a03753 Added the MakeFileExecutable() method. This method takes a filename and
gives it execute access while respecting the user's umask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8324 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 20:14:57 +00:00
Chris Lattner
b44cacb647 The description is no longer stored directly in the type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8319 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 16:28:03 +00:00
Chris Lattner
b23043dc8e Dead header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8317 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:46:08 +00:00
Chris Lattner
3dc48c54de Add RPR prototype here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:44:42 +00:00
Chris Lattner
4f98928d58 Remove dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8313 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:41:21 +00:00
Chris Lattner
c5dc890596 No longer require an OptInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8310 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:40:43 +00:00
Chris Lattner
5ab12b579e Remove header files that were privatized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8307 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:33:38 +00:00
Chris Lattner
1a3350d6cd This file is never #included
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:19:31 +00:00
Chris Lattner
b50b8b1acc This file is just a subset of Cilkifier.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8286 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:42:43 +00:00
Chris Lattner
01112bd08a Other minor cleanups while I'm in the area
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8284 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:38:43 +00:00
Chris Lattner
c87c80dce0 Fix spell-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8283 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:35:30 +00:00
Chris Lattner
2757af2d47 Change the RaiseAllocations pass from being a BasicBlockPass to being a Pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8279 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 03:14:00 +00:00
Chris Lattner
55b2eb3ef8 Rename TarjanSCCIterator -> scc_iterator
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 20:01:57 +00:00
Chris Lattner
ff8fc07890 ELIMINATE the SCC class completely. One less thing deriving from std::vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:55:31 +00:00
Chris Lattner
94d1092c6a Move the HasLoop method from the SCC class to the iterator class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8268 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:51:22 +00:00
Chris Lattner
fe8d8806f7 Remove explicit passing of SCC's around as objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8267 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:46:48 +00:00
Chris Lattner
0c6a271d91 This should use Support/iterator, not <iterator>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8266 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:46:22 +00:00
Chris Lattner
1da3398600 Cleanups, move the getAnalysisUsage method to the .cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:41:17 +00:00
Chris Lattner
a04e51f4c0 Fix an FLAT OUT WRONG comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8263 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:37:29 +00:00
Chris Lattner
b55cae23cb * Cleanups
* operator* now returns a reference to the current SCC, instead of a possibly
  null pointer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8261 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:34:27 +00:00
Chris Lattner
fa7f524162 Add accessor function for the PruneEH pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8254 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 16:30:25 +00:00
Chris Lattner
c6c804b0d2 Minor simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8251 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 02:50:07 +00:00
Chris Lattner
4a81067a84 Initial checkin of the CallGraphSCCPass class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 01:54:59 +00:00
Chris Lattner
22ab2a16e5 Remove usage of unsigned long: unsigned should be enough!
Remove explicit use of a stack<>, use a vector instead


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8246 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 01:48:21 +00:00
Chris Lattner
ca82e6c3d1 This file uses cerr without including <iostream>. Since it's just for debugging, comment it out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8245 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 01:45:00 +00:00
Chris Lattner
5636eec5fb s/Meth/F
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8244 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 01:38:00 +00:00
Chris Lattner
12d40d2926 Add new helper function which makes it even easier to do this sort of thing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8237 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 00:19:18 +00:00
Chris Lattner
004caf4ded Remove automagic support for Modules. Noone uses it now anyways, and GCC 3.4 doesn't want us to do this unless Module has been #included
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8216 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 14:48:21 +00:00
Chris Lattner
df9ec1052b Move getAnalysisToUpdate to after the definition of AnalysisResolver.
GCC 3.4 apparently wants classes to be DEFINED before they are USED.  What is
it smoking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8213 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 14:26:51 +00:00
Chris Lattner
40c6fb6cac Fix compilation problems with G++ 3.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8212 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 14:22:29 +00:00
Chris Lattner
6ac02a9092 Allow for "unsafe" replaceAllUsesWith operatations, for use during type resolution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8208 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 05:36:05 +00:00
Chris Lattner
94949dad0c Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8204 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 05:08:31 +00:00
Tanya Lattner
f68b8a2dee Moved index in BB to common graph class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8175 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 15:31:28 +00:00
Misha Brukman
88d942d898 Spell `incompatible' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8163 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 18:26:28 +00:00
Tanya Lattner
d04087cce6 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8161 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 15:52:23 +00:00
Tanya Lattner
1796cb7fbc Cleaned up the code (spacing, not needed headers) and changed ostream function. Also made some functions inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8154 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 02:45:08 +00:00
Tanya Lattner
0320b1406e SchedGraphCommon header file. Contains class definition for SchedGraphCommon which is used by SchedGraph and ModuloSchedGraph (coming soon).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8149 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-25 23:12:23 +00:00
Chris Lattner
bfa964699f As it turns out, things will be simpler than I first expected. We no longer
need any exception handling intrinsics beyond llvm.unwind. (yaay)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8145 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-25 22:35:01 +00:00
Chris Lattner
39c07264da Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8134 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:50:53 +00:00
Chris Lattner
e3ac7565a0 Targets should configure themselves based on the module, not some wierd flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8131 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:49:07 +00:00
Chris Lattner
a7a35a831b Allow modules to have 'any' pointer size and endianness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8117 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 13:46:37 +00:00
Chris Lattner
6270f36784 rethrow is really the language independent primitive here. "throw" can be written
in terms of it and llvm.exc.setcurrent.

Rework these intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8109 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 12:24:03 +00:00
Chris Lattner
9d3a1b2d97 Add versions of InlineFunction which work on Invoke instructions and general call sites
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8105 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 06:58:32 +00:00
Chris Lattner
9dd7d1c8eb Initial support for recognizing LLVM exception handling intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8102 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 05:30:29 +00:00
Chris Lattner
4bd4aa5e3c Allow specifying the name for the newly split basic block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8097 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 03:41:39 +00:00
Chris Lattner
3acbd5d5d4 Add period
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8090 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 23:15:10 +00:00
Chris Lattner
131d19f9c6 Rename SwitchInst::dest_push_back -> addCase
Add new removeCase method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8088 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 23:14:37 +00:00
Chris Lattner
2d710ff7cf Of course, the copy ctor really should copy the operand as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8077 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 20:06:38 +00:00
Chris Lattner
8518e74f3e Add more methods to be more value-like
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8074 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 19:51:10 +00:00
Chris Lattner
88e1eef1ed Initial checkin of ValueHolder helper class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8073 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 19:43:18 +00:00
Chris Lattner
b274d4a38b Add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8063 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-22 23:08:55 +00:00
Chris Lattner
31a6db0f2c Changes to work better with GCC3.4/LLVM G++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-22 14:26:59 +00:00
Misha Brukman
ef6a6a69ff The word dependent' has no a'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8030 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:14:26 +00:00
John Criswell
69582b35b6 The JIT now passes the environment pointer to the main() function when it
starts a program.  This allows the GNU env program to compile and JIT under
LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8022 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 21:12:30 +00:00
Chris Lattner
3c7eb1f2ea Make assertion message more helpful in a case that might happen...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7975 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-19 21:57:00 +00:00
Chris Lattner
fd4d8975cf Add new methods, update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7962 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 22:10:57 +00:00
Chris Lattner
8169cf810c Add intrinsics for the llvm.sig(set|long)jmp functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7949 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 15:41:24 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
7dd46b09c0 Fix bug: LoopPreheaders/2003-08-15-PreheadersFail.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7915 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-16 20:57:16 +00:00
Brian Gaeke
c48ef2ae36 lib/Support/CommandLine.cpp:
Many changes suggested by Chris. It's okay, I'll recover from the emotional
damage...maybe someday. :-)

Collapse ParseCStringVector into ParseStringVector.  Comment it.
Make it take a const input.
Use std::string::npos instead of -1 (what a mouthful!)
Make ParseEnvironmentOptions take const inputs.
Check its args at the very beginning.
Strdup all the contents of newArgv and free them all at the end.

include/Support/CommandLine.h:
Constify progName and envVar arguments to ParseEnvironmentOptions().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7905 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 21:05:57 +00:00
Misha Brukman
53523e57bf Reordered includes to be consistent with the LLVM style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7887 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 17:52:02 +00:00
Chris Lattner
960ff04a09 Remove extraneous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7881 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 05:21:30 +00:00
Chris Lattner
f4f5f8bcaa Add support for basic blocks, unary/binary unspecs, conditional branches, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7874 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:52:51 +00:00
Chris Lattner
20968a2472 Remove extraneous cl:: namespace qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7852 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 22:04:41 +00:00
Brian Gaeke
06b06c5f00 Add support for reading command line arguments from an environment variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7851 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 22:00:59 +00:00
Brian Gaeke
bf3c4cfaad Factory methods for function passes now return type FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7839 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:09:32 +00:00
Brian Gaeke
1d3fa21cdd Add new method to FunctionPassManager to add ImmutablePasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7838 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:07:57 +00:00
Brian Gaeke
19df3876e6 Factory methods for FunctionPasses now return type FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7823 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:18:15 +00:00
Brian Gaeke
fb0ef2e82c Deconstify parameter to getPointerToFunction().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7822 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:17:54 +00:00
Brian Gaeke
8844a0ba89 addPassesToJITCompile and addPassesToEmitMachineCode now take a
FunctionPassManager, to support function-at-a-time compilation and
 emission of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7821 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:17:27 +00:00
John Criswell
478b3a9682 Removing the pool allocator from the main CVS tree.
Use the poolalloc module in CVS from now on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7810 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 15:36:15 +00:00
Vikram S. Adve
906cd975df Make MInst2LVSetBI and MInst2LVSetAI be hash_maps instead of maps.
Add some comments and non-const methods to fix constness problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7797 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 23:39:08 +00:00
Brian Gaeke
8ab1ef265a Add FunctionPassManager - it's like a PassManager, but it only deals in
FunctionPasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 17:22:39 +00:00
Chris Lattner
2b3860faeb Add support to the mangler for targets which require _'s on global symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7741 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:34:29 +00:00
Chris Lattner
cacf462915 Initial checkin of SelectionDAG header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7716 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:56:26 +00:00
Misha Brukman
35d402fbba Remove references to `bugpoint' from the now-generic system utilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7693 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:33:33 +00:00
Misha Brukman
3d1b0c7331 Moved removeFile() and getUniqueFilename() into FileUtilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7691 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:28:50 +00:00
Sumant Kowshik
edea6d646b Added a flag which is set when all data structures are not pool allocated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7660 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 04:37:52 +00:00
Chris Lattner
3314d8d656 There was no reason for these to be bit-fields, they just need to be unique.
Also, add an isVoid item


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7659 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 00:17:00 +00:00
Chris Lattner
c232818432 Add a bunch of new Alpha Intrinsics for Rahul Joshi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 20:08:25 +00:00
Chris Lattner
5e8b77e375 Completely eliminate the per-machine-instruction regsUsed set.
This substantially shrinks the size of each machine instruction, which should
make allocation faster and the cache footprint of the machine code lighter.

Here are some timings for code generation of the larger benchmarks we have.
This are timings of code generation phases of the X86 JIT, when compiled in
debug mode:

		Before	After	Diff
164.gzip:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2031	0.1757	-15.6%
  TOTAL		0.5585	0.4999	-11.7%
Ptrdist-bc:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2070	0.1933	- 7.1%
  TOTAL		0.6972	0.6464	- 7.9%
197.parser:
  InstSel	0.2148	0.2148	- 0.0%
  RegAlloc	0.4941	0.4277	-15.5%
  TOTAL		1.3749	1.2851	- 7.0%
175.vpr:
  InstSel	0.2519	0.2109	-19.4%
  RegAlloc	0.5976	0.5663	- 5.5%
  TOTAL		1.6933	1.6347	- 3.5%
254.gap:
  InstSel	1.1328	0.9921	-14.2%
  RegAlloc	2.6933	2.4804	- 8.6%
  TOTAL		7.7871	7.2499	- 7.4%


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7622 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:39:13 +00:00
Chris Lattner
610234d5c9 Do not insert physical regsiters into the regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:20 +00:00
Chris Lattner
8366b38ff7 Add a comment to the method decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7609 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 18:38:16 +00:00
Chris Lattner
e057ca61b1 Remove unused method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7608 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 17:09:08 +00:00
Sumant Kowshik
9f2ac19f8e Added declaration of mergeInGlobalsGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7607 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 17:06:18 +00:00
Chris Lattner
a2dd745613 All callers of these methods actually wanted them to preserve the flags,
so get rid of the def/use parameters that were getting passed in.

**** This now changes the semantics of these methods to preserve the flags,
     not clobber them!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7602 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:58:46 +00:00
Sumant Kowshik
3d9c001af0 Added the declaration of InlineIndirectCalls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7601 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:56:59 +00:00
Chris Lattner
9ca5a2a33e The NOOP instruction is no longer needed. Instead, use the
TargetInstrInfo::isNOPinstr method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7530 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 18:52:15 +00:00
Chris Lattner
2dd93edfc2 Move debugging support out of Statistic.h into Debug.h, implement the new DEBUG_TYPE facilities
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7490 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:12:40 +00:00
Chris Lattner
aeac00ed53 Including statistics into an anonymous namespace that gets #included into
every file is a bad idea.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7489 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:12:07 +00:00
Chris Lattner
4181a4fb4f New file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7482 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 20:28:55 +00:00
Chris Lattner
9ef719afac This file doesn't need this include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7479 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 19:16:18 +00:00
Tanya Lattner
be08bb399a Renamed trapping instruction function to be more consistent with other functions in the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7448 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 05:08:02 +00:00
Tanya Lattner
741bb0019d Added function to determine if an Instruction may trap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7442 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 04:05:50 +00:00
Chris Lattner
92988ecdb6 Code generation passes don't need access to raw LLVM types, this method is unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7412 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:29:45 +00:00
Vikram S. Adve
588668d468 Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7398 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 20:30:20 +00:00
Vikram S. Adve
ceb7d2f4f8 Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall here: they are all
machine independent.  Remove all uses of PhyRegAlloc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7387 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:41:23 +00:00
Vikram S. Adve
0eb7f745ed Don't require a BB to look-up live variables, unless they may need to
be recomputed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7384 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:32:04 +00:00
John Criswell
c78022ed07 Enable JIT when the platform supports it.
Select /localhome/$USER when it exists.
Fix the checks for bidirectional and forward iterators so that they work with
version of GCC prior to 3.x.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7383 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:11:58 +00:00
Chris Lattner
38dbde19cc Fix copy and paste-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7378 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 05:15:44 +00:00
Chris Lattner
5d7407cbef Move value type enums to CodeGen/ValueTypes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7376 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 05:13:34 +00:00
Chris Lattner
ad5e1f8153 Define target value types in a form usable by target-independent code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7375 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 05:13:09 +00:00
Chris Lattner
f4836c754a Add alpha intrinsics, contributed by Rahul Joshi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7372 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 21:18:21 +00:00
Misha Brukman
90a24c71a2 Lined things up in a more aesthetically pleasing way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7365 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:17:53 +00:00
Misha Brukman
686e65fb65 Removed extra parenthesis and fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7359 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 16:53:28 +00:00
Tanya Lattner
ebb20c51fa Need to include <string> to fix compile error on Sun
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7358 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 16:42:33 +00:00
Chris Lattner
1194e95019 Code generation phases are not allowed to modify the LLVM representation.
Because of this, we'll make the MBB->BB mapping const as it should be


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:30:37 +00:00
Chris Lattner
70534ee581 Whoops, this one was needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7346 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:18:11 +00:00
Chris Lattner
bae47e5691 Remove extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:00:29 +00:00
Chris Lattner
869ff9e7be Remove #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7339 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 22:56:46 +00:00
Vikram S. Adve
523eb3f768 Change the way unused regs. are marked and found to consider regType
info (since multiple reg types may share the same reg class).
Remove machine-specific regalloc. methods that are no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7328 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:01:43 +00:00
Vikram S. Adve
b1e6f05110 Add an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:58:57 +00:00
Brian Gaeke
00fee61672 Forward-declare class Module to make the header file self-contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7319 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:20:53 +00:00
Chris Lattner
2e99791a1e More cassert inclusion for GCC 3.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7318 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 18:06:53 +00:00
Chris Lattner
be67780f31 #include <cassert> as necessary...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7315 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:58:41 +00:00
Chris Lattner
02a31a5af6 Fix another accessibility problem illuminated by GCC 3.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:49:28 +00:00
Chris Lattner
d091d85c15 Fix visibility problem exposed by GCC 3.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7313 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:46:25 +00:00
Chris Lattner
0192e36cc7 Remove inline declarations that GCC 3.3 doesn't like without a body
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:39:33 +00:00
Chris Lattner
d957518b51 Use the C++ <cassert> header, not the C <assert.h> header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7310 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:34:17 +00:00
Chris Lattner
a44a4cd055 Add includes of assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7307 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:23:27 +00:00
Chris Lattner
32862da7c7 Fix accessibility problems GCC 3.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:23:13 +00:00
Chris Lattner
ab63bd15f5 Add assert.h include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7305 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 16:47:07 +00:00
Brian Gaeke
4166445b7c Cleanups:
Mangler.cpp: Constify parameter to makeNameProper, and use const_iterator.
 Make Count an unsigned int, and use utostr().
 Don't name parameters things that start with underscore.
Mangler.h: All of the above, and also: Add Emacs mode-line.  Include <set>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 21:37:57 +00:00
Brian Gaeke
b198ca304b Factor out name-mangling from X86/Printer, which is derived from CWriter,
into this new support class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 20:20:58 +00:00
Chris Lattner
30780ccf15 Add support for ~ operator on constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7258 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 17:21:17 +00:00
Chris Lattner
949a362802 Remove redundant const qualifiers from cast<> expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:30:06 +00:00
Chris Lattner
af28ac2201 Add more doxygen comments, add new ConstantInt::getRawValue method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7244 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:49:06 +00:00
Anand Shukla
6da69e75ec Added special consideration for instrumentation strategy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7208 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-20 15:39:30 +00:00
Vikram S. Adve
a53e3da92c (1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
to clone the subgraph reachable from a set of root nodes, into the
    current graph, merging the global nodes into those in the current graph.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
    globals graph into the current graph in both BU and TD passes.
(3) Added hash_set<const GlobalValue*> InlinedGlobals: a set of globals to
    track which globals have been inlined into the current graph from
    callers or callees.  In the TD pass, such globals are up-to-date and
    do not need to be rematerialized from the GlobalsGraph.
(4) Added StripIncompleteBit/KeepIncompleteBit to remove incomplete bit
    when cloning nodes into the globals graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7190 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-16 21:45:15 +00:00
Misha Brukman
bc0e998c49 The word separate' only has one e'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-14 17:20:40 +00:00
Vikram S. Adve
4d2faf6307 Values stored in CallArgsDescriptor cannot be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7156 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:46:15 +00:00
Vikram S. Adve
627eb31cd7 Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7154 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:45:07 +00:00
Misha Brukman
b5c520bfb6 Lowercase versions of `occurrence' need to be spelled correctly, too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7142 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 17:05:26 +00:00
Misha Brukman
dd6cb6a43b Occurrence' has no a' and the `r' is doubled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7140 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 16:49:51 +00:00
Chris Lattner
3915da3e0f INCLUDE_PARENT_GRAPH is required
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7089 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:57:21 +00:00
Chris Lattner
a523e22a20 Remove dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7083 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:43:06 +00:00
Chris Lattner
8fd2715098 Add new methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7057 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 04:37:00 +00:00
Chris Lattner
73440f6a15 Disable the parent graph code when not compiled in DEBUG mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7056 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 04:33:55 +00:00
Vikram S. Adve
daee2b492f Leak fix: delete old objects before reallocation in an assignment operator!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7055 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:25:44 +00:00
Chris Lattner
c019f9bba5 TD pass keeps track of which functions have complete arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7048 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 21:12:10 +00:00
Chris Lattner
b512b24442 Add new operator= impl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7047 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 21:11:59 +00:00
Chris Lattner
e2fe664e8f Ok, I'm a moron. Fixed now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7035 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 17:15:11 +00:00
Chris Lattner
985d31215c Fix major problem that was causing all kinds of nasty foldings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7034 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 17:10:50 +00:00
Chris Lattner
17d5d863b2 Add new methods to BUDS for keeping track of a precise call graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7028 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 16:27:15 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
a9d6566e36 Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7007 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 05:57:30 +00:00
Chris Lattner
332f0aa425 Be more const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7004 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 05:27:05 +00:00
Chris Lattner
fa45c7a938 Constness changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7002 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 05:10:09 +00:00
Chris Lattner
17fefa3ac3 Substantial revamp: DSGraphs now may contain the graphs for multiple functions
in the same graph


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6991 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 03:14:23 +00:00
Chris Lattner
1a36443c2f Add argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6990 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 03:13:36 +00:00
Chris Lattner
0baec255a7 Remove prototype for dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6989 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 03:13:28 +00:00
Chris Lattner
62b5c167de Add support for gathering sets of must aliases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6971 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-29 00:23:11 +00:00
Chris Lattner
35de11f3b1 Add new DSGraph::ScalarMapTy typedef to avoid pulling representation issues
into callers of getScalarMap


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28 21:57:13 +00:00
Chris Lattner
2769e6ca92 Add new 'isComplete' method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6943 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28 21:56:42 +00:00
Chris Lattner
d2a6fc397e Add support for 'unsigned' command line arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6928 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28 15:47:20 +00:00
Brian Gaeke
d7908f679e Nice tasty llc fixes. These should fix LLC for x86 for everything in
SingleSource except oopack and Oscar.  (Sorry, Oscar.)

include/llvm/Target/TargetInstrInfo.h: Remove virtual print method. Add
 accessors for ImplicitUses/Defs.
lib/Target/TargetInstrInfo.cpp: Remove virtual print method. If you
 really wanted this, just use MI->print(O, TM); instead...
lib/Target/X86:
FloatingPoint.cpp: ...like this.
X86InstrInfo.h: Remove virtual print method. Define the PrintImplUses
 target-specific flag bit.
X86InstrInfo.def: Add the PrintImplUses flag to all the instructions
 which implicitly use CL, because the assembler needs to see the CL in
 order to generate the right instruction.
Printer.cpp: Ditch fnIndex at Chris's request. Now we use CurrentFnName
  to name constants in the constant pool for each function instead. This
  avoids keeping state between runOnMachineFunction() invocations, which
  is a no-no. Having MangledGlobals be global is a bogon I'd like to get
  rid of too, but making it a static member of Printer causes link errors
  (why???).
 Make NumberForBB into a member of Printer instead of a global, too.
 Make printOp and printMemReference into methods of Printer.
 X86InstrInfo::print is now Printer::printMachineInstruction, because
  TargetInstrInfo::print is history. (Because of this, we have to qualify
  the names of some TargetInstrInfo methods we call.)
 Print out the ImplicitUses field of any instruction we print that has
  the PrintImplUses bit set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6924 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-27 00:00:48 +00:00
Chris Lattner
9b2a14b6f1 Add argument to DAE to allow operation on non-internal functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6895 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-25 04:12:49 +00:00
Chris Lattner
1ee7855dfa Add prototype for tail-dup pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6847 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 20:10:42 +00:00
Chris Lattner
680a7c2d1a Get rid of WORDSIZE macro which can pollute untold numbers of translation units
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6843 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:09:10 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
Chris Lattner
18345bb93f Whoops, accidentally lost a #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6841 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:04:58 +00:00
Chris Lattner
5bb8776ece Remove support for the MultiObject flag, which was just fundamentally broken
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6839 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:03:24 +00:00
Chris Lattner
160cf48671 Lots of changes to make the NodeType field private to DSNode.
Add new MultiObject flag


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 21:14:22 +00:00
Chris Lattner
936f771e25 Update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6785 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 17:03:00 +00:00
Chris Lattner
893f025262 Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6774 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 19:22:36 +00:00
Chris Lattner
697a00fbf0 * Add new CallSite::get factory method
* add new setCalledFunction method
* FIX arg_end method which was horribly broken!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 22:16:59 +00:00
Chris Lattner
a599f871af Add new op_erase method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6757 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 22:15:55 +00:00
Chris Lattner
57ec659810 Make sure accessor is properly doxygenized. It wants two lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6756 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 21:44:51 +00:00
Chris Lattner
95ab3d4bc4 Add accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6755 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 21:44:31 +00:00
Chris Lattner
ad110d2bb4 Make CallSite's default constructable, copyable, and assignable (explicitly)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6749 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 19:50:28 +00:00
Brian Gaeke
a9f6e4ae0e Regularize the names of #include-guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6732 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 00:35:55 +00:00
Chris Lattner
1989d34b3b Add prototype for the new DAE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6703 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 12:16:52 +00:00
John Criswell
a277ca84e0 Changed the LITTLE_ENDIAN and BIG_ENDIAN macros to ENDIAN_LITTLE and ENDIAN_BIG.
This will prevent them from conflicting with macros defined by the system
header files.
When autoconf comes, this will look a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6684 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 19:44:51 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Sumant Kowshik
9271ade15b Made changes suggested by Chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6606 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 08:03:57 +00:00
Sumant Kowshik
a3e5764984 Made changes suggested by Chris; Renamed 'union' function to unionSetsWith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6605 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 08:00:05 +00:00
Chris Lattner
9dad6d7411 Add new setCondition member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6603 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 05:08:31 +00:00
Chris Lattner
b05497e0ca Minor cleanups:
* Document the MOTy namespace correctly for doxygen
  * Eliminate usage of the MachineOpCode typedef, which should eventually
    be eliminated entirely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6584 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:42:53 +00:00
Chris Lattner
4052cf998f Remove use of enum
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6582 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:41:45 +00:00
Chris Lattner
bf0ac3fe69 Add doxygen comment for namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:30:37 +00:00
Chris Lattner
0519bdcd3d Add comment for doxygen for namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6578 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:30:13 +00:00
Chris Lattner
5b595b9421 Minor cleanups:
* LLVM #include should use "", not <>
  * Fix line wrapping
  * Remove noncopyable base class to improve doxygen output


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6577 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:30:01 +00:00
Chris Lattner
4ade9ed40f Remove noncopyable base class as it was making the doxygen docs harder to read
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6576 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:29:12 +00:00
Chris Lattner
17035c0edf Remove noncopyableV base classes, as they were confusing the doxygen documentation,
making it harder to read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6575 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:28:40 +00:00
Chris Lattner
9452b0797a Remove NonCopyable base class to clean up doxygen output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6551 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:07:37 +00:00
Chris Lattner
f2e364ad3a Hack up MachineCodeEmitter to actually be target independent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6514 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:20:02 +00:00
Tanya Lattner
658c5bcdb2 Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6476 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 20:01:37 +00:00
Vikram S. Adve
3fd7bf4257 Made a single common InvalidRegNum = -1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6473 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:44:07 +00:00
Vikram S. Adve
2263df029a Renamed a variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6472 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:43:41 +00:00
Vikram S. Adve
9f495b54fa Support for annul/pred and other future flags on op codes.
Support for recording the physical register for implcit references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6471 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:43:01 +00:00
Vikram S. Adve
f3d3ca18b5 Added MachineCodeForInstruction object as an argument to
TmpInstruction constructors because every TmpInstruction object has
to be registered with a MachineCodeForInstruction to prevent leaks.
This simplifies the user's code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:41:24 +00:00
Misha Brukman
da3a8b19ce Added saveBBreferences() for BasicBlock resolution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 20:32:45 +00:00
Tanya Lattner
7cf322f51b Sorry, correcting small typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6433 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 15:53:50 +00:00
Tanya Lattner
2c49fc023e Added support for cloning a trace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6430 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 15:48:23 +00:00
Sumant Kowshik
87a991eea3 Implementation of Equivalence Classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6422 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 22:44:25 +00:00
Sumant Kowshik
5e587d7a23 Changes to support function pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6421 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 22:43:46 +00:00
Chris Lattner
f0afa50b6c Don't require the user to do something like isa<foo>(II->get()). The ->get
should be implicit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6395 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 15:08:33 +00:00
Chris Lattner
1ff1da7ac9 dyn_cast_or_null should work just the same as dyn_cast does
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6394 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 15:07:48 +00:00
Chris Lattner
aa101c3147 Doxygenify comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6393 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 15:06:40 +00:00
Misha Brukman
e5841daa79 Fixed misspelling and broke a line that was wrapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6391 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 05:00:14 +00:00
Misha Brukman
6b5e0549ca Defines a pass-through debugging emitter -- it writes to a file for inspection
and to memory to test execution (using a passed-in code emitter).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6365 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:46:56 +00:00
Misha Brukman
504905fd4b Allow allocation of a Sparc TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6364 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:46:07 +00:00
Chris Lattner
a161f0c7c9 Expose proto for SRoA pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6348 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 15:52:45 +00:00
Vikram S. Adve
bfebd79dd1 (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6343 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:07:13 +00:00
Vikram S. Adve
a22eace55b Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags.  Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6342 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:06:48 +00:00
Vikram S. Adve
28fc440bc6 Make case of GetNumOfInt/FloatArgRegs functions to be use lower case
like all the other functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-25 16:02:05 +00:00
Misha Brukman
12745c55e1 Reword to remove reference to how things worked in the past.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6323 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 01:08:43 +00:00
Misha Brukman
00b05bd703 NOP instructions are pseudo-instructions. We should not have them explicitly in
our representation, since they are usually special cases of already-existing
instructions.

This abstracts away methods that let a pass create and verify a NOP instruction,
without relying on a `NOP' enum to be in existence in the target's instruction
info descriptor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6319 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 00:08:39 +00:00
Chris Lattner
6cc89aad25 Remove some cruft, add some methods to allow implementation of bugfix for
Bug: Linker/2003-04-26-NullPtrLinkProblem.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6313 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 20:02:05 +00:00
Chris Lattner
baf850a51a Minor rewording/cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6311 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 17:13:15 +00:00
Chris Lattner
7594b29c75 Remove long dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6307 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 22:00:54 +00:00
Chris Lattner
b3b729b69b Add support for a new "CommaSeparated" modifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6293 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 20:25:57 +00:00
Chris Lattner
67d8e1aabc New method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6259 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 17:49:08 +00:00
Misha Brukman
82c89b9f3a Hopefully, the final fix for `[Pp]ropogate'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6251 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-20 21:01:22 +00:00
Misha Brukman
f117cc9ee6 s/convertable/convertible/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6248 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-20 18:45:36 +00:00
Misha Brukman
d5bd008265 The plural of `Pass' is Passes, not Pass's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-20 18:39:06 +00:00
Chris Lattner
c436b37262 Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6241 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-17 22:26:33 +00:00
Chris Lattner
17aefb168f Add some methods to make type safety a bit easier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6198 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-14 17:49:52 +00:00
Chris Lattner
bc4a15f6fa Beef up interface, move getVarInfo out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6114 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:23:04 +00:00
Chris Lattner
9c341366a7 Expand API for updating live var info.
Expose iterators, not const-iterators.
Rename method that was VERY misleading


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6108 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 03:51:30 +00:00
Chris Lattner
56adf152f6 Make sure that globals are emitted AFTER the passmanager is set up for the JIT,
because the globals may refer to functions that need to be compiled!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6105 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 02:14:34 +00:00
Joel Stanley
b450b20bcf Fixed comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6072 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-10 01:56:42 +00:00
Chris Lattner
fbe3ecdb2c Update out of date comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6070 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 22:16:18 +00:00