Chris Lattner
05fe6847a8
Implement SCCP/phitest.ll
...
llvm-svn: 10763
2004-01-12 03:57:30 +00:00
Chris Lattner
4d1bb94c3e
New testcase, allow folding of binary operators that use PHI nodes, as long
...
as the result of the binary operator is always constant. This does not require
the PHI itself to be constant though.
llvm-svn: 10762
2004-01-12 03:57:00 +00:00
Chris Lattner
fafa2ff2d6
Implement Transforms/ScalarRepl/phinodepromote.ll, which is an important
...
case that the C/C++ front-end generates.
llvm-svn: 10761
2004-01-12 01:18:32 +00:00
Chris Lattner
22c7a36cdc
New testcase
...
llvm-svn: 10760
2004-01-12 01:17:42 +00:00
Chris Lattner
aacf2a5833
Implement: Assembler/2004-01-11-getelementptrfolding.llx
...
llvm-svn: 10759
2004-01-11 23:56:33 +00:00
Chris Lattner
fcd7ccd425
This isn't really an assembler test. This tests to make sure the
...
ConstantExpr::getGetElementPtr method folds two getelementptr instructions
when possible.
llvm-svn: 10758
2004-01-11 23:56:03 +00:00
Chris Lattner
d248950a8f
Urg, remove testing code.
...
llvm-svn: 10757
2004-01-11 23:30:03 +00:00
Chris Lattner
0180590bea
Fix a regression that I introduced yesterday. :(
...
llvm-svn: 10756
2004-01-11 23:29:26 +00:00
Alkis Evlogimenos
52a714b45b
Make LiveVariables::HandlePhysRegUse and
...
LiveVariables::HandlePhysRegDef private they use information that is
not in memory when LiveVariables finishes the analysis.
Also update the TwoAddressInstructionPass to not use this interface.
llvm-svn: 10755
2004-01-11 09:18:45 +00:00
Chris Lattner
65f901e23b
Check in two changes:
...
The first change (which is disabled) compactifies all of the function constant
pools into the global constant pool, in an attempt to reduce the amount of
duplication and overhead. Unfortunately, as the comment indicates, this is
not yet a win, so it is disabled.
The second change sorts the typeid's so that those types that can be used
by instructions in the program appear earlier in the table than those that
cannot (such as structures and arrays). This causes the instructions to
be able to use the dense encoding more often, saving about 5K on 254.gap.
This is only a .65% savings though, unfortunately. :(
llvm-svn: 10754
2004-01-10 23:46:13 +00:00
Chris Lattner
570c69ce01
Hrm, another minor cleanup, which I missed before
...
llvm-svn: 10753
2004-01-10 21:42:24 +00:00
Chris Lattner
03c71fa8c5
Minor cleanup
...
llvm-svn: 10752
2004-01-10 21:40:29 +00:00
Chris Lattner
3bcecb92f3
Update obsolete comments
...
Fix iterator invalidation problems which was causing -mstrip to miss some
entries, and read free'd memory. This shrinks the symbol table of 254.gap
from 333 to 284 bytes! :)
llvm-svn: 10751
2004-01-10 21:36:49 +00:00
Chris Lattner
a2bfab849f
Do not bother to emit a BytecodeBlock for an empty symbol table. This commonly
...
occurs when the symbol table for a module has been stripped, making all of the
function local symbols go away.
This saves 6728 bytes in the stripped bytecode file of 254.gap (which obviously
has 841 functions), which isn't a ton, but helps and was easy.
llvm-svn: 10750
2004-01-10 19:56:59 +00:00
Chris Lattner
8043f8c294
Remove use of llvm/CodeGen/InstrSelection.h
...
llvm-svn: 10749
2004-01-10 19:16:26 +00:00
Chris Lattner
03cbd1ab79
Remove standard C header wrappers
...
llvm-svn: 10748
2004-01-10 19:15:38 +00:00
Chris Lattner
d832807311
Remove config wrapper around <cerrno>
...
llvm-svn: 10747
2004-01-10 19:15:14 +00:00
Chris Lattner
7c4b08e99f
Remove standard C file wrapper
...
llvm-svn: 10746
2004-01-10 19:15:00 +00:00
Chris Lattner
ab0f0f3191
Remove wrapper for standard C file, use <cstdlib> instead
...
llvm-svn: 10745
2004-01-10 19:12:44 +00:00
Chris Lattner
56ca6b810a
Remove wrappers around std c files
...
llvm-svn: 10744
2004-01-10 19:12:09 +00:00
Chris Lattner
6c8d212c3b
Dead file, use <cstring> instead of this.
...
llvm-svn: 10743
2004-01-10 19:10:22 +00:00
Chris Lattner
0c53031c5e
Err, we don't need Config/*.h files for things that are standard C++
...
llvm-svn: 10742
2004-01-10 19:10:01 +00:00
Chris Lattner
b0a5964356
minor comment tweaks
...
llvm-svn: 10741
2004-01-10 19:07:06 +00:00
Chris Lattner
94300bde9b
remove obsolete file
...
llvm-svn: 10740
2004-01-10 19:00:26 +00:00
Chris Lattner
4282cbb93a
* finegrainify namespacification of ArchiveReader.cpp
...
* Refactor reader stuff out of include/llvm/Bytecode/Primitives.h. This is
internal implementation details for the reader, not public interfaces!
llvm-svn: 10739
2004-01-10 19:00:15 +00:00
Chris Lattner
82167909a8
Refactor writer stuff out of include/llvm/Bytecode/Primitives.h. This is
...
internal implementation details for the writer, not public interfaces!
llvm-svn: 10738
2004-01-10 18:56:59 +00:00
Chris Lattner
dfe0346e96
Finegrainify namespacification
...
llvm-svn: 10737
2004-01-10 18:49:43 +00:00
Chris Lattner
68fbab0ee8
Fix annoying warnings. W doesn't have a revision number
...
llvm-svn: 10736
2004-01-09 18:39:04 +00:00
Chris Lattner
97390c21d3
Live var is now in lib/Target/Sparc
...
llvm-svn: 10735
2004-01-09 18:16:20 +00:00
Chris Lattner
ae36879303
Move sparc-specific code into lib/Target/Sparc
...
llvm-svn: 10734
2004-01-09 18:15:56 +00:00
Chris Lattner
4ee36320f4
Move sparc-specific livevar code into lib/Target/Sparc
...
llvm-svn: 10733
2004-01-09 18:15:24 +00:00
Chris Lattner
bb6fa4b327
Fix more incestuous #includage.
...
llvm-svn: 10732
2004-01-09 16:17:09 +00:00
Chris Lattner
a4ee66f3ea
Finegrainify namespacification.
...
This should get hunked over to the Sparc backend, along with
MachineCodeForInstruction and a bunch of files in include/llvm/Codegen,
but those battles will have to wait for a later time.
llvm-svn: 10731
2004-01-09 06:30:18 +00:00
Chris Lattner
83e84166a3
Move InstrSelection into lib/Target/Sparc, as it's sparc specific
...
llvm-svn: 10730
2004-01-09 06:24:06 +00:00
Chris Lattner
3d874aebc2
Move InstrSelection into lib/Target/Sparc, as it's sparc specific. This
...
makes the incestuous #include'ing of sparc internal headers much less
disturbing. :)
llvm-svn: 10729
2004-01-09 06:22:34 +00:00
Chris Lattner
b9c7999881
Move lib/Codegen/RegAlloc into lib/Target/Sparc, as it is sparc specific
...
llvm-svn: 10728
2004-01-09 06:17:12 +00:00
Chris Lattner
df3c342a4c
Finegrainify namespacification
...
llvm-svn: 10727
2004-01-09 06:12:26 +00:00
Chris Lattner
fdf788eebd
Remove dependence on structure index type. s/MT/FT
...
llvm-svn: 10726
2004-01-09 06:02:51 +00:00
Chris Lattner
49525f8cf4
Finegrainify namespacification
...
llvm-svn: 10725
2004-01-09 06:02:20 +00:00
Chris Lattner
ff66958154
Finegrainify namespacification
...
add flags for PR82
llvm-svn: 10724
2004-01-09 05:53:38 +00:00
Chris Lattner
84dae1b8a8
Remove an obsolete method, including its _long_ out of date comment.
...
This is an incremental step towards fixing PR82
llvm-svn: 10723
2004-01-09 05:45:58 +00:00
Chris Lattner
9cc1a0e40d
Inching towards fixing PR82
...
llvm-svn: 10722
2004-01-09 05:44:50 +00:00
Chris Lattner
bc39a1a8c4
Inching our way towards fixing PR82
...
llvm-svn: 10721
2004-01-09 05:42:34 +00:00
Chris Lattner
e7d471ad3a
Remove yet another obsolete comment :)
...
llvm-svn: 10720
2004-01-08 22:28:45 +00:00
Brian Gaeke
4ace9279aa
Fix typos. Rewrite head-of-file comment.
...
llvm-svn: 10719
2004-01-08 22:21:59 +00:00
Brian Gaeke
6b991afd26
Fix typos. Regularize include guard.
...
llvm-svn: 10718
2004-01-08 22:21:58 +00:00
Chris Lattner
7433916b5f
New bugs fixed
...
llvm-svn: 10716
2004-01-08 17:20:50 +00:00
Chris Lattner
277276ae37
Testcase for PR202
...
llvm-svn: 10715
2004-01-08 17:15:09 +00:00
Chris Lattner
59d2d7fc33
Improve encapsulation in the Loop and LoopInfo classes by eliminating the
...
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.
llvm-svn: 10714
2004-01-08 00:09:44 +00:00
Chris Lattner
4480f1ab19
explain the jump for llvm-db
...
llvm-svn: 10713
2004-01-07 18:33:14 +00:00
Alkis Evlogimenos
ae5b3d4f74
Add a separate list of fixed intervals. This improves the running time
...
of the register allocator as follows:
before after
mesa 2.3790 1.5994
vpr 2.6008 1.2078
gcc 1.9840 0.5273
mcf 0.2569 0.0470
eon 1.8468 1.4359
twolf 0.9475 0.2004
burg 1.6807 1.3300
lambda 1.2191 0.3764
Speedups range anyware from 30% to over 400% :-)
llvm-svn: 10712
2004-01-07 09:20:58 +00:00
Alkis Evlogimenos
a64d71203e
Minor cleanups.
...
llvm-svn: 10711
2004-01-07 05:31:12 +00:00
Alkis Evlogimenos
9f62b96206
Remove declared but undefined method.
...
llvm-svn: 10710
2004-01-07 02:29:33 +00:00
Alkis Evlogimenos
8b9d36e30c
Change perl interpreter path to the standard /usr/bin/perl.
...
llvm-svn: 10708
2004-01-07 01:48:26 +00:00
Alkis Evlogimenos
1e01557c4e
Change implementation of LiveIntervals::overlap(). This results in a
...
30-50% decrease in running time of the linear scan register allocator.
llvm-svn: 10707
2004-01-07 01:45:58 +00:00
Chris Lattner
bd2977be1a
Ugh, fix some copy and pasted code that somehow never got compiled or something
...
:(
llvm-svn: 10706
2004-01-06 23:46:17 +00:00
Alkis Evlogimenos
96e9a91f55
Pass std::string to constructor as const reference to avoid multiple
...
copies.
llvm-svn: 10705
2004-01-06 09:16:02 +00:00
Chris Lattner
985a535e4f
restore comments to this file
...
llvm-svn: 10704
2004-01-06 05:37:45 +00:00
Chris Lattner
fa13e8ab3e
* Implement set/show args
...
* Implement support for arguments to the 'run' command
* Minor cleanups and fixes
llvm-svn: 10703
2004-01-06 05:37:16 +00:00
Chris Lattner
5a62886928
implement the "null command" which repeats the last command
...
llvm-svn: 10702
2004-01-06 05:36:30 +00:00
Chris Lattner
59f1ef40b0
Add support for new intrinsic
...
llvm-svn: 10701
2004-01-06 05:33:02 +00:00
Chris Lattner
1bb32df2dd
add new intrinsic
...
llvm-svn: 10700
2004-01-06 05:32:17 +00:00
Chris Lattner
3eaba359b0
add new method
...
llvm-svn: 10699
2004-01-06 05:31:57 +00:00
Chris Lattner
941515cf67
Add links to SLD from the LangRef.html doc
...
Clean up the SLD document a LOT
Fill in a lot of details in the SLD document
update the formats for the object descriptors
llvm-svn: 10698
2004-01-06 05:31:32 +00:00
Brian Gaeke
2007cec727
Fix some typos and copy-and-paste-os in comments, and doxygenify.
...
Add <csignal> so that this file compiles on Solaris.
llvm-svn: 10697
2004-01-05 17:22:52 +00:00
Alkis Evlogimenos
2fa1aef707
Remove simple coalescing.
...
llvm-svn: 10695
2004-01-05 08:24:57 +00:00
Chris Lattner
dc24ced2ee
/me slaps head
...
llvm-svn: 10694
2004-01-05 05:47:19 +00:00
Chris Lattner
a090d388a2
/me slaps forehead
...
llvm-svn: 10693
2004-01-05 05:45:25 +00:00
Chris Lattner
fc3d0598df
fix warning
...
llvm-svn: 10692
2004-01-05 05:42:17 +00:00
Chris Lattner
3d903f0c0b
Add VMCore and code generator support for debugging intrinsics. By default
...
code generators completely ignore them.
llvm-svn: 10691
2004-01-05 05:36:30 +00:00
Chris Lattner
53d7dcbee7
Add some intrinsics
...
llvm-svn: 10690
2004-01-05 05:35:34 +00:00
Chris Lattner
3c01d683e3
An example testcase for use in the debugger. Currently you can do stuff like
...
stepping, next'ing, finish'ing, stacktraces, source listings, etc. You can't
print program variables yet though.
Oh, and I lost my nice commented version of funccall.ll :(
Test with:
llvm-as funccall.ll
llvm-db funccall.bc
<arguments>
This is not automatically testable yet, and the C front-end doesn't support
debug information yet. That said, it's a start.
llvm-svn: 10689
2004-01-05 05:32:40 +00:00
Chris Lattner
144992ea30
Add new directory
...
llvm-svn: 10688
2004-01-05 05:28:15 +00:00
Chris Lattner
0a903c38d7
Initial checkin of the LLVM Source-Level Debugger. This is incomplete, but
...
a good start. The status is documented in docs/SourceLevelDebugging.html
llvm-svn: 10687
2004-01-05 05:27:31 +00:00
Chris Lattner
45784e4303
Add new dir
...
llvm-svn: 10686
2004-01-05 05:25:59 +00:00
Chris Lattner
3bb92c65fd
Initial checkin of the LLVM source-level debugger. This is still not finished,
...
by any stretch of the imagination, but it is pretty cool and works :)
llvm-svn: 10685
2004-01-05 05:25:10 +00:00
Chris Lattner
67822803d0
Initial implementation of some source-level debugging stuff
...
llvm-svn: 10684
2004-01-05 05:23:38 +00:00
Chris Lattner
1811fca71c
First version of this document. It is still missing some pretty big pieces, and
...
the debugging information formats will likely change, but it's a start, and I
have to move on to other things in the short-term, so it might be a while before
I get back to working on this.
llvm-svn: 10683
2004-01-05 05:06:33 +00:00
Alkis Evlogimenos
08c5311729
Currently we cannot handle two-address instructions of the form:
...
A = B op C where A == C, but this cannot really occur in practice
because of SSA form. Add an assert to check that just to be safe.
llvm-svn: 10682
2004-01-05 02:25:45 +00:00
Alkis Evlogimenos
5e0e67173d
Update description.
...
llvm-svn: 10681
2004-01-04 23:09:24 +00:00
John Criswell
2c501eca03
Regression test for initializers with members of unknown size.
...
llvm-svn: 10678
2004-01-01 23:58:07 +00:00
John Criswell
5782ca06fc
Not all platforms supports sighandler_t, so I changed it to use the older
...
return value from signal() (which should be the same type; it's just not
typedef'd).
This fixes the build on Solaris.
llvm-svn: 10675
2004-01-01 15:14:28 +00:00
Chris Lattner
748e857996
Add new ExecutionEngine::getGlobalValueAtAddress method, which can efficiently
...
turn a memory address back into the LLVM global object that starts at that
address. Note that this won't cause any additional datastructures to be built
for clients of the EE that don't need this information.
Also modified some code to not access the GlobalAddress map directly.
llvm-svn: 10674
2003-12-31 20:21:04 +00:00
Chris Lattner
e18c9ba06a
Add new ExecutionEngine::getGlobalValueAtAddress method, which can efficiently
...
turn a memory address back into the LLVM global object that starts at that
address. Note that this won't cause any additional datastructures to be built
for clients of the EE that don't need this information.
llvm-svn: 10673
2003-12-31 20:19:31 +00:00
Chris Lattner
78f1f51c66
* Add a new helper progress method
...
* Make sure that the user sees the 100% mark
* Don't bother printing out X.0%, just print out X%
llvm-svn: 10672
2003-12-31 10:20:38 +00:00
Chris Lattner
09bd1a06c1
Add some comments, add new getGlobalVariable method
...
llvm-svn: 10671
2003-12-31 08:43:01 +00:00
Chris Lattner
e501af83b4
Add some comments, add a new getGlobalVariable method
...
llvm-svn: 10670
2003-12-31 08:42:27 +00:00
Chris Lattner
73546536b2
Add missing #include
...
llvm-svn: 10669
2003-12-31 07:31:10 +00:00
Chris Lattner
be3596c8ca
* Make Module::getTypeName const
...
* Add new Module::getTypeByName method
* Group methods in Module.cpp better
llvm-svn: 10668
2003-12-31 07:09:33 +00:00
Chris Lattner
efeb39e3c0
Make the lookup method const.
...
llvm-svn: 10667
2003-12-31 07:08:19 +00:00
Chris Lattner
e7f42f72d3
Add a bunch of fine tunings that Reid contributed. Thanks Reid!
...
llvm-svn: 10666
2003-12-31 06:47:28 +00:00
Chris Lattner
e87006eb7e
add new function
...
llvm-svn: 10665
2003-12-31 06:16:02 +00:00
Chris Lattner
e866d1183b
Add new function
...
llvm-svn: 10664
2003-12-31 06:15:37 +00:00
Chris Lattner
ef927f0ef2
clarify comments
...
llvm-svn: 10663
2003-12-31 05:45:16 +00:00
Chris Lattner
1c007c0ff0
New class, useful for command-line interactive programs.
...
llvm-svn: 10662
2003-12-31 05:40:02 +00:00
Chris Lattner
5220296f77
doxygenify
...
llvm-svn: 10661
2003-12-31 04:42:00 +00:00
Chris Lattner
a0c8fe6794
testcase for PR198
...
llvm-svn: 10660
2003-12-31 03:24:14 +00:00
Chris Lattner
eb537b2401
Fix PR198
...
llvm-svn: 10659
2003-12-31 03:19:37 +00:00
Chris Lattner
af3f8f3b42
Add comments
...
llvm-svn: 10658
2003-12-31 02:50:02 +00:00
Chris Lattner
fd2a514199
Minor code cleanups. The only bugfix is to the UR_DEBUG stuff which didn't
...
compile when enabled.
llvm-svn: 10657
2003-12-31 02:18:11 +00:00
John Criswell
ceea5ad8c8
Updated from files in llvm/autoconf. This was done immediently following
...
the renaming of aclocal.m4 to acinclude.m4.
llvm-svn: 10656
2003-12-30 17:55:05 +00:00
John Criswell
7775323801
Moved aclocal.m4 to acinclude.m4. To re-generate the configure script,
...
do the following:
% cd llvm/autoconf
% aclocal
% autoconf -o ../configure
This changes facilitaties the following:
1) It should be easier to incorporate new autoconf macros.
2) It allows for conversion to Automake (should we ever desire it).
llvm-svn: 10655
2003-12-30 17:50:54 +00:00
Chris Lattner
328e067246
remove some useless #includes
...
llvm-svn: 10654
2003-12-30 07:55:21 +00:00
Chris Lattner
238298acaf
Remove some pointless #includes
...
llvm-svn: 10653
2003-12-30 07:50:31 +00:00
Chris Lattner
c8cbec2cbb
Use getFileSize() instead of sys/stat.h directly
...
llvm-svn: 10652
2003-12-30 07:48:17 +00:00
Chris Lattner
ce8781cd67
Use new getFileSize function. Eliminate some using directives. Reorder #includes a bit
...
llvm-svn: 10651
2003-12-30 07:45:46 +00:00
Chris Lattner
9b75157c04
Use new getFileSize function instead of sys/stat.h directly.
...
llvm-svn: 10650
2003-12-30 07:40:35 +00:00
Chris Lattner
4a1c74dcf8
Add new method
...
llvm-svn: 10649
2003-12-30 07:36:14 +00:00
Chris Lattner
419b70539b
Add new function
...
llvm-svn: 10648
2003-12-30 07:35:47 +00:00
Chris Lattner
cf1755a6f3
Add a -disable-opt flag to gccas, so that we can use -Wa,-disable-opt just
...
like -Wl,-disable-opt
llvm-svn: 10647
2003-12-30 03:24:27 +00:00
Chris Lattner
6b668f228f
Further revisions of the FDHandle idea. In this version we use ownership
...
semantics that are the same as those used by std::auto_ptr. This allows
copying of FDHandle's, but copying transfers ownership.
llvm-svn: 10646
2003-12-30 02:45:16 +00:00
Chris Lattner
b9299236a8
Add a new class useful for providing fully materialized modules to ExecutionEngine's
...
llvm-svn: 10645
2003-12-30 02:44:04 +00:00
John Criswell
1b921c486e
Allow C++ programs to end in .cc. This allows C++ test programs in the
...
test suite to compile.
llvm-svn: 10644
2003-12-29 22:02:12 +00:00
Chris Lattner
0120e92b2b
Add trivial exception specs to produce better code since the methods cannot
...
be inlined.
llvm-svn: 10643
2003-12-29 21:43:58 +00:00
Chris Lattner
a462161f9c
Factor FDHandle out of the bytecode reader into the FileUtilities.h support
...
routines.
llvm-svn: 10642
2003-12-29 21:35:05 +00:00
Chris Lattner
dca358f6ae
implement new getToken function
...
llvm-svn: 10639
2003-12-29 05:07:02 +00:00
Chris Lattner
19857d2c05
add new function
...
llvm-svn: 10638
2003-12-29 05:06:38 +00:00
Chris Lattner
9fbff9f66e
What do you know, we actually do accomplish some things around here :)
...
llvm-svn: 10637
2003-12-28 23:04:17 +00:00
Chris Lattner
5d236005b0
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
...
implementation from the TargetMachine directly.
llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Alkis Evlogimenos
a158dc8104
Reserve ECX and EDI instead of EBX and EDI. Since EBX is a callee
...
saved register it has a longer free range than ECX (which is defined
every time there is a fnuction call) which makes ECX a better register
to reserve.
llvm-svn: 10635
2003-12-28 18:03:52 +00:00
Alkis Evlogimenos
43b587d94d
Add coalescing to register allocator. A hint is added to each interval
...
which denotes the register we would like to be assigned to (virtual or
physical). In register allocation, if this hint exists and we can map
it to a physical register (it is either a physical register or it is a
virtual register that already got assigned to a physical one) we use
that register if it is available instead of a random one in the free
pool.
llvm-svn: 10634
2003-12-28 17:58:18 +00:00
Alkis Evlogimenos
52564b2071
Add TargetInstrInfo::isMoveInstr() to support coalescing in register
...
allocation.
llvm-svn: 10633
2003-12-28 17:35:08 +00:00
Chris Lattner
10cac58d23
Whoops, don't try to lower non intrinsic calls
...
llvm-svn: 10632
2003-12-28 09:53:23 +00:00
Chris Lattner
dabec3ba96
Pass extra arguments around n stuph
...
llvm-svn: 10631
2003-12-28 09:51:04 +00:00
Chris Lattner
36cb530e22
We may now pass IntrinsicLowering implementations into these methods
...
llvm-svn: 10630
2003-12-28 09:48:17 +00:00
Chris Lattner
c45a033b42
implement support for the intrinsic lowering functionality
...
llvm-svn: 10629
2003-12-28 09:47:19 +00:00
Chris Lattner
dfc5631bfd
Eliminate some code that is not needed now that we have the intrinsic lowering pass
...
llvm-svn: 10628
2003-12-28 09:46:33 +00:00
Chris Lattner
c8c6c03dda
Pass around IntrinsicLowering instances as appropriate.
...
Reimplement the Interpreters implementation of va_* to be more direct.
llvm-svn: 10627
2003-12-28 09:44:37 +00:00
Chris Lattner
4b75e04a60
Use the intrinsic lowering functionality
...
llvm-svn: 10626
2003-12-28 09:43:35 +00:00
Chris Lattner
1ae8dde6c4
add argument
...
llvm-svn: 10625
2003-12-28 09:42:49 +00:00
Chris Lattner
bfa9c87bad
ABC's must have virtual dtors! Shame on me!
...
llvm-svn: 10624
2003-12-28 08:55:50 +00:00
Chris Lattner
24650d2b5e
Move into the VMCore library
...
llvm-svn: 10623
2003-12-28 08:30:20 +00:00
Chris Lattner
6e7d2fa79c
Move header into top-level llvm dir
...
llvm-svn: 10622
2003-12-28 08:30:07 +00:00
Chris Lattner
08c196dd4b
Implement the default implementation of the intrinsic lowering class
...
llvm-svn: 10621
2003-12-28 08:19:41 +00:00
Chris Lattner
b697370e97
Add new interface that allows removal of some code from the code generators,
...
provides for future extensibility, might help the LLVA project avoid having to
hack their own LLI, and provides support required for the experimental Venus
project.
llvm-svn: 10620
2003-12-28 08:19:13 +00:00
Chris Lattner
27dd64242b
finegrainify namespacification
...
minor cleanups
llvm-svn: 10619
2003-12-28 07:59:53 +00:00
Chris Lattner
56db5e98c8
Merging constants can cause further room for improvement. Iterate until
...
we converge
llvm-svn: 10618
2003-12-28 07:19:08 +00:00
Chris Lattner
5f4c6f55b6
Add a note
...
llvm-svn: 10617
2003-12-28 04:03:49 +00:00
Chris Lattner
5a0d48290f
Factor code out of LLI
...
llvm-svn: 10616
2003-12-26 06:50:30 +00:00
Chris Lattner
af7cc74126
New method
...
llvm-svn: 10615
2003-12-26 06:50:15 +00:00
Chris Lattner
99958ce7bb
Factor out code to ExecutionEngine
...
llvm-svn: 10614
2003-12-26 06:49:53 +00:00
Chris Lattner
e005b754f3
Simplify code
...
llvm-svn: 10613
2003-12-26 06:36:20 +00:00
Chris Lattner
4a2a8f5821
minor cleanups
...
llvm-svn: 10612
2003-12-26 06:16:00 +00:00
Chris Lattner
079f4d5e71
* eliminate the -f argument to lli, as it was silly and never useful anyway
...
* Inline callMain function
* Remove hack from the ExecutionEngines where the 'run' method would automatically
run atExit functions. Fixing this requires explicitly calling exit if main returns
llvm-svn: 10611
2003-12-26 06:14:47 +00:00
Chris Lattner
385a90aa6d
No longer run atExit functions from run()
...
rename run to runFunction
Genericize the runFunction code a little bit, though it still stinks
llvm-svn: 10610
2003-12-26 06:13:47 +00:00
Chris Lattner
d94296c620
No longer run atExit functions from run()
...
rename run to runFunction
llvm-svn: 10609
2003-12-26 06:13:05 +00:00
Chris Lattner
ad024c3de5
Rename 'run' to 'runFunction' to emphasize that it is usable to run any
...
function in a module, not just main
llvm-svn: 10608
2003-12-26 06:12:25 +00:00
Chris Lattner
141ea3a052
update comment
...
llvm-svn: 10607
2003-12-26 05:07:35 +00:00
Alkis Evlogimenos
2e8c984c58
Improve debugging output when choosing a register to spill.
...
llvm-svn: 10604
2003-12-24 18:53:31 +00:00
Alkis Evlogimenos
eeea81483f
Do a separate pass to compute spill weights because doing it inline
...
with live intervals was missing registers that were used before they
were defined (in the arbitrary order live intervals numbers
instructions).
llvm-svn: 10603
2003-12-24 15:44:53 +00:00
Chris Lattner
4688edb69d
boog fixed
...
llvm-svn: 10602
2003-12-23 23:50:31 +00:00
Chris Lattner
547508d542
Hrm is a really nasty ommission. The lack of this destructor was causing abstract
...
types to never be deleted, manifesting itself as many OpaqueType objects being
leaked. Whoops.
llvm-svn: 10601
2003-12-23 23:25:21 +00:00
John Criswell
5695ec9f95
Corrected typo.
...
llvm-svn: 10600
2003-12-23 22:22:10 +00:00
Chris Lattner
87c593b882
Right, fix the problem with invoke instructions, not just call instructions
...
llvm-svn: 10599
2003-12-23 22:18:36 +00:00
Chris Lattner
601415ed84
Do not delete the type holder until after the call instruction has been
...
constructed!
llvm-svn: 10598
2003-12-23 20:39:17 +00:00
John Criswell
80ce0e620e
Modified the logic so that library objects with main() are only linked in
...
if the program currently has main undefined.
llvm-svn: 10597
2003-12-23 20:27:14 +00:00
Chris Lattner
e970301580
Minor cleanups, plug a minor memory leak
...
llvm-svn: 10596
2003-12-23 20:05:15 +00:00
Alkis Evlogimenos
7d7d7e89d4
Change the way free regusters are computed and perform better
...
allocation in the presence of preallocated intervals.
llvm-svn: 10595
2003-12-23 18:00:33 +00:00
John Criswell
b6d3cb9449
Modified the linker so that it always links in an object from an archive
...
that defines the symbol "main." This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.
There is probably a more correct way to do this, but this works for now.
llvm-svn: 10594
2003-12-23 17:37:06 +00:00
Chris Lattner
bd03ac8567
Rename method
...
llvm-svn: 10593
2003-12-23 09:41:45 +00:00
Chris Lattner
30513e0a3a
rename ClassifyExpression -> ClassifyExpr
...
llvm-svn: 10592
2003-12-23 08:04:08 +00:00
Chris Lattner
f732b6b926
Rename ClassifyExpression -> ClassifyExpr
...
llvm-svn: 10591
2003-12-23 08:03:40 +00:00
Chris Lattner
7e755e443f
More minor non-functional changes. This now computes the exit condition, though
...
it doesn't do anything with it.
llvm-svn: 10590
2003-12-23 07:47:09 +00:00
Chris Lattner
93bfb6c741
Remove extraneous #include
...
finegrainify namespacification
llvm-svn: 10589
2003-12-23 07:43:38 +00:00
Chris Lattner
1e74843e7c
Finegrainify namespacification
...
llvm-svn: 10588
2003-12-23 06:44:41 +00:00
Chris Lattner
0b428c107d
bug fixed
...
llvm-svn: 10587
2003-12-22 23:56:37 +00:00
Chris Lattner
c2ee05427e
Fix memory corruption bug PR193
...
llvm-svn: 10586
2003-12-22 23:49:36 +00:00
John Criswell
bd10d09b07
Reverted back to revision 1.11. The previous fix doesn't really fix
...
anything; it just causes the bug to go dormant.
llvm-svn: 10585
2003-12-22 16:22:49 +00:00
Alkis Evlogimenos
3ec903474f
Fix crash when compiling twolf.
...
llvm-svn: 10584
2003-12-22 13:54:29 +00:00
Chris Lattner
a02d5aa6ce
Don't mind me, I'm just refactoring away. This patch makes room for LFTR, but
...
contains no functionality changes.
llvm-svn: 10583
2003-12-22 09:53:29 +00:00
Chris Lattner
a86c4a3a01
finegrainify namespacification
...
Implement indvar analysis of getelementptr and sub expressions
llvm-svn: 10582
2003-12-22 05:26:29 +00:00
Chris Lattner
f1277450ab
new testcase for cananonicalization of subtracts
...
llvm-svn: 10581
2003-12-22 05:24:45 +00:00
Chris Lattner
6449dcefbc
Implement IndVarsSimplify/pointer-indvars.ll, transforming pointer
...
arithmetic into "array subscripts"
llvm-svn: 10580
2003-12-22 05:02:01 +00:00
Chris Lattner
bb661c18c8
finegrainify namespacification
...
add new getIntPtrType() method
llvm-svn: 10579
2003-12-22 05:01:15 +00:00
Chris Lattner
db65d6f14c
Doxygenize methods, add new getIntPtrType method
...
llvm-svn: 10578
2003-12-22 05:00:45 +00:00
Chris Lattner
a5e3418d98
New testcase to see if -indvars can promote pointer arithmetic to array accesses
...
llvm-svn: 10577
2003-12-22 05:00:13 +00:00
Chris Lattner
2d69eae755
fix grammao
...
llvm-svn: 10576
2003-12-22 04:08:12 +00:00
Chris Lattner
8e570babb0
Bug fixed
...
llvm-svn: 10575
2003-12-22 04:06:24 +00:00
Chris Lattner
5abdc6fd3d
The GCC problem is not specific to suse
...
llvm-svn: 10574
2003-12-22 04:06:12 +00:00
Chris Lattner
d3678bc7c5
Fix PR194
...
llvm-svn: 10573
2003-12-22 03:58:44 +00:00
Misha Brukman
69aa1ccb07
Really release memory used by functions. Patch by Chris.
...
llvm-svn: 10572
2003-12-22 03:47:58 +00:00
Misha Brukman
8834af99d6
Fix the URL to check the referrer for CSS conformity.
...
llvm-svn: 10571
2003-12-21 22:53:21 +00:00
Alkis Evlogimenos
690e1b8de2
Remove verifyIntervals() since it doesn't actually work right now.
...
llvm-svn: 10570
2003-12-21 20:41:26 +00:00
Alkis Evlogimenos
2665d9c6f9
Change weight into a float so that we can take into account the
...
nesting level when computing it. Right now the allocator uses:
w = sum_over_defs_uses( 10 ^ nesting level );
llvm-svn: 10569
2003-12-21 20:19:10 +00:00
Chris Lattner
7b432f77ac
New testcase for PR194
...
llvm-svn: 10568
2003-12-21 19:06:15 +00:00
Alkis Evlogimenos
2103574b32
Move FP_REG_KILL closer to the return instruction.
...
llvm-svn: 10567
2003-12-21 16:47:43 +00:00
Alkis Evlogimenos
c09b77ea35
Add support for inactive intervals. This effectively reuses registers
...
for live ranges that fall into assigned registers' holes.
llvm-svn: 10566
2003-12-21 05:43:40 +00:00
John Criswell
d8c7a7fbaa
Fix PR#193.
...
Modified ReadArchiveBuffer() so that it dynamically allocates the
std::string object used to hold the bytecode object file's name. This is
necessary because it is passed by reference to the new Module that is
allocated to represent the bytecode object, and previously we were
using a std::string that disappeared on function exit.
llvm-svn: 10565
2003-12-20 22:37:29 +00:00
Alkis Evlogimenos
2406ca8d71
Fix help string for --enable-spec2000 option
...
llvm-svn: 10564
2003-12-20 21:35:15 +00:00
Alkis Evlogimenos
27437e3318
Move FP_REG_KILL closer to the actual branch instruction.
...
llvm-svn: 10563
2003-12-20 17:28:15 +00:00
Alkis Evlogimenos
68cff6bf4d
Remove floating point killer pass. This is now implemented in the
...
instruction selector by adding a new pseudo-instruction
FP_REG_KILL. This instruction implicitly defines all x86 fp registers
and is a terminator so that passes which add machine code at the end
of basic blocks (like phi elimination) do not add instructions between
it and the branch or return instruction.
llvm-svn: 10562
2003-12-20 16:22:59 +00:00
Chris Lattner
6448f89cdc
Another day, another bug
...
llvm-svn: 10561
2003-12-20 10:29:02 +00:00
Chris Lattner
4cbb97bfdd
Add a new target-independent machine code freeing pass
...
llvm-svn: 10560
2003-12-20 10:20:58 +00:00
Chris Lattner
452597611f
Finally, _actually delete the machine code_ for a function, after it has
...
been emitted. Also, since the FPK pass is causing memory access violations,
disable it.
llvm-svn: 10559
2003-12-20 10:20:19 +00:00
Chris Lattner
b1bbd7c7f6
This should not be needed anymore
...
llvm-svn: 10558
2003-12-20 10:19:18 +00:00
Chris Lattner
5219159892
Rearrange code, indent for the namespace, add the createMachineFunctionPrinterPass
...
to passes.h, and add the machien destruction pass to Passes.h
llvm-svn: 10557
2003-12-20 10:18:58 +00:00
Chris Lattner
af4304f807
Fix memory leak in the stackifier, due to the machinebasicblocks not holding
...
instructions on an ilist
llvm-svn: 10556
2003-12-20 10:12:17 +00:00
Chris Lattner
d46cd68695
Finegrainify namespacification
...
Minor cleanups to killer pass
llvm-svn: 10555
2003-12-20 09:58:55 +00:00
Chris Lattner
9a4898939a
Hoist some sparc specific code into the sparc target
...
llvm-svn: 10554
2003-12-20 09:17:40 +00:00
Chris Lattner
9a3478e022
* Finegrainify namespacification
...
* Move sparc specific code out of generic code
* Eliminate the getOffset() method which made INVALID_FRAME_OFFSET
necessary, which made pulling in MAX_INT as a sentinal necessary.
llvm-svn: 10553
2003-12-20 09:17:07 +00:00
Chris Lattner
299517dcde
Remove sparc specific passes from public headers
...
llvm-svn: 10552
2003-12-20 09:15:21 +00:00
Chris Lattner
6800f92507
Remove a horrible API
...
llvm-svn: 10551
2003-12-20 09:15:01 +00:00
Chris Lattner
4df78f0fad
PR135 is now finally fixed
...
llvm-svn: 10550
2003-12-20 03:42:11 +00:00
Chris Lattner
fbcc0aa18d
Implement PR135, lazy emission of global variables
...
llvm-svn: 10549
2003-12-20 03:36:47 +00:00
Chris Lattner
620ac15114
Cleanups to implement PR135
...
llvm-svn: 10548
2003-12-20 03:35:50 +00:00
Chris Lattner
6bbe3ecee5
Simple refactorings to prepare for lazy global emission
...
Also, add a stat for the number of globals emitted
llvm-svn: 10547
2003-12-20 02:45:37 +00:00
Chris Lattner
dc997d9470
Simple refactorings to prepare for lazy global emission
...
llvm-svn: 10546
2003-12-20 02:45:16 +00:00
Chris Lattner
ddec71c3b6
A minor cleanup for better encapsulation
...
llvm-svn: 10545
2003-12-20 02:03:14 +00:00
Chris Lattner
9bcae072d1
Cleanup the JIT as per PR176. This renames the VM class to JIT, and merges the
...
VM.cpp and JIT.cpp files into JIT.cpp. This also splits some nasty code out
into TargetSelect.cpp so that people hopefully won't notice it. :)
llvm-svn: 10544
2003-12-20 01:46:27 +00:00
Chris Lattner
32ccf7e196
Update for changes in the JIT
...
llvm-svn: 10543
2003-12-20 01:45:17 +00:00
Chris Lattner
833c3c2597
Rip JIT specific stuff out of TargetMachine, as per PR176
...
llvm-svn: 10542
2003-12-20 01:22:19 +00:00
Chris Lattner
80a4508614
Eliminate a spurious warning
...
llvm-svn: 10540
2003-12-19 19:48:43 +00:00
Chris Lattner
fc7bdac1b3
Fix ADCE/2003-12-19-MergeReturn.llx
...
llvm-svn: 10539
2003-12-19 09:08:34 +00:00
Chris Lattner
b141a2aca6
New testcase for missed optimization
...
llvm-svn: 10538
2003-12-19 09:08:15 +00:00
Chris Lattner
b8b9163a2f
Expand on the AliasSetTracker a bit, so I can remember this next time I come back to it. :)
...
llvm-svn: 10537
2003-12-19 08:43:07 +00:00
Chris Lattner
918460190f
Remove the wierd "Operands" loop, by traversing basicblocks in reverse order
...
llvm-svn: 10536
2003-12-19 08:18:16 +00:00
Chris Lattner
86dd6d835c
Add support for people calling main recursively
...
llvm-svn: 10535
2003-12-19 07:51:46 +00:00
Chris Lattner
547192d688
Implement LICM/sink_multiple.ll, by sinking all possible instructions in the
...
loop before hoisting any.
llvm-svn: 10534
2003-12-19 07:22:45 +00:00
Chris Lattner
a2d66a5ada
New testcase
...
llvm-svn: 10533
2003-12-19 06:54:37 +00:00
Chris Lattner
3d35e879dc
Turn QOI section into CQ section (QUI can be added later if needed)
...
Add PR187
llvm-svn: 10532
2003-12-19 06:31:56 +00:00
Chris Lattner
031a3f8cc7
Generalize a special case to fix PR187
...
llvm-svn: 10531
2003-12-19 06:27:08 +00:00
Chris Lattner
91daeb5431
Factor code out into the Utils library
...
llvm-svn: 10530
2003-12-19 05:58:40 +00:00
Chris Lattner
04efa4b155
Add new function
...
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
Chris Lattner
8f668f26a6
If -enable-linscan is specified, add ENABLE_LINEARSCAN=1 to the make commandline
...
llvm-svn: 10527
2003-12-19 03:47:31 +00:00
Chris Lattner
4953be9c73
Update template
...
llvm-svn: 10525
2003-12-19 03:34:46 +00:00
Alkis Evlogimenos
7139090fd2
Remove TwoAddressInstruction from the public headers and add an ID
...
instead, since this pass doesn't expose any state to its users.
llvm-svn: 10520
2003-12-18 22:40:24 +00:00
Brian Gaeke
bbe0f1d795
Add install target for libraries.
...
llvm-svn: 10519
2003-12-18 20:57:48 +00:00
Chris Lattner
8f88cdfa22
Prune some #includes
...
Add a statistic for # reloads
llvm-svn: 10518
2003-12-18 20:25:31 +00:00
John Criswell
b22e9b4b35
Reverted back to previous revision - this was previously merged
...
according to the CVS log messages.
llvm-svn: 10517
2003-12-18 17:19:19 +00:00
John Criswell
86a3a48697
Merged in RELEASE_11.
...
llvm-svn: 10516
2003-12-18 16:43:17 +00:00
Alkis Evlogimenos
e5e2bd6777
Modify linear scan register allocator to use the two-address
...
instruction pass. This also fixes all remaining bugs for this new
allocator to pass all tests under test/Programs.
llvm-svn: 10515
2003-12-18 13:15:02 +00:00
Alkis Evlogimenos
3bd69eaac5
Fix bug in reserved registers. DH actually aliases DX and EDX which
...
are not reserved registers.
llvm-svn: 10514
2003-12-18 13:12:18 +00:00
Alkis Evlogimenos
c17d57bd82
Modify local register allocator to use the two-address instruction pass.
...
llvm-svn: 10513
2003-12-18 13:08:52 +00:00
Alkis Evlogimenos
725021cb6c
Add TwoAddressInstructionPass to handle instructions that have two or
...
more operands and the two first operands are constrained to be the
same. The pass takes an instruction of the form:
a = b op c
and transforms it into:
a = b
a = a op c
and also preserves live variables.
llvm-svn: 10512
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
4d87219486
Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
...
llvm-svn: 10511
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
15b8036b29
When a variable is killed and redifined in a basic block only one
...
killing instruction is tracked. This causes the LiveIntervals to
create bogus intervals. The workaound is to add a range to the
interval from the redefinition to the end of the basic block.
llvm-svn: 10510
2003-12-18 08:53:43 +00:00
Alkis Evlogimenos
40874c708f
Handle multiple virtual register definitions gracefully.
...
Move some of the longer LiveIntervals::Interval method out of the
header and add debug information to them. Fix bug and simplify range
merging code.
llvm-svn: 10509
2003-12-18 08:48:48 +00:00
Chris Lattner
b3fdf83d17
add boog
...
llvm-svn: 10508
2003-12-18 08:16:25 +00:00
Chris Lattner
9e2b42a0c8
When we delete instructions from the loop, make sure to remove them from the
...
AliasSetTracker as well.
llvm-svn: 10507
2003-12-18 08:12:32 +00:00
Chris Lattner
44fea5416d
Add a new AliassetTracker::remove method. Because we need to be able to remove
...
a pointer from an AliasSet, maintain the pointer values on a doubly linked
list instead of a singly linked list, to permit efficient removal from the
middle of the list.
llvm-svn: 10506
2003-12-18 08:11:56 +00:00
Chris Lattner
cb6dfffa63
Check in patch that Reid submitted
...
llvm-svn: 10505
2003-12-18 06:40:22 +00:00
Misha Brukman
3096ca319a
Fix the links to match our 'llvm' namespace in doxygen-generated docs.
...
llvm-svn: 10504
2003-12-17 23:10:49 +00:00
Misha Brukman
ee158ca708
* Converted C-style comments to C++
...
* Doxygenified comments
* Reordered #includes
llvm-svn: 10503
2003-12-17 22:08:20 +00:00
Misha Brukman
0f42585924
Reordered #includes.
...
llvm-svn: 10502
2003-12-17 22:06:28 +00:00
Misha Brukman
426275b96d
Doxygenified some comments, reduced extraneous space.
...
llvm-svn: 10501
2003-12-17 22:06:08 +00:00
Misha Brukman
b01a80aa94
Reorganized the Sparc backend to be more modular -- each different
...
implementation of a Target{RegInfo, InstrInfo, Machine, etc} now has a separate
header and a separate implementation file.
This means that instead of a massive SparcInternals.h that forces a
recompilation of the whole target whenever a minor detail is changed, you should
only recompile a few files.
Note that SparcInternals.h is still around; its contents should be minimized.
llvm-svn: 10500
2003-12-17 22:04:00 +00:00
Misha Brukman
423ad188da
Since we are now in the 'llvm' namespace, the mangled C++ name of structs
...
and hence the links, all change.
llvm-svn: 10495
2003-12-17 18:46:49 +00:00
John Criswell
d4e013e885
Added Stacker to Reid Spencer's list of contributions.
...
llvm-svn: 10494
2003-12-17 18:15:04 +00:00
Brian Gaeke
0a9980582d
Make getObjectType() smarter about ranlibbed Mac OS X archives.
...
llvm-svn: 10493
2003-12-17 00:18:18 +00:00
Misha Brukman
91ed92fe5f
Disable __attribute__((weak)) on Mac OS X and other lame platforms.
...
llvm-svn: 10489
2003-12-16 22:57:30 +00:00