John Criswell
32e813e486
Merged from mainline.
...
llvm-svn: 15723
2004-08-13 18:52:00 +00:00
John Criswell
b6a9b36e21
Setup the llvm-gcc tarball the way we have always done.
...
llvm-svn: 15687
2004-08-12 14:34:38 +00:00
John Criswell
0fe9bd9e6d
Merged from mainline.
...
llvm-svn: 15686
2004-08-12 14:28:44 +00:00
John Criswell
322e13176f
Merged from mainline. This should fix 176.gcc.
...
llvm-svn: 15685
2004-08-12 14:20:45 +00:00
John Criswell
ab686a51f1
Updated code sizes for LLVM.
...
llvm-svn: 15666
2004-08-11 19:48:12 +00:00
John Criswell
f2a68db009
Adding 2004-08-10-BoolSetCC.ll (written by Chris) as a new regression test.
...
Merged from mainline.
llvm-svn: 15641
2004-08-11 01:28:05 +00:00
John Criswell
ef095995c7
Merged in revision 1.239 from mainline.
...
llvm-svn: 15640
2004-08-11 01:23:22 +00:00
CVS to SVN Conversion
841e6949d7
This commit was manufactured by cvs2svn to create branch 'release_13'.
...
llvm-svn: 15638
2004-08-11 00:49:50 +00:00
John Criswell
a98c3d19a5
Merged from mainline on August 10, 2004.
...
llvm-svn: 15619
2004-08-10 18:33:39 +00:00
CVS to SVN Conversion
10b4a6323f
This commit was manufactured by cvs2svn to create branch 'release_13'.
...
llvm-svn: 15618
2004-08-10 18:33:39 +00:00
John Criswell
7d4bacd1af
Merged in mainline.
...
llvm-svn: 15617
2004-08-10 18:32:06 +00:00
John Criswell
f0958ae6eb
Merged in changes to the instruction combining pass.
...
llvm-svn: 15598
2004-08-09 21:34:34 +00:00
John Criswell
7ee0099de5
Merged in new regression test.
...
llvm-svn: 15597
2004-08-09 21:33:52 +00:00
CVS to SVN Conversion
7aa6c01be2
This commit was manufactured by cvs2svn to create branch 'release_13'.
...
llvm-svn: 15596
2004-08-09 21:33:52 +00:00
John Criswell
1e34901d4d
Fix capitalization of URL.
...
llvm-svn: 15595
2004-08-09 21:17:16 +00:00
John Criswell
362f4b3e5d
Updated release notes from mainline.
...
llvm-svn: 15594
2004-08-09 21:15:20 +00:00
John Criswell
67dee05f54
Merged in changes Chris commited over the weekend. Merge done on August 9,
...
2004.
llvm-svn: 15576
2004-08-09 15:35:51 +00:00
John Criswell
0ccbe35d71
Added note about new PowerPC code generator.
...
Updated versions to 1.3.
llvm-svn: 15560
2004-08-06 21:26:30 +00:00
John Criswell
7f6d3e7317
Fixed the link to the Command Guide. The previous revision only worked
...
if the browser is getting the file from a web server that autocompletes
the URL.
llvm-svn: 15559
2004-08-06 21:12:44 +00:00
John Criswell
fb63a35c3c
Created script to help automate part of the release process.
...
llvm-svn: 15558
2004-08-06 21:03:59 +00:00
John Criswell
6dbb267760
Merge in test for structures with more than 256 members, courtesy of Chris.
...
llvm-svn: 15557
2004-08-06 19:57:05 +00:00
CVS to SVN Conversion
50fe9297ba
This commit was manufactured by cvs2svn to create branch 'release_13'.
...
llvm-svn: 15556
2004-08-06 19:57:05 +00:00
John Criswell
395900dcf5
Updated version.
...
llvm-svn: 15549
2004-08-06 16:21:48 +00:00
CVS to SVN Conversion
a27fe0174c
This commit was manufactured by cvs2svn to create branch 'release_13'.
...
llvm-svn: 15548
2004-08-06 16:21:48 +00:00
Chris Lattner
5064097632
Now without stinky dos newlines!
...
llvm-svn: 15537
2004-08-06 07:45:37 +00:00
Chris Lattner
a8dcf2423e
Changes commited for Nate Begeman:
...
Use a PowerPC specific prolog epilog inserter to control where spilled
callee save regs are placed on the stack.
Get rid of implicit return address stack slot, save return address reg
(LR) in appropriate slot
Improve code generated for functions that don't have calls or access
globals
Note from Chris: PowerPCPEI will eventually be eliminated, once the
functionality is merged into CodeGen/PrologEpilogInserter.cpp
llvm-svn: 15536
2004-08-06 06:58:50 +00:00
Brian Gaeke
a1a0643e38
Update the To-Do list according to my notes + assertions
...
llvm-svn: 15535
2004-08-06 04:38:13 +00:00
John Criswell
2fc39a9c2f
Added Louis Gerbarg. Louis is given credit in the CREDITS.TXT file, so I
...
assume Louis also holds copyright.
llvm-svn: 15534
2004-08-05 23:46:27 +00:00
Chris Lattner
d21e3d020e
More prominantly mention ppc support, more accurately describe its status
...
llvm-svn: 15533
2004-08-05 21:53:13 +00:00
Misha Brukman
467ea6be23
* Mention PowerPC as new feature, and experimental feature
...
* Wrap long lines to 80 cols
llvm-svn: 15532
2004-08-05 21:04:03 +00:00
John Criswell
e7ccf6445e
Add additional copyright notice for the PowerPC backend.
...
Thanks Nate!
llvm-svn: 15531
2004-08-05 20:36:00 +00:00
Brian Gaeke
c51892528b
Split out -disable-codegen into -disable-llc and -disable-jit.
...
llvm-svn: 15530
2004-08-05 19:54:59 +00:00
Misha Brukman
72b2a27617
We now have the PowerPC backend, thanks to Nate Begeman and Luis Gerbarg!
...
llvm-svn: 15529
2004-08-05 19:09:47 +00:00
Misha Brukman
7d41ed5271
Simplify makefile by combining all TableGen dependencies into one variable
...
llvm-svn: 15527
2004-08-05 18:34:15 +00:00
Chris Lattner
c76471842a
while we're at it, make the libraries be on separate lines
...
llvm-svn: 15526
2004-08-05 18:32:57 +00:00
Misha Brukman
eabe770156
Lines need to end with \ to make sure they're actually continued
...
llvm-svn: 15525
2004-08-05 18:31:33 +00:00
Misha Brukman
f7667b1845
* Add PowerPC library to LLC
...
* Fit used libraries on a few lines
llvm-svn: 15524
2004-08-05 18:24:11 +00:00
Misha Brukman
1d1d1c4676
PowerPC is a real target now.
...
llvm-svn: 15522
2004-08-05 18:22:30 +00:00
Chris Lattner
af1ad37f3b
This file is obsolete
...
llvm-svn: 15521
2004-08-05 17:45:32 +00:00
Alkis Evlogimenos
f45cc7a56e
Make GlobalVariable constructor assert when an initializer is of
...
incorrect type.
llvm-svn: 15519
2004-08-05 11:28:34 +00:00
Brian Gaeke
4c8a2120aa
sparcv9select is history.
...
llvm-svn: 15516
2004-08-05 05:17:19 +00:00
Chris Lattner
0d5dc010fa
C++ support does not live in the C runtime any longer
...
llvm-svn: 15515
2004-08-05 02:28:17 +00:00
Chris Lattner
fc9e8b6682
Two files are moved to libstdc++, and a NOTE gets added
...
llvm-svn: 15514
2004-08-05 02:27:28 +00:00
Chris Lattner
0f2aeea79c
Add missing copyrights
...
llvm-svn: 15513
2004-08-05 00:20:51 +00:00
Reid Spencer
24fa5fd29b
Turn a use of intptr_t into a reinterpret_cast<uint64_t> instead to get
...
rid of compilation warnings on some platforms.
llvm-svn: 15512
2004-08-04 22:56:46 +00:00
Chris Lattner
5e18a2489d
Fix another minor problem that exists if you ahve multiple functions with
...
nonunifiable types but the same name. Down with PR411!
llvm-svn: 15511
2004-08-04 22:39:54 +00:00
Chris Lattner
6722f851ef
Fix a typeo
...
llvm-svn: 15510
2004-08-04 22:29:05 +00:00
Chris Lattner
20a4dab308
Add a hack to work around a problem my changes exposed
...
llvm-svn: 15509
2004-08-04 22:26:13 +00:00
Misha Brukman
8e5492e350
* Added documentation in the file header
...
* Shorten assert() text to make it fit within 80 cols
llvm-svn: 15508
2004-08-04 22:07:54 +00:00
Misha Brukman
95908889f4
Surround code element with <tt> tags
...
llvm-svn: 15507
2004-08-04 22:00:05 +00:00
Misha Brukman
283042bed3
Hand-propagate the constant TARGET_NAME which was making lines wrap anyway
...
llvm-svn: 15506
2004-08-04 21:48:45 +00:00
Misha Brukman
b2b9686b3a
* Remove unnecessary comment
...
* Fix alignment of code
* Tabs to spaces
llvm-svn: 15505
2004-08-04 21:48:00 +00:00
Misha Brukman
2068654d68
Align dependencies so they don't hurt the eyes to look at them
...
llvm-svn: 15504
2004-08-04 21:37:41 +00:00
Misha Brukman
eecee636c1
* Convert C++ comments to C
...
* Add UIUC copyright notice headers
llvm-svn: 15503
2004-08-04 21:19:49 +00:00
Misha Brukman
24c7715e93
Shared libraries are usually prepended with `lib'
...
llvm-svn: 15502
2004-08-04 21:19:27 +00:00
Misha Brukman
cdd72aaa1f
Remove unused instruction classes
...
llvm-svn: 15501
2004-08-04 21:18:57 +00:00
Misha Brukman
f74157ab15
Make tablegen targets depend on PowerPCInstrFormats.td as well
...
llvm-svn: 15500
2004-08-04 21:18:36 +00:00
Chris Lattner
29ca2c6f7a
Fix a latent bug exposed by my recent changes
...
llvm-svn: 15498
2004-08-04 18:50:09 +00:00
Chris Lattner
2d1bb6ae2d
Move method out of line
...
llvm-svn: 15497
2004-08-04 18:49:52 +00:00
Chris Lattner
46303fdbf8
It is not possible to catch SIGKILL, don't bother trying.
...
llvm-svn: 15496
2004-08-04 18:14:24 +00:00
Chris Lattner
08c58e63d9
getValues does not exist
...
llvm-svn: 15495
2004-08-04 17:29:14 +00:00
Chris Lattner
50c6df4ba0
getValues is gone
...
llvm-svn: 15494
2004-08-04 17:27:27 +00:00
Alkis Evlogimenos
4242241a69
Clean up whitespace.
...
llvm-svn: 15490
2004-08-04 09:46:56 +00:00
Alkis Evlogimenos
a698308cce
Convert indentation to 2 spaces.
...
llvm-svn: 15489
2004-08-04 09:46:26 +00:00
Alkis Evlogimenos
ed7be9d7f5
Remove uneeded getValues() functions.
...
llvm-svn: 15488
2004-08-04 08:47:21 +00:00
Alkis Evlogimenos
832437255d
Stop using getValues().
...
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Chris Lattner
a6241aed38
Fix a major regression in my previous checkin
...
llvm-svn: 15486
2004-08-04 08:30:43 +00:00
Alkis Evlogimenos
43252afdde
Stop using getValues().
...
llvm-svn: 15485
2004-08-04 08:08:13 +00:00
Brian Gaeke
0f67209ffe
getResultPos() is dead.
...
llvm-svn: 15484
2004-08-04 08:06:30 +00:00
Brian Gaeke
ef57e5b91a
Get rid of the only use of TargetInstrInfo::getResultPos(), a deprecated method.
...
llvm-svn: 15483
2004-08-04 08:05:27 +00:00
Alkis Evlogimenos
f0cc814974
Stop using getValues().
...
llvm-svn: 15482
2004-08-04 08:02:59 +00:00
Chris Lattner
493bdcc4a5
Add note
...
llvm-svn: 15481
2004-08-04 08:00:45 +00:00
Chris Lattner
3706708ede
FindGlobalNamed used to take 2.92s out of 8.39s running a profile build of
...
gccld -disable-opt on 252.eon.
This patch deletes it and replaces it with a map. The proper fix for this
is to fix PR411, but this will do in the short term.
gccld on eon now takes 5.51s, which is 50% faster than before this patch. :)
llvm-svn: 15480
2004-08-04 07:44:58 +00:00
Brian Gaeke
6e5427c2b0
sparcv9select is history
...
llvm-svn: 15479
2004-08-04 07:39:21 +00:00
Brian Gaeke
ab93e34da0
libsparcv9select is history
...
llvm-svn: 15478
2004-08-04 07:38:52 +00:00
Brian Gaeke
b5dcc04220
These headers have been moved/merged into other files.
...
llvm-svn: 15477
2004-08-04 07:37:56 +00:00
Brian Gaeke
c017a2c269
Include SparcV9TmpInstr.h to pick up the def. of TmpInstruction,
...
instead of InstrSelection.h, which is dead.
llvm-svn: 15476
2004-08-04 07:34:57 +00:00
Brian Gaeke
e31a13ae07
Tighten up some whitespace. Include SparcV9TmpInstr.h to pick up
...
the def. of TmpInstruction, instead of InstrSelection.h, which is
dead.
llvm-svn: 15475
2004-08-04 07:34:44 +00:00
Brian Gaeke
def3b458b0
Include SparcV9BurgISel.h, to pick up the definition of
...
createSparcV9BurgInstSelector().
llvm-svn: 15474
2004-08-04 07:30:04 +00:00
Brian Gaeke
813d9f5023
Include SparcV9TmpInstr.h instead of llvm/CodeGen/InstrSelection.h, to pick
...
up the definition of class TmpInstruction.
llvm-svn: 15473
2004-08-04 07:29:53 +00:00
Brian Gaeke
4b621da631
Include SparcV9BurgISel.h, because PreSelection uses routines from within
...
the SparcV9 BURG instruction selector. Eww!
llvm-svn: 15472
2004-08-04 07:29:40 +00:00
Brian Gaeke
908df3299f
Add a Doxygen comment, and inline the constructor (which is now almost empty).
...
llvm-svn: 15471
2004-08-04 07:29:28 +00:00
Brian Gaeke
16f092fe93
The InstrForest data type has moved from llvm/CodeGen/InstrForest.h
...
to SparcV9InstrForest.h.
llvm-svn: 15470
2004-08-04 07:29:16 +00:00
Brian Gaeke
b3e3c539a4
Add a new file containing just TmpInstruction and its implementation.
...
Many other pieces of the SparcV9 backend want to use TmpInstruction, but
don't need any other instruction selector baggage.
llvm-svn: 15469
2004-08-04 07:29:04 +00:00
Brian Gaeke
61dd48425f
All the SparcV9 BURG instruction selector pieces have been collected into the
...
new file SparcV9BurgISel.cpp, with exposed interfaces in SparcV9BurgISel.h.
The InstrSelection directory is now dead.
llvm-svn: 15468
2004-08-04 07:28:51 +00:00
Chris Lattner
dd40787390
I swear I compiled this, really I did.
...
llvm-svn: 15467
2004-08-04 07:28:06 +00:00
Chris Lattner
9262acaed7
Factor some code out, no substantial change.
...
llvm-svn: 15466
2004-08-04 07:05:54 +00:00
Chris Lattner
e19c36cc0f
Concisify some code
...
Do not call FindGlobalNamed when we know we will ignore the result (because
we are not going to link a static symbol anyway). This speeds up
gccld -disable-opt on 252.eon from 8.63s to 8.39s.
llvm-svn: 15465
2004-08-04 06:05:47 +00:00
Chris Lattner
e99bec7f9b
Fix linkage types
...
llvm-svn: 15464
2004-08-04 05:10:48 +00:00
Chris Lattner
3e650aff8b
Implement a FIXME, by not searching linearly through a map to remove an
...
element. This speeds up the bytecode reader from 12.86s to 8.72s on 252.eon.
llvm-svn: 15463
2004-08-04 04:48:01 +00:00
Chris Lattner
4c244225d5
New methods
...
llvm-svn: 15462
2004-08-04 04:45:42 +00:00
Chris Lattner
949681f510
Minor efficiency improvements
...
llvm-svn: 15461
2004-08-04 04:45:29 +00:00
Chris Lattner
3e689f8070
Squelch warnings in release mode
...
llvm-svn: 15460
2004-08-04 03:51:55 +00:00
Chris Lattner
26dc86a8bd
Now that ConstantPointerRef is gone, it is the case that all operands of constants
...
are themselves constants. This should allow us to reduce a significant amount
of casting in the sourcebase.
llvm-svn: 15459
2004-08-04 02:43:00 +00:00
Chris Lattner
da340a9bd5
Add a special version of getType for ConstantPointerNull, exposing the fact
...
that all Null pointers have pointer type
llvm-svn: 15458
2004-08-04 02:42:17 +00:00
Chris Lattner
37b570a049
Add a cast
...
llvm-svn: 15457
2004-08-04 02:27:17 +00:00
Reid Spencer
639a702db8
Added note for PR413
...
Tools now respond to the --version option.
llvm-svn: 15456
2004-08-04 00:43:50 +00:00
Chris Lattner
ea3d501de3
Change SymbolTable::insertEntry to be more careful about how many map
...
lookups it does. This shaves another 5% off of bcreading 252.eon. Note that
the proper solution to this problem is to fix PR411, but that will have to
wait until later.
llvm-svn: 15455
2004-08-04 00:37:31 +00:00
Reid Spencer
ff6cc1233e
Add a --version option for every tool that prints out:
...
Low Level Virtual Machine ($PACKAGE_NAME) $PACKAGE_VERSION
llvm-svn: 15454
2004-08-04 00:36:06 +00:00
Reid Spencer
a0e01ae3f7
Change the package identification to use one less level of quoting so that
...
PACKAGE_VERSION = "1.3" instead of "[1.3]". Rebuild configure script.
llvm-svn: 15453
2004-08-04 00:34:49 +00:00
Chris Lattner
bba09b3f7f
Make getGlobalTableValue not use getTypeSlot, this speeds up the bc reader
...
by 5% on eon
llvm-svn: 15452
2004-08-04 00:19:23 +00:00
Chris Lattner
6494081cce
The Type* is redundant with the TypeSlot
...
llvm-svn: 15451
2004-08-04 00:18:37 +00:00
Chris Lattner
cd84396b58
Do not do a linear std::find to reconstruct information we had, but later threw
...
away. This speeds up by .bc reader by 30% in a profile build on 252.eon.
llvm-svn: 15450
2004-08-03 23:41:28 +00:00
Reid Spencer
02d7f92a79
Line length <= 80 cols.
...
llvm-svn: 15449
2004-08-03 20:57:56 +00:00
Reid Spencer
40e93a466d
Fix some indentation (so brg can test commit script).
...
llvm-svn: 15448
2004-08-03 20:33:56 +00:00
Misha Brukman
8a1978fd72
Remove unused opcodes.
...
llvm-svn: 15447
2004-08-03 20:23:44 +00:00
Reid Spencer
435a1abd86
Fix line lengths.
...
llvm-svn: 15446
2004-08-03 20:21:05 +00:00
Brian Gaeke
df918687cf
Testing the commit-diffs script again.
...
llvm-svn: 15445
2004-08-03 20:14:03 +00:00
Brian Gaeke
84393956c9
Let's try it again.
...
llvm-svn: 15444
2004-08-03 20:02:52 +00:00
Brian Gaeke
0497bba81b
Another test.
...
llvm-svn: 15443
2004-08-03 20:01:10 +00:00
Brian Gaeke
7ce6747863
Testing...one more time.
...
llvm-svn: 15442
2004-08-03 20:00:04 +00:00
Reid Spencer
a54f110e0e
Properly wrap some lines.
...
llvm-svn: 15440
2004-08-03 19:20:18 +00:00
Reid Spencer
000bef1321
Added llvmcs to my list.
...
llvm-svn: 15439
2004-08-03 19:13:16 +00:00
Brian Gaeke
92baeddf2c
Testing... One more time...
...
llvm-svn: 15438
2004-08-03 19:07:20 +00:00
Brian Gaeke
5c7104a478
Just testing
...
llvm-svn: 15437
2004-08-03 19:06:08 +00:00
Brian Gaeke
0254fcb54f
testing
...
llvm-svn: 15436
2004-08-03 19:04:14 +00:00
Brian Gaeke
bc1cf403db
Testing commit-diffs.pl
...
llvm-svn: 15435
2004-08-03 18:59:19 +00:00
Chris Lattner
ac6c18c134
Moved into SparcV9 directory
...
llvm-svn: 15430
2004-08-03 04:15:32 +00:00
Chris Lattner
9e92b19182
Move this file out of the top-level docs directory
...
llvm-svn: 15429
2004-08-03 04:15:02 +00:00
Chris Lattner
298f9f85bc
Simplify the first example, as the LLVM IR interfaces have evolved. Other
...
examples in this doc could also be simplified dramatically in similar ways.
llvm-svn: 15428
2004-08-03 00:17:21 +00:00
John Criswell
caceaafada
Use the new prcontext script.
...
llvm-svn: 15427
2004-08-02 22:31:58 +00:00
John Criswell
8b25914667
Add support for using the prcontext python script instead of grep -C.
...
llvm-svn: 15426
2004-08-02 22:29:38 +00:00
John Criswell
bb4494c93a
New python script that print a specified number of lines surrounding a
...
located pattern.
In other words, grep -C for Solaris.
llvm-svn: 15425
2004-08-02 22:28:50 +00:00
John Criswell
9245f97f97
Set a variable so that we can find the python interpreter.
...
llvm-svn: 15424
2004-08-02 22:24:39 +00:00
Misha Brukman
570dcf63e6
* Use simpler instruction templates to define instructions
...
* Fix several extended opcodes
llvm-svn: 15423
2004-08-02 21:58:52 +00:00
Misha Brukman
6b21bde2d6
Replace patterns 0, 4, and 5 with simpler heirarchical definitions that use the
...
official PowerPC instruction format lingo: X- and D-form.
llvm-svn: 15422
2004-08-02 21:56:35 +00:00
Chris Lattner
baf2b6e9b5
Add link for IRC
...
llvm-svn: 15421
2004-08-02 21:37:11 +00:00
Chris Lattner
e1972b13c3
Written by
...
llvm-svn: 15420
2004-08-02 21:33:45 +00:00
Chris Lattner
07414cb817
continue hacking
...
llvm-svn: 15419
2004-08-02 21:32:08 +00:00
Chris Lattner
fcc7688b89
Revamp the index page
...
llvm-svn: 15418
2004-08-02 21:29:20 +00:00
Chris Lattner
2fd93493d3
... now real HTML 4.01 strict!
...
llvm-svn: 15417
2004-08-02 20:29:51 +00:00
Chris Lattner
5cd4092500
Substantially hack on and clean up the release notes
...
llvm-svn: 15416
2004-08-02 20:28:44 +00:00
Chris Lattner
7e36902bd9
Hide this option
...
llvm-svn: 15415
2004-08-02 20:16:21 +00:00
Misha Brukman
cd4f51b4b6
Separate instruction formats from instruction definitions.
...
llvm-svn: 15414
2004-08-02 16:54:54 +00:00
Misha Brukman
a297dc2480
Add #include <cstdlib> and abort() to silence a warning
...
llvm-svn: 15413
2004-08-02 14:02:21 +00:00
Misha Brukman
8481785391
* ceil() requires #include <cmath> for compilation
...
* Alphabetize #includes
* Fix some lines to fit within 80 cols
llvm-svn: 15412
2004-08-02 13:59:10 +00:00
Chris Lattner
ac44389c83
This pass has proven its metal, remove -disable option.
...
llvm-svn: 15411
2004-08-02 10:10:08 +00:00
Chris Lattner
7aa2d4747a
Fix a regression in InstCombine/xor.ll
...
llvm-svn: 15410
2004-08-01 19:42:59 +00:00
Chris Lattner
4d7af1c680
Fix a warning
...
llvm-svn: 15409
2004-08-01 19:31:30 +00:00
Tanya Lattner
dfd402ea8d
Adding ModuloScheduling so that it compiles for everyone.
...
llvm-svn: 15408
2004-08-01 19:00:17 +00:00
Tanya Lattner
af1fcbb8ce
Adding friend MSSchedule for ModuloScheduling pass.
...
llvm-svn: 15407
2004-08-01 18:57:38 +00:00
Chris Lattner
270b5b1311
Fix warning
...
llvm-svn: 15406
2004-08-01 18:17:36 +00:00
Chris Lattner
803c789d21
Initial testcase for bytecode compatibility regression test.
...
llvm-svn: 15405
2004-08-01 18:06:28 +00:00
Reid Spencer
89ff062fa2
Update.
...
llvm-svn: 15404
2004-08-01 16:30:24 +00:00
Chris Lattner
2b47c02b64
Convert all I<> instructions to asmformat.
...
Delete the 'name' field of all instructions that have asmformats.
llvm-svn: 15403
2004-08-01 09:52:59 +00:00
Chris Lattner
356f5a13f5
Dereferencing end() is bad.
...
llvm-svn: 15402
2004-08-01 09:51:42 +00:00
Chris Lattner
1cabced74b
Add some immediate forms, make name optional
...
llvm-svn: 15401
2004-08-01 09:36:44 +00:00
Chris Lattner
f40e4ebf19
Be picky
...
llvm-svn: 15400
2004-08-01 08:55:34 +00:00
Chris Lattner
29d8ac77e1
Instructions no longer need to have names.
...
llvm-svn: 15399
2004-08-01 08:38:17 +00:00
Chris Lattner
27fcf976f2
Eliminate 3 of the X86 printImplicit* flags.
...
llvm-svn: 15398
2004-08-01 08:23:17 +00:00
Chris Lattner
e42675f5af
Get rid of 3 of the 4 'printimplicit' flags. Implicit operands are now
...
explicitly listed in the asm string.
llvm-svn: 15397
2004-08-01 08:22:29 +00:00
Chris Lattner
f6bd77190e
Convert more instructions over to the asmprinter
...
llvm-svn: 15396
2004-08-01 08:13:11 +00:00
Chris Lattner
06cf67ee14
Handle registers a bit more efficiently
...
llvm-svn: 15395
2004-08-01 08:12:41 +00:00
Chris Lattner
ba52a58836
give FP stack registers names
...
llvm-svn: 15394
2004-08-01 08:12:13 +00:00
Chris Lattner
275d98dcbb
Switch more instructions over to using the asmprinter. Fix bugs in the emission
...
of in/out instructions (missing %'s on registers).
llvm-svn: 15393
2004-08-01 07:44:35 +00:00
Chris Lattner
d5540021fc
The tblgen'erated asmparser wants a way to print operands.
...
llvm-svn: 15392
2004-08-01 07:43:46 +00:00
Chris Lattner
65512a0c49
Add support for asm printing machine instructions that have operands.
...
llvm-svn: 15391
2004-08-01 07:43:02 +00:00
Chris Lattner
5572682faa
Parse the operand list of the instruction. We currently support register and immediate operands.
...
llvm-svn: 15390
2004-08-01 07:42:39 +00:00
Chris Lattner
9520d20c83
Rename the Printer class -> X86AsmPrinter.
...
Include the tablegenerated assembly writer.
llvm-svn: 15389
2004-08-01 06:02:08 +00:00
Chris Lattner
1d21ea7f1f
Factor a bunch of the rules and add support for generating the asmwriter.
...
llvm-svn: 15388
2004-08-01 06:01:32 +00:00
Chris Lattner
321763358b
Specify an asm string and operands lists for a bunch of instructions.
...
This only really covers no-operand instructions so far.
llvm-svn: 15387
2004-08-01 06:01:00 +00:00
Chris Lattner
1c4ae85035
Initial cut at an asm writer emitter. So far, this only handles emission of
...
instructions, and only instructions that take no operands at that!
llvm-svn: 15386
2004-08-01 05:59:33 +00:00
Chris Lattner
c860ecafe1
Add, and start using, the CodeGenInstruction class. This class represents
...
an instance of the Instruction tablegen class.
llvm-svn: 15385
2004-08-01 05:04:00 +00:00
Chris Lattner
fd6893837c
Add the 'ops' marker, add an AsmString initializer
...
llvm-svn: 15383
2004-08-01 04:40:43 +00:00
Chris Lattner
fce9603387
Rename CodeGenWrappers.(cpp|h) -> CodeGenTarget.(cpp|h)
...
llvm-svn: 15382
2004-08-01 04:04:35 +00:00
Chris Lattner
6847866400
Finegrainify namespacification
...
llvm-svn: 15381
2004-08-01 03:55:39 +00:00
Chris Lattner
6971be8159
Completely disable the pattern isel until it is more substantial.
...
llvm-svn: 15380
2004-08-01 03:28:02 +00:00
Chris Lattner
70d2260eb9
Entirely eliminate all patterns and expanders from this file. We shall go
...
with an incremental approach rather than a revolutionary approach.
llvm-svn: 15379
2004-08-01 03:25:01 +00:00
Chris Lattner
fc24e838a6
Move the 'Expander' node to later in the file, with the other experimental
...
stuff. The pattern becomes a list, add some stuff, add some comments.
llvm-svn: 15378
2004-08-01 03:23:34 +00:00
Chris Lattner
06bfc0d930
Remove obsolete file
...
llvm-svn: 15377
2004-08-01 03:19:28 +00:00
Alkis Evlogimenos
62c979ba07
Make OptimizeBlock take a MachineFunction::iterator instead of a
...
MachineBasicBlock* as a parameter so that nxext() and prior() helper
functions can work naturally on it.
llvm-svn: 15376
2004-07-31 19:24:41 +00:00
Chris Lattner
0f1c2ed907
Next on a pointer increments the pointer, not an iterator
...
llvm-svn: 15375
2004-07-31 18:40:36 +00:00
Alkis Evlogimenos
2303d3f660
Use next() helper to make code more readable. Use
...
MachineFunction::iterator instead of MachineBasicBlock* to avoid
dereferencing end iterators.
llvm-svn: 15373
2004-07-31 15:14:29 +00:00
Alkis Evlogimenos
1e8d8fd81f
Use MachineFunction::iterator instead of a MachineBasicBlock* because
...
FallThrough maybe == to MF.end().
llvm-svn: 15372
2004-07-31 15:03:52 +00:00
Alkis Evlogimenos
bb635a27a4
Align breaks.
...
llvm-svn: 15371
2004-07-31 10:05:44 +00:00
Chris Lattner
05f716a972
Expose breakcriticaledges as a functionpass
...
llvm-svn: 15370
2004-07-31 10:02:24 +00:00
Chris Lattner
7471b96a05
Expose this as a functionpass
...
llvm-svn: 15369
2004-07-31 10:01:58 +00:00
Chris Lattner
25e48dd2e0
Implement a simple target-independent CFG cleanup pass
...
llvm-svn: 15368
2004-07-31 10:01:27 +00:00
Chris Lattner
e9d767aa75
New pass
...
llvm-svn: 15367
2004-07-31 09:59:14 +00:00
Chris Lattner
7e7739c431
Expose some helpful methods
...
llvm-svn: 15366
2004-07-31 09:59:04 +00:00
Chris Lattner
fcef7655fa
Add breaks
...
llvm-svn: 15365
2004-07-31 09:53:31 +00:00
Alkis Evlogimenos
ce15f8f4c9
Simplify code a bit.
...
llvm-svn: 15364
2004-07-31 09:44:32 +00:00
Alkis Evlogimenos
aaf642103a
Correctly spell 'unconditional'.
...
llvm-svn: 15363
2004-07-31 09:41:44 +00:00
Alkis Evlogimenos
f57d78a87d
Implement insertGoto and reverseBranchCondition for the X86.
...
llvm-svn: 15362
2004-07-31 09:38:47 +00:00
Alkis Evlogimenos
cf63cb8be2
Change signature to take two basic blocks: the target and the one
...
where the goto will be appended.
llvm-svn: 15361
2004-07-31 09:37:52 +00:00
Alkis Evlogimenos
d6e20fbe12
Doxygenify some comments.
...
llvm-svn: 15360
2004-07-31 08:57:27 +00:00
Alkis Evlogimenos
91eae7e3d2
Remove const from iterators passed by value.
...
llvm-svn: 15359
2004-07-31 08:55:23 +00:00
Alkis Evlogimenos
12312ecfef
Add declarations for insertGoto and reverseBranchCondition.
...
llvm-svn: 15358
2004-07-31 08:52:30 +00:00
Chris Lattner
4504b95801
I'm pretty sure that ba is branch always, which is a barrier. Brg should
...
check this :)
llvm-svn: 15357
2004-07-31 02:24:37 +00:00
Chris Lattner
66a13e230d
Mark barrier instructions. Execution does not fall through uncond branches
...
or return intructions.
llvm-svn: 15356
2004-07-31 02:10:53 +00:00
Chris Lattner
fd4558862c
Support new flag
...
llvm-svn: 15355
2004-07-31 02:07:26 +00:00
Chris Lattner
2ab1142138
New flag
...
llvm-svn: 15354
2004-07-31 02:07:07 +00:00
Chris Lattner
8b3f7d93ea
Add new M_BARRIER_FLAG flag, and isBarrier() method to TargetInstrInfo
...
opCode -> Opcode
llvm-svn: 15353
2004-07-31 02:06:48 +00:00
Chris Lattner
3bf31d75a0
Add some machine CFG related stuff
...
llvm-svn: 15352
2004-07-31 01:59:11 +00:00
Tanya Lattner
081fbd1bde
Updated ModuloScheduling. It makes it all the wya through register allocation on the new code!!
...
llvm-svn: 15351
2004-07-30 23:36:10 +00:00
Misha Brukman
695d50d030
* Conditional save/restore of LR disabled as it's not quite correct
...
* sumarray2d fixed: large fixed-size alloca
* make is now compileable
* Re-organized tests to fit them under proper headings
Patch by Nate Begeman.
llvm-svn: 15347
2004-07-30 15:53:09 +00:00
Misha Brukman
c102577ff1
Do not mark LR as callee-save: not quite correctly done. Patch: Nate Begeman.
...
llvm-svn: 15346
2004-07-30 15:51:51 +00:00
Misha Brukman
471b43a357
* Temporarily suspend LR save/restore optimization as it is not quite correct
...
* Implement large fixed-size allocas Entire patch by Nate Begeman.
llvm-svn: 15345
2004-07-30 15:50:45 +00:00
Misha Brukman
24dac3044f
Enable compilation.
...
llvm-svn: 15344
2004-07-30 14:33:07 +00:00
Misha Brukman
9c003d8f65
Fix De Morgan's name.
...
llvm-svn: 15343
2004-07-30 12:50:08 +00:00
Chris Lattner
d4252a7c64
Start using the PatternMatcher a bit.
...
llvm-svn: 15342
2004-07-30 07:50:03 +00:00
Chris Lattner
308bbe2dd3
Check in some useful helper routines for doing ML-style pattern matching on
...
the LLVM IR.
llvm-svn: 15341
2004-07-30 07:45:00 +00:00
Chris Lattner
5af538f6aa
I demand the ability to say 'if (isa<Value>(V))'!
...
llvm-svn: 15340
2004-07-30 06:59:15 +00:00
Brian Gaeke
b10778dc07
Convert a few assertions with side-effects into regular old runtime checks.
...
These side-effects seem to make a difference when using llc -march=sparcv9
in Release mode (i.e., with -DNDEBUG); when they are left out, lots of
instructions just get dropped on the floor, because they never end up
in the schedule.
llvm-svn: 15339
2004-07-29 21:31:20 +00:00
Chris Lattner
5de840d03b
Fix #includes of i*.h => Instructions.h as per PR403:
...
http://llvm.cs.uiuc.edu/PR403 .
llvm-svn: 15338
2004-07-29 17:31:57 +00:00
Misha Brukman
f4a410f907
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15337
2004-07-29 17:30:57 +00:00
Misha Brukman
63b38bd2ed
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
b5ada398a2
Fix #includes of i*.h => Instructions.h as per PR403:
...
http://llvm.cs.uiuc.edu/PR403 .
llvm-svn: 15333
2004-07-29 17:23:00 +00:00
Chris Lattner
5305437005
Header moved
...
llvm-svn: 15332
2004-07-29 17:15:38 +00:00
Chris Lattner
66a64fb997
Fix #includes of i*.h => Instructions.h as per PR403:
...
http://llvm.cs.uiuc.edu/PR403 .
llvm-svn: 15331
2004-07-29 17:11:37 +00:00
Misha Brukman
2b3387a6d9
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15328
2004-07-29 17:05:13 +00:00
Misha Brukman
2d3fa9e18e
Fix #includes of i*.h files => Instructions.h as per PR403
...
llvm-svn: 15327
2004-07-29 16:53:53 +00:00
Alkis Evlogimenos
93a7c060db
Merge i*.cpp definitions into Instructions.cpp as part of bug403.
...
llvm-svn: 15326
2004-07-29 12:33:25 +00:00
Alkis Evlogimenos
fd7a2d4477
Merge i*.h headers into Instructions.h as part of bug403.
...
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner
c21acbfea4
Fix test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
...
This also fixes the miscompilation of MallocBench/gs with dead store
elimination enabled.
llvm-svn: 15324
2004-07-29 07:56:39 +00:00
Brian Gaeke
690bdefb5f
Get rid of a few dead method declarations.
...
llvm-svn: 15323
2004-07-29 06:43:10 +00:00
Brian Gaeke
d7b36632af
Get rid of calls to void llvm::printSet(const ValueSet &).
...
llvm-svn: 15322
2004-07-29 06:43:09 +00:00
Brian Gaeke
8f8a2ed0b3
Get rid of calls to void llvm::printSet(const ValueSet &).
...
Use LiveRange's iterator types and operations instead of ValueSet's.
llvm-svn: 15321
2004-07-29 06:43:08 +00:00
Brian Gaeke
3073fe3cee
Don't derive from ValueSet to implement class LiveRange; instead, use a
...
SetVector<Value *> data member.
Add << operator for LiveRanges (a dumb one, for now.)
llvm-svn: 15320
2004-07-29 06:43:06 +00:00
Brian Gaeke
818b3631f3
Fix a few typoes and grammaroes in comments.
...
llvm-svn: 15319
2004-07-29 04:25:43 +00:00
Brian Gaeke
2795a34a92
Fix typo in comment.
...
llvm-svn: 15318
2004-07-29 04:22:30 +00:00
Brian Gaeke
3cf8d5b0a2
Remove mustSaveAcrossCalls flag, which isn't ever read, and its mutator,
...
markForSaveAcrossCalls.
llvm-svn: 15317
2004-07-29 04:15:36 +00:00
Chris Lattner
d78935ab60
Move Transforms/BasicAA to Analysis/BasicAA
...
llvm-svn: 15316
2004-07-29 01:34:10 +00:00
Chris Lattner
096a8f7f82
Due to a bug in BasicAA, DSE is incorrectly deleting the first store in
...
this testcase, causing the miscompilation of MallocBench/gs.
llvm-svn: 15315
2004-07-29 01:33:05 +00:00
Reid Spencer
e831f0b761
Updates to reflect most recent changes to bytecode file format:
...
* Dependent libraries & target triple
* Short block headers
* 24-bit type slot ids.
llvm-svn: 15314
2004-07-29 00:13:04 +00:00
Misha Brukman
0d640e87d1
Fix grammar, eliminate double parenthesized sentence fragment.
...
llvm-svn: 15313
2004-07-28 22:37:57 +00:00
Misha Brukman
b2246154df
* Wrap code listings in <div class="doc_code">
...
* Wrap keywords in <tt>
* Wrap lines at 80 cols
llvm-svn: 15312
2004-07-28 22:31:54 +00:00
Misha Brukman
2361fcff41
* Use the doc_code class for code listings to make it stand out from text
...
* Wrap text in soft, comfortable <div>s and <p>s
* Wrap lines at 80 cols
llvm-svn: 15311
2004-07-28 22:18:33 +00:00
Misha Brukman
0fc57a6c47
Put <tt> around verbatim code elements.
...
llvm-svn: 15310
2004-07-28 22:09:29 +00:00
Chris Lattner
07fad1cdee
Minor corrections
...
llvm-svn: 15309
2004-07-28 20:18:53 +00:00
Brian Gaeke
5eb1150db6
TargetInstrInfo::hasOperandInterlock() is always true, because it is
...
never overridden by any target.
llvm-svn: 15308
2004-07-28 19:24:48 +00:00
Misha Brukman
7f01b2539b
Add notes on bug involving casting ulong -> double, thanks to Nate Begeman.
...
llvm-svn: 15307
2004-07-28 19:16:10 +00:00
Misha Brukman
862bb562cc
Simplify loading (un)signed constants to registers, patch by Nate Begeman.
...
llvm-svn: 15306
2004-07-28 19:13:49 +00:00
Misha Brukman
db13b6edba
Remove an extra 8 byte distance penalty. Patch by Nate Begeman.
...
llvm-svn: 15305
2004-07-28 19:13:07 +00:00
Misha Brukman
ca5880025d
Find longs by type, not by their primitive size being 64. Patch by Nate Begeman.
...
llvm-svn: 15304
2004-07-28 19:12:24 +00:00
Misha Brukman
f7037385e2
LI can only take signed values, so values > 32767 can only be loaded with ORI
...
llvm-svn: 15299
2004-07-28 00:56:04 +00:00
Misha Brukman
bd1d7dceb7
Reorganize tests to place them in proper directories.
...
llvm-svn: 15298
2004-07-28 00:55:12 +00:00
Misha Brukman
04dee3bb66
UnitTests 2003-05-26-Shorts and 2003-07-09-LoadShorts have been fixed;
...
2003-05-22-VarSizeArray is broken.
llvm-svn: 15297
2004-07-28 00:01:41 +00:00
Misha Brukman
47d5a22f8b
Fix printing of immediate operands by looking at their operand types in
...
the TargetInstrInfo. This fixes UnitTests 2003-05-26-Shorts and
2003-07-09-LoadShorts.
llvm-svn: 15296
2004-07-28 00:00:48 +00:00
Misha Brukman
92ca8eccd8
Renamed files:
...
* PowerPCReg.td => PowerPCRegisterinfo.td
* PowerPCInstrs.td => PowerPCInstrInfo.td
llvm-svn: 15295
2004-07-27 23:29:16 +00:00
Brian Gaeke
fa8ab0ab6d
ConstantTypeMustBeLoaded has been incorporated into SparcV9PreSelection, its
...
only user.
llvm-svn: 15294
2004-07-27 21:43:38 +00:00
Brian Gaeke
28f75c2140
This was the only user of TargetInstrInfo::ConstantTypeMustBeLoaded().
...
llvm-svn: 15293
2004-07-27 21:11:20 +00:00
Robert Bocchino
1256571c0d
This is the regression test for the change to InstructionCombining.cpp
...
that I made today. It illustrates that the old version of the code
would crash if the RHS of a multiplication were a ConstantExpr that
could not be resolved into a ConstantInt or ConstantFP.
llvm-svn: 15292
2004-07-27 21:06:34 +00:00
Robert Bocchino
7b5b86cd0f
This change fixed a bug in the function visitMul. The prior version
...
assumed that a constant on the RHS of a multiplication was either an
IntConstant or an FPConstant. It checked for an IntConstant and then,
if it did not find one, did a hard cast to an FPConstant. That code
would crash if the RHS were a ConstantExpr that was neither an
IntConstant nor an FPConstant. This version replaces the hard cast
with a dyn_cast. It performs the same way for IntConstants and
FPConstants but does nothing, instead of crashing, for constant
expressions.
The regression test for this change is 2004-07-27-ConstantExprMul.ll.
llvm-svn: 15291
2004-07-27 21:02:21 +00:00
Robert Bocchino
22fddc7d16
*** empty log message ***
...
llvm-svn: 15290
2004-07-27 20:50:02 +00:00
Brian Gaeke
c3259f6413
Get rid of the (apparently non-working) filePrinterEmitter which is added in
...
debug mode. Its only effect seems to be the creation of an empty file...
llvm-svn: 15289
2004-07-27 19:37:37 +00:00
Misha Brukman
2ffb787446
Branch selection support implemented by Nate Begeman for long branches.
...
llvm-svn: 15288
2004-07-27 18:43:04 +00:00
Chris Lattner
e4a72a0268
Fix the nightly tester to default to using gnuplot in /usr/bin
...
llvm-svn: 15287
2004-07-27 18:41:49 +00:00
Misha Brukman
a594740016
Correctly print out long branches, assert on finding pseudo instr COND_BRANCH
...
Patch by Nate Begeman.
llvm-svn: 15286
2004-07-27 18:40:39 +00:00
Misha Brukman
09396bf158
Run the branch selection pass right before the asm printer.
...
Patch by Nate Begeman.
llvm-svn: 15285
2004-07-27 18:39:34 +00:00
Misha Brukman
4d66925aea
Remove empty unused method processFunctionBeforeFrameFinalized()
...
llvm-svn: 15284
2004-07-27 18:38:40 +00:00
Misha Brukman
83df71af70
Add COND_BRANCH pseudo instruction, patch by Nate Begeman.
...
llvm-svn: 15283
2004-07-27 18:35:54 +00:00
Misha Brukman
5b092c15c6
Build COND_BRANCHes which may become long or short, decided by a later pass.
...
Patch by Nate Begeman.
llvm-svn: 15282
2004-07-27 18:35:23 +00:00
Misha Brukman
a783ee55a9
Moved definition of invertPPCBranchOpcode() into PowerPCInstrInfo class.
...
Patch by Nate Begeman.
llvm-svn: 15281
2004-07-27 18:34:11 +00:00
Misha Brukman
ef8cf023a0
Add PowerPCBranchSelector to discover which are `long' branches.
...
Contributed by Nate Begeman.
llvm-svn: 15280
2004-07-27 18:33:06 +00:00
Brian Gaeke
f4c1d1ee34
TargetInstrInfo::getNOPOpCode() has been replaced by a reference to V9::NOP.
...
llvm-svn: 15279
2004-07-27 17:43:24 +00:00
Brian Gaeke
64f51df06d
Convert many of the virtual TargetInstrInfo methods used as helper
...
functions in SparcV9InstrSelection and SparcV9PreSelection into regular
old global functions. As it happens, none of them really have anything
to do with TargetInstrInfo.
llvm-svn: 15278
2004-07-27 17:43:23 +00:00
Brian Gaeke
b788626dc8
As it happens, none of these TargetInstrInfo methods which are only
...
used in the SparcV9 backend really have anything to do with
TargetInstrInfo, so we're converting them into regular old global
functions and moving their declarations to SparcV9InstrSelectionSupport.h.
(They're mostly used as helper functions for SparcV9InstrSelection.)
llvm-svn: 15277
2004-07-27 17:43:22 +00:00
Brian Gaeke
38b79e8fbc
Make the create...() functions for some of these passes return a FunctionPass *.
...
llvm-svn: 15276
2004-07-27 17:43:21 +00:00
Misha Brukman
9eaa879f49
Fixed saving/restoring LR unconditionally, only done as necessary.
...
llvm-svn: 15275
2004-07-27 17:17:48 +00:00
Misha Brukman
bc1a2f96a6
Save and restore LR just like any other register and ONLY if we actually modify
...
it (due to calls or globals access). We now compile `void empty(){}' to `blr'.
llvm-svn: 15274
2004-07-27 17:17:18 +00:00
Misha Brukman
26978c3730
LR is a 32-bit int reg
...
llvm-svn: 15273
2004-07-27 17:15:32 +00:00
Misha Brukman
f1a7e941fb
MovePCtoLR (which is `bl' in disguise) modifies LR implicitly
...
llvm-svn: 15272
2004-07-27 17:15:05 +00:00
Misha Brukman
2bcffa484b
Register LR is callee-saved
...
llvm-svn: 15271
2004-07-27 17:14:34 +00:00
Misha Brukman
640ec1e5e6
Add IMPLICIT_DEF of LR for branch-and-link instrs (calls and global accesses)
...
llvm-svn: 15270
2004-07-27 17:13:58 +00:00
Chris Lattner
5174f436d2
Ugh, the upgrade of zion brought in GCC 3.3.2, our arch nemesis.
...
llvm-svn: 15269
2004-07-27 08:29:06 +00:00
Chris Lattner
aa5b25eae6
Run DSE at link-time, and turn on an IP alias analysis by default in gccld!
...
The -disable-globalsmodref is temporary and will be removed eventually.
llvm-svn: 15268
2004-07-27 08:13:15 +00:00
Chris Lattner
036d2b0c4d
nuke pointless -debug output
...
llvm-svn: 15267
2004-07-27 08:03:18 +00:00
Chris Lattner
d138437ffc
New functionality
...
llvm-svn: 15266
2004-07-27 07:50:07 +00:00
Chris Lattner
cea15a64a2
Document new syntax
...
llvm-svn: 15265
2004-07-27 07:49:39 +00:00
Chris Lattner
b696462260
Fix conservative assumption, which was quite broken. Also, notice that
...
functions known to not access memory (like sin/cos) don't access memory! :)
llvm-svn: 15264
2004-07-27 07:46:26 +00:00
Chris Lattner
50eb771d37
Fix hoisting of void typed values, e.g. calls
...
llvm-svn: 15263
2004-07-27 07:38:32 +00:00
Chris Lattner
89c0c0ae3f
alloca void makes no sense
...
llvm-svn: 15262
2004-07-27 07:30:02 +00:00
Chris Lattner
731381dc0e
Remove a bogus assertion
...
llvm-svn: 15261
2004-07-27 07:22:21 +00:00
Chris Lattner
3a353e84b7
Complete rewrite of this pass to be faster, use less memory, be easier to
...
understand, and more accurate to boot! This implements
GlobalModRef/purecse.ll over the previous impl.
llvm-svn: 15260
2004-07-27 06:40:37 +00:00
Chris Lattner
0373d994a0
new testcase
...
llvm-svn: 15259
2004-07-27 06:35:11 +00:00
Chris Lattner
e30d3c8292
Have some testcases
...
llvm-svn: 15258
2004-07-27 06:26:08 +00:00
Chris Lattner
cf146d4e6e
Add a note
...
llvm-svn: 15257
2004-07-27 04:00:54 +00:00
Chris Lattner
b46f558bed
Fix out of date comment
...
llvm-svn: 15256
2004-07-27 03:04:30 +00:00
Chris Lattner
7ef55da237
Simplify code and silence warning
...
llvm-svn: 15255
2004-07-27 02:34:49 +00:00
Chris Lattner
9b323c3521
Use context-sensitive alias analysis to avoid pessimization in clients of
...
AliasSetTracker (dse and licm). This implements
DeadStoreElimination/context-sensitive.llx
llvm-svn: 15254
2004-07-27 02:20:26 +00:00
Chris Lattner
0a0fc220cc
New testcase. DSE should delete all of the DEAD instructions.
...
llvm-svn: 15253
2004-07-27 02:19:27 +00:00
Chris Lattner
aa05a6e5a1
Make basicaa a bit more aggressive
...
llvm-svn: 15252
2004-07-27 02:18:52 +00:00
Chris Lattner
6b570266b8
basic-aa can actually provide simple mod/ref info
...
llvm-svn: 15251
2004-07-27 02:13:55 +00:00
Chris Lattner
782ab98c56
This was implemented back in march
...
llvm-svn: 15250
2004-07-27 01:59:42 +00:00
Chris Lattner
577fc3f576
Implement test/Regression/TableGen/ListSlices.td
...
llvm-svn: 15249
2004-07-27 01:01:21 +00:00
Chris Lattner
0ff7eb9ba9
New testcase for list slicing
...
llvm-svn: 15248
2004-07-27 01:00:56 +00:00
Chris Lattner
8bf9e06ddd
Add initial support for list slices. This currently allows you to do stuff
...
like this:
def B {
list<int> X = [10, 20, 30, 4, 1, 1231, 20] [2-4,2,2,0-6];
}
... which isn't particularly useful, but more is to come.
llvm-svn: 15247
2004-07-26 23:21:34 +00:00
Reid Spencer
a559cb8e10
A utility to run an arbitrary program on each of the LLVM source files.
...
This is like llvmgrep but instead of running grep, it runs the command
given by the first argument. For example, to find the top ten files with
the most lines in llvm, you could:
utils/llvmdo wc -l | sort -nb | tail
Or, to find any source files with the wrong permissions, you could:
utils/llvmdo ls -l | grep -v rw-r--r--
Hopefully, you get the idea.
llvm-svn: 15246
2004-07-26 22:52:44 +00:00
Misha Brukman
b5ed14486b
Do not store the stack pointer if the stack size is 0.
...
Also, convert C-style comments to C++ and make sure code wraps at 80 cols.
llvm-svn: 15245
2004-07-26 22:00:26 +00:00
Misha Brukman
58499ead7d
ADDI can take several forms, including:
...
addi r1, r2, 0
addi r1, <frame index #n>, 0
so we must check for the second parameter being a register for this instruction
to be considered a reg-to-reg copy.
llvm-svn: 15244
2004-07-26 21:50:38 +00:00
Misha Brukman
6c125a92d7
assert() on MachineInstr properties instead of checking them dynamically
...
llvm-svn: 15243
2004-07-26 21:35:58 +00:00
Misha Brukman
43f1c4045a
* Recognize `addi r1, r2, 0' a move instruction
...
* List formats of instructions currently recognized as moves
llvm-svn: 15242
2004-07-26 21:29:00 +00:00
Chris Lattner
7f50013b0e
Remove dead section
...
llvm-svn: 15241
2004-07-26 21:16:55 +00:00
Misha Brukman
a332a646a0
Fix indentation: should be 2 spaces.
...
llvm-svn: 15240
2004-07-26 18:48:58 +00:00
Misha Brukman
cf7d3af07f
Fix file header as it has been renamed.
...
llvm-svn: 15239
2004-07-26 18:45:48 +00:00
Misha Brukman
bca562404c
Renamed files to have the `X86' prefix for uniqueness purposes.
...
All CVS history was renamed, the *,v were copied over. No worries.
llvm-svn: 15238
2004-07-26 18:43:11 +00:00
Misha Brukman
74e3a17958
* Rewrote casts
...
* Implemented GEP folding
* Dynamically output global address stuff once per function
* Fix casting fp<->short/byte
Patch contributed by Nate Begeman.
llvm-svn: 15237
2004-07-26 18:13:24 +00:00
Misha Brukman
ed664f91a4
Increment the label number in runOnFunction() rather than while printing out
...
some instruction. Patch by Nate Begeman.
llvm-svn: 15236
2004-07-26 16:28:33 +00:00
Misha Brukman
d815472ebd
More notes on bugs, unimplemented features, and suggested code improvements.
...
Written by Nate Begeman.
llvm-svn: 15235
2004-07-26 16:23:55 +00:00
Misha Brukman
40f07ec771
Fix subtracting values > 2^15 in the prologue/epilogue, by Nate Begeman.
...
llvm-svn: 15234
2004-07-26 16:22:52 +00:00
Reid Spencer
084010444f
Added another test case for double FP constants as well.
...
llvm-svn: 15233
2004-07-26 15:04:13 +00:00
Chris Lattner
f29807169a
Implement DeadStoreElim/alloca.llx by observing that allocas are dead at the
...
end of the function (either return or unwind)
llvm-svn: 15232
2004-07-26 06:14:11 +00:00
Chris Lattner
988d70c732
New testcase
...
llvm-svn: 15231
2004-07-26 06:11:42 +00:00
Chris Lattner
bf8c3c405e
Add some new methods
...
llvm-svn: 15230
2004-07-26 05:50:23 +00:00
Chris Lattner
d1818f008f
New methods
...
llvm-svn: 15229
2004-07-26 05:50:09 +00:00
Chris Lattner
a2311dac5f
Update test
...
llvm-svn: 15228
2004-07-26 05:04:25 +00:00
Chris Lattner
e5ad26dbb3
Throttle back indvar substitution from creating multiplies in loops. This is bad bad bad.
...
llvm-svn: 15227
2004-07-26 02:47:12 +00:00
Chris Lattner
87dc093b10
Fix bug in previous patch :(
...
llvm-svn: 15226
2004-07-26 01:40:20 +00:00
Chris Lattner
c2cb34ae61
Fix an extremely serious regression that was causing LLVM basic blocks to be
...
scrambled around almost at random, having really bad effects on icache locality.
llvm-svn: 15225
2004-07-26 01:22:59 +00:00
Chris Lattner
74635dc879
Fix a serious bug in the double constant reader. In particular, because
...
(At[3] << 24) is an int type and it is being coerced to uint64_t, it was
getting sign extended, causing us to get FFFFFFFFxxxxxxxx constants all of
the time.
llvm-svn: 15224
2004-07-25 23:15:44 +00:00
Chris Lattner
21a015c12f
Temporarily disable this code, as it is emitting LLVM_NAN("nan") which results in a call to the
...
glibc 'nan' function because the initializer is not a string. This breaks when used in a global
initializer. Try compiling this testcase for example:
%X = global float <some nan value>
llvm-svn: 15223
2004-07-25 22:36:35 +00:00
Reid Spencer
4b7a38d455
Bugs fixed.
...
llvm-svn: 15222
2004-07-25 22:15:33 +00:00
Reid Spencer
48f98c8545
Avoid use of size(), which counts, in favor of other mechanisms.
...
llvm-svn: 15221
2004-07-25 21:44:54 +00:00
Reid Spencer
9a5f371ce9
Always write FP values correctly.
...
Adjust for new Module.h interface for dependent libraries.
Excise unused backwards compatibility flag.
llvm-svn: 15220
2004-07-25 21:36:26 +00:00
Reid Spencer
bd72920331
Don't create a backwards compatibility flag for something that was a
...
regression bug introduced in release 1.2
llvm-svn: 15219
2004-07-25 21:32:51 +00:00
Reid Spencer
b95885b210
Adjust to new Module.h interface for dependent libraries.
...
llvm-svn: 15218
2004-07-25 21:32:02 +00:00
Reid Spencer
62c6da9a64
Adjust to new Module.h interface for dependent libraries
...
Remove mem leaks resulting from not freeing parse strings.
llvm-svn: 15217
2004-07-25 21:30:51 +00:00
Reid Spencer
ffec7df2c1
Adjust to new Module.h interface for dependent libraries
...
Only write the target triple and deplibs if they are non-empty.
llvm-svn: 15216
2004-07-25 21:29:43 +00:00
Reid Spencer
08a6508e5d
Reduce the footprint of the dependent library interface
...
Document the dependent library interface
Constify the std::string& parameters in the dep lib interface.
llvm-svn: 15215
2004-07-25 21:28:19 +00:00
Chris Lattner
0c73a1ff05
Fix a latent bug in the AliasSetTracker that was exposed by the FreeInst additions and broke a bunch of programs last night.
...
llvm-svn: 15214
2004-07-25 18:32:01 +00:00
Reid Spencer
8c1f5c5c64
bug 263:
...
Add target triple and dependent libraries support to this test.
llvm-svn: 15213
2004-07-25 18:09:47 +00:00
Reid Spencer
a0b05b399d
bug 263:
...
Ensure the list of libraries is cleared.
llvm-svn: 15212
2004-07-25 18:08:57 +00:00
Reid Spencer
cc5ff64416
bug 263:
...
Add ability to write target triple and dependent libraries information.
llvm-svn: 15211
2004-07-25 18:08:18 +00:00
Reid Spencer
b2bdb943b5
bug 263:
...
- encode/decode target triple and dependent libraries
bug 401:
- fix encoding/decoding of FP values to be little-endian only
bug 402:
- initial (compatible) cut at 24-bit types instead of 32-bit
- reduce size of block headers by 50%
Other:
- cleanup Writer by consolidating to one compilation unit, rem. other files
- use a std::vector instead of std::deque so the buffer can be allocated
in multiples of 64KByte chunks rather than in multiples of some smaller
(default) number.
llvm-svn: 15210
2004-07-25 18:07:36 +00:00
Reid Spencer
a24de0d15d
bug 263:
...
Provide parsing for the target triple and dependent libraries.
llvm-svn: 15209
2004-07-25 17:58:28 +00:00
Reid Spencer
4add91957c
bug 263:
...
Provide new tokens for target triples and dependent libraries.
llvm-svn: 15208
2004-07-25 17:56:00 +00:00
Reid Spencer
2b8548cdf1
bug 263:
...
The necessary changes to module in order to support both target triples and
a list of dependent libraries.
llvm-svn: 15207
2004-07-25 17:52:27 +00:00
Reid Spencer
e7dfd77424
bug 402:
...
A new set of block identifiers has been added for version 1.3 so that the
range of values can fit within 5 bits. This aids in halving the size of
block headers.
llvm-svn: 15206
2004-07-25 17:50:00 +00:00
Chris Lattner
3afbb93c67
Codify my thoughts on where we want to end up with the target-independent
...
code generator. Comments welcome.
llvm-svn: 15205
2004-07-25 12:13:35 +00:00
Chris Lattner
7b25bcdf52
* Substantially simplify how free instructions are handled (potentially fixing
...
a bug in DSE).
* Delete dead operand uses iteratively instead of recursively, using a
SetVector.
* Defer deletion of dead operand uses until the end of processing, which means
we don't have to bother with updating the AliasSetTracker. This speeds up
DSE substantially.
llvm-svn: 15204
2004-07-25 11:09:56 +00:00
Chris Lattner
461c1f9857
Add back() and pop_back() methods to SetVector
...
Move clear to the end of the class
Add assertions
llvm-svn: 15203
2004-07-25 11:07:02 +00:00
Alkis Evlogimenos
83d9b62b28
Add some comments to the backtracking code.
...
llvm-svn: 15200
2004-07-25 08:10:33 +00:00
Chris Lattner
4c1c1ac7e4
Free instructions kill values too. This implements DeadStoreElim/free.llx
...
llvm-svn: 15199
2004-07-25 07:58:38 +00:00
Chris Lattner
fb7dd4c1a3
New testcase for DSE
...
llvm-svn: 15198
2004-07-25 07:57:50 +00:00
Chris Lattner
924c68dcb2
Add support for free instructions
...
llvm-svn: 15197
2004-07-25 07:57:37 +00:00
Chris Lattner
bbe845b969
Fix the sense of joinable
...
llvm-svn: 15196
2004-07-25 07:47:25 +00:00
Chris Lattner
d1980dbeba
Remove linux/solaris specific stuff.
...
llvm-svn: 15195
2004-07-25 07:34:00 +00:00
Chris Lattner
ccc75d4f32
This patch makes use of the infrastructure implemented before to safely and
...
aggressively coallesce live ranges even if they overlap. Consider this LLVM
code for example:
int %test(int %X) {
%Y = mul int %X, 1 ;; Codegens to Y = X
%Z = add int %X, %Y
ret int %Z
}
The mul is just there to get a copy into the code stream. This produces
this machine code:
(0x869e5a8, LLVM BB @0x869b9a0):
%reg1024 = mov <fi#-2>, 1, %NOREG, 0 ;; "X"
%reg1025 = mov %reg1024 ;; "Y" (subsumed by X)
%reg1026 = add %reg1024, %reg1025
%EAX = mov %reg1026
ret
Note that the life times of reg1024 and reg1025 overlap, even though they
contain the same value. This results in this machine code:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
add %EAX, %ECX
ret
Another, worse case involves loops and PHI nodes. Consider this trivial loop:
testcase:
int %test2(int %X) {
entry:
br label %Loop
Loop:
%Y = phi int [%X, %entry], [%Z, %Loop]
%Z = add int %Y, 1
%cond = seteq int %Z, 100
br bool %cond, label %Out, label %Loop
Out:
ret int %Z
}
Because of interactions between the PHI elimination pass and the register
allocator, this got compiled to this code:
test2:
mov %ECX, DWORD PTR [%ESP + 4]
.LBBtest2_1:
*** mov %EAX, %ECX
inc %EAX
cmp %EAX, 100
*** mov %ECX, %EAX
jne .LBBtest2_1
ret
Or on powerpc, this code:
_test2:
mflr r0
stw r0, 8(r1)
stwu r1, -60(r1)
.LBB_test2_1:
addi r2, r3, 1
cmpwi cr0, r2, 100
*** or r3, r2, r2
bne cr0, .LBB_test2_1
*** or r3, r2, r2
lwz r0, 68(r1)
mtlr r0
addi r1, r1, 60
blr 0
With this improvement in place, we now generate this code for these two
testcases, which is what we want:
test:
mov %EAX, DWORD PTR [%ESP + 4]
add %EAX, %EAX
ret
test2:
mov %EAX, DWORD PTR [%ESP + 4]
.LBBtest2_1:
inc %EAX
cmp %EAX, 100
jne .LBBtest2_1 # Loop
ret
Or on PPC:
_test2:
mflr r0
stw r0, 8(r1)
stwu r1, -60(r1)
.LBB_test2_1:
addi r3, r3, 1
cmpwi cr0, r3, 100
bne cr0, .LBB_test2_1
lwz r0, 68(r1)
mtlr r0
addi r1, r1, 60
blr 0
Static numbers for spill code loads/stores/reg-reg copies (smaller is better):
em3d: before: 47/25/26 after: 44/22/24
164.gzip: before: 433/245/310 after: 403/231/278
175.vpr: before: 3721/2189/1581 after: 4144/2081/1423
176.gcc: before: 26195/8866/9235 after: 25942/8082/8275
186.crafty: before: 4295/2587/3079 after: 4119/2519/2916
252.eon: before: 12754/7585/5803 after: 12508/7425/5643
256.bzip2: before: 463/226/315 after: 482:241/309
Runtime perf number samples on X86:
gzip: before: 41.09 after: 39.86
bzip2: runtime: before: 56.71s after: 57.07s
gcc: before: 6.16 after: 6.12
eon: before: 2.03s after: 2.00s
llvm-svn: 15194
2004-07-25 07:11:19 +00:00
Chris Lattner
c8002d49e3
Make a method const, no functionality changes
...
llvm-svn: 15193
2004-07-25 06:23:01 +00:00
Chris Lattner
51ebdec5c0
I think that V8 should coallesce registers, don't you?
...
llvm-svn: 15192
2004-07-25 06:19:04 +00:00
Alkis Evlogimenos
74614b0c30
Use name.empty() instead of testing against equality with the empty
...
string.
llvm-svn: 15191
2004-07-25 06:16:52 +00:00
Alkis Evlogimenos
2f130282bd
Disallow creation of named values of type void.
...
llvm-svn: 15190
2004-07-25 06:07:15 +00:00
Chris Lattner
83b9c50f8f
Fix a bug where we incorrectly value numbered the first PHI definition the
...
same as the PHI use. This is not correct as the PHI use value is different
depending on which branch is taken. This fixes espresso with aggressive
coallescing, and perhaps others.
llvm-svn: 15189
2004-07-25 05:45:18 +00:00
Chris Lattner
af7e898e84
Fix a bug in the range remover
...
llvm-svn: 15188
2004-07-25 05:43:53 +00:00
Chris Lattner
0e58e5e48c
Add debugging output for joining assignments
...
llvm-svn: 15187
2004-07-25 03:24:11 +00:00
Alkis Evlogimenos
e0ab16fe54
Remove implementation of operator= and make it private so that it is
...
not used accidentally.
llvm-svn: 15172
2004-07-24 18:55:15 +00:00
Alkis Evlogimenos
cf72e7f854
Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,
...
LiveInterval>. This saves some space and removes the pointer
indirection caused by following the pointer.
llvm-svn: 15167
2004-07-24 11:44:15 +00:00
Chris Lattner
4e0969b500
Finally give bugpoint -timeout support!
...
llvm-svn: 15163
2004-07-24 07:53:26 +00:00
Chris Lattner
bad6478b00
obvious fix
...
llvm-svn: 15162
2004-07-24 07:51:27 +00:00
Chris Lattner
2731ead702
Get rid of the printout from the low-level system interface
...
llvm-svn: 15161
2004-07-24 07:50:48 +00:00
Chris Lattner
8171b14fcc
Pass timeouts into the low level "execute program with timeout" function
...
llvm-svn: 15160
2004-07-24 07:49:11 +00:00
Chris Lattner
e0afd9bd53
Provide timeout values to all abstract interpreters
...
llvm-svn: 15159
2004-07-24 07:48:50 +00:00
Chris Lattner
f5da5de94a
Add support for killing the program if it executes for too long.
...
llvm-svn: 15158
2004-07-24 07:41:31 +00:00
Chris Lattner
8c595eb4bd
whoops, didn't mean to remove this
...
llvm-svn: 15157
2004-07-24 04:32:22 +00:00
Chris Lattner
d9bbbb8484
In the joiner, merge the small interval into the large interval. This restores
...
us back to taking about 10.5s on gcc, instead of taking 15.6s! The net result
is that my big patches have hand no significant effect on compile time or code
quality. heh.
llvm-svn: 15156
2004-07-24 03:41:50 +00:00
Chris Lattner
c51866a20e
Completely eliminate the intervals_ list. instead, the r2iMap_ maintains
...
ownership of the intervals.
llvm-svn: 15155
2004-07-24 03:32:06 +00:00
Chris Lattner
7efcdb7ca3
Big change to compute logical value numbers for each LiveRange added to an
...
Interval. This generalizes the isDefinedOnce mechanism that we used before
to help us coallesce ranges that overlap. As part of this, every logical
range with a different value is assigned a different number in the interval.
For example, for code that looks like this:
0 X = ...
4 X += ...
...
N = X
We now generate a live interval that contains two ranges: [2,6:0),[6,?:1)
reflecting the fact that there are two different values in the range at
different positions in the code.
Currently we are not using this information at all, so this just slows down
liveintervals. In the future, this will change.
Note that this change also substantially refactors the joinIntervalsInMachineBB
method to merge the cases for virt-virt and phys-virt joining into a single
case, adds comments, and makes the code a bit easier to follow.
llvm-svn: 15154
2004-07-24 02:59:07 +00:00
Chris Lattner
d7b9e29327
Add a new differingRegisterClasses method
...
make overlapsAliases take pointers instead of references
fix indentation
llvm-svn: 15153
2004-07-24 02:53:43 +00:00
Chris Lattner
038747f5c0
Little stuff:
...
* Fix comment typeo
* add dump() methods
* add a few new methods like getLiveRangeContaining, removeRange & joinable
(which is currently the same as overlaps)
* Remove the unused operator==
Bigger change:
* In LiveInterval, instead of using a boolean isDefinedOnce to keep track of
if there are > 1 definitions in a particular interval, keep a counter,
NumValues to keep track of exactly how many there are.
* In LiveRange, add a new ValId element to indicate which of the numbered
values each LiveRange belongs to. We now no longer merge LiveRanges if
they are of differing value ID's even if they are neighbors.
llvm-svn: 15152
2004-07-24 02:52:23 +00:00
Misha Brukman
8930d4f24e
Running list of bugs, unimplemented features, currently broken tests, until we
...
have a nightly tester set up for PowerPC.
llvm-svn: 15147
2004-07-23 22:37:22 +00:00
Misha Brukman
c150bdb52e
Eliminate spurious empty space; make code easier to page through.
...
llvm-svn: 15146
2004-07-23 22:35:49 +00:00
Misha Brukman
66c816a6a3
Simplify boolean test.
...
llvm-svn: 15145
2004-07-23 21:43:26 +00:00
Chris Lattner
1604b02c4c
More minor changes:
...
* Inline some functions
* Eliminate some comparisons from the release build
This is good for another .3 on gcc.
llvm-svn: 15144
2004-07-23 21:24:19 +00:00
Misha Brukman
26a04b79cb
Implement casting a floating point to 32-bit unsigned value
...
llvm-svn: 15143
2004-07-23 20:32:59 +00:00
Brian Gaeke
dfaa6ec48f
bug fixed
...
llvm-svn: 15142
2004-07-23 19:41:13 +00:00
Chris Lattner
b4acba49b1
Change addRange and join to be a little bit smarter. In particular, we don't
...
want to insert a new range into the middle of the vector, then delete ranges
one at a time next to the inserted one as they are merged.
Instead, if the inserted interval overlaps, just start merging. The only time
we insert into the middle of the vector is when we don't overlap at all. Also
delete blocks of live ranges if we overlap with many of them.
This patch speeds up joining by .7 seconds on a large testcase, but more
importantly gets all of the range adding code into addRangeFrom.
llvm-svn: 15141
2004-07-23 19:38:44 +00:00
Brian Gaeke
657e590c93
Fix problem with inserting FunctionPasses that depend on ImmutablePasses
...
(e.g., LICM) into FunctionPassManagers. The problem is that we were
using a C-style cast to cast required analysis passes to PassClass*, but
if it's a FunctionPassManager, and the required analysis pass is an
ImmutablePass, the types aren't really compatible, so the C-style cast
causes a crash.
llvm-svn: 15140
2004-07-23 19:35:50 +00:00
Chris Lattner
2fcc5e416d
Search by the start point, not by the whole interval. This saves some
...
comparisons, reducing linscan by another .1 seconds :)
llvm-svn: 15139
2004-07-23 18:40:00 +00:00
Chris Lattner
60babd0431
New helper method
...
llvm-svn: 15138
2004-07-23 18:39:12 +00:00
Chris Lattner
848c7c59d4
Speedup debug builds a bit
...
llvm-svn: 15137
2004-07-23 18:38:52 +00:00
Chris Lattner
c96d299569
Instead of searching for a live interval pair, search for a location. This gives
...
a very modest speedup of .3 seconds compiling 176.gcc (out of 20s).
llvm-svn: 15136
2004-07-23 18:13:24 +00:00
Chris Lattner
856383326a
Rename LiveIntervals.(cpp|h) -> LiveIntervalAnalysis.(cpp|h)
...
llvm-svn: 15135
2004-07-23 17:56:30 +00:00
Chris Lattner
78f62e37f3
Pull the LiveRange and LiveInterval classes out of LiveIntervals.h (which
...
will soon be renamed) into their own file. The new file should not emit
DEBUG output or have other side effects. The LiveInterval class also now
doesn't know whether its working on registers or some other thing.
In the future we will want to use the LiveInterval class and friends to do
stack packing. In addition to a code simplification, this will allow us to
do it more easily.
llvm-svn: 15134
2004-07-23 17:49:16 +00:00
Misha Brukman
7dba17d1ce
* Codegen of GEPs dramatically improved by folding multiplies and adds
...
* Function pointers implemented correctly using appropriate stubs
Contributed by Nate Begeman.
llvm-svn: 15133
2004-07-23 16:08:20 +00:00
John Criswell
9537b0455f
Revised the generation of files so that they follow the newer autoconf
...
standards. This is in hopes of fixing configuration problems on
Windows Services for Unix.
llvm-svn: 15132
2004-07-23 15:40:57 +00:00
Chris Lattner
53280cd26e
Improve comments a bit
...
Use an explicit LiveRange class to represent ranges instead of an std::pair.
This is a minor cleanup, but is really intended to make a future patch simpler
and less invasive.
Alkis, could you please take a look at LiveInterval::liveAt? I suspect that
you can add an operator<(unsigned) to LiveRange, allowing us to speed up the
upper_bound call by quite a bit (this would also apply to other callers of
upper/lower_bound). I would do it myself, but I still don't understand that
crazy liveAt function, despite the comment. :)
Basically I would like to see this:
LiveRange dummy(index, index+1);
Ranges::const_iterator r = std::upper_bound(ranges.begin(),
ranges.end(),
dummy);
Turn into:
Ranges::const_iterator r = std::upper_bound(ranges.begin(),
ranges.end(),
index);
llvm-svn: 15130
2004-07-23 08:24:23 +00:00
Chris Lattner
aaf1e74a85
Change column name
...
llvm-svn: 15129
2004-07-23 06:50:18 +00:00
Chris Lattner
2d75978bc6
Update live intervals more accurately for PHI elim. This slightly reduces
...
the live intervals for some registers.
llvm-svn: 15125
2004-07-23 05:27:43 +00:00
Chris Lattner
b549420cd0
Force coallescing of live ranges that have a single definition, even if they
...
interfere. Because these intervals have a single definition, and one of them
is a copy instruction, they are always safe to merge even if their lifetimes
interfere. This slightly reduces the amount of spill code, for example on
252.eon, from:
12837 spiller - Number of loads added
7604 spiller - Number of stores added
5842 spiller - Number of register spills
18155 liveintervals - Number of identity moves eliminated after coalescing
to:
12754 spiller - Number of loads added
7585 spiller - Number of stores added
5803 spiller - Number of register spills
18262 liveintervals - Number of identity moves eliminated after coalescing
The much much bigger win would be to merge intervals with multiple definitions
(aka phi nodes) but this is not that day.
llvm-svn: 15124
2004-07-23 05:26:05 +00:00
Misha Brukman
6aa3c83f8d
* Convert "\n" -> '\n'
...
* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols
llvm-svn: 15123
2004-07-23 01:30:49 +00:00
Misha Brukman
4fb48609dc
Bool alignment on MacOSX/PowerPC is 4 bytes.
...
llvm-svn: 15122
2004-07-23 01:11:46 +00:00
Misha Brukman
db72025d1d
* Change class of BoolTy back to cInt
...
* Fix indentation back to 2 spaces
llvm-svn: 15121
2004-07-23 01:11:19 +00:00
Misha Brukman
3faa865508
* Add BoolAlignment to TargetData, default is 1 byte, size 1 byte
...
* Convert tabs to spaces
llvm-svn: 15120
2004-07-23 01:09:52 +00:00
Misha Brukman
f0cfb33bbb
* Add a BoolAlignment field to TargetData, default is 1 byte
...
* Fix spacing
llvm-svn: 15119
2004-07-23 01:08:13 +00:00
Chris Lattner
84b93bb107
costmetic changes
...
llvm-svn: 15118
2004-07-22 23:05:12 +00:00
Misha Brukman
d859e170fc
Let's not get carried away here, please.
...
llvm-svn: 15117
2004-07-22 22:43:21 +00:00
John Criswell
ba60b3209b
Give some credit to Oscar. Should help to address Bug#13.
...
llvm-svn: 15116
2004-07-22 22:11:16 +00:00
Chris Lattner
6b2b26c6f2
Fix broken -debug printing
...
llvm-svn: 15115
2004-07-22 21:54:22 +00:00
Chris Lattner
8799dd9e2e
The default has not been 'simple' for AGES!
...
llvm-svn: 15114
2004-07-22 21:46:02 +00:00
Chris Lattner
87bf918bc0
Remove some abandoned code that was never finished. If needed in the future
...
it can be ressurected from CVS.
llvm-svn: 15113
2004-07-22 21:32:38 +00:00
Chris Lattner
8d06c43f01
Remove some (LARGE) abandoned code for the release. If this is ever needed
...
again in the future, it can be resurrected out of CVS
llvm-svn: 15112
2004-07-22 21:30:35 +00:00
Chris Lattner
68426e5ba6
Make linear scan the default
...
llvm-svn: 15111
2004-07-22 18:42:00 +00:00
Misha Brukman
333f58836c
* Change bool from cInt to cByte (for now)
...
* Don't allow negative immediates to users of unsigned immediates
* Fix long compares
* Support <const int>, op as a potential immediate candidate
* Fix sign extension of short and byte loads
* Fix and improve integer casts
* Fix passing of doubles as vararg functions
Patch contributed by Nate Begeman.
llvm-svn: 15109
2004-07-22 15:58:04 +00:00
Alkis Evlogimenos
c73b76a0a8
Put variable name to a separate line.
...
llvm-svn: 15108
2004-07-22 15:30:33 +00:00
Misha Brukman
6dd644e017
Fix indentation and wrap code at 80 cols
...
llvm-svn: 15107
2004-07-22 15:26:23 +00:00
Alkis Evlogimenos
61546f3e5b
Sorting is now handled by both linearscan and iterative scan so live
...
intervals need not be sorted anymore. Removing this redundant step
improves LiveIntervals running time by 5% on 176.gcc.
llvm-svn: 15106
2004-07-22 15:18:10 +00:00
Alkis Evlogimenos
52cff0adf0
Fit to 80 columns.
...
llvm-svn: 15105
2004-07-22 14:29:31 +00:00
Chris Lattner
7ba1be09b3
Remove redundant SCCP pass
...
Add new DSE pass. Add a temporary option to disable it in case we need it
This is going in after the July 22 nightly tester run, so we'll wait until the 23rd to see it
:)
llvm-svn: 15104
2004-07-22 08:34:33 +00:00
Alkis Evlogimenos
1a876fab64
Some compile time improvements resulting in a 1sec speedup in the 5sec
...
compilation of gcc:
* Use vectors instead of lists for the intervals sets
* Use a heap for the unhandled set to keep intervals always sorted and
makes insertions back to the heap very fast (compared to scanning a
list)
llvm-svn: 15103
2004-07-22 08:14:44 +00:00
Chris Lattner
a363ea488f
New prototype
...
llvm-svn: 15102
2004-07-22 08:07:30 +00:00
Chris Lattner
3844c300de
This is a trivial dead store elimination pass. It very very simple and
...
can be improved in many ways. But: stop laughing, even with -basicaa it
deletes 15% of the stores in 252.eon :)
llvm-svn: 15101
2004-07-22 08:00:28 +00:00
Chris Lattner
e82780c22e
Trivial testcase for dse
...
llvm-svn: 15100
2004-07-22 07:59:20 +00:00
Chris Lattner
053427ff4f
Clean up reference counting to stop "leaking" alias sets
...
llvm-svn: 15099
2004-07-22 07:58:18 +00:00
Chris Lattner
f2b976bdd5
Remove extraneous punctuation
...
llvm-svn: 15098
2004-07-22 05:51:56 +00:00
Chris Lattner
51f7c9e56d
Update GC intrinsics to take a pointer to the object as well as a pointer
...
to the field being updated. Patch contributed by Tobias Nurmiranta
llvm-svn: 15097
2004-07-22 05:51:13 +00:00
Chris Lattner
001aba76fd
Updates to gc intrinsics, contributed by Tobias Nurmiranta
...
llvm-svn: 15096
2004-07-22 05:50:01 +00:00
Chris Lattner
609111020f
Update documentation for gc intrinsics change. Contributed by
...
Tobias Nurmiranta
llvm-svn: 15095
2004-07-22 05:49:38 +00:00
Chris Lattner
7324574660
Update gc intrinsics to take pointer to object as well as pointer to field.
...
Patch contributed by Tobias Nurmiranta
llvm-svn: 15094
2004-07-22 05:48:38 +00:00
Alkis Evlogimenos
120187935d
Use reverse iterators when updating the vector, since scanning from
...
the end will reduce erase() runtimes.
llvm-svn: 15093
2004-07-22 02:16:53 +00:00
Chris Lattner
6ff6021712
That funny 2-address lowering pass can also cause multiple definitions,
...
fortunately, they are easy to handle if we know about them. This patch fixes
some serious pessimization of code produced by the linscan register allocator.
llvm-svn: 15092
2004-07-22 00:04:14 +00:00
Chris Lattner
adbbc62f82
Minor cleanups
...
llvm-svn: 15091
2004-07-21 23:17:57 +00:00
Chris Lattner
fac8452acf
Fix cases where we generated horrible code like this:
...
mov %EDI, 12
add %EDI, %ECX
mov %ECX, 12
add %ECX, %EDX
mov %EDX, 12
add %EDX, %ESI
instead (really!) generate this:
add %ECX, 12
add %EDX, 12
add %ESI, 12
llvm-svn: 15090
2004-07-21 21:28:26 +00:00
Brian Gaeke
902dcf0729
These files don't need to include <iostream> since they include "Support/Debug.h".
...
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Brian Gaeke
025daeeee6
Include <iostream> here, because most people using DEBUG() want to use std::cerr too.
...
This means that users of this file do not also need to include <iostream>.
llvm-svn: 15088
2004-07-21 20:50:22 +00:00
Misha Brukman
dbd14bc3e5
* Add the lost fix to define the second reg of a 2-reg representation of longs
...
* Fix opcode RLWNM -> RLWINM since it uses an immediate const shift value
llvm-svn: 15087
2004-07-21 20:30:18 +00:00
Misha Brukman
87e07f8596
* Speed up canUseAsImmediateForOpcode() by comparing Operand before
...
dyn_cast<>ing and checking Constant's value
* Convert tabs to spaces
llvm-svn: 15086
2004-07-21 20:22:06 +00:00
Chris Lattner
d8f5e2ccac
* Further cleanup.
...
* Test for whether bits are shifted out during the optzn.
If so, the fold is illegal, though it can be handled explicitly for setne/seteq
This fixes the miscompilation of 254.gap last night, which was a latent bug
exposed by other optimizer improvements.
llvm-svn: 15085
2004-07-21 20:14:10 +00:00
Misha Brukman
8d75aa4475
* Fix printing of signed immediate values (Nate Begeman)
...
* Fix printing of `zeroinitializer'
* Fix printing of `linkonce' globals, complete with stubs
llvm-svn: 15084
2004-07-21 20:11:11 +00:00
Misha Brukman
072af37088
* Fix printing of signed immediate values
...
* Generation of opcodes that take 16 bit immediates
* Rewrote multiply to be correct for 64 bit values
* Rewrote all the long handling to be correct for PowerPC
* Fix visitSelectInst() to define the upper register of the pair of regs
representing a long value
Patch contributed by Nate Begeman.
llvm-svn: 15083
2004-07-21 20:09:08 +00:00
Chris Lattner
1638de4499
Make cast-cast code a bit more defensive
...
"simplify" a bit of code for comparison/and folding
llvm-svn: 15082
2004-07-21 19:50:44 +00:00
Misha Brukman
455622577a
Use addSImm() instead of addImm() for stack offsets, which may be negative.
...
llvm-svn: 15081
2004-07-21 19:36:57 +00:00
Misha Brukman
00df656502
Reid doesn't need a definite article in front of his name.
...
llvm-svn: 15080
2004-07-21 18:04:27 +00:00
Misha Brukman
2887818206
Delete extra space; add <p> tags around text within a <div>
...
llvm-svn: 15079
2004-07-21 18:02:43 +00:00
Alkis Evlogimenos
c74c7d1101
Fix analysis name.
...
llvm-svn: 15078
2004-07-21 17:23:44 +00:00
Misha Brukman
984bfdc702
Add SUBI instruction
...
llvm-svn: 15077
2004-07-21 15:53:04 +00:00
Misha Brukman
ab25ccb9ea
Fix spelling of `iterative scan'
...
llvm-svn: 15075
2004-07-21 12:53:14 +00:00
Misha Brukman
53bba06e37
* Uncomment rule for location of LLI (formerly commented out: typo?)
...
* Add space between VAR and `='
llvm-svn: 15074
2004-07-21 12:47:40 +00:00
Alkis Evlogimenos
701071a144
Clear spilled list at once. Remove unused vector.
...
llvm-svn: 15073
2004-07-21 12:00:10 +00:00
Alkis Evlogimenos
a3efc03731
Change std::list into a std::vector for IntervalSets. This reduces
...
compile time for 176.gcc from 5.6 secs to 4.7 secs.
llvm-svn: 15072
2004-07-21 09:46:55 +00:00
Alkis Evlogimenos
29d020ab60
Add greater_ptr functor.
...
llvm-svn: 15070
2004-07-21 08:38:06 +00:00
Alkis Evlogimenos
fbc436bbce
Improve file comment.
...
llvm-svn: 15069
2004-07-21 08:28:39 +00:00
Alkis Evlogimenos
d524e5bdf2
Add Iterative scan register allocator.
...
llvm-svn: 15068
2004-07-21 08:24:35 +00:00
Alkis Evlogimenos
c03ccc225b
Linearscan is no longer experimental.
...
llvm-svn: 15067
2004-07-21 08:18:50 +00:00
Chris Lattner
abc4f4523f
Add capability to remove aliasing aliassets from an AST
...
llvm-svn: 15066
2004-07-21 07:04:26 +00:00
Chris Lattner
b2903c2a1e
Add a bunch of new functionality, primarily to do with removing aliasing
...
pointers from an AST.
llvm-svn: 15065
2004-07-21 07:03:57 +00:00
Chris Lattner
2cfaef23e4
Make the AST interface a bit richer by returning whether an insertion caused
...
an insertion or not (because the pointer set already existed).
llvm-svn: 15064
2004-07-21 05:18:04 +00:00
Chris Lattner
4fbad968f8
Remove special casing of pointers and treat them generically as integers of
...
the appopriate size. This gives us the ability to eliminate int -> ptr -> int
llvm-svn: 15063
2004-07-21 04:27:24 +00:00
Chris Lattner
fdcf624939
Do not ignore casts unless they are pointer-pointer casts. This caused us
...
to miscompile the SingleSource/Regression/C++/pointer_member.cpp program.
llvm-svn: 15062
2004-07-21 03:56:54 +00:00
Brian Gaeke
cd4ae3a3fd
Regenerated using autoconf-2.57.
...
llvm-svn: 15061
2004-07-21 03:50:25 +00:00
Brian Gaeke
b1ea500aa1
Add AC_MSG_CHECKING and AC_MSG_RESULT statements which were missing
...
from two of our custom checks.
llvm-svn: 15060
2004-07-21 03:50:01 +00:00
Brian Gaeke
a87044523f
Regenerated with autoconf/autoheader 2.57
...
llvm-svn: 15059
2004-07-21 03:33:58 +00:00
Brian Gaeke
84a69f1494
Solaris hack for isinf()
...
llvm-svn: 15058
2004-07-21 03:32:51 +00:00
Brian Gaeke
a5adf7948c
Add check for finite(). Solaris doesn't have isinf, but it has finite...go
...
figure!
llvm-svn: 15057
2004-07-21 03:30:27 +00:00
Brian Gaeke
1dde3fa94f
Emit NaNs and INFs bit-identically to the bytecode file, if the system has
...
printf("%a") support.
Patch contributed by Bill Wendling.
llvm-svn: 15056
2004-07-21 03:15:26 +00:00
Brian Gaeke
adcf66fb8f
Add prototypes for platform-independent wrappers for isinf().
...
Patch contributed by Bill Wendling.
llvm-svn: 15055
2004-07-21 03:15:14 +00:00
Brian Gaeke
920f4dd59e
Regenerated with autoheader-2.57.
...
Patch contributed by Bill Wendling.
llvm-svn: 15054
2004-07-21 03:15:02 +00:00
Brian Gaeke
499b01d29d
Add call to check for isinf().
...
Patch contributed by Bill Wendling.
llvm-svn: 15053
2004-07-21 03:14:51 +00:00
Brian Gaeke
25318b1381
Add support for checking for isinf().
...
Patch contributed by Bill Wendling.
llvm-svn: 15052
2004-07-21 03:14:39 +00:00
Brian Gaeke
2698a6cb8e
Regenerated with autoconf-2.57.
...
Patch contributed by Bill Wendling.
llvm-svn: 15051
2004-07-21 03:14:12 +00:00
Brian Gaeke
0810ebf56a
Add platform-independent wrapper function for isinf().
...
Patch contributed by Bill Wendling.
llvm-svn: 15050
2004-07-21 03:13:50 +00:00
Brian Gaeke
e2e0637a77
Move LLVM tool definitions to Makefile.rules
...
llvm-svn: 15049
2004-07-21 01:31:47 +00:00
Misha Brukman
75f3291ef3
Shorts are aligned to 2 bytes, bools to 1 byte (in structs).
...
llvm-svn: 15048
2004-07-20 20:59:57 +00:00
Misha Brukman
8e36261aa8
Treat external variables similarly to those with weak linkage: load indirect.
...
llvm-svn: 15047
2004-07-20 20:43:05 +00:00
Misha Brukman
288b211afb
Refer would-be llvm-gcc source users/hackers to the compilation guide.
...
llvm-svn: 15046
2004-07-20 20:25:18 +00:00
Misha Brukman
3475be9a62
Use C++-style <cstdio> instead of C-style <stdio.h>
...
llvm-svn: 15042
2004-07-20 16:14:06 +00:00
Misha Brukman
4aab086eda
Differentiate between global and weak symbol loads
...
llvm-svn: 15037
2004-07-20 15:52:25 +00:00
Misha Brukman
684ef6ca20
* Differentiate between global and weak symbol loads
...
* Fix functions that take more than 32 bytes of args
* Alignment of doubles in structs is 4 bytes, not 8
* Fix passing long args: rN = hi, rN+1 = lo
* Rewrite signed divide
* Rewrite Intrinsic::returnaddress
Patch courtesy of Nate Begeman.
llvm-svn: 15036
2004-07-20 15:51:37 +00:00
Misha Brukman
42666aed5e
Differentiate between global and weak symbol loads
...
llvm-svn: 15035
2004-07-20 15:45:27 +00:00
Misha Brukman
dff882a230
Double alignment in structs is 4 bytes, not 8. Patch by Nate Begeman.
...
llvm-svn: 15034
2004-07-20 15:43:25 +00:00
Alkis Evlogimenos
7eb2b1892b
Add function to clear all virtual->physical mappings but not assigned
...
stack slots. This is in preparation for the iterative linear scan.
llvm-svn: 15032
2004-07-20 13:28:17 +00:00
Alkis Evlogimenos
f616d8328c
Remove unneeded functor. LiveInterval has a < operator.
...
llvm-svn: 15031
2004-07-20 10:20:03 +00:00
Chris Lattner
45b50d14c9
Fix a serious code pessimization problem. If an inlined function has a single
...
return, clone the 'ret' BB code into the block AFTER the inlined call, not the
other way around.
llvm-svn: 15030
2004-07-20 05:45:24 +00:00
Chris Lattner
11ffd59e37
Implement Transforms/InstCombine/IntPtrCast.ll
...
llvm-svn: 15029
2004-07-20 05:21:00 +00:00
Chris Lattner
4269e40e67
new testcase
...
llvm-svn: 15028
2004-07-20 05:20:39 +00:00
Chris Lattner
ec67df0ed1
Ignore instructions that are in trivially dead functions. This allows us
...
to constify 14 globals instead of 4 in a trivial C++ testcase.
llvm-svn: 15027
2004-07-20 03:58:07 +00:00
Misha Brukman
e036ff8b32
Fix stack frame layout in prologue/epilogue. Patch courtesy of Nate Begeman.
...
llvm-svn: 15026
2004-07-20 02:23:09 +00:00
Misha Brukman
9bd41d54c5
Dump the old-fashioned C-style <ctype.h> in favor of new `C++'-style <cctype>
...
llvm-svn: 15025
2004-07-20 02:18:25 +00:00
Chris Lattner
44d0b9502a
Implement InstCombine/GEPIdxCanon.ll
...
llvm-svn: 15024
2004-07-20 01:48:15 +00:00
Chris Lattner
9492af43c4
New testcase that instcombine should help out with.
...
llvm-svn: 15023
2004-07-20 01:47:49 +00:00
Chris Lattner
5823ac1c21
Implement SimplifyCFG/BrUnwind.ll
...
llvm-svn: 15022
2004-07-20 01:17:38 +00:00
Chris Lattner
d4cecb9e2f
test that unconditional branches to unwinds are always eliminated
...
llvm-svn: 15021
2004-07-20 01:17:19 +00:00
Misha Brukman
5e744fa1a3
Move handing of GlobalValues from getReg() to copyConstantToRegister(), this
...
will avoid extra register-to-register copies. Thanks to Chris for the idea.
llvm-svn: 15019
2004-07-20 00:59:38 +00:00
Chris Lattner
4e2dbc6b4a
Rewrite cast->cast elimination code completely based on the information we
...
actually care about. Someday when the cast instruction is gone, we can do
better here, but this will do for now. This implements
instcombine/cast.ll:test17/18 as well.
llvm-svn: 15018
2004-07-20 00:59:32 +00:00
Chris Lattner
10a4194651
Testcases missed by the instruction combiner
...
llvm-svn: 15017
2004-07-20 00:57:21 +00:00
Misha Brukman
d21ef91bc4
isupper() and tolower() are declared in <ctype.h>
...
llvm-svn: 15016
2004-07-20 00:52:16 +00:00
Misha Brukman
22802cc6cd
* Fn args passed in registers are now recorded as used by the call instruction
...
`-> asm printer updated to not print out those registers with the call instr
All of Shootout tests now work. Great thanks to Nate Begeman for the patch!
llvm-svn: 15015
2004-07-20 00:42:19 +00:00
Misha Brukman
818a9dc317
* cFP class split into cFP32 and cFP64
...
* Fn args passed in registers are now recorded as used by the call instruction
`-> asm printer updated to not print out those registers with the call instr
* Stack frame layout in prolog/epilog fixed, spills and vararg fns now work
* float/double to signed int codegen now correct
* various single precision float codegen bugs fixed
* const integer multiply codegen fixed
* select and setcc blocks inserted into the correct place in machine CFG
* load of integer constant code optimized
All of Shootout tests now work. Great thanks to Nate Begeman for the patch!
llvm-svn: 15014
2004-07-20 00:41:46 +00:00
Chris Lattner
f8cf35855a
While I'm at it, don't break codegen of mul by 3,5,9.
...
llvm-svn: 15013
2004-07-19 23:50:57 +00:00
Chris Lattner
7c06d44f42
Generate better code for multiplies by negative constants like -4, -1, -9, etc.
...
llvm-svn: 15012
2004-07-19 23:47:21 +00:00
Alkis Evlogimenos
12a71ea03e
Remove dead code.
...
llvm-svn: 15011
2004-07-19 23:35:55 +00:00
Misha Brukman
8e677e88f6
Tabs to spaces.
...
llvm-svn: 15010
2004-07-19 21:22:02 +00:00
Misha Brukman
a270467ceb
Convert tabs to spaces; fix name of function in assert() description.
...
llvm-svn: 15009
2004-07-19 21:11:45 +00:00
Chris Lattner
8a92e19ba1
Fix broken link
...
llvm-svn: 15008
2004-07-19 19:30:40 +00:00
Chris Lattner
c88858f576
Just run 'make', not all-gcc
...
llvm-svn: 15007
2004-07-19 18:47:59 +00:00
John Criswell
b92c7c2270
Added support for stdint.h. It is now automatically included by
...
DataTypes.h. So far, it doesn't seem to break Linux, Solaris, or MacOS X.
This should automatically include it for those people who need it.
llvm-svn: 15006
2004-07-19 16:12:29 +00:00
Chris Lattner
15dfdb4e01
Fix a bug that occurs when the last instruction in a range is dead
...
llvm-svn: 15005
2004-07-19 15:16:53 +00:00
Chris Lattner
c8fb1fb5bb
When joining intervals, join intervals in deeply nested loops first. This
...
is a simple change, but seems to improve code a little. For example, on
256.bzip2, we went from 75.0s -> 73.33s (2% speedup).
llvm-svn: 15004
2004-07-19 14:40:29 +00:00
Chris Lattner
d10d373ce9
Split joinIntervals into two methods
...
llvm-svn: 15003
2004-07-19 14:08:10 +00:00
Chris Lattner
6345fbe820
Fix comment
...
llvm-svn: 15002
2004-07-19 13:28:39 +00:00
Reid Spencer
82e7fe5b5b
bug 122:
...
Simplify a conditional operator for a constant result from
GV->isNullValue()
llvm-svn: 15001
2004-07-19 13:25:02 +00:00
Chris Lattner
57ca7382d9
Inline 4 methods
...
llvm-svn: 15000
2004-07-19 07:52:35 +00:00
Chris Lattner
056ee8a0a5
Delete 4 methods, make clients use hte mark* methods directly
...
llvm-svn: 14999
2004-07-19 07:52:25 +00:00
Chris Lattner
aef6c2a350
There is no need to store the MBB along with the MI any more, we can now
...
ask instructions for their parent.
llvm-svn: 14998
2004-07-19 07:04:55 +00:00
Chris Lattner
a74cf5a7d9
Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
...
llvm-svn: 14997
2004-07-19 06:55:21 +00:00
Chris Lattner
5027de35ed
Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()
...
llvm-svn: 14996
2004-07-19 06:26:50 +00:00
Chris Lattner
46c48a9654
Err, fix last checkin
...
llvm-svn: 14995
2004-07-19 06:03:51 +00:00
Chris Lattner
874ffdd592
Fix bugpoint miscompilation support on OS/X
...
Patch contributed by the fabulous Nate Begeman.
llvm-svn: 14994
2004-07-19 06:00:17 +00:00
Chris Lattner
a618e13c83
Two changes, both very significant:
...
* vreg <-> vreg joining now works, enable it unconditionally when joining
is enabled (which is the default).
* Fix a serious pessimization of spill code where we were saying that a
spilled DEF operand was live into the subsequent instruction. This allows
for substantially better code when spilling starts to happen.
llvm-svn: 14993
2004-07-19 05:55:50 +00:00
Chris Lattner
c56f90d156
See comments. The live intervals were not coming out of the spiller in sorted
...
order, causing the inactive list in the linearscan list to get unsorted, which
basically fuxored everything up severely.
These seems to fix the joiner, so with more testing I will enable it by default.
llvm-svn: 14992
2004-07-19 05:15:10 +00:00
Chris Lattner
8c8144b958
Fix assertion to not dereference end!
...
llvm-svn: 14991
2004-07-19 05:02:09 +00:00
Chris Lattner
70f8dca59b
Add some asserts that the list of intervals returned by addIntervalsForSpills
...
is sorted. This is not the case currently, which is causing no end of
problems.
llvm-svn: 14990
2004-07-19 04:47:36 +00:00
Chris Lattner
4f2e2a3f80
remove the mbbi2mbbMap_, which was just keeping track of mbb order anyway.
...
Heavily refactor handleVirtualRegisterDef, adding comments and making it more
efficient. It is also much easier to follow and convince ones self that it is
correct :)
Add -debug output to the joine, showing the result of joining the intervals.
llvm-svn: 14989
2004-07-19 02:15:56 +00:00
Chris Lattner
05920e7a70
fill comment to 80 cols
...
remove map that is not needed
llvm-svn: 14988
2004-07-19 02:13:59 +00:00
Chris Lattner
5230e70834
classof implementations are now inlined
...
llvm-svn: 14987
2004-07-19 00:59:10 +00:00
Chris Lattner
370f8871a6
inline classof implementations, eliminate use of virtual methods.
...
classof<ConstantXXX> is now MUCH faster than it used to be.
llvm-svn: 14986
2004-07-19 00:58:47 +00:00
Chris Lattner
1f46ad5a2d
eliminate isConstantExpr, changes to isa<Constant> implementation
...
llvm-svn: 14985
2004-07-19 00:58:02 +00:00
Chris Lattner
afde969989
Add new enum entries for ConstantAggregateZeroVal/ConstantExprVal and
...
rename ConstantVal to SimpleConstantVal
llvm-svn: 14984
2004-07-19 00:57:40 +00:00
Chris Lattner
2730e6aef1
Method now returns null, dtor is inlined
...
llvm-svn: 14983
2004-07-19 00:55:35 +00:00
Chris Lattner
d20f27064b
Change method to return void. Inline dtor
...
llvm-svn: 14982
2004-07-19 00:55:19 +00:00
Chris Lattner
1bfcb28da4
Remove dead file
...
llvm-svn: 14981
2004-07-18 23:44:15 +00:00
Chris Lattner
421cd083d6
Remove this printer
...
llvm-svn: 14980
2004-07-18 23:43:34 +00:00
Reid Spencer
44a81c6bdd
A description of what this library is about, reference to the documentation
...
and a list of don'ts for the library. All so future maintainers don't
break the important contract this library has with its user: LLVM.
llvm-svn: 14979
2004-07-18 22:33:08 +00:00
Chris Lattner
e0050f06b0
Add note about GCC 3.3.2 being completely broken
...
llvm-svn: 14978
2004-07-18 22:32:22 +00:00
Reid Spencer
9673fb744c
Initiali Makefile for this library.
...
llvm-svn: 14977
2004-07-18 22:31:28 +00:00
Chris Lattner
13e5831bd0
Add a workaround for a GCC 3.3.2 bug
...
llvm-svn: 14976
2004-07-18 21:56:20 +00:00
Chris Lattner
517f1847ba
Doesn't exist
...
llvm-svn: 14975
2004-07-18 21:44:13 +00:00
Chris Lattner
e2774757fe
Fix a performance regression from the CPR patch, simplify code
...
llvm-svn: 14974
2004-07-18 21:34:16 +00:00
Chris Lattner
d47504d9db
Strip out and simplify some code. This also fixes the regression last
...
night compiling cfrac. It did not realize that code like this:
int G; int *H = &G;
takes the address of G.
llvm-svn: 14973
2004-07-18 19:56:20 +00:00
Chris Lattner
f3edc49ae2
Minor cleanup, no functionality change
...
llvm-svn: 14972
2004-07-18 18:59:44 +00:00
Chris Lattner
6bdfbaf80d
Fix infinite loop
...
llvm-svn: 14971
2004-07-18 18:45:01 +00:00
Reid Spencer
fa49f86cee
bug 122:
...
Updated to remove references to ConstantPointerRef and reflect the change
in the inheritance hierarchy: GlobalValue now derives from Constant.
llvm-svn: 14969
2004-07-18 13:10:31 +00:00
Reid Spencer
3b4e83ec83
Remove an if statement that would never be reached.
...
llvm-svn: 14968
2004-07-18 08:41:47 +00:00
Reid Spencer
f0a5bcaae4
Delete a redundant if branch.
...
llvm-svn: 14967
2004-07-18 08:34:52 +00:00
Reid Spencer
c44cb6bd9f
Expand the coercion of constants to include the newly constant Globals.
...
llvm-svn: 14966
2004-07-18 08:34:19 +00:00
Reid Spencer
539429d9b5
Delete a no-op loop.
...
llvm-svn: 14965
2004-07-18 08:32:43 +00:00
Reid Spencer
6c2b627e23
Expand the scope to include global values because they are now constants
...
too.
llvm-svn: 14964
2004-07-18 08:32:10 +00:00
Reid Spencer
199aeb7f59
Avoid an unnecessary isa<Constant>.
...
llvm-svn: 14963
2004-07-18 08:31:18 +00:00
Chris Lattner
0145eb7835
Fix infinite loop gccld'ing povray
...
llvm-svn: 14962
2004-07-18 08:12:57 +00:00
Chris Lattner
aba6c47900
CPR Fixes
...
llvm-svn: 14961
2004-07-18 07:29:35 +00:00
Chris Lattner
9ce34cb323
CPR fixes
...
llvm-svn: 14960
2004-07-18 07:26:17 +00:00
Reid Spencer
d166ac7f36
Bug 122 fixed.
...
llvm-svn: 14959
2004-07-18 07:25:14 +00:00
Chris Lattner
9238d78dc3
Remove useless statistic, fix some slightly broken logic
...
llvm-svn: 14958
2004-07-18 07:22:58 +00:00
Chris Lattner
2da5eee33c
Fix a rather serious bug in previous checkin
...
llvm-svn: 14957
2004-07-18 06:56:58 +00:00
Reid Spencer
c9c90cfb29
Shrink some code.
...
llvm-svn: 14956
2004-07-18 01:04:19 +00:00
Reid Spencer
7c6b3d17f0
Add a missing space to align comments.
...
llvm-svn: 14955
2004-07-18 00:56:58 +00:00
Reid Spencer
e5a4cee9ab
Fix typeos in comments.
...
llvm-svn: 14954
2004-07-18 00:55:49 +00:00
Reid Spencer
cb3fb5d4f5
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Reid Spencer
e5914d8555
bug 122:
...
- Minimize redundant isa<GlobalValue> usage
llvm-svn: 14952
2004-07-18 00:44:14 +00:00
Reid Spencer
6a0fd73bee
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14951
2004-07-18 00:41:27 +00:00
Reid Spencer
874368790f
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14950
2004-07-18 00:38:32 +00:00
Reid Spencer
3074d3cfe7
bug 122:
...
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14949
2004-07-18 00:37:35 +00:00
Reid Spencer
ef784f01dd
bug 122:
...
- Minimize redundant isa<GlobalValue> usage
llvm-svn: 14948
2004-07-18 00:32:14 +00:00
Reid Spencer
c5afc9512b
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14947
2004-07-18 00:31:05 +00:00
Reid Spencer
9e855c6832
bug 122:
...
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14946
2004-07-18 00:29:57 +00:00
Reid Spencer
5f6815980b
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Rename methods to get ride of ConstantPointerRef usage
llvm-svn: 14945
2004-07-18 00:25:04 +00:00
Reid Spencer
83cae64faf
bug 122:
...
- Excise dead CPR procesing.
llvm-svn: 14944
2004-07-18 00:23:51 +00:00
Reid Spencer
e4de22874e
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct test ordering for GlobalValue subclass
llvm-svn: 14943
2004-07-18 00:19:45 +00:00
Reid Spencer
30d69a5af9
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14942
2004-07-18 00:18:30 +00:00
Reid Spencer
51fe3361b6
bug 122:
...
- Correct ordering of tests because for GlobalValue isa Constant
llvm-svn: 14941
2004-07-18 00:16:21 +00:00
Reid Spencer
1d8d08f34a
User ValueListTy as the type of the ValueList. This avoides the ValueList
...
from being treated like a Function which can cause the contents of the list
to be come invalidated.
llvm-svn: 14940
2004-07-18 00:13:12 +00:00
Reid Spencer
db1863d50c
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14939
2004-07-18 00:12:03 +00:00
Reid Spencer
edbb40b23c
bug 122:
...
- Update for BytecodeHandler interface change resuing from CPRs going away
llvm-svn: 14938
2004-07-18 00:10:36 +00:00
Reid Spencer
ce6adaff1c
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
- Remove tabs
- Fix coments refering to ConstantPointerRef
llvm-svn: 14937
2004-07-18 00:08:11 +00:00
Reid Spencer
3d169b1c0d
bug 122:
...
- Move these functions from other places
- Provide implementations of Constant class overrides in GlobalValue
llvm-svn: 14936
2004-07-18 00:06:26 +00:00
Reid Spencer
37e4e78cd5
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Replace tabs.
llvm-svn: 14935
2004-07-18 00:03:48 +00:00
Reid Spencer
49fc8a746e
bug 122:
...
- Correct an assert to not have redundant isa<GlobalValue>
llvm-svn: 14934
2004-07-18 00:02:41 +00:00
Reid Spencer
bbddbf3aed
bug 122:
...
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14933
2004-07-18 00:01:50 +00:00
Reid Spencer
784638bbd5
bug 122:
...
- Correct isa<Constant> for GlobalValue subclass
- Fix some tabs and indentation.
llvm-svn: 14932
2004-07-17 23:57:36 +00:00
Reid Spencer
3c4824af7c
bug 122:
...
- Module doesn't need to manage ConstantPointerRefs any more.
llvm-svn: 14931
2004-07-17 23:53:23 +00:00
Reid Spencer
cd3936ee04
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14930
2004-07-17 23:50:57 +00:00
Reid Spencer
c49dd8dec1
bug 122:
...
- Move GlobalValue and GlobalVariable implementations to Globals.cpp
llvm-svn: 14929
2004-07-17 23:50:19 +00:00
Reid Spencer
1ebe1abe22
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
- Delete ConstantPointerRef member function implementations
llvm-svn: 14928
2004-07-17 23:48:33 +00:00
Reid Spencer
accd7c708d
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14927
2004-07-17 23:47:01 +00:00
Reid Spencer
f47c779690
bug 122:
...
remove redundant isa<GlobalValue>
ensure isa<GlobalValue> case is processed before is<Constant>
llvm-svn: 14926
2004-07-17 23:36:58 +00:00
Reid Spencer
6dd4c27c7c
bug 122:
...
- Add ValueListTy to TypeTy so that the bcreader can have its own User
category that won't get factored into any optimizations or cleanup.
- Correct an isa_impl to correctly include GlobalValue now that it isa
Constant.
llvm-svn: 14925
2004-07-17 23:34:47 +00:00
Reid Spencer
f820a23365
bug 122:
...
Remove redundancy in User::classof(Value*); GlobalValue isa Constant now.
llvm-svn: 14924
2004-07-17 23:32:11 +00:00
Reid Spencer
591fc1ebf5
Fix a comment.
...
llvm-svn: 14923
2004-07-17 23:30:45 +00:00
Reid Spencer
fdc497d049
bug 122:
...
We don't need to keep track of CPRs any more.
llvm-svn: 14922
2004-07-17 23:30:11 +00:00
Reid Spencer
82b7ce69e1
bug 122:
...
Now that GlobalVariable is a constant (via derivation from GlobalValue),
override the replaceUsesOfWithOnConstant method.
llvm-svn: 14921
2004-07-17 23:29:46 +00:00
Reid Spencer
1a76c27988
bug 122:
...
- derive from Constant
- declare needed overrides from Constant class
llvm-svn: 14920
2004-07-17 23:28:28 +00:00
Reid Spencer
c5098ac9d4
****** ABOLISH ConstantPointerRef *****
...
llvm-svn: 14919
2004-07-17 23:26:57 +00:00
Reid Spencer
88cda9db1e
Extend constructor so that it can support GlobalValue's (with names).
...
Make GlobalValue a "classof" Constant
Fix the classof(Value*) to include GlobalValue's
llvm-svn: 14918
2004-07-17 23:26:12 +00:00
Reid Spencer
9521143ab7
Constant value not needed after CPR's disappear.
...
llvm-svn: 14917
2004-07-17 23:23:30 +00:00
Chris Lattner
e62af95bef
It looks like physref->virtreg joining is working fine. Enable it by default
...
but make virtreg->virtreg joining stay off by default
llvm-svn: 14916
2004-07-17 21:51:25 +00:00
Chris Lattner
c856e90d1d
Make sure to emit the immediate byte for instructions like:
...
shrd [mem], reg, imm
This fixes the jit-ls failure on 186.crafty.
llvm-svn: 14914
2004-07-17 20:26:14 +00:00
Chris Lattner
8a4039ed9a
Reserve the correct amt of space.
...
llvm-svn: 14913
2004-07-17 20:24:05 +00:00
Chris Lattner
96591356f7
Hrm, I think we need a "Reid is buggy" bug ;-)
...
llvm-svn: 14912
2004-07-17 18:50:19 +00:00
Misha Brukman
e6f4a5ebb0
We don't really need to #include IPO.h into this file.
...
llvm-svn: 14911
2004-07-17 18:37:46 +00:00
Reid Spencer
0fce16f6b1
Initial (outline only) draft of the System Library requirements, design
...
and details documentation.
llvm-svn: 14910
2004-07-17 10:04:49 +00:00
Reid Spencer
6d4c03ebfd
Added a README to point users to the documentation on the design of this
...
library which is a prerequisite for maintaining the library.
llvm-svn: 14909
2004-07-17 08:39:53 +00:00
Chris Lattner
3bbaaaa940
Fix incorrect computation of mod/ref sets. Do not ask for mod/ref information
...
for objects of size 0.
llvm-svn: 14908
2004-07-17 07:40:34 +00:00
Chris Lattner
2e8690bf57
Print modref information in a useful way.
...
llvm-svn: 14907
2004-07-17 06:43:20 +00:00
Chris Lattner
eed1a6f3dc
Cleanups: fold two loops into one
...
New features: -print-all-alias-modref-info option, print more info
llvm-svn: 14906
2004-07-17 06:28:49 +00:00
Chris Lattner
1dd789d775
link.h causes problems on some platforms and is not needed on solaris, where
...
the comment came from.
llvm-svn: 14905
2004-07-17 03:09:12 +00:00
Chris Lattner
2ed243b3a9
Remove dead file
...
llvm-svn: 14904
2004-07-17 02:56:48 +00:00
Chris Lattner
041e6c9fbe
Add note about IA64 C++
...
llvm-svn: 14903
2004-07-17 02:04:41 +00:00
Brian Gaeke
9905a2eb63
Fix warning on 64-bit machines
...
llvm-svn: 14902
2004-07-16 21:40:32 +00:00
Misha Brukman
b85c2522fa
* Use LI(S) to copy constants into registers intead of ADDI(S) as the latter is
...
a funky way to "use" R0 for a 0-valued operand
* Add IMPLICIT_DEFs for incoming function arguments via registers to help the
register allocator not clobber those registers
* Implement comparisons with longs
* Teach emitSelectOperation() to fold the SetCC operation
Patch contributed by Nate Begeman
llvm-svn: 14901
2004-07-16 21:06:24 +00:00
Misha Brukman
db032fb1f9
* Store all non-volatile int registers R13-31 on the stack, restore on exit
...
* Fix comment formatting
llvm-svn: 14900
2004-07-16 20:55:20 +00:00
Misha Brukman
780da8425f
Fix code formatting
...
llvm-svn: 14899
2004-07-16 20:54:25 +00:00
Misha Brukman
3adf84ba0d
Implement PowerPCInstrInfo::isMoveInstr(), patch by Nate Begeman
...
llvm-svn: 14898
2004-07-16 20:51:55 +00:00
Misha Brukman
f0def96a36
Add prototype for TargetInstrInfo::isMoveInstr()
...
llvm-svn: 14897
2004-07-16 20:50:55 +00:00
Misha Brukman
9c2c293225
* Enable allocation of registers r2-r10
...
* Allocate registers 13-31 backwards (to be able to store them all at once)
llvm-svn: 14896
2004-07-16 20:35:20 +00:00
Misha Brukman
6ed15fd181
Add IMPLICIT_DEFS pseudo-instruction; patch by: Nate Begeman
...
llvm-svn: 14895
2004-07-16 20:33:41 +00:00
Misha Brukman
8c9938654a
The generated instruction selector isn't (yet) functional
...
llvm-svn: 14894
2004-07-16 20:31:13 +00:00
Misha Brukman
d4ac818593
* Output non-lazy linking stubs for external global variables
...
* Get rid of dead and #if 0'd code
* Minor for loop speed-up: save end iterator instead of querying every time
llvm-svn: 14893
2004-07-16 20:29:04 +00:00
Misha Brukman
06773822b9
Correctly build shared objects on MacOS X for debugging code generators
...
llvm-svn: 14892
2004-07-16 19:45:45 +00:00
Misha Brukman
a6b9a566b9
Define double alignment as 8 bytes now that assert(DoubleAlignment == PointerSize)
...
has been eliminated
llvm-svn: 14891
2004-07-16 19:32:12 +00:00
Misha Brukman
d350b64352
* Add spaces between words and numbers in comments printed out for longs/floats
...
* Print out IMPLICIT_DEFS as comments in the assembly, patch by Nate Begeman
llvm-svn: 14890
2004-07-16 19:01:13 +00:00
Misha Brukman
65728ddf45
Fix grammar.
...
llvm-svn: 14888
2004-07-16 17:40:28 +00:00
Alkis Evlogimenos
763d930d22
Add convinience constructor for function calls with two args.
...
llvm-svn: 14885
2004-07-16 12:04:28 +00:00
Brian Gaeke
135b870f72
Add a class for pseudo-instructions. Use it.
...
Add IMPLICIT_USE and IMPLICIT_DEF, a la X86.
llvm-svn: 14884
2004-07-16 10:32:10 +00:00
Brian Gaeke
a57943154e
Add what will eventually be the TSFlags. Big switch(opcode) statements are bad.
...
llvm-svn: 14883
2004-07-16 10:31:59 +00:00
Brian Gaeke
f486726c56
Add special handling for pseudo-instructions (print them as comments).
...
llvm-svn: 14882
2004-07-16 10:31:47 +00:00
Brian Gaeke
97b71c9fa9
Add to-do list.
...
llvm-svn: 14881
2004-07-16 10:31:36 +00:00
Brian Gaeke
5ce1408537
Do IMPLICIT_DEFs on incoming args' hard regs, to avoid confusing the regalloc.
...
Support single-fp incoming args.
Support single-fp outgoing args ('call' operands).
Support double-fp return values.
llvm-svn: 14880
2004-07-16 10:31:25 +00:00
Chris Lattner
2453818b8a
The powerpc is now gone. However it is now just known as the Skeleton target.
...
llvm-svn: 14877
2004-07-16 07:14:34 +00:00
Chris Lattner
f1b8afb3b4
Build skeleton target
...
llvm-svn: 14876
2004-07-16 07:12:46 +00:00
Chris Lattner
a46d2a63c7
Build the skeleton target
...
llvm-svn: 14875
2004-07-16 07:11:53 +00:00
Chris Lattner
ed85542ad7
Initial checkin of the rest of the skeleton target
...
llvm-svn: 14874
2004-07-16 07:11:15 +00:00
Chris Lattner
3d53a4752d
Initial skeleton tablegen files
...
llvm-svn: 14873
2004-07-16 06:29:19 +00:00
Chris Lattner
42023220fa
Add skeleton makefile
...
llvm-svn: 14872
2004-07-16 06:20:55 +00:00
Chris Lattner
e8a034901d
Initial readme
...
llvm-svn: 14871
2004-07-16 06:12:28 +00:00
Chris Lattner
fe05024b0f
Fix the regressions handling unnamed global variables
...
llvm-svn: 14870
2004-07-16 01:18:09 +00:00
Chris Lattner
1fbd76ecba
For 64-bit platform support, we now use the clEnumValEnd macro to terminate
...
cl::values lists
llvm-svn: 14869
2004-07-16 00:10:54 +00:00
Chris Lattner
9716100a5d
IA64 compat
...
llvm-svn: 14867
2004-07-16 00:08:28 +00:00
Chris Lattner
34afafc190
Fix IA64 compatibility
...
llvm-svn: 14866
2004-07-16 00:06:01 +00:00
Chris Lattner
cc36c670e8
Use new macro
...
llvm-svn: 14865
2004-07-16 00:04:54 +00:00
Chris Lattner
597555fd45
Be compatible with IA64
...
llvm-svn: 14864
2004-07-16 00:04:13 +00:00
Chris Lattner
89ae115aa5
Passing integer 0 in for a pointer value doesn't work on IA64. Fix this
...
by using a new macro.
llvm-svn: 14863
2004-07-16 00:02:21 +00:00
Chris Lattner
b50070175d
Add a new macro to be used for the end of enum lists.
...
llvm-svn: 14862
2004-07-16 00:01:05 +00:00
Chris Lattner
d79334df33
This patch was contributed by Daniel Berlin!
...
Speed up SCCP substantially by processing overdefined values quickly. This
patch speeds up SCCP by about 30-40% on large testcases.
llvm-svn: 14861
2004-07-15 23:36:43 +00:00
Chris Lattner
f2c018c0c1
Fix PR404 try #2
...
This version takes about 1s longer than the previous one (down to 2.35s),
but on the positive side, it actually works :)
llvm-svn: 14856
2004-07-15 08:20:22 +00:00
Chris Lattner
9b1f3dc990
Give SetVector range support
...
llvm-svn: 14855
2004-07-15 08:18:31 +00:00
Chris Lattner
072a4c0091
Nuke a clearly bogus assertion
...
llvm-svn: 14854
2004-07-15 07:44:34 +00:00
Chris Lattner
daa12135da
Revert previous patch until I get a bug fixed
...
llvm-svn: 14853
2004-07-15 05:36:31 +00:00
Chris Lattner
34cc695252
QOI issue fixed
...
llvm-svn: 14852
2004-07-15 04:30:35 +00:00
Chris Lattner
70177e402d
Fix PR404: Loop simplify is really slow on 252.eon
...
This eliminates an N*N*logN algorithm from the loop simplify pass, replacing
it with a much simpler and faster alternative. In a debug build, this reduces
gccas time on eon from 85s to 42s.
llvm-svn: 14851
2004-07-15 04:27:04 +00:00
Chris Lattner
a4d8ce6399
Bug fixed
...
llvm-svn: 14850
2004-07-15 02:59:24 +00:00
Chris Lattner
29850c5d62
Final fix for PR341: eliminate operator<<(ostream, Value*). Clients should
...
now send references to ostreams instead of pointers. Sending pointers to
ostreams will print their addresses.
llvm-svn: 14849
2004-07-15 02:54:36 +00:00
Chris Lattner
5c4de70691
Fixes for PR341
...
llvm-svn: 14848
2004-07-15 02:51:32 +00:00
Chris Lattner
60a7dd16c4
Fixes for PR341
...
llvm-svn: 14847
2004-07-15 02:51:31 +00:00
Chris Lattner
f2b5817b1b
Fix for PR341
...
llvm-svn: 14846
2004-07-15 02:50:38 +00:00
Chris Lattner
fcdab1b5f5
Fix for PR341
...
llvm-svn: 14845
2004-07-15 02:40:04 +00:00
Chris Lattner
c9819f09c2
Revert stuff that I didn't mean to checkin
...
llvm-svn: 14844
2004-07-15 02:33:38 +00:00
Chris Lattner
3c42077c37
Fixes for PR341
...
llvm-svn: 14843
2004-07-15 02:31:46 +00:00
Chris Lattner
558cebc775
Fix for PR341
...
llvm-svn: 14842
2004-07-15 02:26:49 +00:00
Chris Lattner
7dc9de5f43
Patches towards fixing PR341
...
llvm-svn: 14841
2004-07-15 02:14:30 +00:00
Chris Lattner
32c518e526
Progress on PR341
...
llvm-svn: 14840
2004-07-15 02:06:12 +00:00
Chris Lattner
9a63520b1a
Fixes working towards PR341
...
llvm-svn: 14839
2004-07-15 01:50:47 +00:00
Chris Lattner
cae777bb4f
Bug fixes for PR341
...
llvm-svn: 14838
2004-07-15 01:29:12 +00:00
Chris Lattner
4bbd409749
Implement folding of expressions like 'uint cast (int* getelementptr (int*
...
null, uint 1) to uint)' to a constant integer. We can only do this with
primitive LLVM types, because other types have target-specific sizes.
llvm-svn: 14837
2004-07-15 01:16:59 +00:00
Chris Lattner
030f84f215
Yeah, how about those 'primative' types huh?
...
llvm-svn: 14836
2004-07-15 01:15:53 +00:00
Chris Lattner
ba7aef39fd
Now that we codegen the portable "sizeof" efficiently, we can use it for
...
malloc lowering. This means that lowerallocations doesn't need targetdata
anymore. yaay.
llvm-svn: 14835
2004-07-15 01:08:08 +00:00
Chris Lattner
33930ad7bd
Improve codegen for the LLVM offsetof/sizeof "operator". Before we compiled
...
this LLVM function:
int %foo() {
ret int cast (int** getelementptr (int** null, int 1) to int)
}
into:
foo:
mov %EAX, 0
lea %EAX, DWORD PTR [%EAX + 4]
ret
now we compile it into:
foo:
mov %EAX, 4
ret
This sequence is frequently generated by the MSIL front-end, and soon the malloc lowering pass and
Java front-ends as well..
-Chris
llvm-svn: 14834
2004-07-15 00:58:53 +00:00
Chris Lattner
969d6fbcee
You cannot pass functions by value, what does that even mean??
...
llvm-svn: 14833
2004-07-14 23:14:07 +00:00
Chris Lattner
1e780d3d26
this "feature" is gone
...
llvm-svn: 14832
2004-07-14 23:12:09 +00:00
Chris Lattner
4babbe04e1
This is logically part of the last patch. Just more really horrible code
...
that is made unnecessary by it.
llvm-svn: 14831
2004-07-14 23:07:13 +00:00
Chris Lattner
8abe1a11b4
** Finally DeclareNewGlobalValue is dead!
...
* Simplify a lot of code because type's cannot be in function symbol tables
* Fix memory leaks in handling of redefined function prototypes
* Don't use SymbolTable directly for stuff that we can go through the Module
for.
* Fix some minor bugs on obscure testcases like:
test/Feature/globalredefinition.ll
* Do not create GlobalVariable objects for forward referenced Functions!
* When forward referencing a function in a constant expression, do not create
a placeholder, add a bunch of references to it, then turn around and
replaceAllUsesOfWith on it with a new global, deleting the placeholder.
Instead, when we find the real definition of the global, just use the
placeholder instead of creating a new object.
This substantially simplifies the asmwriter and should even speed it up on
cases heavy in constantexprs (like C++, Java, MSIL)...
llvm-svn: 14830
2004-07-14 23:03:46 +00:00
Chris Lattner
7e40f4f9c5
New, horrible, testcase
...
llvm-svn: 14829
2004-07-14 22:59:47 +00:00
Chris Lattner
4c9210ed64
* Fairly substantial change. Instead of creating new globalvariables, then
...
replaceAllUsesWith'ing any forward references, just use the forward
reference if it exists.
This introduces GetForwardRefForGlobal, which will eventually completely
replace the horrible DeclareNewGlobalValue function.
llvm-svn: 14828
2004-07-14 21:44:00 +00:00
Chris Lattner
e875d48a92
Fold setValueNameMergingDuplicates into ParseGlobalVariable, allowing us
...
to substantially simplify the result. In particular, we no longer create
GlobalVariables and then immediately destroy them when they are duplciate
definitions.
The real point of this patch though is that it gets us closer to the
DeclareNewGlobalValue calls...
llvm-svn: 14827
2004-07-14 20:42:57 +00:00
Brian Gaeke
def1a51232
Actually set the endian/pointersize flags on the module being read in!
...
llvm-svn: 14826
2004-07-14 20:33:13 +00:00
Chris Lattner
cbdf371d30
Simplify logic.
...
llvm-svn: 14825
2004-07-14 20:27:12 +00:00
Chris Lattner
47fb34c00a
Make PATypeHolder and friends return non-const pointers to the types they
...
hold. Because types are basically immutable anyway, they should not be
referenced as "const Type*" everywhere. Just "Type*" should suffice!
llvm-svn: 14824
2004-07-14 20:10:26 +00:00
Chris Lattner
91393ee84f
Fix a regression from last night. Apparently the CFE is broken and outputs
...
functions multiple times, expecting them to be merged. This should be fixed
in the CFE, then here.
llvm-svn: 14823
2004-07-14 19:33:47 +00:00
Misha Brukman
2661c50173
Make sure MTSPR instruction is inserted into the BasicBlock
...
llvm-svn: 14822
2004-07-14 18:26:31 +00:00
Chris Lattner
92aecc9e3c
Implement new helper methods for creating two-index GEP instructions
...
llvm-svn: 14821
2004-07-14 18:14:33 +00:00
Chris Lattner
29f231ce4e
* Change code to use a static_cast instead of reinterpret_cast
...
* Add comments
* Add two new gep ctors for the very common case of creating a two operand
GEP instruction.
llvm-svn: 14820
2004-07-14 18:13:54 +00:00
Misha Brukman
5193410cd9
Don't define the same register twice when loading a ConstantPointerRef to a reg
...
llvm-svn: 14819
2004-07-14 17:57:04 +00:00
Misha Brukman
d4cbe67ce6
* Fix multiplication by powers of two and otherwise
...
* Clarify variable name (StoreInst SI instead of LI)
llvm-svn: 14818
2004-07-14 15:29:51 +00:00
Chris Lattner
42dd47437e
Pull out code shared between GV forward-decl and definition processing.
...
This gives us only a single call site for setValueNameMergingDuplicates.
The next stage is the start merging them together.
llvm-svn: 14811
2004-07-14 08:23:52 +00:00
Chris Lattner
70ef57d001
Simplify code. Do not allow functions to be redefined more than once.
...
Since the stupid '%X = const int 4' thing is gone, we can now simplify
setValueNameMergingDuplicates a bit more.
llvm-svn: 14810
2004-07-14 07:12:48 +00:00
Chris Lattner
6652224c2a
Remove a gross and crufty "feature" that was never documented and doesn't work.
...
llvm-svn: 14809
2004-07-14 06:44:56 +00:00
Chris Lattner
88357937b6
Finegrainify namespacification
...
llvm-svn: 14808
2004-07-14 06:39:48 +00:00
Chris Lattner
4accae9c3e
Revamp handling of labels. In particular, if we create a forward reference
...
for a basic block, use it when the block is defined instead of deleting it
and creating a new one. Also, only create at most ONE forward reference
for any block, instead of one for each forward reference.
llvm-svn: 14807
2004-07-14 06:28:35 +00:00
Brian Gaeke
590b5f12db
Add Machine-CFG edges to SparcV9 MachineBasicBlocks.
...
llvm-svn: 14806
2004-07-14 05:40:50 +00:00
Chris Lattner
95230b0cbc
Split the basic block handling case out of getVal into getBBVal.
...
llvm-svn: 14805
2004-07-14 01:33:11 +00:00
Chris Lattner
e52ed45890
Make Argument::print more resilient to non-verifiable IR
...
llvm-svn: 14801
2004-07-13 23:14:34 +00:00
Chris Lattner
8c54e58f7c
Catch aggregates passed by value sooner rather than later.
...
llvm-svn: 14800
2004-07-13 20:09:51 +00:00
Misha Brukman
aa678b5ed4
* Specify that FP arith options have 3 operands
...
* Correctly load FP constants from the constant pool, should be refactored
llvm-svn: 14799
2004-07-13 15:35:45 +00:00
Chris Lattner
ab1aedab13
Actually, use an exception to stop verification. This gives us much better
...
error messages because verification stops at the first error.
llvm-svn: 14794
2004-07-13 08:48:04 +00:00
Chris Lattner
2c1bc9e7e2
There is no reason to abort and print a stack trace if there is a verification
...
error. Just print the message like a good little tool.
llvm-svn: 14793
2004-07-13 08:45:41 +00:00
Chris Lattner
d25cad9f38
Fine-grainify namespacification, prune #include
...
llvm-svn: 14792
2004-07-13 08:42:12 +00:00
Chris Lattner
e84a2ba99f
Fix typeo and refactor bb productions to make it possible for us to reuse any
...
forward reference blocks if they have been created (instead of creating a new
block, replaceAllUsesOfWith, then nuking the placeholder). This is not yet
implemented.
llvm-svn: 14791
2004-07-13 08:39:15 +00:00
Chris Lattner
d9c9c496e6
Eliminate some mega-cruft here. There is no reason to DERIVE FROM IR CLASSES
...
just to keep track of some per-object state! Gaah! Whoever wrote this stuff...
oh wait, that would be me. Never mind.
llvm-svn: 14790
2004-07-13 08:28:21 +00:00
Chris Lattner
30b35cf3f7
Inline the now trivial setValueNameInternal function into both callers
...
llvm-svn: 14789
2004-07-13 08:12:39 +00:00
Chris Lattner
85a351f78d
Now that basic blocks are eagerly inserted into the Function, we can use
...
the funciton symbol table to check for conflicts instead of having to
keep a shadow named LocalSymtab. Totally eliminate LocalSymtab. Verified
that this did not cause a regression on the testcase for PR107.
llvm-svn: 14788
2004-07-13 08:10:10 +00:00
Chris Lattner
2ed776bb88
A couple of substantial cleanup fixes:
...
1. Split setValueName into two separate functions, one that is only used
at function scope and doesn't have to deal with duplicates, and one
that can be used either at global or function scope but that does deal
with conflicts. Conflicts were only in there because of the crappy old
CFE and probably should be entirely eliminated.
2. Insert BasicBlock's into the parent functions when they are created
instead of when they are complete. This effects name lookup (for the
better), which will be exploited in the next patch.
llvm-svn: 14787
2004-07-13 07:59:27 +00:00
Brian Gaeke
b88d2a44f9
Fix warning on SparcV9, where sizeof (int) != sizeof (void *).
...
llvm-svn: 14786
2004-07-13 07:37:43 +00:00
Chris Lattner
cc459c9d66
Replace a bunch of complex ConstantPointerRef referring code with simple
...
code.
llvm-svn: 14785
2004-07-13 06:58:07 +00:00
Chris Lattner
8e30a4dfc5
Make tblgen not try to be smart. This is better handled in makefiles if
...
at all. Patch contributed by Vladimir Prus!
llvm-svn: 14784
2004-07-13 06:11:46 +00:00
Chris Lattner
35e24774eb
Factor some code to handle "load (constantexpr cast foo)" just like
...
"load (cast foo)". This allows us to compile C++ code like this:
class Bclass {
public: virtual int operator()() { return 666; }
};
class Dclass: public Bclass {
public: virtual int operator()() { return 667; }
} ;
int main(int argc, char** argv) {
Dclass x;
return x();
}
Into this:
int %main(int %argc, sbyte** %argv) {
entry:
call void %__main( )
ret int 667
}
Instead of this:
int %main(int %argc, sbyte** %argv) {
entry:
%x = alloca "struct.std::bad_typeid" ; <"struct.std::bad_typeid"*> [#uses=3]
call void %__main( )
%tmp.1.i.i = getelementptr "struct.std::bad_typeid"* %x, uint 0, uint 0, uint 0 ; <int (...)***> [#uses=1]
store int (...)** getelementptr ([3 x int (...)*]* %vtable for Bclass, int 0, long 2), int (...)*** %tmp.1.i.i
%tmp.3.i = getelementptr "struct.std::bad_typeid"* %x, int 0, uint 0, uint 0 ; <int (...)***> [#uses=1]
store int (...)** getelementptr ([3 x int (...)*]* %vtable for Dclass, int 0, long 2), int (...)*** %tmp.3.i
%tmp.5 = load int ("struct.std::bad_typeid"*)** cast (int (...)** getelementptr ([3 x int (...)*]* %vtable for Dclass, int 0, long 2) to int
("struct.std::bad_typeid"*)**) ; <int ("struct.std::bad_typeid"*)*> [#uses=1]
%tmp.6 = call int %tmp.5( "struct.std::bad_typeid"* %x ) ; <int> [#uses=1]
ret int %tmp.6
ret int 0
}
In order words, we now resolve the virtual function call.
llvm-svn: 14783
2004-07-13 01:49:43 +00:00
Misha Brukman
be1b680f54
Correctly load FP constants out of the constant pool.
...
llvm-svn: 14782
2004-07-12 23:49:47 +00:00
Misha Brukman
9dacda651f
Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>
...
llvm-svn: 14781
2004-07-12 23:37:18 +00:00
Misha Brukman
dcb0eec80d
Implement getModuleMatchQuality and getJITMatchQuality() for PowerPC
...
llvm-svn: 14780
2004-07-12 23:36:12 +00:00
Misha Brukman
b6ee60667b
* Tabs to spaces
...
* Delete extra blank lines
llvm-svn: 14779
2004-07-12 22:58:07 +00:00
Misha Brukman
7596c249e9
New open proj: C/C++ compiler in C++, with link to Ed Willink's C++ yacc grammar
...
llvm-svn: 14778
2004-07-12 21:10:47 +00:00
Chris Lattner
5eb09d1ded
Add a helper method. The StructType element is completely redundant in most
...
cases
llvm-svn: 14777
2004-07-12 20:36:08 +00:00
Chris Lattner
d6108ca27e
implement new helper method
...
llvm-svn: 14776
2004-07-12 20:35:11 +00:00
Chris Lattner
420fd1425d
Fix unused var warning
...
llvm-svn: 14775
2004-07-12 20:29:52 +00:00
Chris Lattner
534d252330
Fix a really nasty logic error that VC noticed.
...
Reid, this might matter to you :)
llvm-svn: 14774
2004-07-12 20:27:31 +00:00
Chris Lattner
049bb9e8d8
Add a missing #include
...
llvm-svn: 14773
2004-07-12 20:25:33 +00:00
Chris Lattner
e8439dced3
Fix warning compiling with VC++
...
llvm-svn: 14772
2004-07-12 20:25:04 +00:00
Chris Lattner
47bafde495
new feature
...
llvm-svn: 14770
2004-07-12 17:09:23 +00:00
Misha Brukman
a516e99ed6
* Clarify Sparc as SparcV9
...
* Add link to bugzilla bug with list of miscompiled SparcV9 programs
* Wrap long lines
llvm-svn: 14769
2004-07-12 16:55:41 +00:00
Chris Lattner
efcb25e5dc
Implement a new method useful for things like the inliner
...
llvm-svn: 14768
2004-07-12 01:17:52 +00:00
Chris Lattner
3df3e050dd
Implement new method
...
llvm-svn: 14767
2004-07-12 01:17:34 +00:00
Reid Spencer
a9e83604f1
Correct an output typo.
...
llvm-svn: 14766
2004-07-11 23:20:54 +00:00
Reid Spencer
194c576efc
Various cleanups:
...
- Remove tabs
- Standardize use of space around ( and ).
- Consolidate the ConstantPlaceHolder class
- Rename two methods to be more meaningful (ParseType, ParseTypes)
- Correct indentation of blocks
- Add documentation
- Convert input dependent asserts to error(...) so it throws instead.
Provide placeholder implementations of read_float and read_double that
still read in platform-specific endianess. When I figure out how to do
this without knowing the endianess of the platform, it will get implemented
correctly.
llvm-svn: 14765
2004-07-11 17:28:43 +00:00
Reid Spencer
db3bf19ad0
- Rename two methods to give them more meaning
...
- Add read_float and read_double in preparation for a correct
implementation of bytecode floating point support.
llvm-svn: 14764
2004-07-11 17:24:05 +00:00
Reid Spencer
cf5c6e4adb
Remove tabs.
...
llvm-svn: 14763
2004-07-11 17:22:51 +00:00
Reid Spencer
a64b62ef6a
Prepare the writer for a non-broken implementation of writing floating
...
point values. This will be fixed when I figure out how to do it correctly
without depending on knowing the endianess of a platform.
llvm-svn: 14762
2004-07-11 17:22:07 +00:00
Chris Lattner
802cffd928
The cleanup is done. Update comment.
...
llvm-svn: 14761
2004-07-11 08:24:02 +00:00
Chris Lattner
c4e6bb5f9f
Make add constantexprs work with all types, fixing the regressions from last night
...
llvm-svn: 14760
2004-07-11 08:01:11 +00:00
Chris Lattner
c9c16a0e60
Implement TargetRegistrationListener
...
llvm-svn: 14759
2004-07-11 06:03:21 +00:00
Chris Lattner
53d2ac5514
Add a new listener class for things that want to be informed about new
...
targets that are loaded
llvm-svn: 14758
2004-07-11 06:02:59 +00:00
Chris Lattner
b889c6b261
Delete the allocate*TargetMachine function, which is now dead.
...
The shared command line options are now in a header that makes sense.
llvm-svn: 14757
2004-07-11 04:17:58 +00:00
Chris Lattner
c2726e63ed
Delete the allocate*TargetMachine function, which is now dead .
...
The shared command line options are now in a header that makes sense.
llvm-svn: 14756
2004-07-11 04:17:10 +00:00
Chris Lattner
2beb4392cf
Delete the allocate*TargetMachine function, which is now dead .
...
llvm-svn: 14755
2004-07-11 04:16:31 +00:00
Chris Lattner
92d1231800
Delete the allocate*TargetMachine functions. Move options to a header file
...
that makes sense.
llvm-svn: 14754
2004-07-11 04:15:52 +00:00
Chris Lattner
a29ca1b7df
Prune unused #include
...
llvm-svn: 14753
2004-07-11 04:05:32 +00:00
Chris Lattner
6142ca8f4f
Goodbye macro hell, hello nice clean and simple code. This also gives llc
...
the ability to dynamically load and use targets that are not linked into it
statically. e.g.:
llc -load libparisc.so -march=parisc foo.bc -o foo.s
llvm-svn: 14751
2004-07-11 04:03:24 +00:00
Chris Lattner
8267b7e17d
Goodbye macro hell, hello nice clean simple extensible code. This change
...
also gives the JIT the ability to dynamically load targets. e.g.
lli -load libparisc.so -march=parisc foo.bc
llvm-svn: 14750
2004-07-11 04:02:06 +00:00
Chris Lattner
baf43cf335
Implement a couple of methods that TargetMachineRegistry now provides. See,
...
I told you this file wasn't useless :)
llvm-svn: 14749
2004-07-11 04:00:19 +00:00
Chris Lattner
d853629893
Add a new TargetNameParser class, which is useful for parsing options.
...
Add two methods which are useful for autoselecting targets.
llvm-svn: 14748
2004-07-11 03:59:46 +00:00
Chris Lattner
73eb9436ee
Make these format a bit nicer
...
llvm-svn: 14747
2004-07-11 03:27:42 +00:00
Chris Lattner
b84e7c523a
Provide better support for pointer-valued command line arguments
...
llvm-svn: 14746
2004-07-11 03:18:30 +00:00
Chris Lattner
4266f8017d
Auto-registrate target
...
llvm-svn: 14745
2004-07-11 02:48:49 +00:00
Chris Lattner
97c176b639
Add compilability
...
llvm-svn: 14744
2004-07-11 02:48:28 +00:00
Chris Lattner
5842560090
Initial impl of this file. Yes this is pretty useless right now, but it
...
will grow in time.
llvm-svn: 14743
2004-07-11 02:44:26 +00:00
Chris Lattner
ab2a7f4336
First cut at TargetMachineRegistry and RegisterTarget classes
...
llvm-svn: 14742
2004-07-11 02:43:43 +00:00
Chris Lattner
fe6a18c154
Add two new "virtual static" methods to the TargetMachine class
...
llvm-svn: 14741
2004-07-11 02:43:07 +00:00
Chris Lattner
ec2a1566cc
Add -load option
...
llvm-svn: 14740
2004-07-11 01:08:19 +00:00
Chris Lattner
4b6cdab582
Add a -load option
...
llvm-svn: 14739
2004-07-11 01:06:59 +00:00
Chris Lattner
99dcad4584
Implicitly getting a new option by linking to support.o instead of support.a
...
is a bad idea. Make tools that want the option #include PluginSupport.h
explicitly.
llvm-svn: 14738
2004-07-11 01:04:33 +00:00
Chris Lattner
92f4e1e0aa
Add a new header
...
llvm-svn: 14737
2004-07-11 01:03:57 +00:00
Reid Spencer
3c0249e916
- Correct grammar of -s description
...
- Normalize -s option specification
llvm-svn: 14736
2004-07-10 23:41:08 +00:00
Reid Spencer
c35d141fc8
Group the hidden command line arguments.
...
Make the -s option actually work and default to the right value.
llvm-svn: 14735
2004-07-10 23:35:46 +00:00
Chris Lattner
f61dbbaa7c
Add link to the stkrc page
...
llvm-svn: 14734
2004-07-10 21:43:12 +00:00
Reid Spencer
487b1e5bf4
Command Guide for the Stacker language compiler, stkrc.
...
llvm-svn: 14733
2004-07-10 20:04:02 +00:00
Reid Spencer
f9776c34b6
Replace use of defunct Type::setName method with SymbolTable::insert.
...
Patch found and provided by Vladimir Merzliakov. Thanks Vladimir!
llvm-svn: 14732
2004-07-10 16:37:42 +00:00
Reid Spencer
e5e19daa1b
Make the VBRSavings percentage make sense (as a fraction of the total
...
expanded size instead of the file size). Thanks Chris.
llvm-svn: 14731
2004-07-10 08:04:13 +00:00
Chris Lattner
517d650eb3
Minor cleanups:
...
* Mention the --help and --help-hidden options
* Don't say program when we really mean any old bytecode file
* Add a link to the man pages
* Move analyze down in the list, as it's not as important as the rest
llvm-svn: 14730
2004-07-10 06:06:56 +00:00
Reid Spencer
f3905c8511
Error Handling Cleanup:
...
- get rid of PARSE_ERROR macro
- add error(std::string) function
- use error(std::string) for all errors
- make input dependent asserts call error(std::string) instead
- ensure asserts are only for logic bugs, not input discrepancies.
llvm-svn: 14729
2004-07-09 22:21:33 +00:00
Reid Spencer
6a218134e3
Fix a backwards compatibility bug found by Tanya. In version 1.2, the
...
global type plane starts with a length and the TypeTyID value to identify
the type plane has having type definitions. This doesn't happen in 1.3
because the types are read from a known position in the file. However, the
TypeTyID must be read in (and ignored) if its a 1.2 bytecode file.
llvm-svn: 14728
2004-07-09 21:13:53 +00:00
Chris Lattner
ed5f67f424
Removed unneeded forward decl
...
llvm-svn: 14727
2004-07-09 17:02:57 +00:00
Chris Lattner
848c8dd825
Remove unused method
...
llvm-svn: 14726
2004-07-09 16:48:13 +00:00
Chris Lattner
d47909e00a
Add checks to ensure that there are no unreachable blocks in the function
...
llvm-svn: 14725
2004-07-09 16:44:37 +00:00
Chris Lattner
c18917c85c
Don't call Type::setName()
...
llvm-svn: 14724
2004-07-09 16:43:55 +00:00
Misha Brukman
82a065dc41
* Add support for indexing into structures, thanks to Chris (x86)
...
The large diff is because of indentation of a whole region
* Fix querying predecessor blocks in SelectPHINodes(), thanks to Brian (v8)
* Add support for external functions malloc() and free()
* Fix some code indentation
Remember, kids: It's not plagiarism if you "creatively borrow" from your
sources. It's called "research"!
llvm-svn: 14723
2004-07-09 15:45:07 +00:00
Misha Brukman
14d02cd2d8
Read/write the offset value for stack-relative loads via correct instr operand.
...
llvm-svn: 14722
2004-07-09 15:37:16 +00:00
Misha Brukman
b47ab7ae1c
* Doxygenify comments
...
* Fix spacing, grammar in comment
* Make code layout consistent
* Wrap code at 80 cols
* Delete spurious blank lines
No functional changes.
llvm-svn: 14721
2004-07-09 14:45:17 +00:00
Alkis Evlogimenos
7300963c66
Fix typo.
...
llvm-svn: 14720
2004-07-09 11:25:27 +00:00
Alkis Evlogimenos
132ece8925
Improve code comments.
...
llvm-svn: 14719
2004-07-09 11:10:00 +00:00
Chris Lattner
3a3e5c42cd
No really, he did finish!
...
llvm-svn: 14717
2004-07-09 06:58:43 +00:00
Chris Lattner
0fc190f305
Too much of a title for it's own good
...
llvm-svn: 14716
2004-07-09 05:05:39 +00:00
Chris Lattner
3e5d2a655e
Fix Validation bugs
...
llvm-svn: 14715
2004-07-09 05:03:54 +00:00
Chris Lattner
2cb4f45a1d
Eliminate the UID field in the Type class, bringing it down to 28 bytes.
...
llvm-svn: 14709
2004-07-08 22:31:37 +00:00
Chris Lattner
753026dae0
The uid mapping is no more
...
llvm-svn: 14708
2004-07-08 22:31:09 +00:00
Chris Lattner
0bba5dbe95
Eliminate uses of the UniqueID field on Type objects
...
llvm-svn: 14707
2004-07-08 22:30:50 +00:00
Chris Lattner
3a9fd4c421
Do not call Type::getUniqueID
...
llvm-svn: 14706
2004-07-08 22:09:34 +00:00
Chris Lattner
a6302c9059
Add a new method
...
llvm-svn: 14705
2004-07-08 22:09:07 +00:00
Reid Spencer
a039955283
Get rid of some cruft in the insert method.
...
llvm-svn: 14704
2004-07-08 21:50:33 +00:00
Misha Brukman
aefab3404e
Add support for __fixdfdi(), __floatdisf(), and __floatdidf() external functions
...
llvm-svn: 14703
2004-07-08 19:41:16 +00:00
Reid Spencer
313aeb2b73
First version of a vector with uniqueness constraints (or a set with
...
deterministic, insertion-order iteration).
llvm-svn: 14702
2004-07-08 19:36:21 +00:00
Misha Brukman
4c4e044e65
* Use several Function* for external functions instead of a std::map
...
* Non-const FP values must be loaded into int regs (for vararg fns) via memory
llvm-svn: 14701
2004-07-08 18:27:59 +00:00
Misha Brukman
59b2d4ef9d
* Add support for loading FP constants from the constant pool
...
* Load FP values into int regs as well for vararg functions; without memory ops!
llvm-svn: 14700
2004-07-08 18:02:38 +00:00
Misha Brukman
b604b4df21
* Fix header comment, excise references to X86
...
* Add suport for printing out references to constant pool indices
llvm-svn: 14699
2004-07-08 17:58:04 +00:00
Chris Lattner
0376545d26
statisfy the spelling police
...
llvm-svn: 14698
2004-07-08 17:49:37 +00:00
Misha Brukman
2d07af3e08
Fix spelling of `equivalent'
...
llvm-svn: 14697
2004-07-08 17:45:18 +00:00
Chris Lattner
f2e960c5ab
Eliminate the SignedType and UnsignedType classes.
...
llvm-svn: 14695
2004-07-08 17:30:07 +00:00
Chris Lattner
417e85ebd7
isSigned/isUnsigned/isInteger methods do not need to be virtual
...
llvm-svn: 14694
2004-07-08 17:29:36 +00:00
Chris Lattner
e7fa4fc18b
Update comment.
...
Remove unused forward decl of Value.h
Make Type 32 bytes instead of 36 bytes
llvm-svn: 14692
2004-07-08 16:09:38 +00:00
Chris Lattner
bf22fbb05e
This file uses the Value class without a forward decl
...
llvm-svn: 14691
2004-07-08 15:54:29 +00:00
Chris Lattner
9ebc7eba24
Add a test that I have had in my tree for several months now, but apparently forgot to commit
...
llvm-svn: 14690
2004-07-08 15:41:08 +00:00
Chris Lattner
9b8881a3b3
Fix this testcase
...
llvm-svn: 14689
2004-07-08 15:38:23 +00:00
Brian Gaeke
8165863a9d
Support setcc on fp values.
...
llvm-svn: 14687
2004-07-08 09:08:35 +00:00
Brian Gaeke
7b4722e62c
Add floating-point branches and compares. Compares don't complete
...
until the next cycle, and there's no interlock, so they effectively
have a delay slot.
llvm-svn: 14686
2004-07-08 09:08:22 +00:00
Brian Gaeke
3b204c3f24
Fix bug where SwitchSection would fail to change to ".bss" successfully.
...
llvm-svn: 14685
2004-07-08 08:08:23 +00:00
Brian Gaeke
4fdd22b922
Fix bug involving bool arguments to binary operators.
...
Fix typo in comment.
llvm-svn: 14684
2004-07-08 08:08:10 +00:00
Brian Gaeke
dc5940794c
Fix bug in copying long constants to register pairs. We were getting
...
the top and bottom halves backwards...how embarrassing.
Support 'cast long to long' and other similar no-op casts to long.
Support 'ret long'.
llvm-svn: 14683
2004-07-08 07:52:13 +00:00
Chris Lattner
b2db87a5ca
Disable some code that isn't helping matters
...
llvm-svn: 14682
2004-07-08 07:25:51 +00:00
Brian Gaeke
4ba31a2e1e
Support 'ret float'
...
llvm-svn: 14681
2004-07-08 07:22:27 +00:00
Chris Lattner
9ab4d88ab6
Really, it is not necessary to recompile all files in a profile build every
...
time!
llvm-svn: 14680
2004-07-08 03:42:20 +00:00
Alkis Evlogimenos
2c422bbefb
Add viewCFG() and viewCFGOnly() APIs.
...
llvm-svn: 14679
2004-07-08 00:47:58 +00:00
Misha Brukman
4233155533
There is no error message to print out, end sentence with `!'
...
llvm-svn: 14678
2004-07-07 21:22:05 +00:00
Reid Spencer
1a4152fa2c
Make error message consistent with the rest of LLVM by saying that bytecode
...
is read, not parsed.
llvm-svn: 14677
2004-07-07 21:20:28 +00:00
Reid Spencer
37e0ba969a
Fix some thinkos in the script (error handling, proper argument handling).
...
llvm-svn: 14676
2004-07-07 21:19:01 +00:00
Reid Spencer
6652252f0f
Bug 391 fixed.
...
llvm-svn: 14675
2004-07-07 21:06:28 +00:00
Reid Spencer
6967cd54f3
Fix for bug 391.
...
Improve exeception handling around bcreader invocations.
llvm-svn: 14674
2004-07-07 21:01:38 +00:00
Misha Brukman
3955f9079b
* Use a map for caching lookups to external functions (fp div/rem)
...
* Tabs to spaces
llvm-svn: 14673
2004-07-07 20:07:22 +00:00
Misha Brukman
6ff655117d
* Wrap long lines (comments and code)
...
* Tabs to spaces
llvm-svn: 14672
2004-07-07 20:01:36 +00:00
Chris Lattner
9df9afddcf
Fix regressions in these testcases:
...
Regression.Assembler.2002-01-24-BadSymbolTableAssert
Regression.Assembler.2002-01-24-ValueRefineAbsType
Found through the nightly tester :)
llvm-svn: 14671
2004-07-07 18:07:46 +00:00
Misha Brukman
ef84814ea9
Add fmod() to the Module being compiled so that it gets a stub in the asm file
...
llvm-svn: 14670
2004-07-07 15:36:18 +00:00
Reid Spencer
18a7abbc75
Insert a reference to uint32_vbr encoding.
...
llvm-svn: 14669
2004-07-07 15:02:54 +00:00
Reid Spencer
8e32af06f4
An update with corrections to content as well as using a regex style
...
notation that Chris' suggested to make the specification more compact and
succinct. Added a section to Describe the notation, made the VBR
description its own section, and otherwise generally cleaned things up.
llvm-svn: 14668
2004-07-07 13:34:26 +00:00
Chris Lattner
e9e13f593f
The bytecode reader wants to be able to read types that are not quite resolved
...
yet, then resolve them in it's own sweet time. We must support this.
llvm-svn: 14666
2004-07-07 06:48:27 +00:00
Chris Lattner
97cf20e1b8
Headers moved
...
llvm-svn: 14665
2004-07-07 06:35:22 +00:00
Chris Lattner
3e6a996063
All of these now live in the DataStructure directory
...
llvm-svn: 14664
2004-07-07 06:32:53 +00:00
Chris Lattner
f6118db088
Move all of the DSA headers into the Analysis/DataStructure subdir.
...
llvm-svn: 14663
2004-07-07 06:32:21 +00:00
Chris Lattner
c800b23c47
Move DSA headers into Analysis/DataStructure to make it more obvious
...
what is implemented by the DataStructure library.
llvm-svn: 14662
2004-07-07 06:29:26 +00:00
Chris Lattner
fccf172c22
Moving headers
...
llvm-svn: 14661
2004-07-07 06:22:54 +00:00
Chris Lattner
deb7676f0f
As much as I hate to say it, the whole setNode interface for DSNodeHandles
...
is HOPELESSLY broken. The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.
As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call. This fixes some obscure bugs
handling non-forwarded node handles.
llvm-svn: 14660
2004-07-07 06:12:52 +00:00
Chris Lattner
71068a0462
When folding constant expr gep's, don't force the use of long indices.
...
llvm-svn: 14658
2004-07-07 04:45:13 +00:00
Chris Lattner
e549717d84
Bug fixed
...
llvm-svn: 14657
2004-07-07 02:25:24 +00:00
Chris Lattner
167d4b0e83
New testcase for PR396
...
llvm-svn: 14656
2004-07-07 02:20:02 +00:00
Alkis Evlogimenos
8a1be03090
Disable coalescing.
...
llvm-svn: 14655
2004-07-07 02:03:12 +00:00
Chris Lattner
8f23abebfc
Make sure people don't make functiontypes with an invalid return type
...
llvm-svn: 14654
2004-07-06 23:25:19 +00:00
Misha Brukman
4556d889f4
* Add support for calling vararg functions (must pass doubles in int regs too)
...
* Make visitSetCondInst() share condition-generating code with EmitComparison()
* There are 13 FPRs for function-passing arguments, not 8
* Do not rely on registers being sequential, use an array lookup
* In unimplemented switch cases, send an error and abort instead of silent
fall-through
* Add doInitialization() for adding function prototypes for external math fns
* Minor changes: fix indentation, spacing, code clarity
llvm-svn: 14653
2004-07-06 22:51:53 +00:00
Misha Brukman
2138f1b2b0
Use the more compact bl' instead of cryptic (but equivalent) bcl 20,31'
...
llvm-svn: 14652
2004-07-06 22:40:34 +00:00
Brian Gaeke
84e1bb8eff
Work around apparent Apple compiler bug which was making all mangled
...
names start with l0_.
llvm-svn: 14651
2004-07-06 20:29:05 +00:00
Chris Lattner
810583d4c4
Punctuate
...
llvm-svn: 14650
2004-07-06 19:58:54 +00:00
Chris Lattner
9eb9ccd9f6
Check to make sure types are sized before calling getTypeSize on them.
...
llvm-svn: 14649
2004-07-06 19:28:42 +00:00
Brian Gaeke
a501be556f
It doesn't matter what the 2nd operand is; if the GEP has 2 operands and
...
the first is a zero, we should leave it alone.
llvm-svn: 14648
2004-07-06 19:24:47 +00:00
Brian Gaeke
0e0fe8a2e9
Add helper function.
...
Don't touch GEPs for which DecomposeArrayRef is not going to do anything
special (e.g., < 2 indices, or 2 indices and the last one is a constant.)
llvm-svn: 14647
2004-07-06 18:15:39 +00:00
Chris Lattner
bea7247357
Find bugs sooner rather than later. In this case, don't allow the creation
...
of instructions that don't have a first-class or void type.
llvm-svn: 14646
2004-07-06 17:44:17 +00:00
Reid Spencer
d448f17b7d
Change the "rotate by 90" xtics specification to just "rotate" which is
...
equivalent. The "by <angle>" syntax is not acceptable for all output
devices. Apparently the Sparc and x86 output devices (no color) don't
accept this, but should accept the plain "rotate".
llvm-svn: 14645
2004-07-06 17:04:09 +00:00
Alkis Evlogimenos
3be9c5fbe7
Do not crash when joining two intervals of registers of different
...
classes: just ignore that move. Thanks to Vladimir Prus who found the
bug!
llvm-svn: 14644
2004-07-06 16:03:21 +00:00
Misha Brukman
e9b763a83f
* Add utility functions: convert SetCC => PPC opcode and invert PPC opcode
...
* If SetCondInst is folded into BranchInst (and it is the only user), do not
emit code for SetCondInst
* Fix assembly opcodes in comments in visitSetCondInst()
* Fix codegen of conditional branches
llvm-svn: 14643
2004-07-06 15:32:44 +00:00
Chris Lattner
23b47b6af9
Implement rem.ll:test3
...
llvm-svn: 14640
2004-07-06 07:38:18 +00:00
Chris Lattner
eca92d3106
New testcase
...
llvm-svn: 14639
2004-07-06 07:38:00 +00:00
Chris Lattner
98c6bdf251
Fix a minor bug where we would go into infinite loops on some constants
...
llvm-svn: 14638
2004-07-06 07:11:42 +00:00
Chris Lattner
7fd5f0745a
Implement InstCombine/sub.ll:test15: X % -Y === X % Y
...
Also, remove X % -1 = 0, because it's not true for unsigneds, and the
signed case is superceeded by this new handling.
llvm-svn: 14637
2004-07-06 07:01:22 +00:00
Chris Lattner
2c9fdbe6cb
New testcase
...
llvm-svn: 14636
2004-07-06 07:00:11 +00:00
Chris Lattner
520df8464b
Fix a bug in the unreachable block elim pass. Dropping all references on a
...
basic block clear()'s all of the operands lists, including phis. This
caused removePredecessor to get confused later. Because of this, we just
nuke (without prejudice) PHI nodes in unreachable blocks.
llvm-svn: 14635
2004-07-06 06:36:11 +00:00
Reid Spencer
987e503e2e
Remove definition and use of OtherVal enumerator. This just fixes a thinko.
...
llvm-svn: 14634
2004-07-06 01:30:36 +00:00
Reid Spencer
e2f97b3464
First draft completed. All sections written.
...
llvm-svn: 14633
2004-07-05 22:28:02 +00:00
Reid Spencer
2ae86fbd05
Caused the labels on the small plots to be drawn vertically instead of
...
horizontally so they no longer overlap.
This eye-strain-lessening patch contributed by Vladimir Merzliakov. Thanks!
llvm-svn: 14632
2004-07-05 19:09:32 +00:00
Reid Spencer
9ce11e44de
Added sections for Constant Pool, Module Global Info, and Compaction
...
Tables. Two more sections to go.
llvm-svn: 14631
2004-07-05 19:04:27 +00:00
Chris Lattner
e5589eabcd
Add a missing "terminator" :)
...
llvm-svn: 14630
2004-07-05 18:05:48 +00:00
Chris Lattner
8aa561992c
Structures allow only uint
...
arrays allow int/uint/long/ulong
llvm-svn: 14629
2004-07-05 17:55:28 +00:00
Reid Spencer
4e0352d8c7
- Reorganized the document contents
...
- Provided a "General Layout" section that currently covers just the block
structure of the bytecode file.
- Wrote the section on the Global Type Pool
- Wrote the section on differences between LLVM file format versions.
Only five sections left to write!
llvm-svn: 14628
2004-07-05 08:18:07 +00:00
Reid Spencer
02b6708e01
Finalize bytecode dumping. The "handleFinish" method was getting called
...
too soon so the function data was not getting dumped (it was generated
after the call handleFinish). Also cleaned up the output format for
proper indentation.
llvm-svn: 14627
2004-07-05 00:57:50 +00:00
Alkis Evlogimenos
21b3a5b0de
Correctly compute the ration of iterations/#intervals.
...
llvm-svn: 14626
2004-07-04 17:23:35 +00:00
Chris Lattner
0969646d6e
Add #includes
...
llvm-svn: 14625
2004-07-04 17:19:21 +00:00
Reid Spencer
00fc1c5fa4
Add #include <iostream> since Value.h doesn't include it any more.
...
llvm-svn: 14624
2004-07-04 12:22:14 +00:00
Reid Spencer
f0ebb25d2b
Add #include <iostream> since Value.h does not include it any more.
...
llvm-svn: 14623
2004-07-04 12:20:55 +00:00
Reid Spencer
eb04d9bcb4
Add #include <iostream> since Value.h does not #include it any more.
...
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Reid Spencer
832fa92ab6
- remove use of isa<Type>(Val) since there's no inheritance relationship
...
any more. Needed for bug 122
- #include <iostream> since Value.h doesn't include it any more.
llvm-svn: 14621
2004-07-04 12:19:05 +00:00
Reid Spencer
e258e94af7
Remove use of Type::TypeTy which is no longer defined. This change needed
...
for bug 122 since the "Type Type" concept is gone now.
llvm-svn: 14620
2004-07-04 12:17:44 +00:00
Reid Spencer
e484cc1925
Correct syntax typo .. ; -> :
...
llvm-svn: 14619
2004-07-04 12:15:11 +00:00
Reid Spencer
1e8005d013
- Changes for bug 122
...
- Remove Tabs
- Add inserters needed since Value doesn't implement them any more
- Move some functions here to avoid cyclic header file dependencies.
llvm-svn: 14618
2004-07-04 12:14:17 +00:00
Reid Spencer
8baf8e270a
- #include <iostream> since its not in Value.h any more.
...
llvm-svn: 14617
2004-07-04 11:55:37 +00:00
Reid Spencer
c107d6ff87
Constify SymbolTable's use of Type* so that it never modifies them.
...
llvm-svn: 14616
2004-07-04 11:55:08 +00:00
Reid Spencer
dbe02b7b1d
- #include <iostream> since its not in Value.h any more.
...
- constify use of Type* returned from symbol table.
llvm-svn: 14615
2004-07-04 11:52:49 +00:00
Reid Spencer
cf394bf2d5
#include <iostream> since its not in Value.h any more.
...
llvm-svn: 14614
2004-07-04 11:51:24 +00:00
Reid Spencer
58d30f24bb
Adjust the slot machine to handle Types separately from Values. This was
...
done by doubling up the data structures so that Type based equivalents are
used. A consequence of this is overloading of function members that take a
Type* instead of a Value*. Various other cleanups related to Type != Value
(bug 122) were also implemented.
llvm-svn: 14613
2004-07-04 11:50:43 +00:00
Reid Spencer
bf2bce3f74
Implementation of SlotTable went into header file. Note that this header
...
is currently not being used but is retained because it will be the basis
for a clean up of the SlotCalculator class.
llvm-svn: 14612
2004-07-04 11:47:22 +00:00
Reid Spencer
2fa95bcd68
Remove Tabs.
...
llvm-svn: 14611
2004-07-04 11:46:15 +00:00
Reid Spencer
a52b0009ea
Implement new output functions for types and compacted type planes. Also
...
remove use of Type::TypeTyID and Type::TypeTy since Type no longer inherits
Value.
llvm-svn: 14610
2004-07-04 11:45:47 +00:00
Reid Spencer
3cdb4e88e5
Add new methods outputTypes and outputCompactionTypes for handling Types
...
separately from Values. This needed for bug 122.
llvm-svn: 14609
2004-07-04 11:44:27 +00:00
Reid Spencer
88f3e0731e
For bug 122:
...
Separate Types from Values because Type no longer inherits from Value. The
changes for this are too numerous to list. In essence, any data structure
that contained a Value was doubled so that Types could be contained
similarly. New members include Types, TypeMap, CompactionTypes, and
CompactionTypeMap. Functions taking a Value* were overloaded with a variant
that takes a Type* that acts on the new data structures.
llvm-svn: 14608
2004-07-04 11:42:49 +00:00
Reid Spencer
25319569fb
- Type::TypeTyID doesn't exist any more (bug 122)
...
- Types don't have names any more, just write them on ostream directly
llvm-svn: 14606
2004-07-04 11:37:54 +00:00
Reid Spencer
5ef4237089
Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
...
that needs it after the Type != Value changes (bug 122).
llvm-svn: 14605
2004-07-04 11:36:31 +00:00
Reid Spencer
bc70f74825
- Don't use macros to call the BytecodeHandler
...
- Don't use PARSE_ERROR macro unnecessarily (for simple strings)
- Add comments before each function
- Convert for bug 122 (Type != Value)
- Handle new value range on Type::PrimitiveTypeId enumeration by augmenting
the reader with a new read_typeid method and sanitizeTypeId method.
- Remove BytecodeHandler's default method implementations to header file.
llvm-svn: 14604
2004-07-04 11:33:49 +00:00
Reid Spencer
6934ce8347
Make all the virtual function (except destructor) inline so there are
...
default implementations without taking up a ton of space in a .cpp file.
llvm-svn: 14603
2004-07-04 11:29:56 +00:00
Reid Spencer
e6c95490a0
- Make ValueList an "OtherVal" user of Values to ensure it doesn't get
...
mistaken for anything else.
- Move function descriptions to Reader.cpp file per Chris.
- Remove tabs.
llvm-svn: 14602
2004-07-04 11:04:56 +00:00
Reid Spencer
0421e6c843
Remove tabs. Move function declaration to Reader.h where it belongs.
...
llvm-svn: 14601
2004-07-04 11:03:03 +00:00
Reid Spencer
646f829e33
Add #include <iostream> which is needed now that Value.h doesn't include it
...
llvm-svn: 14600
2004-07-04 11:01:27 +00:00
Reid Spencer
6eecc40b2d
Excise tabs.
...
llvm-svn: 14599
2004-07-04 11:00:39 +00:00
Reid Spencer
904b345c71
Add a new, compatible, interface function for writing types as operands.
...
This is necessary because Types are no longer Values.
llvm-svn: 14598
2004-07-04 10:59:05 +00:00
Reid Spencer
ca9fb19323
Added #include <iostream> since this header is no longer picked up from
...
the Value.h header.
llvm-svn: 14597
2004-07-04 10:58:20 +00:00
Reid Spencer
bc3919c074
- Remove enumerator TypeVal since Values can't be types any more
...
- Remove isa_impl relationship between Types and Values
- Add OtherVal so "other" users can interact with Values.
llvm-svn: 14596
2004-07-04 10:52:28 +00:00
Reid Spencer
fefe3d5ba3
There is no longer a "Type" primitive type because Values and Types are
...
now distinct.
llvm-svn: 14595
2004-07-04 10:50:43 +00:00
Reid Spencer
a7ae332182
Constify usage of Type* on the interface to ensure SymbolTable doesn't
...
modify types (it never should). Clean up some comments.
llvm-svn: 14594
2004-07-04 10:49:41 +00:00
Reid Spencer
50a334b2d6
Remove all of the classof(const Value*) methods of the derived types since
...
the Type base class no longer derives from Value.
llvm-svn: 14593
2004-07-04 10:48:27 +00:00
Reid Spencer
1431f7cf07
Make Type have no base classes. Previously it inherited Value. Also
...
removed the TypeTyID and TypeTy members so that the notion of the
"Type Type" is no longer present in LLVM. Various other adjustments
resulting from these changes were also made.
llvm-svn: 14592
2004-07-04 10:46:49 +00:00
Alkis Evlogimenos
8f3cc0316c
Add efficiency statistic.
...
llvm-svn: 14590
2004-07-04 07:59:06 +00:00
Alkis Evlogimenos
ef72a7e963
Add more operators.
...
llvm-svn: 14589
2004-07-04 01:30:54 +00:00
Chris Lattner
d3ecc61840
Fix compilation on internix
...
llvm-svn: 14588
2004-07-03 01:21:05 +00:00
Chris Lattner
4c9c20af28
Implement add.ll:test22, a common case in MSIL files
...
llvm-svn: 14587
2004-07-03 00:26:11 +00:00
Chris Lattner
3a03c90085
Add a new testcase for folding an add into a switch
...
llvm-svn: 14586
2004-07-03 00:25:31 +00:00
Chris Lattner
971bbcb43a
Fix Type::isSized() to realize that "{ opaque }" is not sized
...
llvm-svn: 14585
2004-07-02 23:20:17 +00:00
Chris Lattner
49df6cefa5
Do not call getTypeSize on a type that has no size
...
llvm-svn: 14584
2004-07-02 22:55:47 +00:00
Brian Gaeke
317ef96a3a
Modernize example, so that you can paste it right into llvm-as
...
llvm-svn: 14583
2004-07-02 21:08:14 +00:00
Chris Lattner
bee3155b20
Since we are in the department of redundancy department, at least be correct
...
llvm-svn: 14582
2004-07-02 18:41:18 +00:00
Misha Brukman
4308baa0f1
Add FIXME notes for spilling int/fp regs (need to calculate stack space).
...
llvm-svn: 14581
2004-07-02 17:54:38 +00:00
Misha Brukman
0fdfcf147b
* Wrap long lines
...
* Mention the HTML/man page output from single POD source file
llvm-svn: 14580
2004-07-02 16:23:17 +00:00
Misha Brukman
6c4644b4a9
* Standardize manpage output: program name bold, options italic/emphasized
...
* Make links in SEE ALSO section of manpages short without "the ... manpage"
llvm-svn: 14579
2004-07-02 16:06:19 +00:00
Misha Brukman
763855342b
The HTML documentation is now automatically generated from POD source.
...
llvm-svn: 14578
2004-07-02 15:48:33 +00:00
Misha Brukman
cbbf9a1f8f
* Link to the POD-generated HTML documentation
...
* Updated llvm-abcd to llvm-bcanalyzer
llvm-svn: 14577
2004-07-02 15:46:55 +00:00
Misha Brukman
bbd9759fd6
Make `args' stand out as bold, delete confusing elipsis at the end of cmdline.
...
llvm-svn: 14576
2004-07-02 15:42:20 +00:00
Misha Brukman
064e9b7cf0
HTML links in PODs must be absolute.
...
llvm-svn: 14575
2004-07-02 15:37:53 +00:00
Misha Brukman
0e21722a9f
Simplify wording: the bugpoint tool' can just become bugpoint'.
...
llvm-svn: 14574
2004-07-02 15:36:29 +00:00
Misha Brukman
2410a8807e
llvm-abcd has become llvm-bcanalyzer
...
llvm-svn: 14573
2004-07-02 15:32:49 +00:00
Brian Gaeke
f6d2471c5d
Fix use-before-def thinko
...
llvm-svn: 14570
2004-07-02 07:01:31 +00:00
Reid Spencer
f03b63de59
Add a note about implementing interprocedural register allocation.
...
llvm-svn: 14569
2004-07-02 06:27:12 +00:00
Brian Gaeke
dcecac198e
Build llvm-bcanalyzer
...
llvm-svn: 14568
2004-07-02 05:59:20 +00:00
Chris Lattner
a65b4eac3b
Revert patches 1.79 and 1.80 which had to do with dead MBB's. Now that they
...
don't exist, we don't have to pretend to handle them.
llvm-svn: 14567
2004-07-02 05:52:23 +00:00
Chris Lattner
55256dbf9b
Fix potential problems with unreachable basic blocks.
...
Also, while noone's looking, add support for constant expressions. Wait,
I said not to look!
llvm-svn: 14566
2004-07-02 05:49:11 +00:00
Chris Lattner
3594324248
Fix all of those problems that the PPC backend has running 176.gcc :)
...
llvm-svn: 14565
2004-07-02 05:48:42 +00:00
Chris Lattner
6c322ecc31
Remove dead blocks
...
llvm-svn: 14564
2004-07-02 05:46:41 +00:00
Chris Lattner
693244fb33
Add a trivially simple pass to delete unreachable blocks from the CFG. This
...
pass is required to paper over problems in the code generator (primarily
live variables and its clients) which doesn't really have any well defined
semantics for unreachable code.
The proper solution to this problem is to have instruction selectors not
select blocks that are unreachable. Until we have a instruction selection
framework available for use, however, we can't expect all instruction
selector writers to do this. Until then, this pass should be used.
llvm-svn: 14563
2004-07-02 05:46:10 +00:00
Chris Lattner
1661358d7e
Add a new pass for code generators to use
...
llvm-svn: 14562
2004-07-02 05:44:13 +00:00
Chris Lattner
1d6b5f38fe
Make this testcase more interesting
...
llvm-svn: 14561
2004-07-02 05:43:51 +00:00
Brian Gaeke
e1a136fb4b
Get rid of a dead variable, and fix a typo in a comment.
...
llvm-svn: 14560
2004-07-02 05:30:01 +00:00
Brian Gaeke
186e3d1098
Add M_TERMINATOR_FLAG to terminator instructions (branches and returns).
...
Also, the RETURN instructions are not used in the sparcv9 backend.
llvm-svn: 14559
2004-07-02 04:57:37 +00:00
Brian Gaeke
fb894bd864
RETURN instructions are not used in the sparc backend.
...
When in doubt, stamp it out!!
llvm-svn: 14558
2004-07-02 04:57:35 +00:00
Reid Spencer
7efe23752f
llvm-abcd tool name changed to llvm-bcanalyzer: see llvm-bcanalyzer.pod.
...
llvm-svn: 14557
2004-07-02 03:45:32 +00:00
Reid Spencer
b703e0b32f
Podified documentation for the llvm-bcanalyzer tool (nee llvm-abcd).
...
llvm-svn: 14556
2004-07-02 03:44:14 +00:00
Reid Spencer
5780de6219
Name Change: llvm-abcd -> llvm-bcanalyzer
...
llvm-svn: 14555
2004-07-02 03:22:53 +00:00
Misha Brukman
24a0371791
* Follow the PowerPC convention of leaving 24 bytes for linking on the stack.
...
* Also leave space for spilling integer registers (this should be calculated)
llvm-svn: 14554
2004-07-01 21:35:00 +00:00
Misha Brukman
d028593c6e
* Get rid of constant-expr handling code: we use the ConstantExpr lowering pass
...
* Use the SetCC handling code in the format of Brian's V8
* Add FIXMEs where calls to functions are being made without adding them to the
Module first... they cause missing symbols at assembly-time.
llvm-svn: 14553
2004-07-01 21:34:10 +00:00
Misha Brukman
1f3a7f0255
Wrap long line
...
llvm-svn: 14552
2004-07-01 21:27:59 +00:00
Misha Brukman
d575287551
* Do not allocate r0 as we use it indiscriminantly in the instr selector.
...
* Do not define CR register class because we don't (yet) have the i4 type
llvm-svn: 14551
2004-07-01 21:24:50 +00:00
Misha Brukman
fcc59bd0e0
Check if operand has an allocated reg before requesting it.
...
llvm-svn: 14550
2004-07-01 21:09:12 +00:00
Misha Brukman
20709326a1
* Doxygenify comments
...
* Tabs-to-spaces
llvm-svn: 14549
2004-07-01 20:42:00 +00:00
Chris Lattner
80b3aeafc0
Fix broken links
...
llvm-svn: 14548
2004-07-01 20:41:43 +00:00
Brian Gaeke
d4ba0a5721
bug. point. pod.
...
llvm-svn: 14547
2004-07-01 20:29:08 +00:00
Chris Lattner
5b20870830
Add much better assertion checking for load and store insts.
...
Contributed by Vladimir Merzliakov!
llvm-svn: 14546
2004-07-01 20:23:52 +00:00
Chris Lattner
153cd4ed30
Move init methods out of line to enable better assertions, contributed
...
by Vladimir Merzliakov!
llvm-svn: 14545
2004-07-01 20:22:31 +00:00
Brian Gaeke
3785ca3df3
bugpoint command guide has been designated a full-fledged "doc".
...
llvm-svn: 14544
2004-07-01 20:10:40 +00:00
Brian Gaeke
b8a340a3bf
abcd pod document
...
llvm-svn: 14543
2004-07-01 20:07:15 +00:00
Brian Gaeke
cc7cafb371
llvm-nm pod format man page.
...
llvm-svn: 14542
2004-07-01 19:40:36 +00:00
Brian Gaeke
163c87fc32
Make this pass use a more specific debug message than "Processing:".
...
llvm-svn: 14541
2004-07-01 19:27:10 +00:00
Misha Brukman
fa3561c603
Fix grammar: remove `our' as it no longer makes sense.
...
llvm-svn: 14540
2004-07-01 18:34:46 +00:00
Chris Lattner
8a9d11b1bc
This is more of an "llvm team" thing by now
...
llvm-svn: 14539
2004-07-01 18:25:59 +00:00
Misha Brukman
0667a12dcd
llvm-db is in alpha stage, this document is a placeholder.
...
llvm-svn: 14538
2004-07-01 18:00:42 +00:00
Misha Brukman
3121ce052f
Fix links to llvmgcc and llvmgxx
...
llvm-svn: 14537
2004-07-01 17:59:53 +00:00
Misha Brukman
ae8b03362c
gccld enters the Hall of POD.
...
llvm-svn: 14536
2004-07-01 17:53:27 +00:00
Misha Brukman
082fe484ed
Make the text of the link to llvmgxx.html more appropriate: `llvmg++'.
...
llvm-svn: 14535
2004-07-01 17:52:58 +00:00
Chris Lattner
18a08e702d
Handle targets where alignment can be bigger than the size of the data.
...
Contributed by Vladimir Prus!
llvm-svn: 14534
2004-07-01 17:32:59 +00:00
Misha Brukman
3802014c51
Fix grammar in Stacker doc description.
...
llvm-svn: 14533
2004-07-01 17:20:53 +00:00
Misha Brukman
61a747f60b
Mention llvm-abcd, point out difference between it and `analyze'.
...
llvm-svn: 14532
2004-07-01 16:59:05 +00:00
Misha Brukman
b410763f25
Change format of CommandGuide index page to look like other docs.
...
llvm-svn: 14531
2004-07-01 16:04:49 +00:00
Misha Brukman
3eef5d4715
* `The' isn't necessary in front of LLVM
...
* Wrap long line
llvm-svn: 14530
2004-07-01 15:33:24 +00:00
Misha Brukman
6836eaed42
Fresh from the LLVM baker's oven: opt and analyze pods.
...
llvm-svn: 14529
2004-07-01 15:25:04 +00:00
Misha Brukman
dfb5a7b925
Add llvm-g++ and llvm-gcc pod documentation.
...
llvm-svn: 14528
2004-07-01 14:51:26 +00:00
Misha Brukman
81e616976f
Fix link to llvmgcc.
...
llvm-svn: 14527
2004-07-01 14:47:05 +00:00
Misha Brukman
0c7ed6e335
Make links relative instead of absolute.
...
llvm-svn: 14525
2004-07-01 13:52:35 +00:00
Chris Lattner
9a60c532a8
Make sure that we destroy the MBB's, with all of their instructions, before
...
any other data structures
llvm-svn: 14524
2004-07-01 06:29:07 +00:00
Chris Lattner
c85535c8be
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
...
use them instead of a local LiveVariables numbering
llvm-svn: 14523
2004-07-01 06:15:32 +00:00
Chris Lattner
0c26b9cbbb
Now that we have happy mappings from MBBs->numbers, use them instead of keeping
...
a LV private map
llvm-svn: 14522
2004-07-01 06:14:57 +00:00
Chris Lattner
449af59c7e
Change MBB autonumber a bit to get the reverse mapping as well as a forward
...
mapping
llvm-svn: 14521
2004-07-01 06:02:27 +00:00
Chris Lattner
a47455dbd3
Instance var no longer exists
...
llvm-svn: 14520
2004-07-01 06:02:07 +00:00
Chris Lattner
6b2ac89e78
Change the implementation of the autonumbering for MBB's a bit to provide
...
the reverse mapping as well as the mapping from MBB->unsigned
llvm-svn: 14519
2004-07-01 06:01:36 +00:00
Chris Lattner
6c375e4926
Start using MBB numbers directly instead of going through the live variables
...
map.
llvm-svn: 14518
2004-07-01 04:29:47 +00:00
Chris Lattner
7c77fd50e7
Instead of building a private numbering of MBB's use brg's nifty auto-numbering.
...
Also convert df_iterator -> df_ext_iterator for subsequent stuff I'm doing.
llvm-svn: 14517
2004-07-01 04:24:29 +00:00
Chris Lattner
5cc223a7e2
Fix testcase
...
llvm-svn: 14516
2004-07-01 04:11:35 +00:00
Chris Lattner
8785e03d7c
-debug option does not exist in a release build
...
llvm-svn: 14515
2004-07-01 04:10:15 +00:00
Chris Lattner
eee347209f
Fix testcase. For some reason this was failing only with a release build and
...
not with a debug build? Rather testrunner only caught it in that case.
llvm-svn: 14514
2004-07-01 04:09:14 +00:00
Reid Spencer
209ae4bd6d
Added a command page for the llvm-abcd tool.
...
llvm-svn: 14513
2004-07-01 02:32:42 +00:00
Misha Brukman
b9125f462d
Fix indentation to be 2 spaces.
...
llvm-svn: 14512
2004-06-30 22:11:03 +00:00
Misha Brukman
0648a903c7
* Coalesce the handy CALL* alias opcodes with the standard ones
...
* Congregate more branch-and-link opcodes together
* Mark FP, CPR, and special registers as volatile across calls
llvm-svn: 14511
2004-06-30 22:00:45 +00:00
Misha Brukman
299fa1b147
* Allow more registers to be allocated from the general register pool
...
* Define the condition register class
llvm-svn: 14510
2004-06-30 21:54:50 +00:00
Misha Brukman
fee5a22f8a
* Inquire about the number of operands from the instruction directly
...
* Only check for a register if we are sure the instruction has one allocated
llvm-svn: 14509
2004-06-30 21:54:12 +00:00
Misha Brukman
04f07b4589
visitSetCondInst() takes a parameter of type `SetCondInst'
...
llvm-svn: 14508
2004-06-30 21:47:40 +00:00
Jonathan Manton
aff4a6a11b
Fixed the tutorial to indicate that we needed to use the llvm namespace.
...
llvm-svn: 14507
2004-06-30 18:10:30 +00:00
Misha Brukman
2b9106f808
Always assume a function may have calls because the printer may add `bl' to get
...
the PC in a code sequence for global variables.
llvm-svn: 14506
2004-06-30 00:09:12 +00:00
Misha Brukman
351646f31e
* Don't save LR when outputting globals: it's already saved on the stack once
...
for the function
* Registers aren't necessarily sequential wrt their enums, don't rely on it
when emitting function arguments into sequential registers
* Remove X86-specific comments about AL/BL/AH/BH/EDX/etc
* Add an abort() for an unimplemented signed right shift
* The src operand for a GEP was never emitted! Fixed.
* We can skip zero-valued GEP indices as they are no-ops.
"Hello, World!" now works.
llvm-svn: 14505
2004-06-29 23:45:05 +00:00
Misha Brukman
c794feab51
* Stop using BBNumbering, we don't really need it
...
* Only increment labelNumber once, because it's used by both Load{hi,lo}Addr
* There is no .bss section on PowerPC
* Use .align 2 instead of other random numbers
llvm-svn: 14504
2004-06-29 23:40:57 +00:00
Reid Spencer
b1076c4231
Fix order and line length of fixed bugs.
...
llvm-svn: 14503
2004-06-29 23:39:24 +00:00
Misha Brukman
d409669877
Set up the prologue and epilogue to be more like the manual and GCC output.
...
llvm-svn: 14502
2004-06-29 23:38:26 +00:00
Misha Brukman
7454c6fff0
* Use LA instead of LWZ for LoadLoAddr
...
* Specify the isCall bit and caller-save registers for some call instrs
llvm-svn: 14501
2004-06-29 23:37:36 +00:00
Misha Brukman
5459dfb47b
Only allocate non-volatile registers R13-31 (for now).
...
llvm-svn: 14500
2004-06-29 23:35:32 +00:00
Reid Spencer
938be23e90
Implement verification feature.
...
Ensure output occurs even in the face of an error.
llvm-svn: 14499
2004-06-29 23:34:27 +00:00
Reid Spencer
002dd98ce0
The analyzer code now lives in the bcreader library. The bcanalyzer lib
...
is no more.
llvm-svn: 14498
2004-06-29 23:33:31 +00:00
Misha Brukman
4efe3da794
Lower ConstantExpressions before the code generator.
...
llvm-svn: 14497
2004-06-29 23:33:20 +00:00
Reid Spencer
fddebf7ff2
Remove files no longer needed. ConstantReader and InstructionReader were
...
integrated into Reader. Parser.* was just a bad idea. AnalyzerInternals.h
is no longer needed. ReaderPrimitives.h was integrated into Reader.h and
Reader.cpp. Dumper.cpp was integrated into Analyzer.cpp. ReaderInternals.h
became Reader.h. AnalyzerWrappers.cpp was integerated into
ReaderWrappers.cpp
llvm-svn: 14496
2004-06-29 23:32:41 +00:00
Reid Spencer
f4ec6383c0
This is a slimming down of the previous ReaderInternals.h that just
...
declares the BytecodeReader class.
llvm-svn: 14495
2004-06-29 23:31:01 +00:00
Reid Spencer
284b7c7174
MAJOR REWRITE.
...
- stop passing Buf/BufEnd to every function (now member vars)
- internalize things that used to be in a header file that no one else
included/needed.
- Remove defunct BCR_TRACE lines
- Standardize error handling with the PARSE_ERROR macro.
- Integrate ConstantReader.cpp and InstructionReader.cpp and reorgnize
the definition order so that gcc has a chance at optimizing this module
- Standardize case and style of method names.
- Eliminate unneeded header files
- Prepare for Type != Value (bug122) change by splitting Types into their
own data structures.
- Implement the BytecodeHandler interface calls.
- Provide default implementation of BytecodeHandler interface.
llvm-svn: 14494
2004-06-29 23:29:38 +00:00
Reid Spencer
891cb9d925
Adjustments to allow Bytecode Reading to support the BytecodeHandler
...
interface which is called by the reader if a BytecodeHandler is provided.
llvm-svn: 14493
2004-06-29 23:24:14 +00:00
Reid Spencer
351f6bf714
Merge Dumper.cpp and AnalyzerWrappers.cpp into this file. Also, adjust the
...
dumping facility to produce useful output.
llvm-svn: 14492
2004-06-29 23:23:12 +00:00
Reid Spencer
c7b9419add
Analyzer moved to ../Reader directory.
...
llvm-svn: 14491
2004-06-29 23:21:53 +00:00
Reid Spencer
75923a4f93
Remove newly defunct Analyzer directory.
...
llvm-svn: 14490
2004-06-29 23:21:16 +00:00
Reid Spencer
5a45200992
Provide support for the BytecodeHandler interface which will be called by
...
the bcreader if one is supplied to the bytecode reader's interface
functions.
llvm-svn: 14489
2004-06-29 23:20:03 +00:00
Reid Spencer
53213ce347
Fix include guard
...
Adjust comments
Make handlers for constants provide useful information.
llvm-svn: 14488
2004-06-29 23:18:52 +00:00
Reid Spencer
d190ecc669
Adjust comments to match code.
...
Allow analysis to return the module created by the bcreader.
llvm-svn: 14487
2004-06-29 23:17:34 +00:00
Misha Brukman
887fd23dfc
Fix associativity of parameters to assert(): now it actually makes sense.
...
llvm-svn: 14483
2004-06-29 19:43:20 +00:00
Misha Brukman
c968b87d94
Convert tabs to spaces.
...
llvm-svn: 14482
2004-06-29 19:28:53 +00:00
Misha Brukman
802403723b
* Fix saving LR in function prologue
...
* Adjust epilogue restore sequence to match the PowerPC documentation
llvm-svn: 14480
2004-06-29 17:14:42 +00:00
Misha Brukman
811f5c2c4c
Assembly syntax/comment fixes by Nate Begeman.
...
llvm-svn: 14479
2004-06-29 17:13:26 +00:00
Vikram S. Adve
1097ed8467
Restoring this file.
...
llvm-svn: 14478
2004-06-29 14:20:27 +00:00
Chris Lattner
c5f9b356af
The code generator should work with unreachable blocks. If not, then this
...
is a bug that should be fixed in the code generator, not papered over with
the simplifycfg pass. Eliminating this makes bugpoint much more useful
llvm-svn: 14477
2004-06-29 07:20:16 +00:00
Chris Lattner
e6e1b48023
I believe that the code generator now properly handles dead basic blocks. If not,
...
this is a bug, and should be fixed.
llvm-svn: 14476
2004-06-29 07:17:12 +00:00
Chris Lattner
4cda555346
In line with the previous patch, do not assert out if analyzing a dead basic block.
...
llvm-svn: 14475
2004-06-29 07:16:23 +00:00
Chris Lattner
49b34f3f51
Do not dereference end iterators. It hurts when you do that.
...
llvm-svn: 14474
2004-06-29 06:56:51 +00:00
Chris Lattner
1a920d49f6
Fix a regression from r1.224. In particular, codegen a cast from double ->
...
float as a truncation by going through memory. This truncation was being
skipped, which caused 175.vpr to fail after aggressive register promotion.
llvm-svn: 14473
2004-06-29 00:14:38 +00:00
Misha Brukman
15c10883ff
Can't print out machine code before it is constructed.
...
llvm-svn: 14472
2004-06-28 21:16:57 +00:00
Chris Lattner
9475b96a3c
document new pass
...
llvm-svn: 14471
2004-06-28 19:19:47 +00:00
Misha Brukman
3aad397726
Fix the assembly opcode on LOADLoAddr, courtesy of Nate Begeman.
...
llvm-svn: 14470
2004-06-28 18:27:08 +00:00
Misha Brukman
767fa11096
Set isBranch and isTerminator bits on all branch instructions.
...
llvm-svn: 14469
2004-06-28 18:23:35 +00:00
Misha Brukman
2f0cda8b2a
Fix loading and storing PC-relative static variables, courtesy of Nate Begeman.
...
llvm-svn: 14468
2004-06-28 18:20:59 +00:00
Misha Brukman
75985d725c
No need to generate a lazy-linking stub for internal functions, they can be
...
resolved by the static linker.
llvm-svn: 14467
2004-06-28 18:03:37 +00:00
Misha Brukman
8455e0177b
Do not set the `link' bit when branching to the first BB of a function, as it
...
will cause an infinite loop. The link bit is only used for calling functions.
llvm-svn: 14466
2004-06-28 17:57:40 +00:00
Chris Lattner
3337c82745
Add a link to the CFE build instrs next to the CFE download instructions
...
llvm-svn: 14465
2004-06-28 17:14:01 +00:00
Chris Lattner
7d60ee3dcf
Building the C FE is a user-level process
...
llvm-svn: 14464
2004-06-28 17:11:10 +00:00
Misha Brukman
9cb88aae40
Fix spacing around function arguments.
...
llvm-svn: 14463
2004-06-28 15:53:27 +00:00
Chris Lattner
26dff501a4
Initial checkin of a simple mod/ref analysis for global variables. This is
...
still overly conservative and uses very simple data structures, but it is a
start, and allows elimination of a lot of loads.
llvm-svn: 14462
2004-06-28 06:33:13 +00:00
Chris Lattner
8f12ca4d92
Add new header
...
llvm-svn: 14461
2004-06-28 06:31:26 +00:00
Chris Lattner
3b11d3b294
Remove unused file
...
llvm-svn: 14460
2004-06-28 00:46:58 +00:00
Chris Lattner
30a2e1725f
Remove dead file
...
llvm-svn: 14459
2004-06-28 00:46:54 +00:00
Chris Lattner
9958350f42
Bad passes are gone
...
llvm-svn: 14458
2004-06-28 00:44:45 +00:00
Chris Lattner
924882f775
These passes are long dead/obsolete. They never worked in the first place
...
and are a maintenence burden. Nuke nuke nuke
llvm-svn: 14457
2004-06-28 00:44:18 +00:00
Chris Lattner
356b067d69
Remove two dead passes
...
llvm-svn: 14456
2004-06-28 00:43:25 +00:00
Chris Lattner
9b55c11c56
Moved IPModRef out of the public include dir
...
llvm-svn: 14455
2004-06-28 00:41:23 +00:00
Chris Lattner
8676ad8aee
Move file to lib/Analysis/DataStructure
...
llvm-svn: 14454
2004-06-28 00:40:43 +00:00
Chris Lattner
32c79788cc
Move DependenceGraph.* to lib/Analysis/DataStructure
...
llvm-svn: 14452
2004-06-28 00:32:33 +00:00
Chris Lattner
317f89301b
Moved to lib/analysis/datastructure
...
llvm-svn: 14451
2004-06-28 00:30:29 +00:00
Chris Lattner
135fb4be7c
Moving to lib/Analysis/DataStructure
...
llvm-svn: 14450
2004-06-28 00:29:42 +00:00
Chris Lattner
e0e1db012c
Moved to lib/Analysis/DataStructure
...
llvm-svn: 14449
2004-06-28 00:27:34 +00:00
Chris Lattner
dfe8056225
Move MemoryDepAnalysis.h into lib/Analysis/DataStructure
...
llvm-svn: 14448
2004-06-28 00:27:16 +00:00
Chris Lattner
b1775590e4
Moved to lib/Analysis/DataStructure
...
llvm-svn: 14447
2004-06-28 00:20:39 +00:00
Chris Lattner
f6729a3bcc
Move PgmDependenceGraph.h out of the public include hierarchy
...
llvm-svn: 14446
2004-06-28 00:20:04 +00:00
Brian Gaeke
81f67f60ec
Allow saving and restoring of double and float registers.
...
Allow copying of float registers.
llvm-svn: 14445
2004-06-27 22:59:56 +00:00
Brian Gaeke
b3d33c7994
Add FITOS, FITOD, and F{ADD,SUB,MUL,DIV}{S,D}.
...
llvm-svn: 14444
2004-06-27 22:53:56 +00:00
Chris Lattner
6e07936ed2
Implement InstCombine/add.ll:test21
...
llvm-svn: 14443
2004-06-27 22:51:36 +00:00
Chris Lattner
0da061fa1e
new testcase
...
llvm-svn: 14442
2004-06-27 22:51:19 +00:00
Brian Gaeke
187ff172b6
Support printing constant pool indices.
...
If we see an "unknown operand", abort so it's easier to fix it.
llvm-svn: 14441
2004-06-27 22:50:44 +00:00
Brian Gaeke
c81b5a5331
Trim whitespace.
...
Support cast of ints (and narrower) to float and double.
Support cast double to double (using load and store).
Abort if we see a CallInst or SetCondInst with long/fp args, instead
of producing bad code.
Support add, sub, mul, div of float and double.
llvm-svn: 14440
2004-06-27 22:47:33 +00:00
Chris Lattner
59b2c40286
Now that the SparcV9 specific MachineCodeForInstruction class uses it's own
...
map on the side, Instruction no longer has to be Annotable. This reduces
the size of the Instruction class by another 4 bytes (on a 32-bit system).
llvm-svn: 14439
2004-06-27 18:57:34 +00:00
Chris Lattner
d22d9cb800
Do not find these ugly sparc-specific objects by using the annotation API on
...
instructions. Instead, keep a map of instructions -> MCFI objects in the
already sparc-specific class MachineFunctionInfo. This will slow down the
sparc backend a bit, but it does not penalize the rest of LLVM!
llvm-svn: 14438
2004-06-27 18:52:17 +00:00
Chris Lattner
2b04d102f0
This class is no longer an annotation
...
llvm-svn: 14437
2004-06-27 18:50:49 +00:00
Chris Lattner
3a3bd6f29c
Add a map of MachineCodeForInstruction objects to MachineFunctionInfo
...
llvm-svn: 14436
2004-06-27 18:50:30 +00:00
Chris Lattner
dd7a707897
Fold iType into Value::VTy
...
llvm-svn: 14435
2004-06-27 18:38:48 +00:00
Chris Lattner
a7c0a11647
Eliminate the Instruction::iType field, folding it into the Value::VTy field.
...
This reduces the size of the instruction class by 4 bytes, and means that
isa<CallInst>(V) (for example) only needs to do one load from memory instead
of two.
llvm-svn: 14434
2004-06-27 18:38:24 +00:00
Chris Lattner
8e55b75913
Get rid of Annotable's vtable. If anyone deletes an object through an Annotable*,
...
they get what they deserve.
This reduces the size of Instruction & Function by 4 bytes each.
llvm-svn: 14433
2004-06-27 18:36:39 +00:00
Chris Lattner
6b62f225f6
Make it obvious that this file is bad bad bad
...
llvm-svn: 14432
2004-06-27 18:21:20 +00:00
Chris Lattner
60a29a77aa
User ctor is now inline
...
llvm-svn: 14431
2004-06-27 18:01:38 +00:00
Chris Lattner
d2f55b69e0
Make ctor inline, change ValueTy ->unsigned
...
llvm-svn: 14430
2004-06-27 18:01:15 +00:00
Chris Lattner
f758330347
Consider anything with a ValueType that is >= Instruction to be an instruction
...
llvm-svn: 14429
2004-06-26 20:51:50 +00:00
Chris Lattner
d0b0b454e5
Instancevar was renamed
...
llvm-svn: 14428
2004-06-26 20:33:39 +00:00
Chris Lattner
4a9134ecac
Rearrange some code.
...
llvm-svn: 14427
2004-06-26 20:33:27 +00:00
Chris Lattner
80d2d53fbf
Don't call getValueType directly. the LLVM optimizer will turn it into the same code anyway :)
...
llvm-svn: 14426
2004-06-26 19:40:40 +00:00
Chris Lattner
6fb22cd7ef
There is no reason to print ValueType here
...
llvm-svn: 14425
2004-06-26 19:36:34 +00:00
Chris Lattner
74e2acfcdd
Simplify code
...
llvm-svn: 14424
2004-06-26 19:31:26 +00:00
Chris Lattner
f11b67bb8f
Hey, why not just make 'new ReturnInst(BB)' DTRT?
...
llvm-svn: 14422
2004-06-25 23:10:30 +00:00
Chris Lattner
0c8053cace
new ReturnInst(BB) does not "do the right thing". Add an assert to catch it
...
sooner rather than later.
llvm-svn: 14421
2004-06-25 23:06:57 +00:00
Chris Lattner
3c53efa48b
Add credits entry
...
llvm-svn: 14420
2004-06-25 21:00:10 +00:00
Chris Lattner
9a844696f9
Fix relative links for nightly testers not hosted on llvm.cs.
...
Patch contributed by Vladimir Merzliakov!
llvm-svn: 14419
2004-06-25 20:57:19 +00:00
Chris Lattner
10247b13c0
Write .bc files to binary ostreams. This shouldn't change anything on unix,
...
but allows us to generate valid code on hosts (like windows) that do newline
translation for text files.
llvm-svn: 14418
2004-06-25 20:54:43 +00:00
Chris Lattner
4ba8a8d1ef
No functionality changes here:
...
* Some warning fixes for MSVC
* Minor simplification to the deque scanning code
llvm-svn: 14417
2004-06-25 20:52:10 +00:00
Misha Brukman
c52ea2574d
Allow debugging machine instrs (by printout) before/after isel and regalloc
...
llvm-svn: 14416
2004-06-25 19:57:47 +00:00
Misha Brukman
26e36e5758
Combine several if stmts with returns into an if-then-elseif-else chain.
...
llvm-svn: 14414
2004-06-25 19:24:52 +00:00
Misha Brukman
c22fd9a6a5
Do not move any values into registers for a void return (there isn't anything).
...
llvm-svn: 14413
2004-06-25 19:04:27 +00:00
Misha Brukman
b5932a5708
Convert tabs to spaces.
...
llvm-svn: 14412
2004-06-25 18:45:07 +00:00
Misha Brukman
5dbf760e00
Fix opcode: no immediate in an `or r1, r2, r3' (all registers) instr.
...
llvm-svn: 14411
2004-06-25 18:36:53 +00:00
John Criswell
726de6f9b0
Removed the interrupt_handler instrinsic section that I accidently added
...
in my previous commits. It's not implemented and is out of date.
llvm-svn: 14410
2004-06-25 16:42:50 +00:00
John Criswell
bcbb18c7a0
Grammar and punctuation fixes.
...
llvm-svn: 14409
2004-06-25 16:05:06 +00:00
Misha Brukman
c56b66f504
* Be consistent about MachineBB labels and references to them in instr stream
...
* Use MachineBB's built-in numbering system instead of reinventing one
llvm-svn: 14408
2004-06-25 15:42:10 +00:00
John Criswell
40db33f642
Added missing quote.
...
llvm-svn: 14407
2004-06-25 15:16:57 +00:00
Misha Brukman
a27375832b
* Initialize the entire array statically, not member-at-a-time
...
* Remove x86-specific comment re: intel vs. at&t assembly syntax
llvm-svn: 14406
2004-06-25 15:11:34 +00:00
Misha Brukman
468d9a0087
Fix bug in previous checkin.
...
llvm-svn: 14405
2004-06-25 14:57:19 +00:00
Misha Brukman
9ff1cda1a8
* Wrap long lines
...
* Replace silent fall-through FIXME comments with an error to cerr and an abort
* No need to set size of statically initialized arrays
llvm-svn: 14404
2004-06-25 14:50:41 +00:00
Misha Brukman
08b0e61841
Excise X86-specific comments.
...
llvm-svn: 14403
2004-06-25 14:13:26 +00:00
Misha Brukman
7ce853616d
Vladimir Prus also contributed the LowerConstantExprs pass.
...
llvm-svn: 14402
2004-06-25 13:37:03 +00:00
Chris Lattner
7f4222237d
New constant expression lowering pass to simplify your instruction selection needs.
...
Contributed by Vladimir Prus!
llvm-svn: 14399
2004-06-25 07:48:09 +00:00
Chris Lattner
8b0c935145
New testcase for constant expression lowering pass, contributed by Vladimir Prus!
...
llvm-svn: 14398
2004-06-25 07:47:13 +00:00
Chris Lattner
5ea1317e3c
Prototype for new ConstantExpr lowering pass, contributed by Vladimir Prus!
...
llvm-svn: 14397
2004-06-25 07:41:06 +00:00
Brian Gaeke
537851f6e7
Don't try to run qmtests if we fail to build the tree. The qmtests (at
...
least, on macosx) will spiral out of control instead of failing gracefully.
llvm-svn: 14396
2004-06-25 07:25:28 +00:00
Chris Lattner
e67d8400f6
Make sure to link all IPA's into opt, so that it has access to stuff like
...
anders-aa
llvm-svn: 14395
2004-06-25 05:19:17 +00:00
Chris Lattner
f019e346f4
Fix header
...
llvm-svn: 14394
2004-06-25 04:24:22 +00:00
Reid Spencer
1800529834
- Changed Handler.h -> BytecodeHandler.h
...
- Fixed some small coding standard compliance issues in BytecodeHandler.h
llvm-svn: 14393
2004-06-25 02:32:27 +00:00
Chris Lattner
6995c9bced
Okay, Module have not been known as 'C' for a LONG time now
...
llvm-svn: 14392
2004-06-25 00:42:23 +00:00
Chris Lattner
ccd8ed145a
Fix more warnings building with VC++
...
llvm-svn: 14391
2004-06-25 00:35:55 +00:00
Chris Lattner
6b9598db89
Unbreak the build. tsk tsk
...
llvm-svn: 14390
2004-06-25 00:18:02 +00:00
Tanya Lattner
23dbc8170c
Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
...
llvm-svn: 14389
2004-06-25 00:13:11 +00:00
Chris Lattner
521eb8752b
fix warnings
...
llvm-svn: 14388
2004-06-25 00:11:25 +00:00
Misha Brukman
5e3afa0d4c
Add option to print out machine code before register allocation.
...
llvm-svn: 14387
2004-06-24 23:55:01 +00:00
Misha Brukman
a79dd915b7
Use DEBUG() guard for printing out debug info.
...
llvm-svn: 14386
2004-06-24 23:54:05 +00:00
Misha Brukman
c45a5a369d
Add a `break' in the switch/case statement between the int/fp sections.
...
llvm-svn: 14385
2004-06-24 23:53:24 +00:00
Misha Brukman
a08a2363ec
* Lowercase the register names
...
* Parenthesize assert() expressions correctly
* Fix spacing around for() and if() statements
llvm-svn: 14384
2004-06-24 23:51:00 +00:00
Misha Brukman
3bac9e4430
Add a LowercaseString() utility function, courtesy of brg.
...
llvm-svn: 14383
2004-06-24 23:38:52 +00:00
Misha Brukman
c562342751
* LowercaseString moved to StringExtras.h
...
* Wrap long line to 80 cols
llvm-svn: 14382
2004-06-24 23:38:20 +00:00
Misha Brukman
842c710028
* Tabs to spaces
...
* Send an error message to std::cerr before abort()ing
llvm-svn: 14381
2004-06-24 23:19:36 +00:00
Reid Spencer
1c9d4f9678
Definition of the Bytecode Handler interface. Subclasses can override just
...
the methods they are interested in to perform out-of-band tasks while the
BytecodeReader is constructing a module. Handlers should *not* modify any
of the LLVM IR objects during this process.
llvm-svn: 14380
2004-06-24 23:05:07 +00:00
Misha Brukman
f62ee7a11b
* Tabs to spaces
...
* Remove unnecessary parens, braces, clean up code layout
llvm-svn: 14379
2004-06-24 23:04:11 +00:00
Misha Brukman
9adccb6a50
Unindent some more code to be consistent.
...
llvm-svn: 14377
2004-06-24 22:00:15 +00:00
Misha Brukman
1e057bf1b7
Unindent some code, it only needs 2 spaces.
...
llvm-svn: 14376
2004-06-24 21:56:15 +00:00
Misha Brukman
29b3dd7d35
In emitting code for a GEP instr, iterate over GEPTypes because there is one
...
more operand in GEPOps than there are types in GEPTypes: the pointer that is the
first operand of the GEP instruction.
llvm-svn: 14375
2004-06-24 21:54:47 +00:00
Misha Brukman
1c9de4699a
* Capitalize `Java'
...
* Sprinkle hypens liberally
* Fix some grammar in comments
llvm-svn: 14374
2004-06-24 21:47:35 +00:00
Misha Brukman
7d11fbf971
Convert tabs to spaces.
...
llvm-svn: 14373
2004-06-24 21:31:16 +00:00
Brian Gaeke
27966ba77b
Add FSTOD and FDTOS conversion instructions.
...
llvm-svn: 14372
2004-06-24 21:22:09 +00:00
Brian Gaeke
72490c8d86
Support cast float to float, cast double to float, and cast float to double.
...
(It's not yet clear how to copy doubles from register to register.)
llvm-svn: 14371
2004-06-24 21:22:08 +00:00
Chris Lattner
c4f2252374
Add a section about running the nightly tester proper.
...
llvm-svn: 14370
2004-06-24 20:53:09 +00:00
Vikram S. Adve
463556f889
This file is unused, and duplicates functionality in TraceValues.cpp.
...
llvm-svn: 14369
2004-06-24 20:16:22 +00:00
Chris Lattner
b9df0c004a
etags isn't portable at all. Make it not run by default. If you still
...
want it, just type 'make tags'
llvm-svn: 14368
2004-06-24 18:19:42 +00:00
Misha Brukman
f57c3cd1e8
* Order #includes
...
* Use the DEBUG() guard for debug printouts
llvm-svn: 14367
2004-06-24 17:31:42 +00:00
Brian Gaeke
eea4b17cf8
Make the double-fp pseudo registers be "NamedRegs".
...
llvm-svn: 14366
2004-06-24 09:23:21 +00:00
Brian Gaeke
2f6741f4f3
Fix a dyn_cast in copyConstantToRegister which should have been a cast.
...
Compactify the code that emits copies of constant ints into registers.
llvm-svn: 14365
2004-06-24 09:17:47 +00:00
Brian Gaeke
c605ae6754
The long integer pseudo-regs are history. So long, we hardly knew ye.
...
llvm-svn: 14364
2004-06-24 08:55:21 +00:00
Brian Gaeke
4ed2826ce5
Use correct add*Imm form in more BuildMI calls.
...
Fix bug in emitGEPOperation where we weren't passing MBB, IP to getReg.
(hey, wouldn't a constant expression lowering pass be cool? huh huhuhuh)
Fix bug in emitGEPOperation where we might try to OR a constant into a
register which was too big to fit in the immediate field.
Support and, or, xor of longs.
llvm-svn: 14363
2004-06-24 08:55:09 +00:00
Brian Gaeke
7777e66704
Rename the load and store opcodes. The non-fp ones only have one
...
variant worth worrying about; the fp ones have two.
llvm-svn: 14362
2004-06-24 07:37:12 +00:00
Brian Gaeke
c8e1b5abe8
Rename the load and store opcodes. The non-fp ones only have one
...
variant worth worrying about; the fp ones have two.
Add fp stores.
llvm-svn: 14361
2004-06-24 07:36:59 +00:00
Brian Gaeke
9f455efff1
Rename the load and store opcodes. The non-fp ones only have one
...
variant worth worrying about; the fp ones have two.
Stub out the case analysis of int-to-fp casts (no code yet).
I think the number of operands passed to BuildMI for loads was wrong.
Support load and store of float and double.
llvm-svn: 14360
2004-06-24 07:36:48 +00:00
Chris Lattner
5e08b93a34
Remove distasteful method which is really part of the indvars pass
...
llvm-svn: 14359
2004-06-24 06:52:20 +00:00
Chris Lattner
7a002d6010
Two fixes. First, stop using the ugly shouldSubstituteIndVar method.
...
Second, disable substitution of quadratic addrec expressions to avoid putting
multiplies in loops!
llvm-svn: 14358
2004-06-24 06:49:18 +00:00
Brian Gaeke
8863de761d
Strange as it may sound, we'll not use LDD/STD to store longs. For reasons of
...
representational consistency, we want to address the halves of each 64-bit value
separately.
llvm-svn: 14356
2004-06-24 06:44:57 +00:00
Brian Gaeke
1e8cc73ea3
Support constant cast expressions.
...
llvm-svn: 14355
2004-06-24 06:33:00 +00:00
Brian Gaeke
ae6fb8ae5c
Make the most commonly preselected instructions add to the names of the
...
instructions they augment, instead of replacing them. It's good for debugging,
and it's OK for the sparcv9 backend.
llvm-svn: 14353
2004-06-23 21:41:32 +00:00
Misha Brukman
8604fde39d
TransformUtils library is no longer needed since Linker.cpp is in VMCore
...
llvm-svn: 14352
2004-06-23 17:36:17 +00:00
Misha Brukman
28ee8f0f30
Linker.h moved to include/llvm/Support
...
llvm-svn: 14351
2004-06-23 17:33:09 +00:00
Misha Brukman
aff11a1001
Moved to include/llvm/Support
...
llvm-svn: 14350
2004-06-23 17:24:53 +00:00
Misha Brukman
09f04aa331
Linker.h moved to include/llvm/Support
...
llvm-svn: 14349
2004-06-23 17:24:31 +00:00
Misha Brukman
49bb82a4b8
Moved to lib/VMCore
...
llvm-svn: 14348
2004-06-23 17:21:17 +00:00
Reid Spencer
250b03184a
Move the tests for readability of the template and gnuplot files so they
...
occur AFTER the source is checked out. This ensures that if either of the
-gnuplotscript or -templatefile options are not given, that they get picked
up from the checkout directory and don't abort the test unnecessarily.
llvm-svn: 14346
2004-06-23 14:07:12 +00:00
Reid Spencer
2e44d8748c
Added a -noexternals options to avoid performing the externals tests on
...
test environments that don't have Povray or SPEC.
llvm-svn: 14345
2004-06-23 07:45:46 +00:00
Reid Spencer
64889c65e5
Make sure GetRegEx returns something gnuplot can deal with (a number, not
...
a ?) so that graphs don't bail if something fails in a test.
llvm-svn: 14344
2004-06-23 06:36:34 +00:00
Reid Spencer
3a4916ea32
Added a note about the new llvmgrep utility.
...
llvm-svn: 14343
2004-06-23 06:33:15 +00:00
Chris Lattner
0441388aff
Fix merging of nodes whose incoming offset is not zero. This unbreaks DSA on
...
several mallocbench programs, including perl.
llvm-svn: 14342
2004-06-23 06:29:59 +00:00
Brian Gaeke
1ea8447089
Use new IsNAN() wrapper.
...
llvm-svn: 14340
2004-06-23 00:25:35 +00:00
Brian Gaeke
a9a9696767
Provide prototypes for IsNAN() wrapper.
...
llvm-svn: 14339
2004-06-23 00:25:24 +00:00
Brian Gaeke
ef178a43dd
Wrapper for c99 isnan()
...
llvm-svn: 14338
2004-06-22 23:54:38 +00:00
Brian Gaeke
e9a33a8ff3
Regenerated.
...
It looks to me like people haven't been running AutoRegen.sh. Grumble grumble.
llvm-svn: 14337
2004-06-22 23:47:23 +00:00
Brian Gaeke
c77683ce1a
Regenerated.
...
llvm-svn: 14336
2004-06-22 23:47:13 +00:00
Brian Gaeke
bc9bff960a
Call custom check (AC_FUNC_ISNAN) instead of using the generic function check.
...
llvm-svn: 14335
2004-06-22 23:43:04 +00:00
Brian Gaeke
ba798f12d7
Implement isnan check (AC_FUNC_ISNAN) in terms of three calls to a fairly
...
generic macro AC_SINGLE_CXX_CHECK.
llvm-svn: 14334
2004-06-22 23:42:49 +00:00
John Criswell
3c99d0cc85
Added the llvm/test/Programs/Makefile.test Makefile.
...
Added a check for isnan() while I was at it.
llvm-svn: 14333
2004-06-22 21:35:10 +00:00
Brian Gaeke
5825bdd8b2
Add pseudo-registers and register class for 64-bit integer values.
...
llvm-svn: 14332
2004-06-22 20:14:41 +00:00
Brian Gaeke
255f1e1f88
link to qmtest-2.0.3 tar file
...
llvm-svn: 14331
2004-06-22 19:06:49 +00:00
Misha Brukman
44601805a6
File requires IPA, moved to lib/Analysis/IPA
...
llvm-svn: 14330
2004-06-22 19:04:53 +00:00
Misha Brukman
6c2cf08981
Mention a note about having gccas and gccld in the path when running llvm-gcc.
...
llvm-svn: 14328
2004-06-22 18:48:58 +00:00
Misha Brukman
c5300a4f04
File depends on MemoryDepAnalysis (DSA); moved to lib/Analysis/DataStructure
...
llvm-svn: 14327
2004-06-22 18:28:37 +00:00
Misha Brukman
df6339bee7
Files depend on DSA, moved to lib/Analysis/DataStructure
...
llvm-svn: 14326
2004-06-22 18:13:24 +00:00
Misha Brukman
ddc90adca3
File depends on DSA, moved to lib/Analysis/DataStructure
...
llvm-svn: 14325
2004-06-22 18:11:38 +00:00
Misha Brukman
cec9d0bcad
Making an archive version of the CodeGen library is unnecessary if we just
...
move InstructionLowering itself.
llvm-svn: 14324
2004-06-22 17:52:30 +00:00
Misha Brukman
be667731ae
Provide archive version of CodeGen library (for those tools that only need
...
IntrinsicLowering, for instance).
llvm-svn: 14323
2004-06-22 17:28:43 +00:00
Chris Lattner
f4dc3fd26e
Isnan became unordered
...
llvm-svn: 14322
2004-06-22 16:13:57 +00:00
Reid Spencer
7b27d08aa9
- Added the -nice option for nicing the build processes.
...
- Added the -gnuplotscript option to specify the GnuPlot script to use.
- Added the -templatefile option to specify the HTML template to use.
- Moved subroutines to top of file.
- Used variables for file names in case we want to change to directories.
- Made program track its directory changes in $VERBOSE mode (for debugging)
- Added variables to support tracking start time, finish time, and platform
details about each nightly test.
llvm-svn: 14321
2004-06-22 15:38:37 +00:00
Misha Brukman
c403338007
Regenerated with autoconf-2.57 for AIX detection support.
...
llvm-svn: 14320
2004-06-22 15:35:32 +00:00
Misha Brukman
fe16ae23c9
Add AIX to the list of recognized operating systems.
...
llvm-svn: 14319
2004-06-22 15:32:08 +00:00
Reid Spencer
3e8722fd9d
Added start time, finish time, and platform (uname -a output) information
...
to the top of the template for identification purposes.
llvm-svn: 14318
2004-06-22 15:32:02 +00:00
Tanya Lattner
f31fdf895b
Fixing broken links
...
llvm-svn: 14317
2004-06-22 08:02:25 +00:00
Chris Lattner
881d959fd4
If an edge points to a field of another memory object, actually reflect this
...
in the DOT visualization of the DSGraphs.
llvm-svn: 14316
2004-06-22 07:13:10 +00:00
Tanya Lattner
70d53125db
Removed extra href close tag
...
llvm-svn: 14315
2004-06-22 05:44:31 +00:00
Chris Lattner
b449daeaf0
Elimiante ^M's
...
llvm-svn: 14314
2004-06-22 04:47:34 +00:00
Tanya Lattner
8ed32be935
Fixed broken links.
...
llvm-svn: 14313
2004-06-22 04:24:55 +00:00
Tanya Lattner
ce33a1bea0
Fixing broken link to gcc manual
...
llvm-svn: 14312
2004-06-22 03:48:17 +00:00
Chris Lattner
cf237fc684
test/Libraries have been long gone for a long time now. Since noone noticed
...
tehse were broken, just nuke them.
llvm-svn: 14310
2004-06-22 02:26:33 +00:00
Tanya Lattner
31d8921d1d
Changing absolute link. Remembering to logout as root ;)
...
llvm-svn: 14309
2004-06-21 23:36:39 +00:00
Tanya Lattner
c197980246
Fixed small typo to symtab link.
...
llvm-svn: 14308
2004-06-21 23:29:40 +00:00
Tanya Lattner
c0b271710c
Just a stub command guide for llvm-db for now. Will be filled in later. This is not linked off the main command guide web page, but should be once its completed.
...
llvm-svn: 14307
2004-06-21 23:27:57 +00:00
Chris Lattner
53e5e2accc
Fix some broken links
...
llvm-svn: 14306
2004-06-21 22:52:48 +00:00
Misha Brukman
31f4df6b54
Order #includes as per style guide.
...
llvm-svn: 14305
2004-06-21 21:54:40 +00:00
Misha Brukman
a6619a9c3e
Use a reference instead of a pointer for the ostream. The pointer was only
...
there to assist in the development of llvm-tv, and it no longer has a need to
modify the AsmWriter output stream.
llvm-svn: 14304
2004-06-21 21:53:56 +00:00
Misha Brukman
96041e58b9
Direct declaration of namespace-ified globals does not work, must enclose
...
them with a namespace declaration.
llvm-svn: 14303
2004-06-21 21:44:12 +00:00
Misha Brukman
d0bf6f17d1
Specify variables' namespace directly instead of using an enclosing namespace.
...
llvm-svn: 14302
2004-06-21 21:21:49 +00:00
Misha Brukman
0bfea680bb
Move implemented interface header up to the top.
...
llvm-svn: 14301
2004-06-21 21:20:23 +00:00
Misha Brukman
c88c1ba066
Spell out `NoFramePointerElim'.
...
llvm-svn: 14300
2004-06-21 21:18:48 +00:00
Misha Brukman
c22299d21b
Spell out `NoFramePointerElim' for readability.
...
llvm-svn: 14299
2004-06-21 21:17:44 +00:00
Misha Brukman
5cb198a9c6
Use the common `NoFPElim' setting instead of our own.
...
llvm-svn: 14298
2004-06-21 21:10:24 +00:00
Misha Brukman
069ca067e1
Implement `NoFPElim' in a target-agnostic fashion so it can be shared.
...
llvm-svn: 14297
2004-06-21 21:08:45 +00:00
Misha Brukman
ebfd11ffb7
Make a single `NoFPElim' switch available to all targets.
...
llvm-svn: 14296
2004-06-21 21:07:51 +00:00
Misha Brukman
5e323e10df
* Make indentation consistent at 2 chars
...
* Doxygenify function comments
* Wrap code at 80 cols
llvm-svn: 14295
2004-06-21 20:22:03 +00:00
Misha Brukman
a97f29237e
This file is no longer applicable.
...
llvm-svn: 14294
2004-06-21 20:17:41 +00:00
Misha Brukman
cba6532e05
Let's be consistent: listing format `os/arch'.
...
llvm-svn: 14293
2004-06-21 18:43:23 +00:00
Misha Brukman
302df232b5
llvm/IntrinsicLowering.h => llvm/CodeGen/IntrinsicLowering.h
...
llvm-svn: 14292
2004-06-21 18:30:31 +00:00
Misha Brukman
6752fb58b6
Handle shifts >= 32 bits.
...
llvm-svn: 14291
2004-06-21 18:01:47 +00:00
Misha Brukman
11f74d7072
Intrinsic::isnan has gone away, support for it commented out.
...
Intrinsic::isunordered has arrived, and we just use the standard lowering
pass for it.
llvm-svn: 14290
2004-06-21 17:58:36 +00:00
Misha Brukman
c3a0b330c9
Convert tabs to spaces.
...
llvm-svn: 14289
2004-06-21 17:41:12 +00:00
Misha Brukman
254d2cf452
Type::getPrimitiveID() -> getTypeID()
...
llvm-svn: 14288
2004-06-21 17:25:55 +00:00
Misha Brukman
6292a056a8
Type::getPrimitiveID() -> getTypeID()
...
llvm-svn: 14287
2004-06-21 17:19:08 +00:00
Misha Brukman
e05203fb40
Initial revision
...
llvm-svn: 14283
2004-06-21 16:55:25 +00:00
Misha Brukman
e54cbdd478
Mention the requirement of dlcompat for MacOS X.
...
llvm-svn: 14282
2004-06-21 14:00:44 +00:00
Chris Lattner
4fbff990b0
Rename Interval class to LiveInterval to avoid conflicting with the already
...
existing llvm::Interval class.
Patch contributed by Vladimir Prus!
http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html
llvm-svn: 14281
2004-06-21 13:10:56 +00:00
Chris Lattner
265eb6469a
Make ConstantBool act like a 1 bit ConstantInt, in order to simplify client
...
code. Patch contributed by Vladimir Prus.
llvm-svn: 14280
2004-06-21 12:12:12 +00:00
Reid Spencer
afd6bfe736
Nullify this test as it causes infinite loop in optimized nightly test.
...
llvm-svn: 14279
2004-06-21 08:11:32 +00:00
Chris Lattner
f12c4a3d37
*FINALLY* Fix a really nasty nondeterministic bug that has been haunting us
...
since May 1st. In this code, the pred iterator was being invalidated sometimes
causing the wrong entries to be added to PHI nodes.
The fix for this is to defererence and safe the *PI value before we hack on
branch instructions, which changes use/def chains, which SOMETIMES invalidates
the iterator.
llvm-svn: 14278
2004-06-21 07:19:01 +00:00
Chris Lattner
46f60890a3
Comment out the isnan stuff until we get a proper autoconf test for it
...
breaking the build on sparc is not acceptable.
llvm-svn: 14277
2004-06-21 06:17:21 +00:00
Chris Lattner
1c676f76b6
Make order of argument addition deterministic. In particular, the layout
...
of ConstantInt objects in memory used to determine which order arguments
were added in in some cases.
llvm-svn: 14276
2004-06-21 00:07:58 +00:00
Chris Lattner
baaed7ee90
REALLY fix PR378: crash in scalar evolution analysis
...
llvm-svn: 14275
2004-06-20 20:32:16 +00:00
Reid Spencer
ca578611cc
Added a note about requiring QMTest 2.0.3 instead of any other version.
...
llvm-svn: 14274
2004-06-20 19:21:11 +00:00
Chris Lattner
b7a6a33ca9
Bug fixed
...
llvm-svn: 14273
2004-06-20 19:08:50 +00:00
Chris Lattner
6bfca8f5f1
Fix a bug in my change last night that caused a few test failures.
...
llvm-svn: 14270
2004-06-20 17:01:44 +00:00
Chris Lattner
5004e09ad2
IntrinsicLowering.cpp now lives in lib/CodeGen/
...
llvm-svn: 14269
2004-06-20 07:59:27 +00:00
Chris Lattner
58559b370a
Update path
...
llvm-svn: 14268
2004-06-20 07:53:22 +00:00
Chris Lattner
243561d74b
Header moved into the CodeGen directory
...
llvm-svn: 14267
2004-06-20 07:50:32 +00:00
Chris Lattner
bcdadf3765
Move the IntrinsicLowering header into the CodeGen directory, as per PR346
...
llvm-svn: 14266
2004-06-20 07:49:54 +00:00
Chris Lattner
4c96b0883f
Move the IntrinsicLowering header into the CodeGen directory
...
llvm-svn: 14265
2004-06-20 07:46:18 +00:00
Chris Lattner
5f142cfc4d
Start moving IntrinsicLowering out of VMCore into libcodegen, as per PR346
...
llvm-svn: 14264
2004-06-20 07:40:46 +00:00
Chris Lattner
eb3e84078d
Do not sort SCEV objects by address: instead sort by complexity and group
...
by address. This prevents the resultant SCEV objects from depending on
where in memory other scev objects happen to live.
llvm-svn: 14263
2004-06-20 06:23:15 +00:00
Chris Lattner
c9e06336ab
Make use of BinaryOperator::create* methods to shrinkify code.
...
llvm-svn: 14262
2004-06-20 05:04:01 +00:00
Chris Lattner
e6115e471c
Add methods like BinaryOperator::createAdd that take an instruction to insert
...
before.
llvm-svn: 14261
2004-06-20 05:02:56 +00:00
Chris Lattner
7d30a6c145
Fix the inliner to be deterministic, not letting its output depend on the
...
relative location of Function objects in memory.
llvm-svn: 14260
2004-06-20 04:11:48 +00:00
Chris Lattner
d537eb1264
Make fpcmp handle running off of the beginning or end of the file correctly.
...
llvm-svn: 14259
2004-06-20 03:12:18 +00:00
Chris Lattner
9734fd0980
Add some DEBUG output to the simplifycfg routines
...
Fix another non-deterministic behavior, this one should actually speed up the
code though as it was doing silly things.
llvm-svn: 14258
2004-06-20 01:13:18 +00:00
Reid Spencer
0277fd7b44
A utility to search the LLVM source tree for a grep pattern. This is a
...
replacement for getsrcs.sh which now generates too much text to put on a
Linux command line. The approach taken with llvmgrep is to execute a find
command and execute a grep on each file that matches the name pattern. The
arguments to this script are the same as those of egrep. Note that the -H
and -n options to egrep will always be passed so that you always get the
file and line number of matches.
llvm-svn: 14255
2004-06-19 20:32:55 +00:00
Chris Lattner
42ad646104
Now that dominator tree children are built in determinstic order, this horrible code
...
can go away
llvm-svn: 14254
2004-06-19 20:23:35 +00:00
Chris Lattner
39396e2df9
compute dominator tree children in a deterministic order that does not depend
...
on the address of BasicBlock objects in memory. This eliminates stuff like this:
Inorder Dominator Tree:
[1] %entry
[2] %loopentry
- [3] %loopexit
[3] %no_exit
- [4] %endif
[4] %then
+ [4] %endif
+ [3] %loopexit
[3] %return
llvm-svn: 14253
2004-06-19 20:13:48 +00:00
Chris Lattner
89f803bb32
Print out immediate dominators in program order, not in random order based on the address
...
of BasicBlock objects
llvm-svn: 14252
2004-06-19 20:04:47 +00:00
Chris Lattner
940b7ba5ad
This will hopefully fix a heisenbug that Vladimir Merzliakov is running
...
into valiantly trying to compile stuff on freebsd.
llvm-svn: 14251
2004-06-19 19:01:26 +00:00
Reid Spencer
006b386e6f
Add a note about GCC 3.3.2 optimization bug that causes llc to spin.
...
llvm-svn: 14250
2004-06-19 18:24:05 +00:00
Chris Lattner
4027500e1c
Fix a nasty bug, noticed by Reid
...
llvm-svn: 14249
2004-06-19 18:15:50 +00:00
Chris Lattner
ec2d34cc19
Fix one source of nondeterminism in the -licm pass: the hoist pass
...
was processing blocks in whatever order they happened to end up in the
dominator tree data structure. Force an ordering.
llvm-svn: 14248
2004-06-19 08:56:43 +00:00
Chris Lattner
4db0f8260a
Change to use the StableBasicBlockNumbering class
...
llvm-svn: 14247
2004-06-19 08:42:40 +00:00
Chris Lattner
d31410d824
Initial checkin of the StableBasicBlockNumbering, a little helper class for computing
...
(strangely enough) a stable (determinstic) numbering for basic blocks.
llvm-svn: 14246
2004-06-19 08:41:59 +00:00
Chris Lattner
feda9d0583
Fix a tiny bug in the -no-aa pass, in which it did not ever get a target data.
...
This is a regression from 1.2, though noone uses -no-aa anyway
llvm-svn: 14245
2004-06-19 08:05:58 +00:00
Chris Lattner
a52ab6f57f
Do not let the numbering of PHI nodes placed in the function depend on
...
non-deterministic things like the ordering of blocks in the dominance
frontier of a BB. Unfortunately, I don't know of a better way to solve
this problem than to explicitly sort the BB's in function-order before
processing them. This is guaranteed to slow the pass down a bit, but
is absolutely necessary to get usable diffs between two different tools
executing the mem2reg or scalarrepl pass.
Before this, bazillions of spurious diff failures occurred all over the
place due to the different order of processing PHIs:
- %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.0, uint 0, uint 0
+ %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.1, uint 0, uint 0
Now, the diffs match.
llvm-svn: 14244
2004-06-19 07:40:14 +00:00
Chris Lattner
b2b151d297
Do not sort by the address of LLVM ConstantInt* objects. This produces
...
nondeterministic results that depend on where these objects land in memory.
Instead, sort by the value of the constant, which is stable.
Before this patch, the -simplifycfg pass run from two different compilers
could cause different code to be generated, though it was semantically the
same:
@@ -12258,8 +12258,8 @@
%s_addr.1 = phi sbyte* [ %s, %entry ], [ %inc.0, %no_exit ] ; <sbyte*> [#uses=5]
%tmp.1 = load sbyte* %s_addr.1 ; <sbyte> [#uses=1]
switch sbyte %tmp.1, label %no_exit [
- sbyte 0, label %loopexit
sbyte 46, label %loopexit
+ sbyte 0, label %loopexit
]
We need to stomp all of this stuff out.
llvm-svn: 14243
2004-06-19 07:02:14 +00:00
Chris Lattner
b5f8eb8315
Do not loop over uses as we delete them. This causes iterators to be
...
invalidated out from under us. This bug goes back to revision 1.1: scary.
llvm-svn: 14242
2004-06-19 02:02:22 +00:00
Chris Lattner
2ef024b2c2
Bug fixed
...
llvm-svn: 14241
2004-06-19 01:11:02 +00:00
Chris Lattner
649154cace
Test for PR374
...
llvm-svn: 14240
2004-06-19 01:08:12 +00:00
Misha Brukman
0bca699edd
Fix relative link to the CVS mirrors.
...
llvm-svn: 14239
2004-06-18 20:18:31 +00:00
Chris Lattner
8c470182bb
Add link to the CVS mirror hosted by Reid
...
llvm-svn: 14238
2004-06-18 20:15:58 +00:00
Misha Brukman
5f056c78c1
Add link documenting shared/static library differences across platforms.
...
llvm-svn: 14237
2004-06-18 18:39:00 +00:00
Chris Lattner
3daf984f71
Bug fixed
...
llvm-svn: 14236
2004-06-18 17:57:29 +00:00
Misha Brukman
35d842e75f
Capitalize Cygwin.
...
llvm-svn: 14235
2004-06-18 15:54:54 +00:00
Misha Brukman
4b58581545
* Fix file header and name
...
* Order #includes alphabetically
llvm-svn: 14234
2004-06-18 15:38:49 +00:00
Misha Brukman
42a24823a1
Use the machine-independent method of querying the page size.
...
llvm-svn: 14233
2004-06-18 15:34:07 +00:00
Misha Brukman
5d87550ba7
Add a target-independent way to query page size.
...
llvm-svn: 14232
2004-06-18 15:30:25 +00:00
Brian Gaeke
5b433a5de9
.zero doesn't work in the Solaris assembler.
...
llvm-svn: 14231
2004-06-18 08:59:16 +00:00
Brian Gaeke
4125c92009
Get rid of selects the easy way
...
llvm-svn: 14230
2004-06-18 08:46:15 +00:00
Brian Gaeke
694f7b78d9
Make visitAllocaInst() look more like its X86 counterpart.
...
llvm-svn: 14229
2004-06-18 08:45:52 +00:00
Brian Gaeke
fcc30aca1b
Mess around with allocation order. In particular, I think we ought to be
...
using the local & in regs first because they are not clobbered by calls.
llvm-svn: 14228
2004-06-18 08:19:08 +00:00
Brian Gaeke
b42345811e
JMPL has a delay slot.
...
llvm-svn: 14227
2004-06-18 08:18:54 +00:00
Brian Gaeke
7d9af983de
Clean up the commented-out F3_3 stuff.
...
Replace it with a working class for FP instrs.
llvm-svn: 14226
2004-06-18 06:28:21 +00:00
Brian Gaeke
75f3738969
Fix jmpl.
...
Add some FP moves.
llvm-svn: 14225
2004-06-18 06:28:10 +00:00
Brian Gaeke
12ee9a1e75
Support printing base+offset pairs where the offset is a register.
...
Use this for printing the jmpl indirect-call instruction.
llvm-svn: 14224
2004-06-18 06:27:59 +00:00
Brian Gaeke
5ebab28a8a
Support intrinsic calls (although no particular intrinsics are supported yet).
...
Support indirect calls.
Support returning a float value.
llvm-svn: 14223
2004-06-18 06:27:48 +00:00
Chris Lattner
b7c4bac617
Calls to __builtin_isunordered and friends no longer cause llvmgcc to ICE.
...
llvm-svn: 14222
2004-06-18 06:26:29 +00:00
Chris Lattner
023a483c76
Implement Transforms/InstCombine/and.ll:test17, a common case that
...
occurs due to unordered comparison macros in math.h
llvm-svn: 14221
2004-06-18 06:07:51 +00:00
Chris Lattner
d5829aac27
New test
...
llvm-svn: 14220
2004-06-18 06:07:17 +00:00
Chris Lattner
1e1abdd6ed
Do not function resolve intrinsics. This prevents warnings and possible bad
...
things from happening due to
declare bool %llvm.isunordered(double, double)
declare bool %llvm.isunordered(float, float)
llvm-svn: 14219
2004-06-18 05:50:48 +00:00
Chris Lattner
b62fa74253
Test that C99 unordered comparison functions are not being turned into libc calls
...
llvm-svn: 14218
2004-06-18 05:42:50 +00:00
Brian Gaeke
51d3c7b05b
Add load instructions for floating-point registers.
...
llvm-svn: 14217
2004-06-18 05:19:27 +00:00
Brian Gaeke
21305c6f0c
Support alloca instructions.
...
Support copying floating-point constants to registers.
Add assertion to visitCallInst to abort if we hit a NULL calledFunction, for now.
llvm-svn: 14216
2004-06-18 05:19:16 +00:00
Chris Lattner
fdf197ff6e
Fix printing of Argument objects, problem found by Patrick Meredith
...
llvm-svn: 14215
2004-06-18 04:07:20 +00:00
Chris Lattner
388f43ac3d
New testcase for GCC unordered comparison builtins
...
llvm-svn: 14214
2004-06-18 03:39:56 +00:00
Chris Lattner
aa27623b99
Codegen sub C, X a little bit better for register pressure. Instead of
...
mov REG, C
sub REG, X
generate:
neg X
add X, C
which uses one less reg
llvm-svn: 14213
2004-06-18 00:50:37 +00:00
Chris Lattner
b30d12292a
Fold setcc instructions into select and branches that are not in the same BB as
...
the setcc.
llvm-svn: 14212
2004-06-18 00:29:22 +00:00
Brian Gaeke
c37af629b4
Make storeRegToStackSlot slightly shorter.
...
Make copyRegToReg return 1 instead of -1.
Edit a comment in emitPrologue().
llvm-svn: 14211
2004-06-17 22:34:48 +00:00
Brian Gaeke
eca9546dc3
Set the isBranch and isTerminator flags on branch instructions correctly.
...
Add a FIXME about the (currently unused) JMPL instructions.
llvm-svn: 14210
2004-06-17 22:34:29 +00:00
Brian Gaeke
63c1d6eda8
Emit stores correctly; don't fail an assertion.
...
llvm-svn: 14209
2004-06-17 22:34:19 +00:00
Brian Gaeke
c4ee938f55
Support generating machine instructions for Phi nodes (based on x86, but with
...
modifications for 1 LLVM BB --> many MBBs).
Fix store operand order: make it always be Base, Offset, SrcReg (think
"[ Base + Offset ] = SrcReg").
Rewrite visitBranchInst() to be even dumber (but working) -- give up on
the branch fallthrough trick, for the time being.
Make visitSetCondInst() work.
llvm-svn: 14208
2004-06-17 22:34:08 +00:00
Brian Gaeke
a067fb3e6b
Recognize more branches.
...
llvm-svn: 14207
2004-06-17 22:33:57 +00:00
Brian Gaeke
27b13253d9
I love the smell of a freshly broken PowerPC build in the morning.
...
llvm-svn: 14206
2004-06-17 22:27:04 +00:00
Brian Gaeke
4300ca9d32
Make debugging dumps w/ multiple MachineBBs for a given LLVM BB readable.
...
llvm-svn: 14205
2004-06-17 22:26:53 +00:00
Chris Lattner
7887da36de
Do not fold loads into instructions if it is used more than once. In particular
...
we do not want to fold the load in cases like this:
X = load
= add A, X
= add B, X
llvm-svn: 14204
2004-06-17 22:15:25 +00:00
Chris Lattner
f03f320b79
Fix compilation problem on freebsd. Problem noted by Vladimir Merzliakov in
...
PR371
llvm-svn: 14203
2004-06-17 21:20:52 +00:00
Brian Gaeke
2f2b5f5b93
Use addGlobalAddress and addMBB for call & branch targets instead of addPCDisp.
...
Abort if we see a PCRelativeDisp MachineOperand, to be safe. This matches
the X86 backend.
llvm-svn: 14202
2004-06-17 19:39:23 +00:00
Chris Lattner
6b7275996c
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
97bfcea262
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
Delete two functions that are now methods on the Type class
llvm-svn: 14200
2004-06-17 18:16:02 +00:00
Chris Lattner
395e219a1c
Minor cleanup
...
llvm-svn: 14199
2004-06-17 17:56:54 +00:00
Misha Brukman
b8561ebf21
Make header comment fit within 80 cols.
...
llvm-svn: 14198
2004-06-17 15:49:36 +00:00
Misha Brukman
a1237d00d6
Since the Great LLVM Tool Renaming(tm), we no longer have collisions between our
...
assembler/linker and the system equivalents.
llvm-svn: 14197
2004-06-17 15:39:58 +00:00
Brian Gaeke
661963c63f
Fix typo in DEBUG printout.
...
llvm-svn: 14196
2004-06-17 07:26:52 +00:00
Chris Lattner
6f4a596234
Fix a recent regression in Applications/sgefa that Alkis pointed out to me.
...
The vector may actually be empty if the register that we are marking as
recently used is not actually allocatable. This happens for physical registers
that are not allocatable, like the ST(x) registers on X86.
llvm-svn: 14195
2004-06-16 06:57:29 +00:00
Brian Gaeke
3b9474ecd7
Add int ferror(FILE *)
...
llvm-svn: 14194
2004-06-16 02:56:40 +00:00
Brian Gaeke
f6920d6f34
I'm afraid this doesn't exist.
...
llvm-svn: 14193
2004-06-16 00:26:45 +00:00
Brian Gaeke
20e09e5c7b
Um, did someone make a typo or something?
...
llvm-svn: 14192
2004-06-15 23:09:50 +00:00
Chris Lattner
fbf4dc3bd0
isnan is dead
...
llvm-svn: 14191
2004-06-15 21:52:58 +00:00
Chris Lattner
f64f794cad
llvm.isnan is dead, long live llvm.isunordered!
...
llvm-svn: 14190
2004-06-15 21:50:46 +00:00
Chris Lattner
7011d35594
Remove support for llvm.isnan. Alkis wins :)
...
llvm-svn: 14189
2004-06-15 21:48:07 +00:00
Chris Lattner
ee92bfca97
This testcase is a bit silly now, but oh well :)
...
llvm-svn: 14188
2004-06-15 21:46:16 +00:00
Chris Lattner
de2f567a20
Remove isnan support, correct isunordered support
...
llvm-svn: 14187
2004-06-15 21:42:23 +00:00
Chris Lattner
5a542aadc8
Remove support for the isnan intrinsic
...
llvm-svn: 14186
2004-06-15 21:37:54 +00:00
Chris Lattner
70dfc06e02
Add basic support for the isunordered intrinsic. The isnan stuff still needs to go
...
llvm-svn: 14185
2004-06-15 21:36:44 +00:00
Chris Lattner
75bcc59f1c
Right, stop being silly
...
llvm-svn: 14184
2004-06-15 21:29:40 +00:00
Chris Lattner
ce4ac095f0
Add a nan, stop testing isnan
...
llvm-svn: 14183
2004-06-15 21:29:01 +00:00
Brian Gaeke
476c73b241
Fix thinko in visitor... ShiftInsts should currently be delegated
...
to visitBinaryOperator.
llvm-svn: 14182
2004-06-15 21:09:46 +00:00
Chris Lattner
b1f0478f1d
Do not dereference end iterators. It's really bad for the asmwriter's health.
...
This possibly fixes PR370
llvm-svn: 14181
2004-06-15 21:07:32 +00:00
Brian Gaeke
675c0e9701
I think we'll use the standard lowering passes for now.
...
llvm-svn: 14179
2004-06-15 20:37:12 +00:00
Brian Gaeke
0c8ee30d53
Fix bug generating code for void call instructions: don't call
...
getReg() on void value.
llvm-svn: 14178
2004-06-15 20:06:32 +00:00
Brian Gaeke
065a6cb93a
Squash a warning from the Solaris assembler by aligning the stack
...
on a double-word boundary instead of a single-word boundary.
llvm-svn: 14177
2004-06-15 19:53:10 +00:00
Brian Gaeke
ad98a9b526
Allow special-casing of operand printing based on opcode. Print
...
non-register, non-immed. arguments to SETHI and OR using %hi() and
%lo() respectively.
llvm-svn: 14176
2004-06-15 19:52:59 +00:00
Brian Gaeke
19fbd28a06
Support constant GEP expressions.
...
Support copying long constants to register pairs.
Support copying ConstantPointerNulls and ConstantPointerRefs to registers.
llvm-svn: 14175
2004-06-15 19:16:07 +00:00
Misha Brukman
342693e35b
The correct prototype is `int atoi(CONST char*)'. Unbroke AIX build.
...
llvm-svn: 14173
2004-06-14 16:30:05 +00:00
Misha Brukman
bba0f0e492
Add file comment.
...
llvm-svn: 14172
2004-06-14 15:13:59 +00:00
Brian Gaeke
21370771ba
Quick hack to get this file compiling again on Mac OS X. The right thing to do
...
is write an autoconf macro that checks whether __isnan or isnan actually works
**using the C++ compiler after #include <cmath>**, instead of doing it the easy
way with AC_CHECK_FUNCS().
llvm-svn: 14171
2004-06-14 06:33:19 +00:00
Brian Gaeke
99c6539bce
Make -print-machineinstrs even stronger. You get to see the final code after
...
peepholing, and make it work the same way in the JIT as in LLC.
llvm-svn: 14170
2004-06-14 05:05:45 +00:00
Reid Spencer
d5a21b0575
Get rid of "might be uninitialized" warnings when compiling with GCC 3.3.2
...
llvm-svn: 14169
2004-06-13 19:17:49 +00:00
Alkis Evlogimenos
e395468ae5
Add constant folding capabilities to the isunordered intrinsic.
...
llvm-svn: 14168
2004-06-13 01:23:56 +00:00
Alkis Evlogimenos
0fa392310a
Really add the docs this time :-)
...
llvm-svn: 14167
2004-06-13 01:16:15 +00:00
Alkis Evlogimenos
cf9f8f1762
Make assertions more consistent with the rest of the intrinsic
...
function verification and make it a requirement that both arguments to
llvm.isunordered are of the same type.
llvm-svn: 14165
2004-06-13 00:55:26 +00:00
Alkis Evlogimenos
9d740629a0
Add the isunordered intrinsic.
...
llvm-svn: 14159
2004-06-12 19:19:14 +00:00
Reid Spencer
0a70ceb55f
Reduce the number of columns in the alpha index to 4 so that it fits
...
on a 1280x1024 screen!
llvm-svn: 14158
2004-06-12 14:46:02 +00:00
Chris Lattner
27f44fe1f8
It is no longer 2001
...
llvm-svn: 14157
2004-06-11 21:12:22 +00:00
Brian Gaeke
787ed2f377
Don't trim @PrevDays (causing an error) if it isn't long enough.
...
llvm-svn: 14156
2004-06-11 19:55:30 +00:00
Misha Brukman
fb35b09738
Fix grammar: 's is for possessive only.
...
llvm-svn: 14155
2004-06-11 16:50:21 +00:00
Reid Spencer
c0999e134e
Implement tracking of bytecode instruction size and the number of long
...
instructions generated.
llvm-svn: 14154
2004-06-11 15:10:38 +00:00
Reid Spencer
80ae844ea8
Add two options to the program:
...
-release causes ENABLE_OPTIMIZED=1 to be added to the make line so that
the test runs against optimized code.
-pedantic causes the CompileOptimizeOpts variable to be overridden to
add several additional warnings not picked up by -Wall. This
should help catch additional programming faux pas. See the diff
for the specific details.
llvm-svn: 14153
2004-06-11 07:06:22 +00:00
Chris Lattner
5888b5d4b1
Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
...
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions
on X86.
llvm-svn: 14152
2004-06-11 06:37:11 +00:00
Chris Lattner
66f313725c
llvm.isnan doesn't access memory
...
llvm-svn: 14151
2004-06-11 06:17:13 +00:00
Chris Lattner
ec941f7abb
Constant fold the isnan intrinsic
...
llvm-svn: 14150
2004-06-11 06:16:23 +00:00
Chris Lattner
b82f707e30
Add tests for isnan
...
llvm-svn: 14149
2004-06-11 06:16:13 +00:00
Chris Lattner
1c2be0e5a9
By far, one of the most common uses of isnan is to make 'isunordered'
...
comparisons. In an 'isunordered' predicate, which looks like this at
the LLVM level:
%a = call bool %llvm.isnan(double %X)
%b = call bool %llvm.isnan(double %Y)
%COM = or bool %a, %b
We used to generate this code:
fxch %ST(1)
fucomip %ST(0), %ST(0)
setp %AL
fucomip %ST(0), %ST(0)
setp %AH
or %AL, %AH
With this patch, we generate this code:
fucomip %ST(0), %ST(1)
fstp %ST(0)
setp %AL
Which should make alkis happy. Tested as X86/compare_folding.llx:test1
llvm-svn: 14148
2004-06-11 05:33:49 +00:00
Chris Lattner
858cb55a5c
Test that the X86 backend is only emitting one fucom instruction
...
for each 'COM =' line.
llvm-svn: 14147
2004-06-11 05:30:34 +00:00
Chris Lattner
71186e2fb6
Fix bug in previous checkin
...
llvm-svn: 14146
2004-06-11 05:22:44 +00:00
Chris Lattner
5ed9113e14
No really, these are dead now
...
llvm-svn: 14145
2004-06-11 04:50:14 +00:00
Chris Lattner
b35f47627d
Now that compare instructions aren't lumped in with the other twoargfp instructions,
...
we can get rid of the FpUCOM/FpUCOMi pseudo instructions, which makes stuff simpler
and faster.
llvm-svn: 14144
2004-06-11 04:49:02 +00:00
Chris Lattner
0876edf122
Introduce a new FP instruction type to separate the compare cases from the
...
twoarg cases.
llvm-svn: 14143
2004-06-11 04:41:24 +00:00
Chris Lattner
4e71aa84d5
Bug fixed, new feature
...
llvm-svn: 14142
2004-06-11 04:35:21 +00:00
Chris Lattner
26a964f88e
Add direct support for the isnan intrinsic, implementing test/Regression/CodeGen/X86/isnan.llx
...
testcase
llvm-svn: 14141
2004-06-11 04:31:10 +00:00
Chris Lattner
a0cfedef3a
Add support for the setp instructions
...
llvm-svn: 14140
2004-06-11 04:30:06 +00:00
Chris Lattner
94ff2c3210
Split compare instruction handling OUT of handleTwoArgFP into handleCompareFP.
...
This makes the code much simpler, and the two cases really do belong apart.
Once we do it, it's pretty obvious how flawed the logic was for A != A case,
so I fixed it (fixing PR369).
This also uses freeStackSlotAfter instead of inserting an fxchg then
popStackAfter'ing in the case where there is a dead result (unlikely, but
possible), producing better code.
llvm-svn: 14139
2004-06-11 04:25:06 +00:00
Reid Spencer
95290c7d33
Change tags rule to pipe output from find through etags command so that it
...
doesn't break on machines with limited command line lengths.
llvm-svn: 14138
2004-06-11 03:10:27 +00:00
Reid Spencer
c22be9f9d5
Revert an unneeded interface change to Instruction.h
...
llvm-svn: 14137
2004-06-11 03:06:43 +00:00
Chris Lattner
a5ddab2779
Testcase for PR369
...
llvm-svn: 14136
2004-06-11 02:59:47 +00:00
Chris Lattner
434cc49bca
Check to make sure that isnan doesn't require calling a function
...
llvm-svn: 14135
2004-06-11 02:54:54 +00:00
Chris Lattner
0c6db524d6
Fix lowering to work correctly
...
llvm-svn: 14134
2004-06-11 02:54:02 +00:00
Chris Lattner
8f40e35934
I misled Alkis: LLVM should have isnan, not isunordered.
...
isunordered(X, Y) === isnan(X) | isnan(Y)
Remove isunordered, add isnan.
Modernize testcase
llvm-svn: 14133
2004-06-11 02:29:57 +00:00
Chris Lattner
8f69c9e439
I misled Alkis: LLVM should have isnan, not isunordered.
...
isunordered(X, Y) === isnan(X) | isnan(Y)
Remove isunordered, add isnan.
llvm-svn: 14132
2004-06-11 02:29:43 +00:00
Chris Lattner
3b4f437526
Document the llvm.isnan intrinsic
...
llvm-svn: 14131
2004-06-11 02:28:03 +00:00
Brian Gaeke
522235efbf
Bug fixed.
...
llvm-svn: 14130
2004-06-11 02:15:39 +00:00
Brian Gaeke
5caed4e7dd
Test case for PR368
...
llvm-svn: 14129
2004-06-11 02:11:43 +00:00
Brian Gaeke
2655aab200
Turn loads of ConstantPointerNulls into loads of zero... don't spill
...
them into the constant pool.
llvm-svn: 14128
2004-06-11 02:03:48 +00:00
Alkis Evlogimenos
d0b5d0c7cc
Add the isunordered intrinsic.
...
llvm-svn: 14127
2004-06-11 01:08:18 +00:00
Alkis Evlogimenos
2baa85e8be
Add feature test for llvm intrinsics. It currently contains only the "isunordered" intrinsic
...
llvm-svn: 14126
2004-06-11 01:06:40 +00:00
Reid Spencer
c4bbb8f70b
Updated the BytecodeAnalysis data structure to contain additional fields
...
needed for analysis of individual functions.
llvm-svn: 14125
2004-06-10 22:28:11 +00:00
Reid Spencer
7e5d80033d
Added an isPhiNode(unsigned) static method to determine if an opcode is
...
a PhiNode or not. Needed by Bytecode Analyzer.
llvm-svn: 14124
2004-06-10 22:27:10 +00:00
Reid Spencer
8395e67fb1
Remove tabs.
...
llvm-svn: 14123
2004-06-10 22:03:00 +00:00
Reid Spencer
7670bbdfb9
Implement detailed function level data collection and reporting.
...
llvm-svn: 14122
2004-06-10 22:00:54 +00:00
Reid Spencer
90f0032664
Adjust prototypes to new Handler interface.
...
llvm-svn: 14121
2004-06-10 22:00:29 +00:00
Reid Spencer
2491b0959e
Make the parser deal with functions instead of just function types.
...
llvm-svn: 14120
2004-06-10 21:59:20 +00:00
Reid Spencer
b3a4e0b9bd
Clean up documentation and naming of variables.
...
llvm-svn: 14119
2004-06-10 18:38:44 +00:00
Misha Brukman
ffdffe1d76
Remove extra space.
...
llvm-svn: 14117
2004-06-10 12:51:35 +00:00
Reid Spencer
ff35cf92c5
Doxygenize a comment.
...
llvm-svn: 14115
2004-06-10 08:27:00 +00:00
Reid Spencer
1080b373a2
Made detailed output the default and changed -details option to -nodetails.
...
llvm-svn: 14114
2004-06-10 08:24:42 +00:00
Reid Spencer
8e5de9cd75
Implemented the bulk of the functionality. Cleaned up the code.
...
llvm-svn: 14113
2004-06-10 08:09:13 +00:00
Brian Gaeke
966938cff2
Allow dates with slashes in them in $DateRE.
...
Don't match on $Filename (which will be unset) if we hit 'UNMATCHABLE:'.
llvm-svn: 14112
2004-06-10 07:44:28 +00:00
Chris Lattner
175532bb1e
Fix the prolog epilog code inserter to match the documentation and support
...
targets whose stack grows up.
Patch contributed by Vladimir Prus
llvm-svn: 14111
2004-06-10 06:23:35 +00:00
Chris Lattner
6d6b3b3ce9
Fix the fixed stack offset, patch contributed by Vladimir Prus
...
llvm-svn: 14110
2004-06-10 06:19:25 +00:00
Chris Lattner
ee59d4bf04
Fix a bug in my checkin from last night that caused miscompilations of
...
186.crafty, fhourstones and 132.ijpeg.
Bugpoint makes really nasty miscompilations embarassingly easy to find. It
narrowed it down to the instcombiner and this testcase (from fhourstones):
bool %l7153_l4706_htstat_loopentry_2E_4_no_exit_2E_4(int* %i, [32 x int]* %works, int* %tmp.98.out) {
newFuncRoot:
%tmp.96 = load int* %i ; <int> [#uses=1]
%tmp.97 = getelementptr [32 x int]* %works, long 0, int %tmp.96 ; <int*> [#uses=1]
%tmp.98 = load int* %tmp.97 ; <int> [#uses=2]
%tmp.99 = load int* %i ; <int> [#uses=1]
%tmp.100 = and int %tmp.99, 7 ; <int> [#uses=1]
%tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=2]
%tmp.102 = cast bool %tmp.101 to int ; <int> [#uses=0]
br bool %tmp.101, label %codeRepl4.exitStub, label %codeRepl3.exitStub
codeRepl4.exitStub: ; preds = %newFuncRoot
store int %tmp.98, int* %tmp.98.out
ret bool true
codeRepl3.exitStub: ; preds = %newFuncRoot
store int %tmp.98, int* %tmp.98.out
ret bool false
}
... which only has one combination performed on it:
$ llvm-as < t.ll | opt -instcombine -debug | llvm-dis
IC: Old = %tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=1]
New = setne int %tmp.100, 0 ; <bool>:<badref> [#uses=0]
IC: MOD = br bool %tmp.101, label %codeRepl3.exitStub, label %codeRepl4.exitStub
IC: MOD = %tmp.97 = getelementptr [32 x int]* %works, uint 0, int %tmp.96 ; <int*> [#uses=1]
It doesn't get much better than this. :)
llvm-svn: 14109
2004-06-10 02:33:20 +00:00
Chris Lattner
c8e7e298c1
More minor cleanups
...
llvm-svn: 14108
2004-06-10 02:12:35 +00:00
Chris Lattner
df20a4d589
Eliminate many occurrances of Instruction::
...
llvm-svn: 14107
2004-06-10 02:07:29 +00:00
Chris Lattner
88ba175c1e
Share some code
...
llvm-svn: 14106
2004-06-10 01:57:38 +00:00
Chris Lattner
867653ad6a
Add new BinaryOperator::createAdd/Sub/... methods to avoid having to type
...
llvm::Instruction:: all of the time.
llvm-svn: 14105
2004-06-10 01:43:29 +00:00
Chris Lattner
68a038e6a1
Tolerate more errors
...
llvm-svn: 14104
2004-06-09 22:22:10 +00:00
Brian Gaeke
5b03a0628f
Encode %fsr correctly; don't fail an assertion.
...
llvm-svn: 14103
2004-06-09 21:54:59 +00:00
Brian Gaeke
87d8878f6d
Fix encoding of ST*FSR instructions.
...
llvm-svn: 14102
2004-06-09 21:54:58 +00:00
Brian Gaeke
87c75632ee
Fix assertion failure message to have the right method name.
...
llvm-svn: 14101
2004-06-09 20:44:42 +00:00
Chris Lattner
757ee0b533
Make the asmwriter much more tolerant of errors (which are common when working
...
on new front-ends and stuff). Also get rid of some tabs that snuck in.
llvm-svn: 14100
2004-06-09 19:41:19 +00:00
Reid Spencer
f8d610ca73
Columnized the compilation statistics for easier reading.
...
llvm-svn: 14099
2004-06-09 18:29:15 +00:00
Chris Lattner
4408630c67
Fix the really bizarre stuff that happened last night in the tester
...
due to non-numeric diff failures that caused fpcmp to go into infinite loops
llvm-svn: 14098
2004-06-09 18:28:53 +00:00
Reid Spencer
8beac69819
Made it possible for the printInfoComment method to invoke getSlot in
...
such a way that if the Value being printed is standalone that we don't
assert and abort but just print ":??" for the slot number instead.
llvm-svn: 14097
2004-06-09 15:26:53 +00:00
John Criswell
9095c64147
Fix for PR#366. We use getClassB() so that we can handle cast instructions
...
that cast to bool.
llvm-svn: 14096
2004-06-09 15:18:51 +00:00
Chris Lattner
35167c3087
Implement InstCombine/select.ll:test15*
...
llvm-svn: 14095
2004-06-09 07:59:58 +00:00
Chris Lattner
ce527c8e6d
More instcombine testcases
...
llvm-svn: 14094
2004-06-09 07:59:40 +00:00
Reid Spencer
2acee7e4d6
Cleanup alignment of output.
...
llvm-svn: 14093
2004-06-09 06:22:00 +00:00
Reid Spencer
1e47e066ad
Add some new fields for bytecode analysis.
...
llvm-svn: 14092
2004-06-09 06:18:53 +00:00
Reid Spencer
cc4e35a404
Implement analysis output. Don't dump function details unless requested.
...
llvm-svn: 14091
2004-06-09 06:17:58 +00:00
Reid Spencer
839fa681f6
Implement some rudimentary analysis.
...
llvm-svn: 14090
2004-06-09 06:16:43 +00:00
Reid Spencer
f1598b0efa
Clean up indentation of file body output.
...
Don't dump functions unless "detailedResults" is requested.
llvm-svn: 14089
2004-06-09 06:16:19 +00:00
Reid Spencer
fc6f5508aa
Move parsing details to Parser.cpp.
...
llvm-svn: 14088
2004-06-09 06:15:21 +00:00
Reid Spencer
670c26d3af
Bring some things out of header files that belong only in this file.
...
llvm-svn: 14087
2004-06-09 06:14:52 +00:00
Chris Lattner
396dbfe327
Be more careful about the order we put stuff onto the worklist. This allow us to
...
collapse this:
bool %le(int %A, int %B) {
%c1 = setgt int %A, %B
%tmp = select bool %c1, int 1, int 0
%c2 = setlt int %A, %B
%result = select bool %c2, int -1, int %tmp
%c3 = setle int %result, 0
ret bool %c3
}
into:
bool %le(int %A, int %B) {
%c3 = setle int %A, %B ; <bool> [#uses=1]
ret bool %c3
}
which is handy, because the Java FE makes these sequences all over the place.
This is tested as: test/Regression/Transforms/InstCombine/JavaCompare.ll
llvm-svn: 14086
2004-06-09 05:08:07 +00:00
Chris Lattner
7ed7d82512
New testcase that is important for the Java FE
...
llvm-svn: 14085
2004-06-09 05:07:01 +00:00
Reid Spencer
e73febc64a
Cleaned up a dead header file to prevent duplicate definition warnings
...
in doxygen.
llvm-svn: 14084
2004-06-09 04:38:34 +00:00
Chris Lattner
2dd017402b
Implement select.ll:test14*
...
llvm-svn: 14083
2004-06-09 04:24:29 +00:00
Chris Lattner
52d7430fc5
New testcase for the instruction combiner that happen often in the Java FE
...
llvm-svn: 14082
2004-06-09 04:23:57 +00:00
Chris Lattner
0c09852909
Minor tweaks
...
llvm-svn: 14081
2004-06-09 03:59:05 +00:00
Reid Spencer
4d598edc59
Regularize title of Regression Test section. Clean up some blank space.
...
llvm-svn: 14080
2004-06-09 02:07:25 +00:00
Chris Lattner
4769612be1
Bug fixed
...
llvm-svn: 14079
2004-06-09 01:09:16 +00:00
Chris Lattner
74248512eb
Workaround or a VS miscompilation bug
...
llvm-svn: 14078
2004-06-08 23:21:39 +00:00
Chris Lattner
8b52a68356
I checked and no clients expect this to return null for unconditional branches
...
Simplify code and make it more uniform.
llvm-svn: 14077
2004-06-08 22:03:05 +00:00
Chris Lattner
4c7a24af44
Don't grab the condition of unconditional branches!
...
This fixes PR363
llvm-svn: 14076
2004-06-08 21:50:30 +00:00
Brian Gaeke
c365e7cc99
Fix a minor bug in the map - since this pass adds a global symbol, it must be
...
accounted for in the map (at least, in its current format).
llvm-svn: 14075
2004-06-08 20:08:30 +00:00
Brian Gaeke
78d03b523f
Add a forwarding method pop_front() that allows you to delete instructions
...
from the beginning of a MBB.
llvm-svn: 14074
2004-06-08 18:52:47 +00:00
Brian Gaeke
76b6426a8c
Add a TmpInstruction ctor that doesn't take a MCFI.
...
llvm-svn: 14073
2004-06-08 18:52:46 +00:00
Brian Gaeke
223b345279
Explicitly specify libtool tag "CXX" so that if you setenv CXX to something
...
libtool can't parse, e.g., "/path/to/g++ -some-funny-options",
then it will still be able to compile and link.
llvm-svn: 14072
2004-06-08 18:52:45 +00:00
Chris Lattner
a20f4aab7f
Fix a link error using VS8.0
...
llvm-svn: 14071
2004-06-08 17:53:24 +00:00
Chris Lattner
4409487746
Apparently a particular vendor compiler uses the struct/class tag to MANGLE
...
symbols with. Therefore, if you do not use struct/class consistently, you can
get LINK ERRORS. grr.
This fixes the link errors for libsupport and vmcore.
-Chris
llvm-svn: 14070
2004-06-08 17:44:21 +00:00
Misha Brukman
23c2f67fda
Fix case of doxygen directive `\p': it's lowercase.
...
llvm-svn: 14068
2004-06-08 13:49:17 +00:00
Reid Spencer
7d4b814e86
* Fix indentation of Regression Test Results by making sure the
...
GetQMTestResults function closes all its open tags.
* Cause XFAIL results to not be reported at all except in the stats.
llvm-svn: 14067
2004-06-08 08:01:33 +00:00
Reid Spencer
b14a0a69fc
Put in a place holder for describing the differences in bytecode format
...
between LLVM versions. This is just a reminder so I don't forget to
document it.
llvm-svn: 14066
2004-06-08 07:41:41 +00:00
Reid Spencer
850f85f81f
Add a note about llvm-abcd, the Analysis of ByteCode Dumper
...
llvm-svn: 14065
2004-06-08 07:30:31 +00:00
Chris Lattner
bd948cfe38
Ooh, that fixed the annoying warning!!
...
llvm-svn: 14064
2004-06-08 07:19:29 +00:00
Chris Lattner
25b3a03e17
Bug fixed
...
llvm-svn: 14063
2004-06-08 07:15:52 +00:00
Chris Lattner
79dd360555
New testcase for PR355
...
llvm-svn: 14062
2004-06-08 07:11:14 +00:00
Chris Lattner
12eb60f213
Testcase for PR355
...
llvm-svn: 14061
2004-06-08 07:10:11 +00:00
Chris Lattner
522ef67fb2
Add documentation to the TargetFrameInfo class, contributed by Vladimir Prus
...
llvm-svn: 14060
2004-06-08 06:23:17 +00:00
Reid Spencer
ddc6fb125e
Clean up the documentation.
...
Simplify the file handling. It now only writes to std::cout.
llvm-svn: 14059
2004-06-08 05:56:58 +00:00
Reid Spencer
2eb0f1d44c
Clean up documentation and make it possible for the BytecodeAnalyzer to
...
store the output of the bytecode dumper.
llvm-svn: 14058
2004-06-08 05:55:53 +00:00
Reid Spencer
42427f0ccb
Fix the bug that was preventing the parser from working on all bytecode
...
files. It was reading non-initialized global vars when the flag said it was
initialized and vice versa. Causes mis-alignment since initialized and
non-initialized constants have different bytecode lengths.
llvm-svn: 14057
2004-06-08 05:54:47 +00:00
Reid Spencer
2c5613d1c3
Make it #include Parser.h instead of AnalyzerInternals.h since it only
...
needs the BytecodeHandler interface which is now in Parser.h
llvm-svn: 14056
2004-06-08 05:53:14 +00:00
Reid Spencer
621a4ad111
Adjust what's included to compensate for changes in Parser.h
...
llvm-svn: 14055
2004-06-08 05:52:29 +00:00
Reid Spencer
fbe659d435
Merged BytecodeHandler.h into Parser.h since the parser and the handler
...
must always coexist. Cleaned up the documentation on these interfaces
significantly. This is in preparation for moving Parser.h to the include
directories to make it a public interface.
llvm-svn: 14054
2004-06-08 05:51:18 +00:00
Chris Lattner
71dbebf411
Fix PR361.
...
Dominance properties don't hold in unreachable code
llvm-svn: 14053
2004-06-07 23:07:33 +00:00
Chris Lattner
3b2e067386
New testcase for PR361
...
llvm-svn: 14052
2004-06-07 23:07:09 +00:00
Chris Lattner
07ab2d1d2d
Make all of this functionality work directly on win32. Properly conditionalize
...
system specific stuff on HAVE_MKSTEMP
llvm-svn: 14051
2004-06-07 19:37:24 +00:00
Chris Lattner
6068345cc5
Implement getTimeRecord natively in Win32, properly conditionalize the
...
getrusage implementation on HAVE_GETRUSAGE
llvm-svn: 14050
2004-06-07 19:34:51 +00:00
Chris Lattner
bbc373bf8b
Eliminate more traces of the -c option
...
llvm-svn: 14049
2004-06-07 18:10:01 +00:00
Reid Spencer
db5c86d0b1
Commit For New Tool: llvm-abcd (Analysis of ByteCode Dumper). This tool
...
will (eventually) provide statistical analysis of bytecode files as well
as the ability to dump them in a low level format (slot numbers not
resolved). The purpose of this is to aid in the Type!=Value change of
bug 122. With this initial release, llvm-abcd merely dumps out the
bytecode. However, the infrastructure for separating bytecode parsing from
handling the parsing events is in place. The style chosen is similar to
SAX XML parsing where a handler object is called to handlign the parsing
events. This probably isn't useful to anyone but me right now as there is
no analysis yet, and the dumper doesn't work on every bytecode file. It
will probably be useful by the end of this week. Note that there is some
duplication of code from the bytecode reader. This was done to eliminate
errors from being introduced in the reader and to minimize the impact to
other LLVM developers. At some point, the Analyzer and the Reader will be
integrated to use the same infrastructure. Also, sorry for the minor change
to Instruction.h but I just couldn't bring myself to write code that
depends on Instruction internals.
llvm-svn: 14048
2004-06-07 17:53:43 +00:00
John Criswell
b0a352c94f
Added checks for mkstemp and getrusage.
...
llvm-svn: 14047
2004-06-07 14:26:24 +00:00
Chris Lattner
2738b7ea61
Add some notes so I can throw away one of my many todo lists.
...
llvm-svn: 14046
2004-06-05 20:12:36 +00:00
Chris Lattner
307e1df0d1
Fix GCC warning
...
llvm-svn: 14045
2004-06-05 17:44:48 +00:00
Chris Lattner
08d1b9db1e
Fix GCC warnings
...
llvm-svn: 14044
2004-06-05 17:43:52 +00:00
Reid Spencer
1253fb9d83
Fix a few typos, spellos, grammaros.
...
llvm-svn: 14043
2004-06-05 14:39:24 +00:00
Reid Spencer
242ddb92bc
Add "work in progress" warning.
...
llvm-svn: 14042
2004-06-05 14:18:02 +00:00
Alkis Evlogimenos
2c0735446b
Include cerrno.
...
llvm-svn: 14041
2004-06-05 08:59:43 +00:00
Chris Lattner
0d63958706
Remove an unused variable.
...
Work around for bogus errors: no those static functions don't need to
be executed to be initialized!
llvm-svn: 14040
2004-06-05 01:05:19 +00:00
Chris Lattner
0a5f63d5f4
Macros are baaad.
...
llvm-svn: 14039
2004-06-05 00:54:11 +00:00
Chris Lattner
28461fa83c
Don't #include <unistd.h> directly, go through the config files
...
llvm-svn: 14038
2004-06-05 00:27:38 +00:00
Chris Lattner
c5e0be647c
Add missing #include
...
llvm-svn: 14037
2004-06-05 00:24:59 +00:00
Chris Lattner
61bd8b3810
Work around VS bug
...
llvm-svn: 14036
2004-06-05 00:22:04 +00:00
Chris Lattner
2e7ceee89f
Warning foo
...
llvm-svn: 14035
2004-06-05 00:17:13 +00:00
Chris Lattner
708ee9d965
As much as I dislike doing this, it's the only fix for VC8.0 that I can come
...
up with, even though it's perfectly conformant code. :(
llvm-svn: 14034
2004-06-05 00:11:27 +00:00
Chris Lattner
5c391ce004
Remove unused var
...
llvm-svn: 14033
2004-06-05 00:03:27 +00:00
Chris Lattner
aa6ff271d0
Squelch a warning
...
llvm-svn: 14032
2004-06-04 23:53:20 +00:00
Chris Lattner
42d5b0878b
Delete some unreachable code
...
llvm-svn: 14031
2004-06-04 23:52:36 +00:00
Misha Brukman
21bbdb9533
* No more CachedWriter::setStream()
...
* ostream is back to being a reference instead of a pointer
* Output single characters as chars, not as length-1 strings
llvm-svn: 14030
2004-06-04 21:11:51 +00:00
Misha Brukman
a415858fc2
Revert ostream back to reference: the only user (llvm-tv) no longer needs it.
...
llvm-svn: 14029
2004-06-04 21:10:35 +00:00
Chris Lattner
603b1ca393
Add some constants for VC
...
llvm-svn: 14028
2004-06-04 20:58:34 +00:00
Brian Gaeke
78faa9a9e6
Fix up some spacing & fix a typo in an assertion in cpValue2Value.
...
llvm-svn: 14027
2004-06-04 20:51:40 +00:00
Chris Lattner
dcffa86719
Ugh, apparently there is no common ground here.
...
llvm-svn: 14026
2004-06-04 20:48:51 +00:00
Chris Lattner
214e58ded5
Fix a *really* dumb warning on VC
...
llvm-svn: 14025
2004-06-04 20:47:19 +00:00
Chris Lattner
a429db82bf
Fix more warnings
...
llvm-svn: 14024
2004-06-04 20:39:05 +00:00
Chris Lattner
fd427c1edd
Remove support for printing strings from the cached writer
...
llvm-svn: 14023
2004-06-04 20:34:51 +00:00
Chris Lattner
75019ba397
Don't send random junk to CachedWriter's. Also remove a cast that could be
...
problematic when Type does not derive from Value.
llvm-svn: 14022
2004-06-04 20:25:55 +00:00
Chris Lattner
875779a87a
GCC doesn't like prefix form of cast with two identifiers I guess.
...
llvm-svn: 14021
2004-06-04 20:21:53 +00:00
Chris Lattner
1278759a2c
Squish a warning
...
llvm-svn: 14020
2004-06-04 20:14:29 +00:00
Chris Lattner
505b2c6b77
Silence a warning
...
llvm-svn: 14019
2004-06-04 20:10:17 +00:00
Chris Lattner
a36804a2ff
Add ssize_t for VC++
...
llvm-svn: 14018
2004-06-04 20:06:33 +00:00
Chris Lattner
49dc039eeb
<io.h> provides read/write/open/...
...
llvm-svn: 14017
2004-06-04 20:05:35 +00:00
Chris Lattner
5cc1b64528
Visual C has something resembling a stat function, but it doesn't provide S_ISREG
...
llvm-svn: 14016
2004-06-04 20:03:06 +00:00
Chris Lattner
3df4beffa5
Make this work on VC++, pull the HAVE_ALLOCA_H case out instead of duplicating
...
it. This code can probably be dramatically simplified, as I suspect that the
pragma and other stuff is not needed with C++ compilers.
llvm-svn: 14015
2004-06-04 19:25:50 +00:00
Chris Lattner
72e76982f7
Add more needed typedefs
...
llvm-svn: 14014
2004-06-04 19:11:04 +00:00
Chris Lattner
b80110f667
Add explicit casts to silence warnings. There is no need to use snprintf here.
...
llvm-svn: 14013
2004-06-04 19:10:30 +00:00
Chris Lattner
5034a983ff
Make this work with VC++
...
llvm-svn: 14012
2004-06-04 19:01:49 +00:00
Chris Lattner
1d79ba7edb
Fix a nasty bug that caused areAliases to always return false.
...
Bug fix courtesy of Anshu Dasgupta
llvm-svn: 14011
2004-06-04 17:03:11 +00:00
Misha Brukman
aff10d0461
Emit a more sensible error message if no subclasses of Target are defined.
...
Patch contributed by Vladimir Prus.
llvm-svn: 14010
2004-06-04 14:59:42 +00:00
Misha Brukman
57c586cf78
Clarify documentation and use correct doxygen comment form /// vs. // .
...
Thanks to Vladimir Prus for corrections.
llvm-svn: 14009
2004-06-04 14:51:25 +00:00
Chris Lattner
881cc1549f
Fix extraneous tag
...
llvm-svn: 14008
2004-06-04 00:40:53 +00:00
Chris Lattner
a7fac9566d
New doc
...
llvm-svn: 14007
2004-06-04 00:40:11 +00:00
Chris Lattner
b4e5664f98
Fix PR356: [doc] lib/Target/X86/README.txt needs update
...
Also add some documentation about how instructions work
llvm-svn: 14006
2004-06-04 00:16:02 +00:00
Chris Lattner
add9f29fdf
This file is obsolete
...
llvm-svn: 14005
2004-06-04 00:15:21 +00:00
Brian Gaeke
2948d2e724
Honor DISABLE_CBE, etc., even when doing the "running tests" (i.e., Olden)
...
llvm-svn: 14004
2004-06-04 00:07:12 +00:00
Misha Brukman
1d3b7a3f52
Fix broken internal link; add stub for missing subsection.
...
llvm-svn: 14003
2004-06-03 23:47:34 +00:00
Misha Brukman
3155159ef9
Fix broken internal link.
...
llvm-svn: 14002
2004-06-03 23:42:24 +00:00
Misha Brukman
d72c7f9fc9
GCSE has suddenly become a struct, not a class; fix broken link.
...
llvm-svn: 14001
2004-06-03 23:39:36 +00:00
Misha Brukman
18a94d6f21
Fix more broken links as a result of the llvm namespace.
...
llvm-svn: 14000
2004-06-03 23:35:54 +00:00
Misha Brukman
aa8db1845e
Fix broken internal links.
...
llvm-svn: 13999
2004-06-03 23:33:10 +00:00
Misha Brukman
fdcb3c209c
Fix broken links as a result of the llvm namespace.
...
llvm-svn: 13998
2004-06-03 23:29:12 +00:00
Chris Lattner
10ee9654c9
Fix some broken links
...
llvm-svn: 13997
2004-06-03 22:57:15 +00:00
Chris Lattner
249b3558bc
CQ bug implemented
...
llvm-svn: 13996
2004-06-03 22:35:13 +00:00
Chris Lattner
e0c83d2566
The prototype for ParseCommandLineOptions changed at some point, but this
...
was never updated. I guess GCC just ignores the prototype
llvm-svn: 13995
2004-06-03 22:07:26 +00:00
Brian Gaeke
0a71673115
Allow script to set configure args.
...
Allow environment to set llvmgccdir.
llvm-svn: 13994
2004-06-03 21:46:56 +00:00
Chris Lattner
5a8676a3f8
Adjust argument to match destination data type
...
llvm-svn: 13993
2004-06-03 21:14:56 +00:00
Chris Lattner
9e650d4583
Don't use identifiers that start with an _
...
llvm-svn: 13992
2004-06-03 21:12:02 +00:00
Chris Lattner
a24b5d0286
Only use the non-standards-compliant std::distance on the compiler that is
...
buggy, not for all compilers that are not GCC 3
llvm-svn: 13990
2004-06-03 18:48:59 +00:00
Misha Brukman
94192b638c
Specify div type "doc_text" to get proper indentation for paragraphs.
...
llvm-svn: 13989
2004-06-03 16:59:59 +00:00
Misha Brukman
df55bdfb5f
Add a hyphen.
...
llvm-svn: 13988
2004-06-03 16:55:57 +00:00
Misha Brukman
d888b5d54e
Properly close the footer paragraph.
...
llvm-svn: 13987
2004-06-03 15:25:16 +00:00
Misha Brukman
b18cc84921
Wrap long lines.
...
llvm-svn: 13986
2004-06-03 15:23:59 +00:00
Misha Brukman
313373d4d7
Fix case of doxygen directive \p.
...
llvm-svn: 13985
2004-06-03 15:14:00 +00:00
Chris Lattner
f75832b015
* Verify function prototypes, not just functions with bodies.
...
* Verify that functions do not take aggregates as arguments.
llvm-svn: 13984
2004-06-03 06:38:43 +00:00
Brian Gaeke
6973e85b16
Add new internal-global-symbol mapping info pass... may its life be short
...
and sweet.
llvm-svn: 13983
2004-06-03 05:03:37 +00:00
Brian Gaeke
a9c5779a86
Expand head-of-file comment.
...
llvm-svn: 13982
2004-06-03 05:03:02 +00:00
Brian Gaeke
0a48c0d913
Add new mapping info pass, when EmitMappingInfo is on.
...
llvm-svn: 13981
2004-06-03 05:03:01 +00:00
Brian Gaeke
25c6fa0e83
Fix big mistake in my last checkin... the big question is, how did I ever
...
get this to link before?
llvm-svn: 13980
2004-06-03 05:03:00 +00:00
Brian Gaeke
11cfb090b8
Add decl. for new mapping info pass factory method.
...
llvm-svn: 13979
2004-06-03 05:02:59 +00:00
Chris Lattner
1c0a0e2e36
Add -disable-codegen option to disable LLC and JIT targets
...
llvm-svn: 13978
2004-06-03 03:29:39 +00:00
Brian Gaeke
dca24ddfc7
Collapse together the abstract superclass TargetRegInfo and SparcV9RegInfo, its
...
only concrete implementation.
llvm-svn: 13977
2004-06-03 02:45:09 +00:00
Chris Lattner
f55aa9c49c
Recognize cygwin
...
llvm-svn: 13976
2004-06-02 23:32:17 +00:00
Chris Lattner
4f816d2e38
<alloca.h> on cygwin pulls in a ton of stuff (macros and function protos)
...
that we REALLY don't want in the CBE code.
With this fix, the CBE passes all of the MultiSource tests on cygwin that
it does on linux. Yaay!
llvm-svn: 13975
2004-06-02 23:10:26 +00:00
Brian Gaeke
60f37d6df7
Another pod
...
llvm-svn: 13969
2004-06-02 20:55:52 +00:00
Brian Gaeke
51b3ef02ad
The llvm-dis.html page was a little out of date, but this pod file can supersede it.
...
llvm-svn: 13968
2004-06-02 20:45:25 +00:00
Chris Lattner
0379351667
Update to include llc on x86 and other systems
...
llvm-svn: 13967
2004-06-02 20:37:02 +00:00
Brian Gaeke
e35ca2ec1c
Tasty, tasty pods...
...
llvm-svn: 13966
2004-06-02 20:29:49 +00:00
Chris Lattner
05a292a37f
The -q option is gone
...
llvm-svn: 13965
2004-06-02 19:51:09 +00:00
Chris Lattner
7113171f63
The --enable-correct-eh-support option is meaningless when provided to
...
gccas.
llvm-svn: 13964
2004-06-02 19:30:23 +00:00
Chris Lattner
8c85ec93be
cygwin apparently doesn't have widechar support. But when disabled, the whole
...
C/C++ front-end and runtime libraries finally build!
llvm-svn: 13963
2004-06-02 19:27:50 +00:00
Chris Lattner
4123104202
Add a link to the code gen document
...
llvm-svn: 13962
2004-06-02 19:24:10 +00:00
Brian Gaeke
098fc08d54
Here's another pod.
...
llvm-svn: 13961
2004-06-02 19:21:26 +00:00
Brian Gaeke
9e8f8628c3
Look, it's a gccas pod.
...
llvm-svn: 13960
2004-06-02 19:12:38 +00:00
Chris Lattner
e6cad6c5ae
Add a note about the V9 backend.
...
llvm-svn: 13959
2004-06-02 07:06:06 +00:00
Chris Lattner
7b4d0f9c22
Oops, this was not to go in
...
llvm-svn: 13958
2004-06-02 06:06:45 +00:00
Chris Lattner
2805c189dc
Adjust to the new TargetMachine interface
...
llvm-svn: 13957
2004-06-02 06:06:20 +00:00
Chris Lattner
2150542af9
Adjust to new TargetMachine interface
...
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
Chris Lattner
185fa54c68
Inline findOptimalStorageSize into it's caller, both of which are sparc specific
...
llvm-svn: 13955
2004-06-02 05:56:52 +00:00
Chris Lattner
562d15636e
Adjust to new TM interface
...
llvm-svn: 13954
2004-06-02 05:56:04 +00:00
Chris Lattner
c832e546d0
Method has been inlined into all callers
...
llvm-svn: 13953
2004-06-02 05:55:48 +00:00
Chris Lattner
82baa9c394
Convert to the new TargetMachine interface.
...
llvm-svn: 13952
2004-06-02 05:55:25 +00:00
Chris Lattner
535e8db0da
Stubs are no longer needed
...
llvm-svn: 13951
2004-06-02 05:53:52 +00:00
Chris Lattner
e5892f32d6
Delete the V9 specific findOptimalStorageSize method, inlining it into all callers.
...
Substantially clean up all target implementations by having the OPTIONAL get*Info
methods return a pointer instead of a reference. This allows us to have default
implementations!
llvm-svn: 13950
2004-06-02 05:53:25 +00:00
Chris Lattner
63c07bf246
Adjust to new TM interfaces
...
llvm-svn: 13949
2004-06-02 05:47:26 +00:00
Chris Lattner
560b5e42ab
Finegrainify namespacification
...
llvm-svn: 13948
2004-06-02 04:28:06 +00:00
Chris Lattner
71f1d6d9d8
Fix a trivial but blatant bug
...
llvm-svn: 13947
2004-06-02 03:57:43 +00:00
Chris Lattner
6662d33f8a
Make gccld copy the llvm-stub program to be the execution wrapper for
...
bytecode files on win32 systems. We keep the shell script on unix systems
because it is much more transparent for the users and supports -load
options.
This allows llvmgcc work correctly on win32 systems without the -native or
-native-cbe options.
llvm-svn: 13946
2004-06-02 00:53:57 +00:00
Chris Lattner
80adb79be2
Implement the new CopyFile function
...
llvm-svn: 13945
2004-06-02 00:52:22 +00:00
Chris Lattner
5bcd2323ff
Add a new CopyFile function
...
llvm-svn: 13944
2004-06-02 00:51:20 +00:00
Misha Brukman
e5a7239cae
Fix a double negation (in grammar).
...
llvm-svn: 13943
2004-06-02 00:29:52 +00:00
Chris Lattner
85b943dd06
Move some functions out of gccld.cpp to GenerateCode.cpp. This allows us
...
to reduce the inter-file interface in the gccld tool and gets some
uninteresting code out of gccld.cpp.
llvm-svn: 13942
2004-06-02 00:22:24 +00:00
Chris Lattner
fdcb868fef
Refactor a bit of code into a function, no functionality changes.
...
llvm-svn: 13941
2004-06-02 00:10:19 +00:00
Misha Brukman
140f26ea46
Fix spelling, trim empty space, tighten up function header comment.
...
llvm-svn: 13940
2004-06-02 00:09:46 +00:00
Chris Lattner
7f6a0343fc
No really cygwin, we LIKE .exe'ness.
...
llvm-svn: 13939
2004-06-02 00:04:54 +00:00
Chris Lattner
cb043e4ab6
Build the llvm-stub directory
...
llvm-svn: 13938
2004-06-01 23:49:55 +00:00
Chris Lattner
10d7d569db
Initial checkin of a stub executable that can be used by gccld to forward to
...
bytecode files on systems that don't support #!/bin/sh natively (ie, win32).
llvm-svn: 13937
2004-06-01 23:48:45 +00:00
Chris Lattner
8e71bc09ff
On win32, process.h provides some of the traditional stuff that unistd
...
provides. This seems like a relatively clean way to get it.
llvm-svn: 13936
2004-06-01 23:47:00 +00:00
Chris Lattner
3edb94bff1
Bug fixed
...
llvm-svn: 13935
2004-06-01 21:52:45 +00:00
Chris Lattner
a32ca86c21
Implement PR315: abort, don't warn, when missing external functions encountered
...
This fixes some critical problems building libstdc++ on cygwin.
llvm-svn: 13934
2004-06-01 21:49:00 +00:00
Brian Gaeke
31d599adca
Add spiff
...
llvm-svn: 13933
2004-06-01 20:37:41 +00:00
Brian Gaeke
c0b9b83450
Use new form of unconditional branch constructor.
...
llvm-svn: 13930
2004-06-01 20:06:10 +00:00
Brian Gaeke
84c8bd0dd4
Call Cygwin by its proper name, and give it a link. :-)
...
llvm-svn: 13929
2004-06-01 20:02:56 +00:00
Brian Gaeke
7ed1d1b320
Maybe this will keep people from breaking -branch-combine!
...
llvm-svn: 13928
2004-06-01 20:01:05 +00:00
Chris Lattner
ce1a3843b0
Add a note about cygwin
...
llvm-svn: 13927
2004-06-01 19:41:30 +00:00
Chris Lattner
4f120545a7
Make tool names end with .exe on windows. This isn't needed to run the
...
tools, but is required for rules that depend on the executables, e.g.:
a: b $(LLVMAS)
llvm-svn: 13926
2004-06-01 19:06:43 +00:00
John Criswell
8a76df0bd7
Added the EXEEXT variable so that Makefiles can figure out what extension
...
to put on executable files.
llvm-svn: 13925
2004-06-01 19:04:38 +00:00
Misha Brukman
5363e38618
* Standardize footer
...
* HTML 4.01 (Strict) compliance
llvm-svn: 13924
2004-06-01 18:51:03 +00:00
Chris Lattner
d9be5faada
Finish the thought that got interrupted when my train arrived. :)
...
llvm-svn: 13923
2004-06-01 18:35:00 +00:00
Chris Lattner
2c7b08766d
Fix wandering </a>, add note about cygwin being supported.
...
llvm-svn: 13922
2004-06-01 18:22:41 +00:00
Misha Brukman
49c28757b9
* Use sans-serif fonts just like in the rest of doxygen
...
* Reference the lines image correctly
* Set font size to make the title stand out
llvm-svn: 13921
2004-06-01 18:19:28 +00:00
Chris Lattner
bbdec0365c
* Make it HTML4.01
...
* Add information about cygwin
* Simplify instructions a little and make it more robust (have people just
reconfig and build after buildint the CFE)
* Remove some obsolete stuff
llvm-svn: 13920
2004-06-01 18:13:05 +00:00
Misha Brukman
c9555decd1
Make doxygen pages look like our own documentation.
...
llvm-svn: 13919
2004-06-01 18:09:32 +00:00
Misha Brukman
a1c4fcce3f
* Add the year 2003 back to the copyright line
...
* Remove doxygen image from page, make LLVM link inline with the text
llvm-svn: 13918
2004-06-01 18:00:39 +00:00
Misha Brukman
2a75e7246a
* It's now the year 2004
...
* Our main page is index.html, not index.php
* Wrap lines at 80 cols
llvm-svn: 13917
2004-06-01 17:35:10 +00:00
Chris Lattner
f249fdc1c9
Add a warning about incompleteness, fix validation errors
...
llvm-svn: 13916
2004-06-01 17:18:11 +00:00
John Criswell
cd116ba64c
Modified calcTypeName() so that it does not allocate a std::string for
...
every recursive call.
This makes it more robust for deeply nested, unnamed types.
llvm-svn: 13915
2004-06-01 14:54:08 +00:00
Chris Lattner
565d7d567d
It's a small start, but it is certainly needed. Contributions are certainly
...
welcomed. :)
llvm-svn: 13914
2004-06-01 06:48:00 +00:00
Reid Spencer
26b9a3b747
Align the lower portion of the page with the left margin so that the page
...
width is not made excessive by the large table of results. Improves
readability of the page.
llvm-svn: 13913
2004-05-31 21:38:56 +00:00
Reid Spencer
8ac57711b0
Clean up the Feature and Regression test output to (a) use section headers,
...
(b) avoid <pre> tag so page width doesn't become excessive, (c) omit the
execution time stats, (d) format each reported test in a list with bold
headings for readability, (e) omit long lines of dashes.
llvm-svn: 13912
2004-05-31 20:59:55 +00:00
Brian Gaeke
4cc9328b5d
There is no "mcff" here; delete the confusing comments that refer to it.
...
llvm-svn: 13911
2004-05-30 08:29:16 +00:00
Alkis Evlogimenos
fbe799cfa2
Pull Interval class out of LiveIntervals.
...
llvm-svn: 13910
2004-05-30 07:46:27 +00:00
Alkis Evlogimenos
34f6bcc8d2
Add comparator useful for natural comparisons on collections with
...
pointers to objects.
llvm-svn: 13909
2004-05-30 07:45:09 +00:00
Brian Gaeke
7a8734af7f
Transform an occurrence of if(...) { assert (0) }.
...
llvm-svn: 13908
2004-05-30 07:34:01 +00:00
Alkis Evlogimenos
a5268e8199
When spilling an register, introduce a new temporary for each of its
...
spills. This allows for more flexibility when allocating registers for
spill code.
llvm-svn: 13907
2004-05-30 07:24:39 +00:00
Brian Gaeke
01c1f3279d
Reduce the amount of LLVM Values for which we save reg. allocator
...
state. Also, save the state for the incoming register of each phi
node.
llvm-svn: 13906
2004-05-30 07:08:43 +00:00
Brian Gaeke
9836668944
Rename verifySavedState to dumpSavedState. Give it a new comment.
...
Call it at a more appropriate point.
llvm-svn: 13905
2004-05-30 04:22:24 +00:00
Brian Gaeke
bc3d8652ec
Insert machine instructions generated for Phi nodes into their
...
corresponding MachineCodeForInstruction vectors.
I need to be able to get the register allocated for the thing which is
called PhiCpRes in this code; this should make that task easier, plus,
Phi nodes are no longer "special" in the sense that their
MachineCodeForInstruction is empty.
llvm-svn: 13904
2004-05-30 03:33:49 +00:00
Brian Gaeke
a8b396fe29
Fix typo in head-of-file comment.
...
llvm-svn: 13903
2004-05-30 03:33:48 +00:00
Reid Spencer
8eb06df5ab
Fix a bug that Chris asserts emphatically is a bug. The changed clause
...
would always return false because the Type of a type value is always
Type::TypeTY and can never be a floating point type.
llvm-svn: 13902
2004-05-30 01:19:48 +00:00
Reid Spencer
3b4302290d
Make the Regression/Feature test support excise all ": PASS" lines that
...
indicate successful tests. We're really only interested in the bad news
in this output :)
llvm-svn: 13901
2004-05-30 00:17:47 +00:00
Reid Spencer
9163bcdf0f
Moved this file to lib/Bytecode/Writer because its used there only.
...
llvm-svn: 13900
2004-05-30 00:09:32 +00:00
Brian Gaeke
24c18879f0
Remove unused #include.
...
llvm-svn: 13899
2004-05-29 23:26:13 +00:00
Brian Gaeke
42112b4a09
Add comments.
...
llvm-svn: 13898
2004-05-29 23:10:20 +00:00
Brian Gaeke
2398b17a57
Trim whitespace.
...
llvm-svn: 13897
2004-05-29 22:49:51 +00:00
Brian Gaeke
7fa398d850
Give InsertCodeForPhis() a new documentation comment.
...
llvm-svn: 13896
2004-05-29 22:20:59 +00:00
Alkis Evlogimenos
fd735bcf28
Add method to assign stack slot to virtual register without creating a
...
new one.
llvm-svn: 13895
2004-05-29 20:38:05 +00:00
Alkis Evlogimenos
e3cec71bdc
Add grow() member that grows the maps when the number of virtual
...
registers in the function has changed.
llvm-svn: 13893
2004-05-29 19:03:29 +00:00
Alkis Evlogimenos
1010116a8f
Remove defs vector from live intervals.
...
llvm-svn: 13892
2004-05-29 16:18:57 +00:00
Chris Lattner
446ac25072
Thoroughly rehack the dynamic linking mechanisms on Win32. The Win32
...
dynamic linker does not automatically search libraries when looking up
symbols with GetProcAddress. Because of this we have to emulate it. The
only detail is that there doesn't seem to be a way to enumerate the
libraries loaded, so we have a gross hack (tm).
This make the JIT functional on win32 under cygwin.
llvm-svn: 13887
2004-05-28 23:54:07 +00:00
Chris Lattner
972c68fbdf
Prune #includes
...
llvm-svn: 13886
2004-05-28 23:35:39 +00:00
Chris Lattner
fc69b6a538
Fix bizzare problems when you include Config/dlfcn and Config/windows.h in
...
the same xlation unit
llvm-svn: 13885
2004-05-28 21:07:11 +00:00
Chris Lattner
f28766ed39
Add links to new-featuer and code-cleanup bugs
...
llvm-svn: 13884
2004-05-28 20:41:37 +00:00
Chris Lattner
c2506037ae
Reid implemented this.
...
llvm-svn: 13883
2004-05-28 20:30:48 +00:00
Chris Lattner
a9e9d2cbcf
Changes to make the nightly tester run the regression tests at night, yaay!
...
Change contributed by Reid Spencer.
llvm-svn: 13882
2004-05-28 20:30:23 +00:00
Tanya Lattner
50cbb9ad3e
updates to ModuloSched
...
llvm-svn: 13881
2004-05-28 20:14:12 +00:00
Brian Gaeke
90dc744ac0
Give PhiCp nodes better names in many cases.
...
Simplify InsertPhiElimInstructions(), and give it a better doxygen comment.
llvm-svn: 13880
2004-05-28 19:34:00 +00:00
Brian Gaeke
26925ff857
Make debugging output with -print-machineinstrs more useful: always print out
...
the transformed LLVM code which is the input to the instruction selector.
llvm-svn: 13879
2004-05-28 19:33:59 +00:00
Chris Lattner
3709627b7d
Unbreak the bugpoint image
...
llvm-svn: 13878
2004-05-28 16:49:54 +00:00
Chris Lattner
c53c2a3a62
Fix the big regression that has been killing the nightly tester these last
...
few days. Apparently the old symbol table used to auto rename collisions in
the type symbol table and the new one does not. It doesn't really make sense
for the new one to do so, so we just make the client do it.
llvm-svn: 13877
2004-05-28 05:47:27 +00:00
Chris Lattner
1bb9661818
Don't use size() when you mean empty()
...
llvm-svn: 13876
2004-05-28 05:40:19 +00:00
Chris Lattner
49cdc6b564
Minor efficiency gain: do 1 nlogn lookup instead of two
...
Code cleanup
llvm-svn: 13875
2004-05-28 05:36:49 +00:00
Chris Lattner
c7e2ff2980
Minor changes. Switch to a SymbolTable remove that does not take linear time
...
llvm-svn: 13874
2004-05-28 05:30:51 +00:00
Chris Lattner
5b7b6bbd38
Eliminate this form of SymbolTable::remove. It ignores the type argument
...
anyway. Add a form that takes a type_iterator for the C backend.
llvm-svn: 13873
2004-05-28 05:30:29 +00:00
Chris Lattner
523d3e6674
Fix one of the major things that is causing the C Backend to infinite loop
...
llvm-svn: 13872
2004-05-28 05:02:13 +00:00
Chris Lattner
b6d6b931cc
Add support for getting executable memory on Windows. This is actually
...
much easier than on unix. :) The only evil thing is that windows.h defines
a macro named FindExecutable, which collides with one of our names.
The JIT now runs on windows, but it cannot resolve external functions
(like printf) yet.
llvm-svn: 13871
2004-05-28 01:20:58 +00:00
Chris Lattner
d54358279d
Add a new function for the JIT. libsupport is now the only library that
...
includes mman.h
llvm-svn: 13870
2004-05-28 00:59:40 +00:00
Chris Lattner
5374edb8ef
Add a new function for the JIT
...
llvm-svn: 13869
2004-05-28 00:58:48 +00:00
Chris Lattner
0bd7797446
Use the SystemUtils.h file to do our dirty work.
...
llvm-svn: 13868
2004-05-28 00:57:27 +00:00
Chris Lattner
abb26eac9d
Right: the #includes are not needed either
...
llvm-svn: 13867
2004-05-28 00:35:51 +00:00
Chris Lattner
acc6cdda85
Add support for zero length files
...
llvm-svn: 13866
2004-05-28 00:34:42 +00:00
Chris Lattner
06e381d31e
Use fileutilities instead of mmap directly
...
llvm-svn: 13865
2004-05-28 00:31:36 +00:00
Chris Lattner
9063461603
Use the new FileUtilities.h API for mapping a file into an address
...
space
llvm-svn: 13864
2004-05-28 00:24:41 +00:00
Chris Lattner
0e713bc208
Add a pair of functions to hide system specific details of mapping a file in for reading.
...
llvm-svn: 13863
2004-05-28 00:23:48 +00:00
Reid Spencer
9a6bb5fab7
Remove some more dead code resulting from adding setTypeName().
...
llvm-svn: 13862
2004-05-28 00:21:06 +00:00
Reid Spencer
3ae29942bf
Remove an assertion that uses Type::TypeTy that is never hit and will
...
break when Type::TypeTy goes away. Also remove a dead block of code and
dead comments.
llvm-svn: 13861
2004-05-27 22:05:50 +00:00
Reid Spencer
f43ac62dec
Clean up a comment.
...
llvm-svn: 13860
2004-05-27 22:04:46 +00:00
Reid Spencer
4148139dd9
Fix for bug 348.
...
The SymbolTable changes caused this one too.
llvm-svn: 13859
2004-05-27 21:58:13 +00:00
Brian Gaeke
1c6f9b4304
Make comment lines stick out less.
...
llvm-svn: 13858
2004-05-27 21:41:48 +00:00
Chris Lattner
cef00ec3da
Remove long unused #includes
...
llvm-svn: 13857
2004-05-27 21:25:44 +00:00
Chris Lattner
cb9ccac8a7
These #includes are long dead
...
llvm-svn: 13856
2004-05-27 21:24:38 +00:00
John Criswell
37d2ae92a7
Fix a bug in the -deadtypeelim pass. The SymbolTable re-write changed it
...
to eliminate the wrong type.
llvm-svn: 13855
2004-05-27 21:16:46 +00:00
Chris Lattner
fc7509b7d4
Fix warnings about reaching end of non-void function
...
llvm-svn: 13852
2004-05-27 20:57:01 +00:00
Chris Lattner
db3da22f4b
Add DynamicLinker support for systems that provide windows.h
...
llvm-svn: 13851
2004-05-27 20:53:10 +00:00
Chris Lattner
94aac779e1
An "autoconf wrapper" for the infamous windows.h file
...
llvm-svn: 13849
2004-05-27 20:51:22 +00:00
Reid Spencer
d2eca3d441
Make the test pass by using the correct RUN: syntax.
...
llvm-svn: 13848
2004-05-27 20:49:16 +00:00
John Criswell
1cd5f920e3
Added a check for a new header file.
...
My apologies for changing config.h.in. Now you will all have to
re-configure.
llvm-svn: 13846
2004-05-27 20:40:39 +00:00
Chris Lattner
1553edc2da
Neuter the -q option. Stop printing the "program modified" message, ever
...
llvm-svn: 13844
2004-05-27 20:32:10 +00:00
Reid Spencer
f2f34b3052
Use the SymbolTable::isEmpty() method instead of checking for no value
...
planes. A SymbolTable could still have types in it! This fixes problems
with two regression tests that failed because a symbol table that only
contained types was being omitted from bytecode files. Thanks to Chris
for the reduced test case that helped find this immediately.
llvm-svn: 13842
2004-05-27 20:18:51 +00:00
Chris Lattner
781479c7d7
Add support for dos-style files
...
llvm-svn: 13840
2004-05-27 18:28:32 +00:00
Chris Lattner
8232621124
This code is a real mess, but at least get the JIT *building* on platforms
...
(such as plan 9) without mmap. Of course it won't RUN... but that's another
step. :)
llvm-svn: 13839
2004-05-27 18:03:56 +00:00
Chris Lattner
e7bda9c022
doxygen no longer builds into the docs tree, and we no longer have boost
...
in the tree
llvm-svn: 13838
2004-05-27 17:58:45 +00:00
Chris Lattner
604e19e707
Add support for dos-style files
...
llvm-svn: 13837
2004-05-27 17:49:14 +00:00
Chris Lattner
1f4e545a89
Add support for dos style files.
...
llvm-svn: 13836
2004-05-27 17:44:18 +00:00
Chris Lattner
3a45149bd5
Add back a test I accidentally removed
...
llvm-svn: 13835
2004-05-27 17:43:33 +00:00
Chris Lattner
ed79d8af53
Fix InstCombine/load.ll & PR347.
...
This code hadn't been updated after the "structs with more than 256 elements"
related changes to the GEP instruction. Also it was not handling the
ConstantAggregateZero class.
Now it does!
llvm-svn: 13834
2004-05-27 17:30:27 +00:00
Chris Lattner
9b38743684
Add another testcase
...
llvm-svn: 13833
2004-05-27 17:28:55 +00:00
Reid Spencer
c8878edc5a
Re-introduce the -q option and make opt always return 0, even if the
...
optimization pasess fail. This is necessary to avoid breaking feature
tests in the tests suite that depend on this behavior. *sigh*
llvm-svn: 13832
2004-05-27 16:28:54 +00:00
Reid Spencer
09fabea814
Added a "RUN:" line so this file can be executed by TestRunner.sh
...
llvm-svn: 13829
2004-05-27 08:28:42 +00:00
Reid Spencer
7873671463
Removed the -q option and the default message written to stderr. The
...
output produces confusing results in TestRunner.sh
llvm-svn: 13828
2004-05-27 08:26:22 +00:00
Chris Lattner
d4065a6c94
remove bogus test
...
llvm-svn: 13827
2004-05-27 07:39:51 +00:00
Chris Lattner
076f7493bf
Make the test test what it is supposed to
...
llvm-svn: 13826
2004-05-27 07:37:45 +00:00
Chris Lattner
97462838b2
The -exprs pass is no longer with LLVM. *sniff*
...
llvm-svn: 13825
2004-05-27 07:36:08 +00:00
Chris Lattner
0ceb07b09e
Correct test. use "not grep" instead of "grep -v"
...
llvm-svn: 13824
2004-05-27 07:32:25 +00:00
Chris Lattner
c6e21fbd5c
Implement constant folding of fmod, which is used a lot in povray
...
llvm-svn: 13823
2004-05-27 07:25:00 +00:00
Chris Lattner
5f1a5bb735
Right, globals aren't values yet..
...
llvm-svn: 13822
2004-05-27 06:43:37 +00:00
Chris Lattner
06158d140c
Restructure call constant folding code a bit to make it simpler
...
Add support for acos/asin/atan. 188.ammp contains three calls to acos with
constant arguments. Constant folding it allows elimination of those 3 calls
and three FP divisions of the results.
llvm-svn: 13821
2004-05-27 06:26:28 +00:00
Chris Lattner
8082c74e0a
Add a simple pass.
...
llvm-svn: 13820
2004-05-27 06:13:36 +00:00
Chris Lattner
716793336f
Continue the exposition
...
llvm-svn: 13819
2004-05-27 05:52:10 +00:00
Chris Lattner
c2ee70db2d
Continue the implementation
...
llvm-svn: 13818
2004-05-27 05:51:31 +00:00
Chris Lattner
f74b2868c8
A few more microsteps
...
llvm-svn: 13817
2004-05-27 05:51:13 +00:00
Chris Lattner
d74befe02a
gc_init now gets an argument
...
llvm-svn: 13816
2004-05-27 05:51:00 +00:00
Chris Lattner
5a4d17bb57
Uhh, that doesn't exist.
...
llvm-svn: 13815
2004-05-27 05:44:22 +00:00
Chris Lattner
0c4fa93d25
Beta-test moving a header from include/Support into the llvm hierarchy:
...
it seems to work :)
llvm-svn: 13814
2004-05-27 05:42:33 +00:00
Chris Lattner
278f5152d3
Header file moved
...
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Chris Lattner
84647525f6
Header moved
...
llvm-svn: 13812
2004-05-27 05:37:32 +00:00
Chris Lattner
ed317b2a29
Signals.h header moved. Eventually this should move into a lib/System library,
...
but not right now.
llvm-svn: 13811
2004-05-27 05:31:24 +00:00
Chris Lattner
8e6c1d1a9b
Moved header from include/Support/ to include/llvm/System
...
llvm-svn: 13810
2004-05-27 05:30:18 +00:00
Chris Lattner
1760ccd7b0
Changes to make libSupport build on systems that don't have the wait syscall.
...
llvm-svn: 13806
2004-05-27 01:20:55 +00:00
Alkis Evlogimenos
67150528d4
Add section on the newly added Instruction and subclasses constructor
...
variant.
llvm-svn: 13802
2004-05-27 00:57:51 +00:00
John Criswell
b82cbbfc70
Only give warnings if the user doesn't have mmap(). This is pretty much
...
a hack that allows users to fight through a build if they don't have mmap().
When I get into the office, I'll make something better.
llvm-svn: 13801
2004-05-27 00:57:50 +00:00
Alkis Evlogimenos
e3260007bc
Add constructors that take a BasicBlock to append to, to the rest of
...
the llvm::Instruction hierarchy.
llvm-svn: 13800
2004-05-27 00:15:23 +00:00
Chris Lattner
52a71340c1
Fix a test that was "broken" by new optimizations. The transformation we
...
are doing is certainly correct, its just that we didn't have the capability
to do it when the testcase was written (no select instr)
llvm-svn: 13799
2004-05-26 23:51:29 +00:00
Alkis Evlogimenos
0eefdcd73f
Do not pass a null pointer if this instruction is not prepended or
...
appended anywhere.
llvm-svn: 13798
2004-05-26 22:50:28 +00:00
Alkis Evlogimenos
af494c5f13
Inline trivial constructors.
...
llvm-svn: 13797
2004-05-26 22:07:18 +00:00
Reid Spencer
56010e4077
Several clean ups suggested by Chris: remove tabs, make SlotMachine do lazy
...
initialization so we don't scan large Modules/Functions needlessly, tighten
up restrictions on what can be put in SlotMachine (no Constants that aren't
GlobalValues).
llvm-svn: 13796
2004-05-26 21:56:09 +00:00
Reid Spencer
5b4413cb03
Provide the correct patch for bug 345. The solution is to add a setTypeName
...
function to llvmAsmParser.y and then use it in the one place in the grammar
that needs it. Also had to make Type::setName public because setTypeName
needs it in order to retain compatibility with setValueName.
llvm-svn: 13795
2004-05-26 21:48:31 +00:00
Reid Spencer
ebb1569d38
Tighten up checking on SymbolTable interface to make it illegal to pass a
...
Type* where a Value* is expected.
llvm-svn: 13794
2004-05-26 21:46:18 +00:00
Alkis Evlogimenos
9f0fdf7482
Refactor common initialization code in private init() functions.
...
This is a first step in supplying append to basic block constructors
for all instruction types.
llvm-svn: 13793
2004-05-26 21:41:09 +00:00
Alkis Evlogimenos
9e84b503f0
Use one destination constructor for the unconditional branch.
...
llvm-svn: 13792
2004-05-26 21:38:14 +00:00
Misha Brukman
6d6f276813
Fix spelling of doxygen directive.
...
llvm-svn: 13791
2004-05-26 17:42:51 +00:00
Chris Lattner
83d067a103
Fix PR344: the incorrect remove was being used.
...
llvm-svn: 13790
2004-05-26 17:20:52 +00:00
Chris Lattner
6eea16e526
Make the test use the %A type
...
llvm-svn: 13789
2004-05-26 17:14:49 +00:00
Chris Lattner
1f08746f72
A quick and ugly hack to fix PR345. I used TypeTy specifically to make
...
Reid cringe :)
llvm-svn: 13788
2004-05-26 17:08:25 +00:00
Chris Lattner
cc83417e6c
Fix a bug in reid's checkin
...
llvm-svn: 13787
2004-05-26 16:52:55 +00:00
Reid Spencer
9aed59b2c8
Added a section on the SymbolTable class.
...
llvm-svn: 13786
2004-05-26 08:41:35 +00:00
Reid Spencer
0aff01a239
Part of bug 122:
...
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).
llvm-svn: 13785
2004-05-26 07:37:11 +00:00
Reid Spencer
16f2f7fba0
Part of bug 122. Removed dependency of AsmWriter on SlotCalculator by
...
incorporating a significantly simpler "SlotMachine" into this file. The
SlotMachine is tailored for use by only the AsmWriter whose requirements
for slot numbers are vastly different than from the Bytecode/Writer. Code
change passes all Feature and Regression tests.
llvm-svn: 13784
2004-05-26 07:18:52 +00:00
Tanya Lattner
642685a400
Adding scheduling class.
...
llvm-svn: 13783
2004-05-26 06:27:36 +00:00
Tanya Lattner
a066df6bd7
Updating my cvs versions. THis is still in progress and much will be changed.
...
llvm-svn: 13782
2004-05-26 06:27:18 +00:00
Brian Gaeke
230deea60f
Add a (not very meaningful) default constructor for AllocInfo objects.
...
llvm-svn: 13773
2004-05-25 20:43:47 +00:00
Reid Spencer
abac0ef0b7
Put SlotTable.h inclusion back at front of list to be coding standards
...
compliant. Thanks, Chris.
llvm-svn: 13771
2004-05-25 20:09:05 +00:00
Reid Spencer
d936d812bc
Change the install-includes target to completely ignore the llvm/Internal
...
directory. Headers located there are not public to LLVM but are shared
between LLVM modules.
llvm-svn: 13769
2004-05-25 20:01:25 +00:00
Reid Spencer
6244bc7831
Make the constructor explicit so we can't implicitly convert bool to
...
SlotTable.
llvm-svn: 13766
2004-05-25 19:09:25 +00:00
Reid Spencer
37dd30c00a
Make some improvements suggested by Chris.
...
llvm-svn: 13765
2004-05-25 19:03:21 +00:00
Reid Spencer
4feb245a31
Adding the initial implementation of the SlotTable class. This class is
...
the Abstract Data Type that holds slot number values and associates them
with Type* and Value*. The SlotTable is simply the holder of the slot
numbers and provides a controlled interface for building the table. It does
not enforce any particular idiom or functionality for manipulating the slot
numbers.
This is part of bug_122. The SlotCalculator and SlotMachine classes will
follow.
llvm-svn: 13764
2004-05-25 18:44:51 +00:00
Alkis Evlogimenos
40f9a8730a
Remove this file as well as it is no longer needed nor it compiles
...
llvm-svn: 13762
2004-05-25 18:24:27 +00:00
Reid Spencer
5264183123
Document a couple functions.
...
llvm-svn: 13761
2004-05-25 18:14:38 +00:00
Chris Lattner
e7d5ec2b68
Make use of the doc_author and doc_code styles. <tt>'ify llvm names. Minor
...
other edits
llvm-svn: 13760
2004-05-25 17:44:58 +00:00
Reid Spencer
660ea5fadb
Changed to use SymbolTable's new iteration interfaces.
...
llvm-svn: 13759
2004-05-25 17:29:59 +00:00
Reid Spencer
ea41b4fb83
Changed to use SymbolTable's new lookup interface.
...
llvm-svn: 13758
2004-05-25 17:29:21 +00:00
Reid Spencer
15e969a45e
Removed unused, useless header file.
...
llvm-svn: 13757
2004-05-25 17:28:35 +00:00
Reid Spencer
49ad21ce7b
Added a bit on slot numbers.
...
llvm-svn: 13756
2004-05-25 15:47:57 +00:00
Reid Spencer
877b9a2f31
Made it illegal to pass a Type* through one of the Value* interfaces. The
...
SymbolTable will now assert if this is done. This didn't find any incorrect
usage of SymbolTable but will prevent future mistakes until Type != Value.
llvm-svn: 13755
2004-05-25 15:20:47 +00:00
Reid Spencer
e7e9671cad
Convert to SymbolTable's new iteration interface.
...
llvm-svn: 13754
2004-05-25 08:53:40 +00:00
Reid Spencer
47cf71a61e
Convert to SymbolTable's new iteration interface. Remove tabs.
...
llvm-svn: 13753
2004-05-25 08:53:29 +00:00
Reid Spencer
3f6a692a21
Completely rewrote the class. SymbolTable now separates Type* from Value* in preparation\
...
for making Type not derive from Value. There are now separate interfaces \
for looking up, finding, and inserting Types and Values. There are also \
three separate iterator interfaces, one for type planes, one for the types \
(type type plane), and one for values within a type plane. See the \
documentation in the Header file.
llvm-svn: 13752
2004-05-25 08:52:42 +00:00
Reid Spencer
abb6f008ca
Convert to SymbolTable's new lookup and iteration interfaces.
...
llvm-svn: 13751
2004-05-25 08:52:20 +00:00
Reid Spencer
297d7fe7e6
Remove unused header file.
...
llvm-svn: 13750
2004-05-25 08:51:36 +00:00
Reid Spencer
1cc31f264f
Make this pass simply invoke SymbolTable::strip().
...
llvm-svn: 13749
2004-05-25 08:51:25 +00:00
Reid Spencer
14428ac740
Remove use of Type::TypeTy from an assert. It will go away soon.
...
llvm-svn: 13748
2004-05-25 08:50:52 +00:00
Reid Spencer
7b8a3b550a
Get rid of a wart: useless getFILE function is now a cast macro.
...
llvm-svn: 13747
2004-05-25 08:46:15 +00:00
Reid Spencer
50e3db3a64
Give Type its own dump() method in preparation for Type != Value.
...
llvm-svn: 13746
2004-05-25 08:46:04 +00:00
Reid Spencer
1eb1ef009e
Completely rewrote the class. SymbolTable now separates Type* from Value* in preparation\
...
for making Type not derive from Value. There are now separate interfaces \
for looking up, finding, and inserting Types and Values. There are also \
three separate iterator interfaces, one for type planes, one for the types \
(type type plane), and one for values within a type plane. See the \
documentation in the Header file.
llvm-svn: 13745
2004-05-25 08:45:53 +00:00
Reid Spencer
303a74d2b7
Convert dump() method to call Type::dump() instead of Value::dump().
...
llvm-svn: 13744
2004-05-25 08:45:42 +00:00
Reid Spencer
bbea18c182
Fix a small typo.
...
llvm-svn: 13743
2004-05-25 08:45:31 +00:00
Vikram S. Adve
f6c4ee0744
Recognize memalign and friends, and handle them specially.
...
llvm-svn: 13741
2004-05-25 08:14:52 +00:00
Chris Lattner
e1e10e1883
Implement InstCombine:shift.ll:test16, which turns (X >> C1) & C2 != C3
...
into (X & (C2 << C1)) != (C3 << C1), where the shift may be either left or
right and the compare may be any one.
This triggers 1546 times in 176.gcc alone, as it is a common pattern that
occurs for bitfield accesses.
llvm-svn: 13740
2004-05-25 06:32:08 +00:00
Chris Lattner
6a02158bc5
New testcase
...
llvm-svn: 13739
2004-05-25 06:30:49 +00:00
Chris Lattner
db8bdba593
Implement some helpers
...
llvm-svn: 13738
2004-05-25 05:32:43 +00:00
Chris Lattner
bbdd577a00
Add some helpers
...
llvm-svn: 13737
2004-05-25 05:32:13 +00:00
Chris Lattner
03841659a4
Implement instcombine/cast.ll:test16:
...
Canonicalize cast X to bool into a setne instruction
llvm-svn: 13736
2004-05-25 04:29:21 +00:00
Chris Lattner
608c18f20c
Add a new test16 and fix some other tests that were not properly written
...
llvm-svn: 13735
2004-05-25 04:28:43 +00:00
Chris Lattner
64556f042a
Make doc_code shrink-to-fit. This only works in mozilla, but it doesn't
...
hurt legibility on IE
llvm-svn: 13720
2004-05-24 18:05:58 +00:00
Tanya Lattner
91fa3a9908
Moved MachineBasicBlock deconstructor to cpp file and removed it from LeakDetector to fix memory leak bug.
...
llvm-svn: 13718
2004-05-24 07:14:35 +00:00
Chris Lattner
6f02714a10
Fix a bug in my previous checkin
...
llvm-svn: 13717
2004-05-24 06:24:46 +00:00
Tanya Lattner
a578cb7a65
Added MachineFunction parent* to MachineBasicBlock. Customized ilist template
...
to set the parent when a MachineBasicBlock is added to a MachineFunction.
llvm-svn: 13716
2004-05-24 06:11:51 +00:00
Chris Lattner
a0390ec7f9
Lots of minor typo fixes, some minor inaccuracies fixed, and some new material.
...
llvm-svn: 13715
2004-05-24 05:35:17 +00:00
Chris Lattner
57e7a4cd56
new feature
...
llvm-svn: 13714
2004-05-24 05:34:32 +00:00
Chris Lattner
b97a9b2e7e
Fix a couple of busted li's
...
llvm-svn: 13713
2004-05-24 04:55:32 +00:00
Chris Lattner
1224615f62
Add a todo to make it clear that the section is not done
...
llvm-svn: 13712
2004-05-24 04:54:31 +00:00
Chris Lattner
f10ccbfab8
Personally, I think that documentation is as important as code. Increase
...
the visibility of dox changes
llvm-svn: 13711
2004-05-24 04:53:32 +00:00
Chris Lattner
21a9040464
Fix a div problem that was causing some wierd indentation. Get more div'y
...
llvm-svn: 13710
2004-05-24 04:50:25 +00:00
Chris Lattner
eda4f47d87
Add some notes
...
llvm-svn: 13709
2004-05-24 04:45:52 +00:00
Chris Lattner
e0de86c36c
Add a link to the GC doc
...
llvm-svn: 13708
2004-05-24 04:43:49 +00:00
Chris Lattner
18dad6ed52
Eliminate an explicit use of the LLVM basic block, using getParent instead,
...
which simplifies the code
llvm-svn: 13707
2004-05-24 03:44:52 +00:00
Tanya Lattner
bcee21b491
Changed clone to be const.
...
Changed copy constructor to set parent, prev, and next pointers to null.
llvm-svn: 13706
2004-05-24 03:14:18 +00:00
Alkis Evlogimenos
4da5264253
Eliminate warnings
...
llvm-svn: 13704
2004-05-23 23:02:35 +00:00
Chris Lattner
c4e2053767
Testcases for andersen's alias analysis.
...
I think this is all of the stuff I had pending in my tree..
llvm-svn: 13703
2004-05-23 21:31:00 +00:00
Chris Lattner
99173879ad
Spelling people's names right is kinda important
...
llvm-svn: 13702
2004-05-23 21:27:29 +00:00
Chris Lattner
48ae330f2e
Build the garbage collectors
...
llvm-svn: 13701
2004-05-23 21:26:29 +00:00
Chris Lattner
9656fe9cdc
Initial checkin of GC implementation support files
...
llvm-svn: 13700
2004-05-23 21:25:59 +00:00
Reid Spencer
e1a5727733
Create a new style for tables that have no width (.doc_table_nw) so the
...
table doesn't stretch across the whole page. Change for BytecodeFormat.html
llvm-svn: 13699
2004-05-23 21:25:50 +00:00
Chris Lattner
843cef8f3b
Check in an EARLY START on a simple copying collector
...
llvm-svn: 13698
2004-05-23 21:25:45 +00:00
Chris Lattner
acd339ea4f
Add a simple testcase for garbage collection support
...
llvm-svn: 13697
2004-05-23 21:24:50 +00:00
Chris Lattner
6e4edd65ab
Add support for accurate garbage collection to the LLVM code generators
...
llvm-svn: 13696
2004-05-23 21:23:35 +00:00
Chris Lattner
3ef067ff33
Add some notes to myself, no functional changes
...
llvm-svn: 13695
2004-05-23 21:23:12 +00:00
Chris Lattner
66911019e7
minor wording change
...
llvm-svn: 13694
2004-05-23 21:22:55 +00:00
Chris Lattner
6754b827c6
Fix cases where we missed inlining some more obvious candidates because the
...
caller was in an SCC.
llvm-svn: 13693
2004-05-23 21:22:17 +00:00
Chris Lattner
8d7ff5e3dd
Simplify the interface and remove an unneeded #include
...
llvm-svn: 13692
2004-05-23 21:21:35 +00:00
Chris Lattner
254f8f8ad5
Fairly substantial changes to update the alias analysis we are querying as
...
we make the transformation. This allows us to use interprocedural alias
analyses successfully.
llvm-svn: 13691
2004-05-23 21:21:17 +00:00
Chris Lattner
289ba2ac4d
Adjust to the changes in the AliasSetTracker interface
...
llvm-svn: 13690
2004-05-23 21:20:19 +00:00
Chris Lattner
e67dbc2ae2
Add support for replacement of formal arguments with simpler expressions.
...
llvm-svn: 13689
2004-05-23 21:19:55 +00:00
Chris Lattner
099c8cfe90
Implement the -lowergc pass which is used by code generators (like the CBE)
...
that do not have builtin support for garbage collection.
llvm-svn: 13688
2004-05-23 21:19:22 +00:00
Chris Lattner
9c251eb0ad
Recognize and verify the new GC intrinsics.
...
llvm-svn: 13687
2004-05-23 21:16:51 +00:00
Chris Lattner
abc125169b
Add the new GC intrinsics
...
llvm-svn: 13686
2004-05-23 21:16:33 +00:00
Chris Lattner
e6113c06b1
Add a new prototype
...
llvm-svn: 13685
2004-05-23 21:16:13 +00:00
Chris Lattner
62c37008a4
Changes to work with the changes to the AliasAnalysis interface. The -no-aa
...
class is now in the BasicAliasAnalysis.cpp file
llvm-svn: 13684
2004-05-23 21:15:48 +00:00
Chris Lattner
59c8ed8843
Move the -no-aa AA implementation into this file since both of these
...
alias analysis implementations are special: they do not autoforward to a
chained implementation of alias analysis
llvm-svn: 13683
2004-05-23 21:15:12 +00:00
Chris Lattner
e345f6b5ab
Updates to work with the new auto-forwarding AA interface changes
...
llvm-svn: 13682
2004-05-23 21:14:27 +00:00
Chris Lattner
e657eb17cc
Fix a really nasty bug with the -disable-ds-field-sensitivity option
...
llvm-svn: 13681
2004-05-23 21:14:09 +00:00
Chris Lattner
befe4c510e
Update to match the autochaining interface that the AA interface uses
...
llvm-svn: 13680
2004-05-23 21:13:51 +00:00
Chris Lattner
32502b8d4a
Implement the interfaces to update value numbering information. Add an
...
assert.
llvm-svn: 13679
2004-05-23 21:13:24 +00:00
Chris Lattner
8f2b467feb
Several *major* changes to the AA interfaces:
...
1. Provide interfaces so that clients can update alias analyses to reflect
the changes made by the transformations.
2. Change how alias analysis implementations work overall. In particular,
now clients will automatically forward to chained AA implementations: they
don't have to remember to do it themselves.
llvm-svn: 13678
2004-05-23 21:12:38 +00:00
Chris Lattner
98da971901
Add interfaces to update value numbering results
...
llvm-svn: 13677
2004-05-23 21:11:17 +00:00
Chris Lattner
746e1e1808
Rename a method
...
llvm-svn: 13676
2004-05-23 21:10:58 +00:00
Chris Lattner
020e1fc733
Make use of the new doc_author class. "Seperate content from presentation" they said.
...
llvm-svn: 13675
2004-05-23 21:07:27 +00:00
Chris Lattner
4dd45ffdb6
Lots of minor cleanups and clarifications
...
llvm-svn: 13674
2004-05-23 21:06:58 +00:00
Chris Lattner
ed0ec7afbb
Remove implemented stuff
...
llvm-svn: 13673
2004-05-23 21:06:21 +00:00
Chris Lattner
757528b0b6
Describe the new garbage collector intrinsics
...
llvm-svn: 13672
2004-05-23 21:06:01 +00:00
Chris Lattner
411eba181a
Lots of minor fixes and formatting improvements
...
llvm-svn: 13671
2004-05-23 21:05:39 +00:00
Chris Lattner
1dab192f22
Update the coding standards, removign the bit about avoiding exceptions and
...
rtti (they shouldn't be used in the main compiler, but that's because
optimizations aren't allowed to fail!)
Remove the big section about iterators, because people who do not know what
they are doing shouldn't be writing them. :)
llvm-svn: 13670
2004-05-23 21:05:07 +00:00
Chris Lattner
2a19d83689
Substantially expand and update the alias analysis documentation, including
...
adding blurbs about all of the implementations we have
llvm-svn: 13669
2004-05-23 21:04:01 +00:00
Chris Lattner
e25f4fffff
Various changes to make the docs look nicer. Add a new doc_author class.
...
The one thing that someone (misha?) should look at is fixing doc_code so that it sizes to fit the code instead of going to the right margin all of the way. Fixing it at a particular number of pixels was just wrong. :)
llvm-svn: 13668
2004-05-23 21:03:30 +00:00
Chris Lattner
f689d57f0f
Add a new document describing the LLVM accurate garbage collection support.
...
llvm-svn: 13667
2004-05-23 21:02:20 +00:00
Chris Lattner
5758134505
Add a simple implementation of Andersen's interprocedural pointer analysis
...
llvm-svn: 13666
2004-05-23 21:00:47 +00:00
Tanya Lattner
9953d86e63
Fixed up my changes to add support for cloning Machine Instructions.
...
llvm-svn: 13665
2004-05-23 20:58:02 +00:00
Alkis Evlogimenos
ee4dcae9ba
Remove virtual destructor from InstVisitor. This class should never be
...
used through a base pointer/reference so inproper destruction should
never be an issue. Removing this last virtual function also saves 4
bytes off each InstVisitor instance.
llvm-svn: 13664
2004-05-23 20:54:39 +00:00
Chris Lattner
23257069b6
Fix a couple misplaced div tags
...
llvm-svn: 13663
2004-05-23 20:42:08 +00:00
Chris Lattner
f45d23b85c
Revert back to the previous version, as it doesn't work with mozilla, and people REALLY CAN just click the link. :)
...
llvm-svn: 13662
2004-05-23 20:29:35 +00:00
Tanya Lattner
e6a4a7dbcf
Adding support to clone MachineInstr
...
llvm-svn: 13661
2004-05-23 19:35:12 +00:00
Reid Spencer
3e58f5880a
Added a "Miscellaneous Improvements" section to cover things like the
...
Bytecode File Format documentation, getting all documents in HTML 4.01
(Strict) compliance, and any other minor improvement that shoud be noted.
llvm-svn: 13660
2004-05-23 17:23:13 +00:00
Reid Spencer
ac9cc8c82d
Make the file HTML 4.01 (Strict) clean.
...
llvm-svn: 13659
2004-05-23 17:12:45 +00:00
Reid Spencer
eca340ba12
Additional content describing variable bit rate encoding, correcting the
...
definition of the signature block and module block, and adding definitions
of the global type pool and symbol table. More still to come.
llvm-svn: 13658
2004-05-23 17:05:09 +00:00
Alkis Evlogimenos
22acc1268d
Put back the inlined bug list. Use the OBJECT tag to make it HTML-4.01
...
(Strict)-compliant.
llvm-svn: 13655
2004-05-23 11:10:55 +00:00
Vikram S. Adve
189d626ad6
Remember the set of leaders. Also compute on demand and cache the equiv
...
class for each leader. Finally, rename Elem2ECLeaderMap to Elem2LeaderMap
(most of the changed lines are only due to the latter).
llvm-svn: 13651
2004-05-23 08:05:14 +00:00
Vikram S. Adve
16f29f349d
Add getCaller() method.
...
llvm-svn: 13650
2004-05-23 08:02:45 +00:00
Vikram S. Adve
159ed21b67
Inline both direct and indirect callees in the CBU phase because
...
a direct callee may have indirect callees and so may have changed.
llvm-svn: 13649
2004-05-23 08:00:34 +00:00
Vikram S. Adve
c5e27638dd
Complete rewrite of the code that merges DS graphs for equivalence classes
...
of functions called at a common call site. The rewrite inlines the
resulting graphs bottom-up on the SCCs of the CBU call graph. It also
simplifies the merging of equivalence classes by exploiting the fact that
functions in non-trivial SCCs are already merged.
llvm-svn: 13645
2004-05-23 07:54:02 +00:00
Vikram S. Adve
f44d32d9e2
Fix size/offset assertion to allow negative offsets and folded nodes.
...
llvm-svn: 13644
2004-05-23 07:34:53 +00:00
Brian Gaeke
d4889be5ca
Fix a typo in a comment.
...
llvm-svn: 13643
2004-05-23 05:10:06 +00:00
Brian Gaeke
74b08516e9
Fix a typo in the head-of-file comment.
...
Rewrite the comments about the different versions of BuildMI, to
better emphasize their differences.
llvm-svn: 13642
2004-05-23 05:04:00 +00:00
Reid Spencer
257dbb00fe
Some additional data added to the bytecode specification.
...
llvm-svn: 13626
2004-05-22 05:56:41 +00:00
Reid Spencer
9acd412316
Added an initial template/overview for documentation of the LLVM Bytecode
...
file format. This format is being extracted from the source code and the
small recesses of Chris' brain.
llvm-svn: 13625
2004-05-22 02:28:36 +00:00
Reid Spencer
deea18188e
Removed the 64-bit fix from the "to do" list since the bug is fixed.
...
llvm-svn: 13624
2004-05-22 01:04:19 +00:00
Misha Brukman
144c77b515
Pass the Makefile flags to recursive makes in {PARALLEL,OPTIONAL}_DIRS targets.
...
llvm-svn: 13623
2004-05-21 23:21:11 +00:00
Chris Lattner
37c653a28e
It's not clear to me whether the old version was correct C++ code, but in
...
any case it's not portable.
llvm-svn: 13621
2004-05-21 18:38:16 +00:00
Chris Lattner
54291f6005
Starting an identifier with an _ is not legal C/C++ code.
...
llvm-svn: 13620
2004-05-21 18:37:13 +00:00
Chris Lattner
8f7cf27241
Bug fixed
...
llvm-svn: 13619
2004-05-21 16:48:20 +00:00
Chris Lattner
ab5aa14403
Fix for PR340: Verifier misses malformed switch instruction
...
llvm-svn: 13618
2004-05-21 16:47:21 +00:00
Chris Lattner
6041fee872
Testcase for PR340: Verifier misses malformed switch instruction
...
This testcase was reduced by John, thanks!
llvm-svn: 13617
2004-05-21 16:47:02 +00:00
Misha Brukman
3e810058a7
Pass given flags on to recursive sub-makes.
...
llvm-svn: 13616
2004-05-21 00:09:21 +00:00
Alkis Evlogimenos
e716bafbc8
Change DEPRECATED macro to ATTR_DEPRECATED as this conflicts with some
...
java constants.
llvm-svn: 13611
2004-05-20 21:31:43 +00:00
Chris Lattner
83c139d575
Fix to make the CBE always emit comparisons inline. Hopefully this will
...
fix the really bad code we're getting on PPC.
llvm-svn: 13609
2004-05-20 20:25:50 +00:00
Brian Gaeke
7b7a14d718
Fix a bug in outputting branches to constant PCs. Since the PC is supplied as
...
a full 64-bit address, it must be adjusted to fit in the branch instruction's
immediate field. (This is only used in the reoptimizer, for now.)
llvm-svn: 13608
2004-05-20 07:43:40 +00:00
Brian Gaeke
e8949b3083
Minor simplification: eliminate a dyn_cast.
...
Fix a typo in a debug message.
llvm-svn: 13607
2004-05-19 21:30:01 +00:00
Misha Brukman
bd094e73d2
Add hint about syntax-highlighting non-standardly-named LLVM Makefiles.
...
llvm-svn: 13606
2004-05-19 21:20:40 +00:00
Alkis Evlogimenos
c5bd926a62
Declare function defined in namespace llvm as gcc-3.4 doesn't accept a definition in a namespace of a non-declared function.
...
llvm-svn: 13602
2004-05-19 19:17:48 +00:00
Brian Gaeke
72185765bc
Add CloneTraceInto(), which is based on (and has mostly the same
...
effects as) CloneFunctionInto().
llvm-svn: 13601
2004-05-19 09:08:14 +00:00
Brian Gaeke
6182acf92a
Move RemapInstruction() to ValueMapper, so that it can be shared with
...
CloneTrace, and because it is primarily an operation on ValueMaps. It
is now a global (non-static) function which can be pulled in using
ValueMapper.h.
llvm-svn: 13600
2004-05-19 09:08:12 +00:00
Misha Brukman
926e0f9eef
Minor aesthetic alignments; no functional changes.
...
llvm-svn: 13593
2004-05-17 22:28:21 +00:00
Misha Brukman
40c6d6d307
* Minor aesthetic alignment of iterator declarations
...
* Removed redundant function comments
llvm-svn: 13592
2004-05-17 22:25:12 +00:00
Brian Gaeke
fced05bd44
Define erase forwarding method on traces
...
llvm-svn: 13591
2004-05-17 21:17:21 +00:00
Brian Gaeke
e8a6bf3d21
Fold two assertions with backwards error messages into one with a
...
correct error message.
llvm-svn: 13590
2004-05-17 21:15:18 +00:00
Brian Gaeke
27e4943516
Clean up this pass somewhat:
...
Add better comments, including a better head-of-file comment.
Prune #includes.
Fix a FIXME that Chris put here by using doInitialization().
Use DEBUG() to print out debug msgs.
Give names to basic blocks inserted by this pass.
Expand tabs.
Use InsertProfilingInitCall() from ProfilingUtils to insert the initialize call.
llvm-svn: 13581
2004-05-14 21:21:52 +00:00
Misha Brukman
7e39a19ecb
Rename "User's Guide" to "Command Guide" to be consistent with current scheme.
...
llvm-svn: 13580
2004-05-14 20:29:11 +00:00
Misha Brukman
0dbe2acf5f
Ignore generated ps files.
...
llvm-svn: 13579
2004-05-14 20:26:45 +00:00
Misha Brukman
d198ac5470
Ignore generated man files.
...
llvm-svn: 13578
2004-05-14 20:26:39 +00:00
Misha Brukman
caed51e6f7
Ignore generated HTML files.
...
llvm-svn: 13577
2004-05-14 20:26:34 +00:00
Misha Brukman
5ac525ba39
This is the stylesheet used by perldoc.com; we shall modify it as we see fit.
...
llvm-svn: 13576
2004-05-14 20:25:35 +00:00
Misha Brukman
13b433ecf5
Put outputs of each type into a separate subdirectory.
...
llvm-svn: 13575
2004-05-14 20:24:59 +00:00
Brian Gaeke
ee7068ef6d
More pods... work in progress
...
llvm-svn: 13574
2004-05-14 19:50:33 +00:00
Misha Brukman
67abadb055
Use <pre> instead of <p><tt> combo to decrease space used for code blocks.
...
llvm-svn: 13573
2004-05-14 19:04:07 +00:00
Misha Brukman
c050f9fbc3
Mention the --tool-args option that Brian and Chris added.
...
llvm-svn: 13572
2004-05-14 18:57:24 +00:00
Misha Brukman
0c05819cf5
Make link to HowToSubmitABug.html local instead of to LLVM website.
...
llvm-svn: 13571
2004-05-14 18:54:04 +00:00
Brian Gaeke
1274e44002
NAME section is supposed to have a brief description, for apropos(1) & whatis(1)
...
llvm-svn: 13570
2004-05-14 18:31:13 +00:00
Brian Gaeke
c5565949df
This seems like as good a place as any to keep POD files.
...
llvm-svn: 13569
2004-05-14 18:03:22 +00:00
Brian Gaeke
de5ccc18e3
Don't keep track of references to LLVM BasicBlocks while emitting; use
...
MachineBasicBlocks instead.
llvm-svn: 13568
2004-05-14 06:54:58 +00:00
Brian Gaeke
2b3a81cd33
Support MachineBasicBlock operands on RawFrm instructions.
...
Get rid of separate numbering for LLVM BasicBlocks; use the automatically
generated MachineBasicBlock numbering.
llvm-svn: 13567
2004-05-14 06:54:57 +00:00
Brian Gaeke
35e73e1ca4
Generate branch machine instructions with MachineBasicBlock operands instead of
...
LLVM BasicBlock operands.
llvm-svn: 13566
2004-05-14 06:54:56 +00:00
Chris Lattner
0026512bac
This was not meant to be committed
...
llvm-svn: 13565
2004-05-13 20:56:34 +00:00
Chris Lattner
c12c945cc4
Fix a nasty bug that caused us to unroll EXTREMELY large loops due to overflow
...
in the size calculation.
This is not something you want to see:
Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - UNROLLING!
The problem was that 2*2147483648 == 0.
Now we get:
Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - TOO LARGE: 4294967296>100
Thanks to some anonymous person playing with the demo page that repeatedly
caused zion to go into swapping land. That's one way to ensure you'll get
a quick bugfix. :)
Testcase here: Transforms/LoopUnroll/2004-05-13-DontUnrollTooMuch.ll
llvm-svn: 13564
2004-05-13 20:43:31 +00:00
Chris Lattner
535a48942a
New testcase that used to cause the unroller to try to unroll the loop 2G times. :(
...
llvm-svn: 13563
2004-05-13 20:43:15 +00:00
Misha Brukman
7dcf665ed0
Specify units in padding length.
...
llvm-svn: 13560
2004-05-13 16:37:52 +00:00
Misha Brukman
603492299a
Make page HTML-4.01 compliant (& => & in URL).
...
llvm-svn: 13559
2004-05-13 16:37:23 +00:00
Chris Lattner
8e7aea026a
Two more improvements for null pointer handling: storing a null pointer
...
and passing a null pointer into a function.
For this testcase:
void %test(int** %X) {
store int* null, int** %X
call void %test(int** null)
ret void
}
we now generate this:
test:
sub %ESP, 12
mov %EAX, DWORD PTR [%ESP + 16]
mov DWORD PTR [%EAX], 0
mov DWORD PTR [%ESP], 0
call test
add %ESP, 12
ret
instead of this:
test:
sub %ESP, 12
mov %EAX, DWORD PTR [%ESP + 16]
mov %ECX, 0
mov DWORD PTR [%EAX], %ECX
mov %EAX, 0
mov DWORD PTR [%ESP], %EAX
call test
add %ESP, 12
ret
llvm-svn: 13558
2004-05-13 15:26:48 +00:00
Chris Lattner
593d22d666
Second half of my fixed-sized-alloca patch. This folds the LEA to compute
...
the alloca address into common operations like loads/stores.
In a simple testcase like this (which is just designed to excersize the
alloca A, nothing more):
int %test(int %X, bool %C) {
%A = alloca int
store int %X, int* %A
store int* %A, int** %G
br bool %C, label %T, label %F
T:
call int %test(int 1, bool false)
%V = load int* %A
ret int %V
F:
call int %test(int 123, bool true)
%V2 = load int* %A
ret int %V2
}
We now generate:
test:
sub %ESP, 12
mov %EAX, DWORD PTR [%ESP + 16]
mov %CL, BYTE PTR [%ESP + 20]
*** mov DWORD PTR [%ESP + 8], %EAX
mov %EAX, OFFSET G
lea %EDX, DWORD PTR [%ESP + 8]
mov DWORD PTR [%EAX], %EDX
test %CL, %CL
je .LBB2 # PC rel: F
.LBB1: # T
mov DWORD PTR [%ESP], 1
mov DWORD PTR [%ESP + 4], 0
call test
*** mov %EAX, DWORD PTR [%ESP + 8]
add %ESP, 12
ret
.LBB2: # F
mov DWORD PTR [%ESP], 123
mov DWORD PTR [%ESP + 4], 1
call test
*** mov %EAX, DWORD PTR [%ESP + 8]
add %ESP, 12
ret
Instead of:
test:
sub %ESP, 20
mov %EAX, DWORD PTR [%ESP + 24]
mov %CL, BYTE PTR [%ESP + 28]
*** lea %EDX, DWORD PTR [%ESP + 16]
*** mov DWORD PTR [%EDX], %EAX
mov %EAX, OFFSET G
mov DWORD PTR [%EAX], %EDX
test %CL, %CL
*** mov DWORD PTR [%ESP + 12], %EDX
je .LBB2 # PC rel: F
.LBB1: # T
mov DWORD PTR [%ESP], 1
mov %EAX, 0
mov DWORD PTR [%ESP + 4], %EAX
call test
*** mov %EAX, DWORD PTR [%ESP + 12]
*** mov %EAX, DWORD PTR [%EAX]
add %ESP, 20
ret
.LBB2: # F
mov DWORD PTR [%ESP], 123
mov %EAX, 1
mov DWORD PTR [%ESP + 4], %EAX
call test
*** mov %EAX, DWORD PTR [%ESP + 12]
*** mov %EAX, DWORD PTR [%EAX]
add %ESP, 20
ret
llvm-svn: 13557
2004-05-13 15:12:43 +00:00
Chris Lattner
2bb3325965
Substantially improve code generation for address exposed locals (aka fixed
...
sized allocas in the entry block). Instead of generating code like this:
entry:
reg1024 = ESP+1234
... (much later)
*reg1024 = 17
Generate code that looks like this:
entry:
(no code generated)
... (much later)
t = ESP+1234
*t = 17
The advantage being that we DRAMATICALLY reduce the register pressure for these
silly temporaries (they were all being spilled to the stack, resulting in very
silly code). This is actually a manual implementation of rematerialization :)
I have a patch to fold the alloca address computation into loads & stores, which
will make this much better still, but just getting this right took way too much time
and I'm sleepy.
llvm-svn: 13554
2004-05-13 07:40:27 +00:00
Reid Spencer
1b3b3ef375
Reduce line length to about 80 chars.
...
llvm-svn: 13538
2004-05-13 03:40:27 +00:00
Misha Brukman
53dd5e66eb
Insert spacing between the table and the next section.
...
llvm-svn: 13523
2004-05-13 00:37:23 +00:00
Misha Brukman
4642d92b12
* Use stylesheets for table borders so we factor out the formatting and can
...
adjust it much easier. Also changed border to gray to fit into the current
color scheme.
* Convert < and > to < and >, respectively.
* Wrap long lines at 80 cols
llvm-svn: 13522
2004-05-13 00:24:43 +00:00
Brian Gaeke
99e7c1cf44
Fix a comment.
...
llvm-svn: 13518
2004-05-12 21:57:23 +00:00
Chris Lattner
6307b8d061
Fix a really nasty bug from my changes on Monday to PHIElim. These changes
...
broke obsequi and a lot of other things. It all boiled down to MBB being
overloaded in an inner scope and me confusing it with the one in the outer
scope. Ugh!
llvm-svn: 13517
2004-05-12 21:47:57 +00:00
Misha Brukman
fa50a224bf
Break lines at 80 cols; eliminate extra space caused by a single <p> tag on a
...
line by itself.
llvm-svn: 13516
2004-05-12 21:46:05 +00:00
Brian Gaeke
4cf17775e8
Start NextMBBNumber out at zero.
...
llvm-svn: 13515
2004-05-12 21:35:23 +00:00
Brian Gaeke
cb5d22a0cb
Add non-const MachineBasicBlock::getParent() accessor method.
...
MBBs start out as #-1. When a MBB is added to a MachineFunction, it
gets the next available unique MBB number. If it is removed from a
MachineFunction, it goes back to being #-1.
llvm-svn: 13514
2004-05-12 21:35:22 +00:00
Brian Gaeke
379e609e3d
Add a NextMBBNumber field w/ incrementing accessor method, for
...
function-level unique numbering of MBBs.
llvm-svn: 13513
2004-05-12 21:35:21 +00:00
Brian Gaeke
00db6be879
Add a Number field w/ accessor method, for function-level unique numbering
...
of MBBs.
Add non-const MachineBasicBlock::getParent() accessor method.
llvm-svn: 13512
2004-05-12 21:35:20 +00:00
Chris Lattner
c9ebda0fcd
Make the subsubsections stand out a bit more
...
llvm-svn: 13511
2004-05-12 21:28:08 +00:00
Misha Brukman
fdb2b17b3c
These images have been moved to img/
...
llvm-svn: 13510
2004-05-12 21:26:39 +00:00
Misha Brukman
3c1f8e7aa7
Use the images in the img/ directory.
...
llvm-svn: 13509
2004-05-12 21:26:16 +00:00
Misha Brukman
746c5181cd
Finally, switch to a stylesheet that makes the documentation easier on the eyes
...
and consistent with the LLVM website.
llvm-svn: 13508
2004-05-12 21:20:56 +00:00
Misha Brukman
9d05fbf7be
Centralize images in this dir; add lines.gif from website for consistent
...
formatting.
llvm-svn: 13507
2004-05-12 21:20:13 +00:00
Misha Brukman
e15655b404
Make file use stylesheets and be HTML-4.01 (Strict)-compliant.
...
llvm-svn: 13506
2004-05-12 20:57:43 +00:00
Misha Brukman
6eb0085f65
Made document HTML-4.01 (Strict)-compliant.
...
llvm-svn: 13505
2004-05-12 19:52:00 +00:00
Misha Brukman
c1aac03803
Make file standard-compliant once again.
...
llvm-svn: 13504
2004-05-12 19:25:59 +00:00
Misha Brukman
f91d994801
Made file comply with HTML-4.01 (Strict)
...
llvm-svn: 13503
2004-05-12 19:21:57 +00:00
Chris Lattner
5f49573cf6
Turn the block extractor on by default now that it basically works, eliminating the option.
...
llvm-svn: 13502
2004-05-12 19:02:44 +00:00
Misha Brukman
c06c9332ab
Made file HTML-4.01 (Strict)-compliant.
...
llvm-svn: 13501
2004-05-12 18:57:54 +00:00
Misha Brukman
4478f2b039
Made to be HTML-4.01 (Strict)-compliant.
...
llvm-svn: 13500
2004-05-12 18:49:47 +00:00
Misha Brukman
374258e5ce
Made to be HTML-4.01 (Strict) -compliant.
...
llvm-svn: 13499
2004-05-12 18:42:35 +00:00
Misha Brukman
d4f290a8ae
Add proper footer since this file is HTML-4.01 compliant.
...
llvm-svn: 13498
2004-05-12 18:37:22 +00:00
Misha Brukman
692cec07db
Make document HTML-4.01 (Strict) compliant.
...
llvm-svn: 13497
2004-05-12 18:31:21 +00:00
Misha Brukman
55ba220cee
Fix grammar: remove `the' before LLVM.
...
llvm-svn: 13496
2004-05-12 18:02:00 +00:00
Misha Brukman
8e33feddac
* Make the document format follow the stringent purple standards (like the rest
...
of the documentation)
* Do not make the link text be the link itself, use some keywords
* Make doc use stylesheets and HTML markup for lists instead of definitions
* Shorten page by not making multiple lines per link with description + link of
the same name as the target
llvm-svn: 13495
2004-05-12 18:00:48 +00:00
Chris Lattner
e2d382e1a4
Pass boolean constants into function calls more efficiently, generating:
...
mov DWORD PTR [%ESP + 4], 1
instead of:
mov %EAX, 1
mov DWORD PTR [%ESP + 4], %EAX
llvm-svn: 13494
2004-05-12 16:35:04 +00:00
Chris Lattner
66219abac7
Do not pass in the same argument to the extracted function more than once, and
...
give the extracted function a more useful name than just foo_code.
llvm-svn: 13493
2004-05-12 16:26:18 +00:00
Chris Lattner
6c0c313daf
Check to see if all blocks are extractible first.
...
llvm-svn: 13491
2004-05-12 16:08:01 +00:00
Chris Lattner
13d2ddfe9c
Implement support for code extracting basic blocks that have a return
...
instruction in them.
llvm-svn: 13490
2004-05-12 16:07:41 +00:00
Chris Lattner
795c9933e2
Implement splitting of PHI nodes, allowing block extraction of BB's that have
...
PHI node entries from multiple outside-the-region blocks. This also fixes
extraction of the entry block in a function. Yaay.
This has successfully block extracted all (but one) block from the score_move
function in obsequi (out of 33). Hrm, I wonder which block the bug is in. :)
llvm-svn: 13489
2004-05-12 15:29:13 +00:00
Chris Lattner
3b2917bfcf
* Pull some code out into the definedInRegion/definedInCaller methods
...
* Add a stub for the severSplitPHINodes which will allow us to bbextract
bb's with PHI nodes in them soon.
* Remove unused arguments from findInputsOutputs
* Dramatically simplify the code in findInputsOutputs. In particular,
nothing really cares whether or not a PHI node is using something.
* Move moveCodeToFunction to after emitCallAndSwitchStatement as that's the
order they get called.
* Fix a bug where we would code extract a region that included a call to
vastart. Like 'alloca', calls to vastart must stay in the function that
they are defined in.
* Add some comments.
llvm-svn: 13482
2004-05-12 06:01:40 +00:00
Chris Lattner
ffc4926263
Generate substantially better code when there are a limited number of exits
...
from the extracted region. If the return has 0 or 1 exit blocks, the new
function returns void. If it has 2 exits, it returns bool, otherwise it
returns a ushort as before.
This allows us to use a conditional branch instruction when there are two
exit blocks, as often happens during block extraction.
llvm-svn: 13481
2004-05-12 04:14:24 +00:00
Chris Lattner
3d1ca67fdd
Two minor improvements:
...
1. Get rid of the silly abort block. When doing bb extraction, we get one
abort block for every block extracted, which is kinda annoying.
2. If the switch ends up having a single destination, turn it into an
unconditional branch.
I would like to add support for conditional branches, but to do this we will
want to have the function return a bool instead of a ushort.
llvm-svn: 13478
2004-05-12 03:22:33 +00:00
Chris Lattner
af24e90c51
Don't leave dead bytecode.output files around if the optimizer/block extractor crashes.
...
llvm-svn: 13477
2004-05-12 02:55:45 +00:00
Misha Brukman
5ed8cf5f1e
This file has been superseded by docs/index.html .
...
llvm-svn: 13476
2004-05-12 02:48:30 +00:00
Chris Lattner
49e4a33c98
Implement the final missing bits for block extractor support. Now bugpoint
...
can extract basic blocks up to the limit of the block extractor implementation.
llvm-svn: 13475
2004-05-12 02:43:24 +00:00
Misha Brukman
b797a4f968
Add link to Valgrind.
...
llvm-svn: 13472
2004-05-12 00:57:24 +00:00
Chris Lattner
a060b10ee5
Implement basic block extraction for the miscompilation debugger. This still needs
...
two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block
extractor itself needs to have enough bugs fixed for this to be more or less
useful.
Until the time that this is generally useful, it is hidden behind the new bugpoint
-enable-block-extraction option. I hope to get the FIXME done tonight.
Also of note, this patch adds a -extract-bbs option to bugpoint which can be used
to debug the block extractor. (hint hint Misha :)
llvm-svn: 13471
2004-05-11 21:54:13 +00:00
Chris Lattner
d7d574db01
A class that is meant to be a base class should have a virtual destructor
...
llvm-svn: 13470
2004-05-11 20:41:07 +00:00
Chris Lattner
415532491a
Add a note to make sure the program is memory correct
...
llvm-svn: 13464
2004-05-11 19:34:27 +00:00
John Criswell
1aaea06cbc
Added obsequi.
...
llvm-svn: 13462
2004-05-11 19:29:59 +00:00
Brian Gaeke
4db22f625e
Use inttypes.h, which exists on all of Linux, Solaris and Darwin.
...
llvm-svn: 13461
2004-05-11 16:14:53 +00:00
Chris Lattner
9dca2d7852
Unbreak the build on X86.
...
llvm-svn: 13460
2004-05-11 14:08:54 +00:00
Brian Gaeke
a9cfeeb826
Squash warnings on Solaris/sparc... the test suite is not working for me so I
...
can't be sure if these are OK, but they look OK.
llvm-svn: 13459
2004-05-11 07:45:28 +00:00
Brian Gaeke
f120c9d69b
Do not hardcode the name of gcc, because its full pathname may have been
...
specified by top-level configure
llvm-svn: 13458
2004-05-11 07:42:58 +00:00
Brian Gaeke
b6b0f46220
Do not depend on the path to bash
...
llvm-svn: 13457
2004-05-11 07:42:19 +00:00
Brian Gaeke
940c2a8306
Include <sys/types.h> to get the definition of int64_t on Solaris.
...
llvm-svn: 13456
2004-05-11 07:18:02 +00:00
Chris Lattner
24f200ad7b
Switch this from using an std::map to using a DenseMap. This speeds up
...
phi-elimination from 0.6 to 0.54s on kc++.
llvm-svn: 13454
2004-05-10 19:17:36 +00:00
Chris Lattner
39a1e0a33e
Use a new VRegPHIUseCount to compute uses of PHI values by other phi values
...
in the basic block being processed. This fixes PhiElimination on kimwitu++
from taking 105s to taking a much more reasonable 0.6s (in a debug build).
llvm-svn: 13453
2004-05-10 19:06:37 +00:00
Chris Lattner
a2f7b9bddc
Now that we use an ilist of machine instructions, iterators are more robust
...
than before. Because this is the case, we can compute the first non-phi
instruction once when de-phi'ing a block. This shaves ~4s off of
phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s. There are
still much more important gains to come.
llvm-svn: 13452
2004-05-10 18:47:18 +00:00
Chris Lattner
72fb3256f8
Fix a fairly serious pessimizaion that was preventing us from efficiently
...
compiling things like 'add long %X, 1'. The problem is that we were switching
the order of the operands for longs even though we can't fold them yet.
llvm-svn: 13451
2004-05-10 15:15:55 +00:00
Chris Lattner
eefb8a7dd0
Bug fixed
...
llvm-svn: 13450
2004-05-10 14:28:09 +00:00
Chris Lattner
5eb8094c2d
Patch to fix PR337. Make sure to mark all aliased physical registers as used
...
when we see a read of a register. This is important in cases like:
AL = ...
AH = ...
= AX
The read of AX must make both the AL and AH defs live until the use.
llvm-svn: 13444
2004-05-10 05:12:43 +00:00
Chris Lattner
60ef22da3d
Testcase for PR337, which was reduced by Reid Spencer.
...
llvm-svn: 13443
2004-05-10 05:11:24 +00:00
Reid Spencer
45e25d8295
Bug 178 Fixed
...
llvm-svn: 13442
2004-05-09 23:32:39 +00:00
Reid Spencer
be4fadf1b8
Changes to make the Stacker Stack use 64 bit values. This *should* get
...
around the problem with Stacker on Solaris because the Stack can handle
64-bit entries (pointer sized).
llvm-svn: 13441
2004-05-09 23:20:19 +00:00
Chris Lattner
a367dd745b
Fix some comments, avoid sign extending booleans when zero extend works fine
...
llvm-svn: 13440
2004-05-09 23:16:33 +00:00
Chris Lattner
1542a98e7b
Generate more efficient code for casting booleans to integers (no sign extension required)
...
llvm-svn: 13439
2004-05-09 22:28:45 +00:00
Chris Lattner
f719a52088
syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
...
llvm-svn: 13438
2004-05-09 20:41:32 +00:00
Chris Lattner
87d036caf2
Do not emit prototypes for setjmp/longjmp, as they are handled specially
...
llvm-svn: 13437
2004-05-09 16:03:29 +00:00
Chris Lattner
17fcb67a20
Fine grainify namespacification
...
llvm-svn: 13436
2004-05-09 06:22:29 +00:00
Chris Lattner
9c29991970
Make the floating point constant pools local to each function, split the
...
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!
llvm-svn: 13435
2004-05-09 06:20:51 +00:00
Brian Gaeke
e3e557e553
Bug fixed.
...
Rewrite portability intro.
llvm-svn: 13434
2004-05-09 05:28:35 +00:00
Chris Lattner
14d328e2a5
Get this looking more like a function pass.
...
llvm-svn: 13433
2004-05-09 04:30:20 +00:00
Chris Lattner
254677fe0a
Implement the AddPrototypes method
...
llvm-svn: 13432
2004-05-09 04:29:57 +00:00
Chris Lattner
e7cc64f6e7
Add support for inserting all prototypes up-front
...
llvm-svn: 13431
2004-05-09 04:29:49 +00:00
Chris Lattner
2484a6336f
Print all PHI copies for successor blocks before the terminator, whether it be a conditional branch or switch.
...
llvm-svn: 13430
2004-05-09 03:42:48 +00:00
Chris Lattner
8ec5f88c79
Fix stupid bug in my checkin yesterday
...
llvm-svn: 13429
2004-05-08 22:41:42 +00:00
Tanya Lattner
090365b154
Fixed up sched graph.
...
llvm-svn: 13428
2004-05-08 16:14:24 +00:00
Tanya Lattner
f751ca6767
Registering the ModuloScheduling pass.
...
llvm-svn: 13427
2004-05-08 16:14:02 +00:00
Tanya Lattner
8ad6335dfa
Changed CPUResource to allow access to max num users for a resource.
...
Also added ModuloScheduling as a friend.
llvm-svn: 13426
2004-05-08 16:13:26 +00:00
Tanya Lattner
39bd20d6eb
Changed CPUResource to allow access to maxnum users.
...
llvm-svn: 13425
2004-05-08 16:12:50 +00:00
Tanya Lattner
a6820d6704
Updating my versions of ModuloScheduling in cvs. Still not complete.
...
llvm-svn: 13424
2004-05-08 16:12:10 +00:00
Brian Gaeke
1096ba9422
Add support for widening integral casts.
...
Flesh out the SetCC support... which currently ends in a little bit
of unfinished code (which is probably completely hilarious) for
generating the condition value splitting the basic block up into 4
blocks, like this (clearly a better API is needed for this!):
BB
cond. branch
/ / R1=1 R2=0
\ /
\ /
R=phi(R1,R2)
Other minor edits.
llvm-svn: 13423
2004-05-08 06:36:14 +00:00
Brian Gaeke
91bf7cb79b
Add a bunch more branches
...
llvm-svn: 13422
2004-05-08 06:08:29 +00:00
Brian Gaeke
7a66e5fff9
Flesh out GEP support
...
llvm-svn: 13421
2004-05-08 05:27:20 +00:00
Brian Gaeke
d18b330605
Add ADD with immediate
...
llvm-svn: 13420
2004-05-08 05:26:55 +00:00
Brian Gaeke
b56f1c9c10
Add forms of CMP, SUBCC, and a few branches, and some comments.
...
llvm-svn: 13419
2004-05-08 04:21:32 +00:00
Brian Gaeke
f3a479f04a
Add stub support for GEPs.
...
Add support for branches (based loosely on X86/InstSelectSimple).
Add support for not visiting phi nodes in the first pass.
Add support for loading bools.
Flesh out support for stores.
llvm-svn: 13418
2004-05-08 04:21:17 +00:00
Alkis Evlogimenos
2a54b5d3e1
Add required header
...
llvm-svn: 13417
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos
54a89b7c72
Remove unneeded header
...
llvm-svn: 13416
2004-05-08 03:49:35 +00:00
Chris Lattner
5f667a6f58
Implement folding of GEP's like:
...
%tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5 ; <sbyte*> [#uses=2]
%tmp.7 = getelementptr sbyte* %tmp.0, int 8 ; <sbyte*> [#uses=1]
together. This patch actually allows us to simplify and generalize the code.
llvm-svn: 13415
2004-05-07 22:09:22 +00:00
Brian Gaeke
9a7b9d07f0
Allow the user to set the LLVMINTERP environment variable as a workaround, for
...
when they have to run a gccld shell script without having lli in their path.
This is intended to address Bug 289.
Also, emit the traditional syntax ${1+"$@"} for passing all of a shell script's
args to a subprocess. If you have arguments that have spaces in them, $* will
not preserve the quoting (i.e., the quoted string "foo bar" as an argument will
end up as two arguments "foo" "bar" to lli.)
llvm-svn: 13414
2004-05-07 21:47:36 +00:00
Brian Gaeke
584308b71a
Add support for copying bool constants to registers.
...
Disable the code that copies long constants to registers - it looks fishy.
Implement some simple casts: integral, smaller than longs, and equal-width
or narrowing only.
llvm-svn: 13413
2004-05-07 21:39:30 +00:00
Chris Lattner
a2dc6bf6e6
Codegen floating point stores of constants into integer instructions. This
...
allows us to compile:
store float 10.0, float* %P
into:
mov DWORD PTR [%EAX], 1092616192
instead of:
.CPItest_0: # float 0x4024000000000000
.long 1092616192 # float 10
...
fld DWORD PTR [.CPItest_0]
fstp DWORD PTR [%EAX]
llvm-svn: 13409
2004-05-07 21:18:15 +00:00
Brian Gaeke
1edc9637d0
Add more casts. You can never have enough casts.
...
llvm-svn: 13408
2004-05-07 21:10:28 +00:00
Chris Lattner
cecf3f94a4
Make comparisons against the null pointer as efficient as integer comparisons
...
against zero. In particular, don't emit:
mov %ESI, 0
cmp %ECX, %ESI
instead, emit:
test %ECX, %ECX
llvm-svn: 13407
2004-05-07 19:55:55 +00:00
Chris Lattner
cf5822a2be
PR implemented
...
llvm-svn: 13406
2004-05-07 19:23:05 +00:00
Chris Lattner
3553fe3a5b
Bug fixed
...
llvm-svn: 13403
2004-05-07 18:40:38 +00:00
Chris Lattner
798b5e4a6f
New testcase
...
llvm-svn: 13402
2004-05-07 18:38:59 +00:00
Chris Lattner
0a8ee61c51
New testcase for PR336
...
llvm-svn: 13401
2004-05-07 15:38:50 +00:00
Chris Lattner
d9e5813821
Fix PR336: The instcombine pass asserts when visiting load instruction
...
llvm-svn: 13400
2004-05-07 15:35:56 +00:00
John Criswell
e0727fe00d
Regression test for PR#330.
...
llvm-svn: 13399
2004-05-07 13:57:19 +00:00
Chris Lattner
c6fdf8ddb3
Add the enum corresponding to the source change I made earlier
...
llvm-svn: 13395
2004-05-07 02:27:32 +00:00
John Criswell
6956afa7c5
Bug fixed.
...
llvm-svn: 13392
2004-05-06 22:23:24 +00:00
John Criswell
2af0fd3ca8
Don't call getForwardedType() twice, as recommended by Chris.
...
llvm-svn: 13391
2004-05-06 22:15:47 +00:00
Chris Lattner
6aee736d1b
Use the new commandline flag to allow us to call bugpoint like this:
...
bugpoint ... --tool-args -enable-correct-eh-support -regalloc=linearscan --args -- -foo
So that tool-args option gets the -enable-correct-eh-support -regalloc=linearscan flags instead of bugpoint.
llvm-svn: 13389
2004-05-06 22:05:35 +00:00
Chris Lattner
a60f355c87
Implement the new cl::PositionalEatsArgs flag, refactor code a bit
...
llvm-svn: 13388
2004-05-06 22:04:31 +00:00
Chris Lattner
b68bd76978
Add a new cl::PositionalEatsArgs flag
...
llvm-svn: 13387
2004-05-06 22:03:59 +00:00
John Criswell
f6709bc579
Fix for PR#330.
...
When looking at getelementptr instructions, make sure to use a forwarded
type. We want to do this because a DerivedType may drop its uses and then
refine its users, who may then use another user who hasn't been refined yet.
By getting the forwarded type, we always ensure that we're looking at a
Type that isn't in a halfway refined state.
Now, I should be able to put this stuff in PATypeHandle, but it doesn't work
for some reason. This should do for now.
llvm-svn: 13386
2004-05-06 21:18:08 +00:00
Chris Lattner
8737169a6a
Remove a really old comment
...
llvm-svn: 13385
2004-05-06 19:29:58 +00:00
Reid Spencer
432f53b47f
Just testing the "Reid has CVS commit access" system
...
llvm-svn: 13384
2004-05-06 18:06:18 +00:00
Misha Brukman
afdd8a0608
Give props to Vladimir Prus for the inst_iterator patch.
...
llvm-svn: 13383
2004-05-06 16:53:18 +00:00
Chris Lattner
991425ae70
numeric_limits::infinity() apparently does not work on all systems. As a
...
workaround, use the C HUGE_VAL macro instead.
llvm-svn: 13377
2004-05-06 16:25:59 +00:00
Alkis Evlogimenos
4c4497e834
Fix for gcc3.4: invalid use of forward delacred class on line 93
...
llvm-svn: 13370
2004-05-06 02:07:42 +00:00
Brian Gaeke
e330adf842
Move the stuff that fixes the size, orientation & fonts of graphs to
...
the debugging functions that call "dot". These fixed settings have
various problems: for example, the fixed size that is set in the graph
traits classes is not appropriate for turning the dot file into a PNG,
and if TrueType font rendering is being used, the 'Courier' TrueType font
may not be installed. It seems easy enough to specify these things on the
command line, anyhow.
llvm-svn: 13366
2004-05-05 06:10:06 +00:00
Brian Gaeke
706bd5bf2b
Apply simplification suggested by Chris: why assign() when operator = will do?
...
llvm-svn: 13364
2004-05-04 22:02:41 +00:00
John Criswell
987ad1945d
Fixed inconsistent indentation.
...
llvm-svn: 13363
2004-05-04 21:46:05 +00:00
Brian Gaeke
d26074eef1
Missing piece of fix for Bug 333
...
llvm-svn: 13362
2004-05-04 21:41:45 +00:00
Brian Gaeke
e307f8a791
Bugs fixed
...
llvm-svn: 13360
2004-05-04 21:22:57 +00:00
Brian Gaeke
48ef3f0fa1
update command guide to have --tool-args
...
llvm-svn: 13359
2004-05-04 21:13:35 +00:00
Brian Gaeke
4a278f0b1b
Add --tool-args flag which lets you pass arguments to llc or lli.
...
This is intended to address Bug 40.
llvm-svn: 13358
2004-05-04 21:09:16 +00:00
Brian Gaeke
f2ff5dd442
Correctly mangle function names when they are used as part of a
...
constant pool member's name.
This is intended to address Bug 333.
Also, fix an anachronistic usage of "M" as a parameter of type Function *.
llvm-svn: 13357
2004-05-04 21:09:02 +00:00
Brian Gaeke
b3a9a0fcbd
Add "Args" optional argument to AbstractInterpreter factory methods, which
...
fills in a ToolArgs vector in the AbstractInterpreter if it is set. This
ToolArgs vector is used to pass additional arguments to LLI and/or LLC.
This is intended to address Bug 40.
Also, make -debug-only=toolrunner work for the LLC and CBE
AbstractInterpreters.
llvm-svn: 13356
2004-05-04 21:09:01 +00:00
Chris Lattner
c6f601310f
Remove unneeded check
...
llvm-svn: 13355
2004-05-04 19:35:11 +00:00
Chris Lattner
22df9a59b4
Improve signed division by power of 2 *dramatically* from this:
...
div:
mov %EDX, DWORD PTR [%ESP + 4]
mov %ECX, 64
mov %EAX, %EDX
sar %EDX, 31
idiv %ECX
ret
to this:
div:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
sar %ECX, 5
shr %ECX, 26
mov %EDX, %EAX
add %EDX, %ECX
sar %EAX, 6
ret
Note that the intel compiler is currently making this:
div:
movl 4(%esp), %edx #3.5
movl %edx, %eax #4.14
sarl $5, %eax #4.14
shrl $26, %eax #4.14
addl %edx, %eax #4.14
sarl $6, %eax #4.14
ret #4.14
Which has one less register->register copy. (hint hint alkis :)
llvm-svn: 13354
2004-05-04 19:33:58 +00:00
Misha Brukman
bc1ccfd053
Provide visit(Module&) and visitModule(Module&) functionality.
...
llvm-svn: 13353
2004-05-04 18:30:38 +00:00
Brian Gaeke
600f2045a9
Add stub support for reading BBTraces.
...
llvm-svn: 13352
2004-05-04 17:11:14 +00:00
Brian Gaeke
9a1b8c73a8
Add BBTrace accessor method and data member.
...
llvm-svn: 13351
2004-05-04 17:11:13 +00:00
Chris Lattner
ea309ff082
Bug fixed
...
llvm-svn: 13350
2004-05-04 17:04:09 +00:00
Chris Lattner
9490849028
Do not mark instructions in unreachable sections of the function as live.
...
This fixes PR332 and ADCE/2004-05-04-UnreachableBlock.llx
llvm-svn: 13349
2004-05-04 17:00:46 +00:00
Chris Lattner
1190a4de0b
New testcase for PR332
...
llvm-svn: 13348
2004-05-04 17:00:10 +00:00
Brian Gaeke
ba7b0d7a0e
New header file containing profile info enums shared between the C++ analysis
...
libraries and the C runtime support library
llvm-svn: 13347
2004-05-04 16:57:57 +00:00
Brian Gaeke
34c13fbe94
Share ProfilingType enum with the C profiling runtime libraries.
...
llvm-svn: 13346
2004-05-04 16:53:07 +00:00
Brian Gaeke
495d9340e9
Share the profile info type enum with the C++ analysis libraries.
...
Add a documentation comment for write_profiling_data().
llvm-svn: 13345
2004-05-04 16:51:48 +00:00
Brian Gaeke
875d70b3c0
Constants for profile info type changed names to match the C++ ones.
...
llvm-svn: 13344
2004-05-04 16:51:47 +00:00
Brian Gaeke
6e72e2a6e9
Constants for profile info type changed names to match the C++ ones.
...
Edited comments.
llvm-svn: 13343
2004-05-04 16:51:46 +00:00
Chris Lattner
8c22ece232
Improve code generated for integer multiplications by 2,3,5,9
...
llvm-svn: 13342
2004-05-04 15:47:14 +00:00
Chris Lattner
dd1a86d858
Minor efficiency tweak, suggested by Patrick Meredith
...
llvm-svn: 13341
2004-05-04 15:19:33 +00:00
Brian Gaeke
5237476f75
Fix typo
...
llvm-svn: 13340
2004-05-03 23:52:07 +00:00
Brian Gaeke
2157c9a49b
Add initial implementation of basic block tracing runtime
...
llvm-svn: 13339
2004-05-03 23:51:50 +00:00
Brian Gaeke
417d555b6f
Add basic block tracing functions as exported symbols.
...
llvm-svn: 13338
2004-05-03 23:49:17 +00:00
Brian Gaeke
213715bceb
Add basic block tracing information as a type of "profiling" information.
...
llvm-svn: 13337
2004-05-03 23:49:16 +00:00
Brian Gaeke
e96196081e
In InsertProfilingInitCall(), make it legal to pass in a null array, in
...
which case you'll get a null array and zero passed to the profiling function.
llvm-svn: 13336
2004-05-03 22:06:33 +00:00
Brian Gaeke
088dd3e121
Add initial implementation of basic-block tracing instrumentation pass.
...
llvm-svn: 13335
2004-05-03 22:06:32 +00:00
Chris Lattner
6e6baf6157
Initialize member out of paranoia
...
llvm-svn: 13319
2004-05-02 16:06:40 +00:00
Chris Lattner
6942946132
Fix a problem with double freeing memory. For some reason, CallGraph is not
...
acting like a normal pass. :(
llvm-svn: 13318
2004-05-02 16:06:18 +00:00
Chris Lattner
929291aabb
Plug a minor memory leak
...
llvm-svn: 13317
2004-05-02 07:31:34 +00:00
Chris Lattner
be6f06818c
Do not clone arbitrary condition instructions.
...
llvm-svn: 13316
2004-05-02 05:19:36 +00:00
Chris Lattner
51a6dbcb65
Do not infinitely "unroll" single BB loops.
...
llvm-svn: 13315
2004-05-02 05:02:03 +00:00
Chris Lattner
2ad4878d8e
Add some stuff to the release notes.
...
llvm-svn: 13314
2004-05-02 04:19:15 +00:00
Brian Gaeke
19202cd08b
Chris told me to take these assertions out a few days ago, but I forgot to
...
check this in.
llvm-svn: 13313
2004-05-02 01:04:52 +00:00
Chris Lattner
1e94ed606e
Dont' merge terminators that are needed to select PHI node values.
...
llvm-svn: 13312
2004-05-02 01:00:44 +00:00
Chris Lattner
2e93c4275e
Implement SimplifyCFG/branch-cond-merge.ll
...
Turning "if (A < B && B < C)" into "if (A < B & B < C)"
llvm-svn: 13311
2004-05-01 23:35:43 +00:00
Chris Lattner
c9b34e5648
New testcase:
...
Turn "if (A < B && B < C)" into "if (A < B & B < C)"
llvm-svn: 13310
2004-05-01 23:35:21 +00:00
Chris Lattner
63d75af920
Make sure to reprocess instructions used by deleted instructions to avoid
...
missing opportunities for combination.
llvm-svn: 13309
2004-05-01 23:27:23 +00:00
Chris Lattner
b643a9e675
Make sure the instruction combiner doesn't lose track of instructions
...
when replacing them, missing the opportunity to do simplifications
llvm-svn: 13308
2004-05-01 23:19:52 +00:00
Chris Lattner
4cbd160b45
Fix my missing parens
...
llvm-svn: 13307
2004-05-01 22:41:51 +00:00
Chris Lattner
88da6f7b52
Implement SimplifyCFG/branch-cond-prop.ll
...
llvm-svn: 13306
2004-05-01 22:36:37 +00:00
Chris Lattner
380affdc88
New testcase for case that simplifycfg should catch
...
llvm-svn: 13305
2004-05-01 22:36:24 +00:00
Chris Lattner
7b0a2046d4
Remove unused #include
...
llvm-svn: 13304
2004-05-01 21:29:16 +00:00
Chris Lattner
acbf0c84de
Iterate over the Machine CFG that Brian added instead of the LLVM CFG.
...
Look at all of the pretty minuses. :)
llvm-svn: 13303
2004-05-01 21:27:53 +00:00
Chris Lattner
8c0bc68910
Operate on the Machine CFG instead of on the LLVM CFG
...
llvm-svn: 13302
2004-05-01 21:24:39 +00:00
Chris Lattner
c49a9a5d76
Stop LiveVariables from using BasicBlocks as part of the mapping, instead
...
use MachineBasicBlocks. To do this, we traverse the Machine CFG instead of
the LLVM CFG, which is also *MUCH* more efficient by having fewer levels of
indirections and mappings.
llvm-svn: 13301
2004-05-01 21:24:24 +00:00
Chris Lattner
5e65763532
Stop LiveVariables from using BasicBlocks as part of the mapping, instead
...
use MachineBasicBlocks.
llvm-svn: 13300
2004-05-01 21:23:35 +00:00
Chris Lattner
c89208483f
Move the GraphTraits for MachineBasicBlocks to the MachineBasicBlock file.
...
llvm-svn: 13299
2004-05-01 21:05:34 +00:00
Chris Lattner
15a041ca88
Add comment about optimizations
...
llvm-svn: 13298
2004-05-01 11:40:07 +00:00
Chris Lattner
490e804a4e
Add a constructor that got lost
...
llvm-svn: 13297
2004-05-01 11:17:13 +00:00
Brian Gaeke
2d7efbbb93
Generalize the strlen size_t hack, for the benefit of the other external
...
functions with wrappers that either take or return size_ts.
llvm-svn: 13296
2004-05-01 06:42:15 +00:00
Chris Lattner
77a51733e7
Fix broken link, again.
...
llvm-svn: 13295
2004-04-30 22:17:12 +00:00
Tanya Lattner
f0fda31479
Sorry, now friend class name should be right!!
...
llvm-svn: 13294
2004-04-30 20:48:37 +00:00
Tanya Lattner
34f7cfe4d0
Fixed friend class name for ModuloScheduling.
...
llvm-svn: 13293
2004-04-30 20:47:59 +00:00
Tanya Lattner
717f2a51fd
Fixed friend class name for ModuloSched
...
llvm-svn: 13292
2004-04-30 20:46:40 +00:00
Tanya Lattner
6ebf67f8b6
Removing MachineResource class.
...
llvm-svn: 13291
2004-04-30 20:40:38 +00:00
Chris Lattner
e8b56f27b8
Fix a broken link
...
llvm-svn: 13290
2004-04-30 14:13:16 +00:00
Chris Lattner
652064e3b8
Fix a major pessimization in the instcombiner. If an allocation instruction
...
is only used by a cast, and the casted type is the same size as the original
allocation, it would eliminate the cast by folding it into the allocation.
Unfortunately, it was placing the new allocation instruction right before
the cast, which could pull (for example) alloca instructions into the body
of a function. This turns statically allocatable allocas into expensive
dynamically allocated allocas, which is bad bad bad.
This fixes the problem by placing the new allocation instruction at the same
place the old one was, duh. :)
llvm-svn: 13289
2004-04-30 04:37:52 +00:00
Brian Gaeke
63c3b3c8d7
Add machine-CFG graph traits specializations.
...
llvm-svn: 13288
2004-04-29 17:43:55 +00:00
Misha Brukman
372d5bc9ab
Wrapped code and comments at 80 cols; doxygenified some comments.
...
llvm-svn: 13264
2004-04-29 04:05:30 +00:00
Misha Brukman
a70ae90722
Reorder #includes as per style guide.
...
llvm-svn: 13263
2004-04-29 04:04:47 +00:00
Misha Brukman
40b4f6eca8
Added `zeroinitializer' keyword.
...
llvm-svn: 13253
2004-04-28 19:36:08 +00:00
Misha Brukman
da546eac70
class AssemblyWriter:
...
* Make contained ostream pointer, not reference
* Allow setting of that ostream via setStream()
class CachedWriter:
* setStream() in turn calls setStream() on the AssemblyWriter
llvm-svn: 13247
2004-04-28 19:24:28 +00:00
Misha Brukman
2dc1944f14
* Make contained ostream not public.
...
* Remove various print methods that called the Value* method, just have one that
all subclasses of Value will use anyway.
* Remove template for printing constant references
* Add methods to print char* and strings
* setStream now sets the stream on the contained AssemblyWriter
llvm-svn: 13246
2004-04-28 19:22:58 +00:00
Misha Brukman
7e66438579
Send text and numbers directly to CachedWriter's contained ostream.
...
llvm-svn: 13243
2004-04-28 18:52:43 +00:00
Misha Brukman
1846321345
Squelch compile-time warning (profile build).
...
llvm-svn: 13228
2004-04-28 15:32:09 +00:00
Misha Brukman
4685e26bc7
* Add ability to print out type as symbolic
...
* Add Module accessor to AssemblyWriter
llvm-svn: 13227
2004-04-28 15:31:21 +00:00
Misha Brukman
d472aff18c
* Add ability to get and set the output stream
...
* New feature: outputting a Type* as symbolic, controlled via the stream
similarly to sending std::hex to change number format
llvm-svn: 13226
2004-04-28 15:30:33 +00:00
Brian Gaeke
4ba46506df
Add pred./succ. list size methods.
...
llvm-svn: 13214
2004-04-28 04:46:35 +00:00
Brian Gaeke
4390e4a7fc
Make RequiresFPRegKill() take a MachineBasicBlock arg.
...
In InsertFPRegKills(), just check the MachineBasicBlock for successors
instead of its corresponding BasicBlock.
llvm-svn: 13213
2004-04-28 04:45:55 +00:00
Brian Gaeke
33ff118407
In InsertFPRegKills(), use the machine-CFG itself rather than the
...
LLVM CFG when trying to find the successors of BB.
llvm-svn: 13212
2004-04-28 04:34:16 +00:00
Brian Gaeke
24ec85689b
Update the machine-CFG edges whenever we see a branch.
...
llvm-svn: 13211
2004-04-28 04:19:37 +00:00
Brian Gaeke
153cb8d18a
Move private methods to end of class decl at Chris's request
...
llvm-svn: 13210
2004-04-28 04:15:06 +00:00
Brian Gaeke
2d875451d2
Fix thinkos that Chris caught for me.
...
Make pred mutators private.
llvm-svn: 13209
2004-04-28 03:59:48 +00:00
Brian Gaeke
dc745e6dc1
Add machine-code CFG support: MachineBasicBlocks may now have their own
...
predecessors and successors
llvm-svn: 13208
2004-04-28 02:16:33 +00:00
Brian Gaeke
444a03b77a
Integrate the rest of my random sparcv9 scribblings into this file
...
llvm-svn: 13204
2004-04-27 22:04:03 +00:00
Chris Lattner
f011b7dfe6
Fix warning building in optimized mode
...
llvm-svn: 13190
2004-04-27 18:24:38 +00:00
Chris Lattner
f1c9593a90
Fix warning
...
llvm-svn: 13189
2004-04-27 18:21:56 +00:00
Chris Lattner
2d3a7a6ff0
Changes to fix up the inst_iterator to pass to boost iterator checks. This
...
patch was graciously contributed by Vladimir Prus.
llvm-svn: 13185
2004-04-27 15:13:33 +00:00
Brian Gaeke
8bcc86b6ae
Because I like being able to instantiate the cfgprinter from external projects,
...
this header file is born.
llvm-svn: 13176
2004-04-26 16:27:53 +00:00
Brian Gaeke
104341f31e
Add functions that return instances of these printer passes
...
llvm-svn: 13175
2004-04-26 16:27:08 +00:00
Brian Gaeke
1b07de4c2b
Fix a typo in a comment.
...
llvm-svn: 13174
2004-04-26 16:26:21 +00:00
Chris Lattner
f374b3f304
If an object is not in the scalar map then it must be a global from another
...
graph.
llvm-svn: 13173
2004-04-26 14:44:08 +00:00
Chris Lattner
e20c334e65
Instcombine X/-1 --> 0-X
...
llvm-svn: 13172
2004-04-26 14:01:59 +00:00
Chris Lattner
e24003a261
Add a new testcase for X/-1, fix bug that prevented tests from running right
...
llvm-svn: 13171
2004-04-26 14:01:47 +00:00
Brian Gaeke
03cac379bd
Fix file header comments and include guards -- many files have been moved or
...
renamed since they were last spiffed up, or they just never had proper comments
in the first place.
llvm-svn: 13148
2004-04-25 07:04:49 +00:00
Brian Gaeke
42d321ab66
Add a getRegisterInfo() accessor just like on the X86 target.
...
llvm-svn: 13147
2004-04-25 06:32:28 +00:00
Brian Gaeke
4ec08db77c
Regularize file header comment and include guard.
...
Include SparcV9RegisterInfo.h.
Add a getRegisterInfo() accessor and SparcV9RegisterInfo instance, just like
on the X86 target.
llvm-svn: 13146
2004-04-25 06:32:16 +00:00
Brian Gaeke
f70544c583
Add MRegisterInfo subclass for the SparcV9 target (containing only stub
...
functions for now). This automatically turns on the printing of machine
registers using their own real names, instead of goofy things like %mreg(42),
and allows us to migrate code incrementally to the new interface as we see fit.
The register file description it uses is hand-written, so that the register
numbers will match the ones that the SparcV9 target already uses.
Perhaps someday we'll tablegen it.
llvm-svn: 13145
2004-04-25 06:32:05 +00:00
Misha Brukman
7426c893f0
Standardize header comments of top-level Makefiles.
...
llvm-svn: 13143
2004-04-24 00:10:56 +00:00
Misha Brukman
fc993c39e7
Aggregating function arguments is now an option. Default is `no', as before.
...
llvm-svn: 13142
2004-04-23 23:54:34 +00:00
Misha Brukman
3596f0a180
* Allow aggregating extracted function arguments (controlled by flag)
...
* Commandline option (for now) controls that flag that is passed in
llvm-svn: 13141
2004-04-23 23:54:17 +00:00
Brian Gaeke
ced65e8792
Fix a typo.
...
llvm-svn: 13136
2004-04-23 21:45:02 +00:00
Chris Lattner
83cd87efcd
Move the scev expansion code into this pass, where it belongs. There is
...
still room for cleanup, but at least the code modification is out of the
analysis now.
llvm-svn: 13135
2004-04-23 21:29:48 +00:00
Chris Lattner
05ef97f994
Eliminate all of the SCEV Expansion code which is really part of the
...
IndVars pass, not part of SCEV *analysis*.
llvm-svn: 13134
2004-04-23 21:29:03 +00:00
Chris Lattner
0eab307e3c
Remove the SCEV::expandCodeFor method, add a new SCEVVisitor class.
...
llvm-svn: 13133
2004-04-23 21:28:25 +00:00
Chris Lattner
02cea4afd3
Teach bugpoint to be a little bit smarter and avoid repeating work
...
llvm-svn: 13132
2004-04-23 20:36:51 +00:00
Brian Gaeke
99e3e94012
Merged this file into the SparcV9 target.
...
llvm-svn: 13128
2004-04-23 18:17:03 +00:00
Brian Gaeke
0b65f8f582
Merge TargetRegInfo.h into SparcV9RegInfo.h, which is its only subclass.
...
This prepares us to be able to de-virtualize and de-abstract it, and
take the register allocator bits out and move them into the register allocator
proper...
llvm-svn: 13127
2004-04-23 18:15:48 +00:00
Brian Gaeke
71509a98c5
Include SparcV9RegInfo.h instead of TargetRegInfo.h.
...
llvm-svn: 13126
2004-04-23 18:15:47 +00:00
Brian Gaeke
a411e07db0
Include SparcV9RegInfo.h instead of TargetRegInfo.h. This serves as a bit of
...
documentation that this module needs to be made independent of the
register file description of the current target.
llvm-svn: 13125
2004-04-23 18:15:46 +00:00
Brian Gaeke
fbd43e43a7
Get rid of the old byte-at-a-time emission code used when the Sparc JIT was
...
being tested on X86, as per Chris's request.
llvm-svn: 13124
2004-04-23 18:10:38 +00:00
Brian Gaeke
ad373c8576
Go back to the interpreter main loop after performing intrinsic lowering,
...
because 1) the first instruction might not be a call site, and
2) CS and SF.Caller were not getting set to point to the new call site
anyway (resulting in a crash on e.g. call %llvm.memset).
llvm-svn: 13122
2004-04-23 18:05:28 +00:00
Brian Gaeke
11550c1deb
mmap of a zero length file returns null on some platforms, so hack around it.
...
llvm-svn: 13121
2004-04-23 17:38:17 +00:00
Brian Gaeke
6e102a7edd
Use emitWordAt() to emit forward-branch fixups.
...
llvm-svn: 13120
2004-04-23 17:11:16 +00:00
Brian Gaeke
fe277c2809
Emit SPARC machine code a word at a time instead of a byte at a time.
...
Use emitWordAt() to emit forward-branch fixups.
llvm-svn: 13119
2004-04-23 17:11:15 +00:00
Brian Gaeke
0c4fb283f3
Implement emitWordAt() for the JIT emitter.
...
llvm-svn: 13118
2004-04-23 17:11:14 +00:00
Brian Gaeke
4aaa9c603a
Implement emitWordAt() for the debug emitter and the file printer emitter. (I
...
am not so sure about the file printer emitter, but the debug emitter change
should be harmless.)
llvm-svn: 13117
2004-04-23 17:11:13 +00:00
Brian Gaeke
1ed0cdbd04
Add emitWordAt() - a quick and dirty interface that the machine-dependent
...
emitters can use to emit "relocations".
llvm-svn: 13116
2004-04-23 17:11:12 +00:00
Misha Brukman
2ccac826e4
Add command-line option to select whether to isolate or delete function from
...
module. Default is `isolate' as before.
llvm-svn: 13113
2004-04-22 23:07:39 +00:00
Misha Brukman
98aa516a9c
Clarify the logic: the flag is renamed to `deleteFn' to signify it will delete
...
the function instead of isolating it. This also means the condition is reversed.
llvm-svn: 13112
2004-04-22 23:00:51 +00:00
Misha Brukman
e0682426f0
Add a flag to choose between isolating a function or deleting the function from
...
the Module. The default behavior keeps functionality as before: the chosen
function is the one that remains.
llvm-svn: 13111
2004-04-22 22:52:22 +00:00
Misha Brukman
2de9ce4f51
Add a boolean flag to delete this function from module, leaving the rest behind.
...
Useful in manual debugging when bugpoint isn't quite up to snuff.
llvm-svn: 13110
2004-04-22 22:51:37 +00:00
Misha Brukman
324e9e06d8
Add a space before result for readability on the command line.
...
llvm-svn: 13109
2004-04-22 20:02:09 +00:00
Chris Lattner
c27302c79f
Disable a previous patch that was causing indvars to loop infinitely :(
...
llvm-svn: 13108
2004-04-22 15:12:36 +00:00
Chris Lattner
8f02e9c5f7
Add an ugly cast
...
llvm-svn: 13107
2004-04-22 15:00:36 +00:00
Chris Lattner
c1a682dda0
Fix an extremely serious thinko I made in revision 1.60 of this file.
...
llvm-svn: 13106
2004-04-22 14:59:40 +00:00
Chris Lattner
334bee87f4
Add a method
...
llvm-svn: 13105
2004-04-22 14:56:51 +00:00
Chris Lattner
af532f27e7
Implement a todo, rewriting all possible scev expressions inside of the
...
loop. This eliminates the extra add from the previous case, but it's
not clear that this will be a performance win overall. Tommorows test
results will tell. :)
llvm-svn: 13103
2004-04-21 23:36:08 +00:00
Chris Lattner
fb9a299f68
This code really wants to iterate over the OPERANDS of an instruction, not
...
over its USES. If it's dead it doesn't have any uses! :)
Thanks to the fabulous and mysterious Bill Wendling for pointing this out. :)
llvm-svn: 13102
2004-04-21 22:29:37 +00:00
Chris Lattner
dc7cc35088
Implement a fixme. The helps loops that have induction variables of different
...
types in them. Instead of creating an induction variable for all types, it
creates a single induction variable and casts to the other sizes. This generates
this code:
no_exit: ; preds = %entry, %no_exit
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=4]
*** %j.0.0 = cast uint %indvar to short ; <short> [#uses=1]
%indvar = cast uint %indvar to int ; <int> [#uses=1]
%tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1]
store short %j.0.0, short* %tmp.7
%inc.0 = add int %indvar, 1 ; <int> [#uses=2]
%tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.2, label %no_exit, label %loopexit
instead of:
no_exit: ; preds = %entry, %no_exit
%indvar = phi ushort [ %indvar.next, %no_exit ], [ 0, %entry ] ; <ushort> [#uses=2]
*** %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%indvar = cast uint %indvar to int ; <int> [#uses=1]
%indvar = cast ushort %indvar to short ; <short> [#uses=1]
%tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1]
store short %indvar, short* %tmp.7
%inc.0 = add int %indvar, 1 ; <int> [#uses=2]
%tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1
*** %indvar.next = add ushort %indvar, 1
br bool %tmp.2, label %no_exit, label %loopexit
This is an improvement in register pressure, but probably doesn't happen that
often.
The more important fix will be to get rid of the redundant add.
llvm-svn: 13101
2004-04-21 22:22:01 +00:00
Chris Lattner
be8bb804c5
Fix an incredibly nasty iterator invalidation problem. I am too spoiled by ilists :)
...
Eventually it would be nice if CallGraph maintained an ilist of CallGraphNode's instead
of a vector of pointers to them, but today is not that day.
llvm-svn: 13100
2004-04-21 20:44:33 +00:00
Chris Lattner
15572abd14
bug fixed
...
llvm-svn: 13099
2004-04-21 18:52:06 +00:00
Chris Lattner
ee80c45d46
new testcase for PR326
...
llvm-svn: 13098
2004-04-21 18:49:35 +00:00
Misha Brukman
0784a601c2
Add doxygenified comments to functions.
...
llvm-svn: 13097
2004-04-21 18:36:43 +00:00
Misha Brukman
3bcead7201
I'm allergic to the word `stuff'.
...
llvm-svn: 13096
2004-04-21 18:27:56 +00:00
Brian Gaeke
376ac1bed5
Make SparcV9RegInfo::getRegType() return the right answer for registers
...
of IntCC, FloatCC, and Special types.
Make SparcV9RegInfo::getRegClassIDOfRegType() return the right answer
if you ask for the class corresponding to SpecialRegType.
llvm-svn: 13095
2004-04-21 17:53:58 +00:00
Alkis Evlogimenos
f68f40ea42
Include cerrno (gcc-3.4 fix)
...
llvm-svn: 13091
2004-04-21 16:11:40 +00:00
Alkis Evlogimenos
07f7574ba3
Declare iterator as public since it is defined as such (gcc-3.4 fix)
...
llvm-svn: 13090
2004-04-21 16:10:40 +00:00
Chris Lattner
a9691fe70d
Fix typeo
...
llvm-svn: 13089
2004-04-21 14:23:18 +00:00
Chris Lattner
c87784f1fc
REALLY fix PR324: don't delete linkonce functions until after the SCC traversal
...
is done, which avoids invalidating iterators in the SCC traversal routines
llvm-svn: 13088
2004-04-20 22:06:53 +00:00
Chris Lattner
99504890b7
Pass the callgraph not the module
...
llvm-svn: 13087
2004-04-20 21:52:26 +00:00
Chris Lattner
a45086a45e
Allow getting the module from a call graph
...
llvm-svn: 13086
2004-04-20 21:52:12 +00:00
Chris Lattner
0a985ac82c
Change it to take a callgraph, from which we can get a module
...
llvm-svn: 13085
2004-04-20 21:52:07 +00:00
Chris Lattner
8d0838130c
Add the ability for SCC passes to initialize and finalize themselves
...
llvm-svn: 13084
2004-04-20 21:30:06 +00:00
Chris Lattner
c1aa21f5a7
Fix PR325
...
llvm-svn: 13081
2004-04-20 20:26:03 +00:00
Chris Lattner
514934051a
Fix PR324 and testcase: Inline/2004-04-20-InlineLinkOnce.llx
...
llvm-svn: 13080
2004-04-20 20:20:59 +00:00
Chris Lattner
40123bff5b
New testcase, distilled from PR324
...
llvm-svn: 13079
2004-04-20 20:15:01 +00:00
Brian Gaeke
a2f66db6c4
Make it legal to ask for the type of a specialreg
...
llvm-svn: 13078
2004-04-20 20:12:57 +00:00
Brian Gaeke
86a6c75a7e
Add some PRs which were fixed, but not previously mentioned in the rel. notes.
...
llvm-svn: 13077
2004-04-20 18:18:46 +00:00
Chris Lattner
2b2d7a99be
Add support for the select instruction
...
llvm-svn: 13076
2004-04-20 16:43:21 +00:00
Brian Gaeke
6c272a93bb
Make it legal to request a load or store of %fsr.
...
llvm-svn: 13073
2004-04-19 19:12:12 +00:00
Brian Gaeke
627abf14bb
Fix typo.
...
llvm-svn: 13072
2004-04-19 19:09:24 +00:00
Brian Gaeke
755651df27
Regularize include guards and remove some excess whitespace.
...
llvm-svn: 13071
2004-04-19 18:53:44 +00:00
Brian Gaeke
2fd2536ea8
Tighten up SparcV9FloatCCRegClass::getRegName()'s assertion - if you ask it for
...
the name of %fsr (as the comment in SparcV9RegClassInfo.h used to suggest)
you would walk off the end of the FloatCCRegName array.
llvm-svn: 13070
2004-04-19 18:53:43 +00:00
Brian Gaeke
85cb77737c
Regularize include guards, remove some excess whitespace and fix some comments.
...
Remove the extra %fsr register from SparcV9FloatCCRegClass.
llvm-svn: 13069
2004-04-19 18:53:42 +00:00
Chris Lattner
f48f777d4c
Initial checkin of a simple loop unswitching pass. It still needs work,
...
but it's a start, and seems to do it's basic job.
llvm-svn: 13068
2004-04-19 18:07:02 +00:00
Chris Lattner
ceea37590f
New testcase
...
llvm-svn: 13067
2004-04-19 18:06:34 +00:00
Chris Lattner
1c9fb0007e
Add accessor for a Loop Unswitching pass
...
llvm-svn: 13066
2004-04-19 06:28:37 +00:00
Chris Lattner
46f888dd80
Eliminate a poorly conceived method
...
llvm-svn: 13065
2004-04-19 06:26:46 +00:00
Chris Lattner
663ebc3ec6
It's not just a printer, it's actually an analysis too
...
llvm-svn: 13064
2004-04-19 03:42:32 +00:00
Misha Brukman
ce89b392c6
As per Chris, greatly simplify handling of external functions by using the
...
wrapper idea uniformly: we can use Value::replaceAllUsesWith() instead of
special-casing by class of user.
llvm-svn: 13063
2004-04-19 03:36:47 +00:00
Misha Brukman
d2493e1565
* Remove note about "UNSUPPORTED: " feature that just became supported
...
* Fix usage of <p> tag and some grammar
llvm-svn: 13062
2004-04-19 03:28:39 +00:00
Misha Brukman
8a32c6d91b
* Reorder #includes
...
* Wrap a long line
llvm-svn: 13061
2004-04-19 03:12:35 +00:00
Misha Brukman
4825e215c0
Display sample bugpoint output with the `code' stylesheet class.
...
llvm-svn: 13060
2004-04-19 03:07:29 +00:00
Chris Lattner
5414021060
* Improve file header comment
...
* Remove #include
* Add some methods to update loop/loopinfo
* Stop explicitly holding the loop depth in the Loop class. Instead, just
dynamically calculate it. This makes it easier to update LoopInfo as a
result of transformations.
llvm-svn: 13059
2004-04-19 03:03:19 +00:00
Chris Lattner
32447c55fe
Remove code to update loop depths
...
llvm-svn: 13058
2004-04-19 03:02:09 +00:00
Chris Lattner
bc02177fdc
Add #include
...
llvm-svn: 13057
2004-04-19 03:01:23 +00:00
Misha Brukman
e70502328e
Add notes about PRs 38 and 290 being fixed.
...
llvm-svn: 13056
2004-04-19 03:01:01 +00:00
Misha Brukman
017f2f3405
Wrap (some) lines to 80 cols.
...
llvm-svn: 13055
2004-04-19 02:56:49 +00:00
Misha Brukman
8301864215
Finally implement rewriting global initializers which use external functions
...
by creating an internal wrapper function with same signature as the external
function, and use it instead of the "real" function.
The wrapper then calls the external function using the same JIT function
resolution API that has been used before for rewriting instructions, since the
wrapper has an explicit call instruction which we can rewrite.
llvm-svn: 13054
2004-04-19 01:12:01 +00:00
Chris Lattner
732b5d5bba
Provide an interface that is more convenient for iterating over the blocks
...
in a loop.
llvm-svn: 13052
2004-04-18 23:37:03 +00:00
Chris Lattner
fc44a25bcb
Move isLoopInvariant to the Loop class
...
llvm-svn: 13051
2004-04-18 22:46:08 +00:00
Chris Lattner
26ba2f5fe8
Add new method
...
llvm-svn: 13050
2004-04-18 22:45:27 +00:00
Chris Lattner
d4d66c86c0
Add new method.
...
llvm-svn: 13049
2004-04-18 22:45:16 +00:00
Chris Lattner
827826320d
Correct rewriting of exit blocks after my last patch
...
llvm-svn: 13048
2004-04-18 22:27:10 +00:00
Chris Lattner
d6ce359d3b
Fix computation of exit blocks
...
llvm-svn: 13047
2004-04-18 22:21:41 +00:00
Chris Lattner
35eaa55cfc
Loop exit sets are no longer explicitly held, they are dynamically computed on demand.
...
llvm-svn: 13046
2004-04-18 22:15:13 +00:00
Chris Lattner
d72c3eb54e
Change the ExitBlocks list from being explicitly contained in the Loop
...
structure to being dynamically computed on demand. This makes updating
loop information MUCH easier.
llvm-svn: 13045
2004-04-18 22:14:10 +00:00
Chris Lattner
bf3c8763c0
Spiff is no longer in our tree
...
llvm-svn: 13041
2004-04-18 18:26:38 +00:00
Chris Lattner
d15250240c
Reduce the unrolling limit
...
llvm-svn: 13040
2004-04-18 18:06:14 +00:00
Chris Lattner
30ae18155d
If the preheader of the loop was the entry block of the function, make sure
...
that the exit block of the loop becomes the new entry block of the function.
This was causing a verifier assertion on 252.eon.
llvm-svn: 13039
2004-04-18 17:38:42 +00:00
Chris Lattner
230bcb6b35
Be much more careful about how we update instructions outside of the loop
...
using instructions inside of the loop. This should fix the MishaTest failure
from last night.
llvm-svn: 13038
2004-04-18 17:32:39 +00:00
Chris Lattner
3796974563
Another testcase
...
llvm-svn: 13037
2004-04-18 06:55:57 +00:00
Chris Lattner
e375a4fdc2
Implement method
...
llvm-svn: 13036
2004-04-18 06:54:48 +00:00
Chris Lattner
5f46b7044c
Add a new method
...
llvm-svn: 13035
2004-04-18 06:54:34 +00:00
Chris Lattner
4d52e1e401
After unrolling our single basic block loop, fold it into the preheader and exit
...
block. The primary motivation for doing this is that we can now unroll nested loops.
This makes a pretty big difference in some cases. For example, in 183.equake,
we are now beating the native compiler with the CBE, and we are a lot closer
with LLC.
I'm now going to play around a bit with the unroll factor and see what effect
it really has.
llvm-svn: 13034
2004-04-18 06:27:43 +00:00
Chris Lattner
f2cc841619
Fix a bug: this does not preserve the CFG!
...
While we're at it, add support for updating loop information correctly.
llvm-svn: 13033
2004-04-18 05:38:37 +00:00
Chris Lattner
1472c63fb9
Add a new method, add a check missing that caused a segfault if a loop didn't
...
have a canonical indvar
llvm-svn: 13032
2004-04-18 05:38:05 +00:00
Chris Lattner
c9de38d316
Allow clients to delete loops, add a new method
...
llvm-svn: 13031
2004-04-18 05:37:42 +00:00
Chris Lattner
bf9ba24155
Move loop optimization passes up, add loop unroller
...
llvm-svn: 13030
2004-04-18 05:21:01 +00:00
Chris Lattner
e4ce5dbd1d
Add prototype
...
llvm-svn: 13029
2004-04-18 05:20:32 +00:00
Chris Lattner
946b255977
Initial checkin of a simple loop unroller. This pass is extremely basic and
...
limited. Even in it's extremely simple state (it can only *fully* unroll single
basic block loops that execute a constant number of times), it already helps improve
performance a LOT on some benchmarks, particularly with the native code generators.
llvm-svn: 13028
2004-04-18 05:20:17 +00:00
Chris Lattner
c14da9600b
Make the tail duplication threshold accessible from the command line instead of hardcoded
...
llvm-svn: 13025
2004-04-18 00:52:43 +00:00
Chris Lattner
ca96cee67b
Fix a memory leak. We leaked the vector holding the entries in switch tables.
...
llvm-svn: 13023
2004-04-17 23:49:15 +00:00
Chris Lattner
bc4118f316
New testcase
...
llvm-svn: 13020
2004-04-17 23:00:51 +00:00
Chris Lattner
dd73047673
Add the ability to compute exit values for complex loop using unanalyzable
...
operations. This allows us to compile this testcase:
int main() {
int h = 1;
do h = 3 * h + 1; while (h <= 256);
printf("%d\n", h);
return 0;
}
into this:
int %main() {
entry:
call void %__main( )
%tmp.6 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([4 x sbyte]* %.str_1, long 0, long 0), int 364 ) ; <int> [#uses=0]
ret int 0
}
This testcase was taken directly from 256.bzip2, believe it or not.
This code is not as general as I would like. Next up is to refactor it
a bit to handle more cases.
llvm-svn: 13019
2004-04-17 22:58:41 +00:00
Chris Lattner
a814080025
If the loop executes a constant number of times, try a bit harder to replace
...
exit values.
llvm-svn: 13018
2004-04-17 18:44:09 +00:00
Chris Lattner
4021d1af5a
Add the ability to compute trip counts that are only controlled by constants
...
even if the loop is using expressions that we can't compute as a closed-form.
This allows us to calculate that this function always returns 55:
int test() {
double X;
int Count = 0;
for (X = 100; X > 1; X = sqrt(X), ++Count)
/*empty*/;
return Count;
}
And allows us to compute trip counts for loops like:
int h = 1;
do h = 3 * h + 1; while (h <= 256);
(which occurs in bzip2), and for this function, which occurs after inlining
and other optimizations:
int popcount()
{
int x = 666;
int result = 0;
while (x != 0) {
result = result + (x & 0x1);
x = x >> 1;
}
return result;
}
We still cannot compute the exit values of result or h in the two loops above,
which means we cannot delete the loop, but we are getting closer. Being able to
compute a constant trip count for these two loops will allow us to unroll them
completely though.
llvm-svn: 13017
2004-04-17 18:36:24 +00:00
Chris Lattner
1e9ac1a45e
Fix a HUGE pessimization on X86. The indvars pass was taking this
...
(familiar) function:
int _strlen(const char *str) {
int len = 0;
while (*str++) len++;
return len;
}
And transforming it to use a ulong induction variable, because the type of
the pointer index was left as a constant long. This is obviously very bad.
The fix is to shrink long constants in getelementptr instructions to intptr_t,
making the indvars pass insert a uint induction variable, which is much more
efficient.
Here's the before code for this function:
int %_strlen(sbyte* %str) {
entry:
%tmp.13 = load sbyte* %str ; <sbyte> [#uses=1]
%tmp.24 = seteq sbyte %tmp.13, 0 ; <bool> [#uses=1]
br bool %tmp.24, label %loopexit, label %no_exit
no_exit: ; preds = %entry, %no_exit
*** %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=2]
*** %indvar = phi ulong [ %indvar.next, %no_exit ], [ 0, %entry ] ; <ulong> [#uses=2]
%indvar1 = cast ulong %indvar to uint ; <uint> [#uses=1]
%inc.02.sum = add uint %indvar1, 1 ; <uint> [#uses=1]
%inc.0.0 = getelementptr sbyte* %str, uint %inc.02.sum ; <sbyte*> [#uses=1]
%tmp.1 = load sbyte* %inc.0.0 ; <sbyte> [#uses=1]
%tmp.2 = seteq sbyte %tmp.1, 0 ; <bool> [#uses=1]
%indvar.next = add ulong %indvar, 1 ; <ulong> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.2, label %loopexit.loopexit, label %no_exit
loopexit.loopexit: ; preds = %no_exit
%indvar = cast uint %indvar to int ; <int> [#uses=1]
%inc.1 = add int %indvar, 1 ; <int> [#uses=1]
ret int %inc.1
loopexit: ; preds = %entry
ret int 0
}
Here's the after code:
int %_strlen(sbyte* %str) {
entry:
%inc.02 = getelementptr sbyte* %str, uint 1 ; <sbyte*> [#uses=1]
%tmp.13 = load sbyte* %str ; <sbyte> [#uses=1]
%tmp.24 = seteq sbyte %tmp.13, 0 ; <bool> [#uses=1]
br bool %tmp.24, label %loopexit, label %no_exit
no_exit: ; preds = %entry, %no_exit
*** %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%indvar = cast uint %indvar to int ; <int> [#uses=1]
%inc.0.0 = getelementptr sbyte* %inc.02, uint %indvar ; <sbyte*> [#uses=1]
%inc.1 = add int %indvar, 1 ; <int> [#uses=1]
%tmp.1 = load sbyte* %inc.0.0 ; <sbyte> [#uses=1]
%tmp.2 = seteq sbyte %tmp.1, 0 ; <bool> [#uses=1]
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
br bool %tmp.2, label %loopexit, label %no_exit
loopexit: ; preds = %entry, %no_exit
%len.0.1 = phi int [ 0, %entry ], [ %inc.1, %no_exit ] ; <int> [#uses=1]
ret int %len.0.1
}
llvm-svn: 13016
2004-04-17 18:16:10 +00:00
Chris Lattner
885a6eb74d
Even if there are not any induction variables in the loop, if we can compute
...
the trip count for the loop, insert one so that we can canonicalize the exit
condition.
llvm-svn: 13015
2004-04-17 18:08:33 +00:00
Chris Lattner
a43312d30b
Add support for evaluation of exp/log/log10/pow
...
llvm-svn: 13011
2004-04-16 22:35:33 +00:00
Chris Lattner
284d3b0311
Fix some really nasty dominance bugs that were exposed by my patch to
...
make the verifier more strict. This fixes building zlib
llvm-svn: 13002
2004-04-16 18:08:07 +00:00
Misha Brukman
ede10c9185
Fix retriving parent Function.
...
llvm-svn: 13001
2004-04-16 17:37:12 +00:00
Misha Brukman
66532f5e8a
Fit comment into 80 cols.
...
llvm-svn: 12996
2004-04-16 17:13:52 +00:00
Brian Gaeke
efe9105979
Regenerated using autoconf-2.57.
...
llvm-svn: 12995
2004-04-16 17:13:44 +00:00
Brian Gaeke
fe766057a9
Refactor external benchmark checking stuff into one hairy
...
macro-to-bind-them-all, called EXTERNAL_BENCHMARK().
llvm-svn: 12994
2004-04-16 17:13:33 +00:00
Misha Brukman
c08a573515
Add idea about a disassembler.
...
llvm-svn: 12993
2004-04-16 16:55:30 +00:00
Brian Gaeke
ec240edcc8
Switch to including <iostream> for compatibility with gcc-3.0.x (Debian).
...
llvm-svn: 12990
2004-04-16 16:28:33 +00:00
Misha Brukman
0c88a74044
* Fix capitalization of PICk
...
* Wrap long lines to 80 cols
llvm-svn: 12988
2004-04-16 16:20:07 +00:00
Brian Gaeke
174633b078
Include <cmath> for compatibility with gcc 3.0.x (the system compiler on
...
Debian.)
llvm-svn: 12986
2004-04-16 15:57:32 +00:00
Brian Gaeke
8bd536a311
Include <string> for compatibility with gcc 3.0.x (the system compiler on
...
Debian.)
llvm-svn: 12985
2004-04-16 15:57:14 +00:00
Brian Gaeke
7850dd6877
As a part of the bootstrapping process, the top-level tools-only target
...
should not build projects.
llvm-svn: 12984
2004-04-16 15:57:02 +00:00
Misha Brukman
0af4a9c12b
Assert if deleting BasicBlock before removing it from Function.
...
llvm-svn: 12983
2004-04-16 15:47:21 +00:00
Misha Brukman
1a6b00cd57
Assert if Instruction is being deleted before being removed from BasicBlock.
...
llvm-svn: 12982
2004-04-16 15:46:43 +00:00
Chris Lattner
994e48ff09
Remove libraries that have no reason to be here, and keep breaking the nightly tester because their makefiles do not have the right dependencies!!
...
llvm-svn: 12981
2004-04-16 14:12:36 +00:00
Chris Lattner
9e9b2b7474
Fix some of the strange CBE-only failures that happened last night.
...
llvm-svn: 12980
2004-04-16 06:03:17 +00:00
Chris Lattner
0377e4384f
Make sure to check for a very bad class of errors: an instruction
...
that does not dominate all of its users, but is in the same basic block as
its users. This class of error is what caused the mysterious CBE only
failures last night.
llvm-svn: 12979
2004-04-16 05:51:47 +00:00
Chris Lattner
82876bdb2a
Bugpoint was not correctly capturing stderr! This caused it to "find" bugs
...
that didn't exist, missing the ones that do :(
llvm-svn: 12978
2004-04-16 05:35:58 +00:00
Chris Lattner
0328d75c83
Fix Inline/2004-04-15-InlineDeletesCall.ll
...
Basically we were using SimplifyCFG as a huge sledgehammer for a simple
optimization. Because simplifycfg does so many things, we can't use it
for this purpose.
llvm-svn: 12977
2004-04-16 05:17:59 +00:00
Misha Brukman
272322e591
Add note about easier way to debug tests in the llvm tree.
...
llvm-svn: 12972
2004-04-15 21:01:21 +00:00
Misha Brukman
c21921cec7
Add note about passing arguments to program being debugged.
...
llvm-svn: 12970
2004-04-15 20:49:32 +00:00
Chris Lattner
fbc88b6cbd
New testcase that Brian provided which crashes the inliner
...
llvm-svn: 12969
2004-04-15 20:45:45 +00:00
Chris Lattner
d7a559e353
Fix a bug in the previous checkin: if the exit block is not the same as
...
the back-edge block, we must check the preincremented value.
llvm-svn: 12968
2004-04-15 20:26:22 +00:00
Brian Gaeke
5bee0f3068
Give SparcV9CodeEmitter a head-of-file comment and a PassName.
...
llvm-svn: 12967
2004-04-15 20:23:13 +00:00
Misha Brukman
cf2b18791a
If we're going to use tabs, use them consistently. Maybe doxygen will find the
...
@parameter line documentation that way, too.
llvm-svn: 12966
2004-04-15 15:38:48 +00:00
Misha Brukman
a34f067bac
Removed obsolete doxygen options (they were blank anyway).
...
llvm-svn: 12965
2004-04-15 15:33:49 +00:00
Misha Brukman
b4f20ea496
The "best" of both worlds: readable C++ comments and valid HTML For doxygen.
...
llvm-svn: 12964
2004-04-15 15:30:15 +00:00
Misha Brukman
cd19073a70
Don't use invalid HTML in doxygen comments.
...
llvm-svn: 12963
2004-04-15 15:24:55 +00:00
Misha Brukman
d061d81571
Don't use invalid HTML in a doxygen comment.
...
llvm-svn: 12962
2004-04-15 15:23:45 +00:00
Chris Lattner
0cec5cb92c
Change the canonical induction variable that we insert.
...
Instead of producing code like this:
Loop:
X = phi 0, X2
...
X2 = X + 1
if (X != N-1) goto Loop
We now generate code that looks like this:
Loop:
X = phi 0, X2
...
X2 = X + 1
if (X2 != N) goto Loop
This has two big advantages:
1. The trip count of the loop is now explicit in the code, allowing
the direct implementation of Loop::getTripCount()
2. This reduces register pressure in the loop, and allows X and X2 to be
put into the same register.
As a consequence of the second point, the code we generate for loops went
from:
.LBB2: # no_exit.1
...
mov %EDI, %ESI
inc %EDI
cmp %ESI, 2
mov %ESI, %EDI
jne .LBB2 # PC rel: no_exit.1
To:
.LBB2: # no_exit.1
...
inc %ESI
cmp %ESI, 3
jne .LBB2 # PC rel: no_exit.1
... which has two fewer moves, and uses one less register.
llvm-svn: 12961
2004-04-15 15:21:43 +00:00
Chris Lattner
d9dc425376
add some helpful methods. Rearrange #includes to proper order
...
llvm-svn: 12960
2004-04-15 15:16:02 +00:00
Chris Lattner
6580bbda3d
Add some helpful methods
...
llvm-svn: 12959
2004-04-15 15:15:40 +00:00
Chris Lattner
b4f681b42b
Factor a bunch of classes out into a public header
...
llvm-svn: 12958
2004-04-15 15:07:24 +00:00
Chris Lattner
3598d13b1c
Publically export all of these classes from the ScalarEvolutions.cpp file
...
llvm-svn: 12957
2004-04-15 15:06:59 +00:00
Chris Lattner
a4e4a63856
Unbreak the build
...
llvm-svn: 12956
2004-04-15 14:17:43 +00:00
Chris Lattner
d420fe63ea
Implement a FIXME: if we're going to insert a cast, we might as well only
...
insert it once!
llvm-svn: 12955
2004-04-14 22:01:22 +00:00
John Criswell
e3e2c91997
Remove code to adjust the iterator for llvm.readio and llvm.writeio.
...
The iterator is pointing at the next instruction which should not disappear
when doing the load/store replacement.
llvm-svn: 12954
2004-04-14 21:27:56 +00:00
Brian Gaeke
0174347d9a
Fix typo.
...
llvm-svn: 12953
2004-04-14 21:21:56 +00:00
Chris Lattner
8a9fd94cfe
This is a trivial tweak to the addrec insertion code: insert the increment
...
at the bottom of the loop instead of the top. This reduces the number of
overlapping live ranges a lot, for example, eliminating a spill in an important
loop in 183.equake with linear scan.
I still need to make the exit comparison of the loop use the post-incremented
version of this variable, but this is an easy first step.
llvm-svn: 12952
2004-04-14 21:11:25 +00:00
Brian Gaeke
aec2bcd63b
Add a TargetData to the PassManager regardless of the TargetMachine.
...
This should unbreak the Sparc JIT again.
llvm-svn: 12949
2004-04-14 17:45:52 +00:00
Brian Gaeke
9a2e37bccd
Add a copy constructor for TargetData.
...
llvm-svn: 12948
2004-04-14 17:45:48 +00:00
Chris Lattner
cea7f660bc
We are now on LLVM 1.3
...
Make autoconf default to checking to look to see if our funny directory exists
llvm-svn: 12947
2004-04-14 16:32:34 +00:00
Chris Lattner
6d06918ef0
Regenerated
...
llvm-svn: 12946
2004-04-14 16:32:09 +00:00
John Criswell
c4e72c9a0a
Remove the return type check for llvm.readio. This check is done for all
...
functions and is not needed here.
Simplify the pointer type check per Chris's suggestions.
llvm-svn: 12945
2004-04-14 15:06:48 +00:00
John Criswell
0c654c6a4e
Added code to verify that llvm.readio's pointer argument returns something
...
that matches its return type.
llvm-svn: 12944
2004-04-14 14:49:36 +00:00
John Criswell
917b641609
Test for memory mapped I/O intrinsics.
...
llvm-svn: 12943
2004-04-14 13:52:56 +00:00
John Criswell
23c48d63d6
Finish adding the llvm.readio and llvm.writeio intrinsics.
...
Sorry these didn't get in yesterday.
llvm-svn: 12942
2004-04-14 13:46:52 +00:00
Chris Lattner
6679e46b59
ADd a trivial instcombine: load null -> null
...
llvm-svn: 12940
2004-04-14 03:28:36 +00:00
Chris Lattner
0dc099c2b5
This is the real fix for Codegen/X86/2004-04-13-FPCMOV-Crash.llx which works
...
even when the "optimization" I added before is turned off. It generates this
extremely pointless code:
test:
fld QWORD PTR [%ESP + 4]
mov %AL, 0
test %AL, %AL
fcmove %ST(0), %ST(0)
ret
Good thing the optimizer will have removed this before code generation
anyway. :)
llvm-svn: 12939
2004-04-14 02:42:32 +00:00
Chris Lattner
52acdaacc7
Temporarily hack in the intrinsics that John added. I expect him to finish up their addition, but in the meantime, the build should not be broken.
...
llvm-svn: 12938
2004-04-14 02:22:54 +00:00
John Criswell
beded72a08
Added support for the llvm.readio and llvm.writeio intrinsics.
...
On x86, memory operations occur in-order, so these are just lowered into
volatile loads and stores.
llvm-svn: 12936
2004-04-13 22:13:14 +00:00
Chris Lattner
9042e381d8
Implement a small optimization, which papers over the problem in
...
X86/2004-04-13-FPCMOV-Crash.llx
A more robust fix is to follow.
llvm-svn: 12935
2004-04-13 21:56:09 +00:00
Chris Lattner
ed94fef7e3
Fix bug, add support for +/-
...
llvm-svn: 12934
2004-04-13 21:48:43 +00:00
Chris Lattner
8662beeecd
new testcase that crashes the fp stackifier
...
llvm-svn: 12932
2004-04-13 21:44:54 +00:00
Chris Lattner
ed7a7d20c9
We actually don't have spiff anymore
...
llvm-svn: 12929
2004-04-13 20:59:47 +00:00
Chris Lattner
9a3ac1a956
Out with spiff, in with fpcmp
...
llvm-svn: 12928
2004-04-13 20:59:24 +00:00
Chris Lattner
e542c1c422
Remove spiff. Though it looked good, it was not really as spiffy as it seemed
...
llvm-svn: 12927
2004-04-13 20:58:42 +00:00
Chris Lattner
5613bcc258
Okay, spiff is completely incapable of handling files of nontrivial size.
...
Here is a simple minimal program that does what we want. Instead of taking
minutes to compare mesa's output, and crashing on binary files (like spiff
does), this take < .02s in the common case and doesn't crash.
llvm-svn: 12926
2004-04-13 20:55:49 +00:00
Chris Lattner
cb5e795f1f
Add a note
...
llvm-svn: 12922
2004-04-13 19:48:55 +00:00
Chris Lattner
ff9362a8da
Add SCCP support for constant folding calls, implementing:
...
test/Regression/Transforms/SCCP/calltest.ll
llvm-svn: 12921
2004-04-13 19:43:54 +00:00
Chris Lattner
9d42084081
New testcase
...
llvm-svn: 12920
2004-04-13 19:43:33 +00:00
Chris Lattner
ca52d0468e
Add a simple call constant propagation interface.
...
llvm-svn: 12919
2004-04-13 19:28:52 +00:00
Chris Lattner
7dacdb6f13
Add new interfaces
...
llvm-svn: 12918
2004-04-13 19:28:32 +00:00
Chris Lattner
d0dc6d5295
Constant propagation should remove the dead instructions
...
llvm-svn: 12917
2004-04-13 19:28:20 +00:00
Chris Lattner
e3debac3cd
New testcase
...
llvm-svn: 12916
2004-04-13 19:28:09 +00:00
Brian Gaeke
9a79ed7b89
Regenerated using autoconf-2.57.
...
llvm-svn: 12915
2004-04-13 19:03:49 +00:00
Brian Gaeke
fca4720590
Rewrite POV-Ray check as per PR301
...
llvm-svn: 12914
2004-04-13 19:02:51 +00:00
Chris Lattner
becf6365d6
Increase buffer size again. *sigh*
...
llvm-svn: 12912
2004-04-13 18:43:18 +00:00
Chris Lattner
f37bd007e4
Don't index spiff. It should not count as lines of LLVM code
...
llvm-svn: 12911
2004-04-13 18:37:51 +00:00
Chris Lattner
763596e28d
Fixed sized limits are bad... duh.
...
llvm-svn: 12908
2004-04-13 18:34:16 +00:00
Chris Lattner
7b9733dac2
Really spiff, don't chatter :)
...
llvm-svn: 12907
2004-04-13 18:33:21 +00:00
Brian Gaeke
6f6e4b9f59
I don't think we have to have 4 extra allocated (but unused) bytes on the stack.
...
llvm-svn: 12905
2004-04-13 18:28:37 +00:00
Brian Gaeke
969795b4ea
I started working on casts, but I don't have anything compilable yet.
...
llvm-svn: 12903
2004-04-13 18:27:46 +00:00
Brian Gaeke
bacab88d42
Don't underline diffs
...
llvm-svn: 12902
2004-04-13 18:24:01 +00:00
Chris Lattner
c71b096672
Emit the immediate form of in/out when possible.
...
Fix several bugs in the intrinsics:
1. Make sure to copy the input registers before the instructions that use them
2. Make sure to copy the value returned by 'in' out of EAX into the register
it is supposed to be in.
This fixes assertions when using in/out and linear scan.
llvm-svn: 12896
2004-04-13 17:20:37 +00:00
Chris Lattner
a340febe52
Add immediate forms of in/out. Use let to shorten lines
...
llvm-svn: 12895
2004-04-13 17:19:31 +00:00
Chris Lattner
eaa28a29ae
Add support for new instruction type
...
llvm-svn: 12894
2004-04-13 17:18:51 +00:00
Chris Lattner
27b2e2cdc0
Add support for the printImplicitDefsBefore flag
...
llvm-svn: 12893
2004-04-13 17:18:39 +00:00
Chris Lattner
e342a8ef49
Make the testcase more challenging
...
llvm-svn: 12892
2004-04-13 17:18:07 +00:00
Chris Lattner
34fba8eb00
Reenable library now that the loopsimplify bug is fixed
...
llvm-svn: 12891
2004-04-13 16:24:53 +00:00
Chris Lattner
89e959bb1f
Fix LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll
...
LoopSimplify was not updating dominator frontiers correctly in some cases.
llvm-svn: 12890
2004-04-13 16:23:25 +00:00
Chris Lattner
a7aeb506dd
New testcase where loop simplify is not updating domfrontiers correctly
...
llvm-svn: 12889
2004-04-13 16:22:04 +00:00
Chris Lattner
a6e22814ab
Refactor code a bit to make it simpler and eliminate the goto
...
llvm-svn: 12888
2004-04-13 15:21:18 +00:00
Chris Lattner
54dcea809f
Add notes about some of the code quality improvements that have gone in
...
llvm-svn: 12887
2004-04-13 14:43:35 +00:00
Chris Lattner
277f7e6ebc
Temporary hack to get the nightly tester running
...
llvm-svn: 12886
2004-04-13 13:57:29 +00:00
John Criswell
ed868e14ff
Added Spiff.
...
llvm-svn: 12885
2004-04-13 13:42:38 +00:00
Chris Lattner
8417052938
This patch addresses PR35: Loop simplify should reconstruct nested loops.
...
This is fairly straight-forward, but was a real nightmare to get just
perfect. aarg. :)
llvm-svn: 12884
2004-04-13 05:05:33 +00:00
Brian Gaeke
ff27406cf9
Clean up the Spiff code so that it emits fewer warnings. This
...
consists mostly of changing sloppy K&R C code to slightly more
disciplined K&R C code, and doing the usual things to shut gcc up.
llvm-svn: 12877
2004-04-13 03:24:45 +00:00
Brian Gaeke
2ec7dfc278
Build Spiff directory
...
llvm-svn: 12876
2004-04-12 22:53:51 +00:00
Brian Gaeke
4ae2642fd4
Add the Spiff fp-aware diff utility from Bellcore
...
llvm-svn: 12875
2004-04-12 22:53:24 +00:00
Brian Gaeke
bb0f2db881
We don't need to insert TargetData into the PassManager here.
...
llvm-svn: 12874
2004-04-12 21:46:31 +00:00
Chris Lattner
176b4c2439
new testcase
...
llvm-svn: 12873
2004-04-12 20:59:07 +00:00
Alkis Evlogimenos
8f2df3aa3c
Fix bug introduced in previous commit.
...
llvm-svn: 12872
2004-04-12 20:26:39 +00:00
Chris Lattner
55b7ef5a81
Add some methods that are useful for updating loop information.
...
llvm-svn: 12871
2004-04-12 20:26:17 +00:00
Alkis Evlogimenos
7ab640fdcb
Update testcase to illustrate the coalescing problem. The previous one did not work because of a fix in the x86 instruction selector.
...
llvm-svn: 12870
2004-04-12 19:04:22 +00:00
Alkis Evlogimenos
0ede7ec4f8
Correctly compute spill weights
...
llvm-svn: 12869
2004-04-12 17:39:20 +00:00
John Criswell
b7147b33a0
Added testcase for the llvm.readport and llvm.writeport intrinsics.
...
llvm-svn: 12868
2004-04-12 16:42:43 +00:00
John Criswell
7a57647f97
Corrected the descriptions of the llvm.writeport and llvm.writeio
...
intrinsics.
Modified llvm.readio and llvm.writeio to use pointers to memory instead
of integers. This should take care of problems such as different pointer
sizes, casting integers to pointers, weird architectural pointer types, etc.
Re-worded the description of llvm.readio and llvm.writeio so that it should
be more clear as to why they should be used over regular loads/stores for
I/O.
llvm-svn: 12867
2004-04-12 16:33:19 +00:00
Alkis Evlogimenos
b753c8c9c5
Print def lists a bit more compactly
...
llvm-svn: 12866
2004-04-12 15:57:58 +00:00
Alkis Evlogimenos
70bbce62b1
Add same value coalescing testcase
...
llvm-svn: 12865
2004-04-12 15:40:25 +00:00
John Criswell
a450122ebf
Added initial design for the llvm.readio and llvm.writeio intrinsics.
...
llvm-svn: 12864
2004-04-12 15:02:16 +00:00
Chris Lattner
a2b279e89c
Add a couple more IPO's
...
llvm-svn: 12863
2004-04-12 05:38:15 +00:00
Chris Lattner
0a7526470b
finegrainify namespacification
...
llvm-svn: 12862
2004-04-12 05:38:01 +00:00
Chris Lattner
be43544429
Actually update the call graph as the inliner changes it. This allows us to
...
execute other CallGraphSCCPasses after the inliner without crashing.
llvm-svn: 12861
2004-04-12 05:37:29 +00:00
Chris Lattner
8b6db18ac3
Change the call graph class to have TWO external nodes, making call graph
...
SCC passes much more useful. In particular, this should fix the incredibly
stupid missed inlining opportunities that the inliner suffered from.
llvm-svn: 12860
2004-04-12 05:36:32 +00:00
Chris Lattner
c9e37d7cc9
Hrm, operator new and new[] do not belong here. We should not CSE them! :)
...
llvm-svn: 12859
2004-04-12 05:16:42 +00:00
Chris Lattner
494a685449
Add support for removing invoke instructions
...
llvm-svn: 12858
2004-04-12 05:15:13 +00:00
Chris Lattner
08f201bee5
Stop printing Function*
...
llvm-svn: 12857
2004-04-12 04:06:56 +00:00
Chris Lattner
d041dcd92f
Simplify code a bit, and be sure to mark the external node as potentially throwing
...
llvm-svn: 12856
2004-04-12 04:06:38 +00:00
Chris Lattner
a24f986333
Fix issues that the local allocator has dealing with instructions that implicitly use ST(0)
...
llvm-svn: 12855
2004-04-12 03:02:48 +00:00
Chris Lattner
2e2b0ceab9
No really, fix printing for LLC. I gotta get a way for CVS to whine at me if
...
I have unsaved emacs buffers, geeze...
llvm-svn: 12854
2004-04-12 01:52:04 +00:00
Chris Lattner
ba1038e0f3
Correct printing for LLC and the encoding for the JIT
...
llvm-svn: 12853
2004-04-12 01:50:04 +00:00
Chris Lattner
e407dbe9ff
Use the fucomi[p] instructions to perform floating point comparisons instead
...
of the fucom[p][p] instructions. This allows us to code generate this function
bool %test(double %X, double %Y) {
%C = setlt double %Y, %X
ret bool %C
}
... into:
test:
fld QWORD PTR [%ESP + 4]
fld QWORD PTR [%ESP + 12]
fucomip %ST(1)
fstp %ST(0)
setb %AL
movsx %EAX, %AL
ret
where before we generated:
test:
fld QWORD PTR [%ESP + 4]
fld QWORD PTR [%ESP + 12]
fucompp
** fnstsw
** sahf
setb %AL
movsx %EAX, %AL
ret
The two marked instructions (which are the ones eliminated) are very bad,
because they serialize execution of the processor. These instructions are
available on the PPRO and later, but since we already use cmov's we aren't
losing any portability.
I retained the old code for the day when we decide we want to support back
to the 386.
llvm-svn: 12852
2004-04-12 01:43:36 +00:00
Chris Lattner
d1c7545322
Add support for the FUCOMIr instruction
...
llvm-svn: 12851
2004-04-12 01:39:15 +00:00
Chris Lattner
6c84d4ca44
Add two new instructions
...
llvm-svn: 12850
2004-04-12 01:38:55 +00:00
Chris Lattner
0fe57da8fa
Fix a bug in my load/cast folding patch.
...
llvm-svn: 12849
2004-04-12 00:23:04 +00:00
Chris Lattner
dc0105467a
Adjust some comments, fix a bug in my previous patch
...
llvm-svn: 12848
2004-04-12 00:12:04 +00:00
Chris Lattner
dfbb1d1cfe
Disambiguate symbols after loop extraction so that we can diagnose a code
...
generator bug if multiple loops are extracted from a function.
llvm-svn: 12847
2004-04-11 23:52:35 +00:00
Chris Lattner
07c1c11511
On X86, casting an integer to floating point requires going through memory.
...
If the source of the cast is a load, we can just use the source memory location,
without having to create a temporary stack slot entry.
Before we code generated this:
double %int(int* %P) {
%V = load int* %P
%V2 = cast int %V to double
ret double %V2
}
into:
int:
sub %ESP, 4
mov %EAX, DWORD PTR [%ESP + 8]
mov %EAX, DWORD PTR [%EAX]
mov DWORD PTR [%ESP], %EAX
fild DWORD PTR [%ESP]
add %ESP, 4
ret
Now we produce this:
int:
mov %EAX, DWORD PTR [%ESP + 4]
fild DWORD PTR [%EAX]
ret
... which is nicer.
llvm-svn: 12846
2004-04-11 23:21:26 +00:00
Chris Lattner
14243fb3b8
New testcase
...
llvm-svn: 12845
2004-04-11 23:18:30 +00:00
Chris Lattner
d4af820aad
Implement folding of loads into floating point operations. This implements:
...
test/Regression/CodeGen/X86/fp_load_fold.llx
llvm-svn: 12844
2004-04-11 22:05:45 +00:00
Chris Lattner
fe94f0bf93
New testcase
...
llvm-svn: 12843
2004-04-11 22:05:16 +00:00
Chris Lattner
dcb750f015
Unify all of the code for floating point +,-,*,/ into one function
...
llvm-svn: 12842
2004-04-11 21:23:56 +00:00
Chris Lattner
80ba401602
This implements folding of constant operands into floating point operations
...
for mul and div.
Instead of generating this:
test_divr:
fld QWORD PTR [%ESP + 4]
fld QWORD PTR [.CPItest_divr_0]
fdivrp %ST(1)
ret
We now generate this:
test_divr:
fld QWORD PTR [%ESP + 4]
fdivr QWORD PTR [.CPItest_divr_0]
ret
This code desperately needs refactoring, which will come in the next
patch.
llvm-svn: 12841
2004-04-11 21:09:14 +00:00
Chris Lattner
e1efbc7c6c
Restructure the mul/div/rem handling code to follow the pattern the other
...
instructions use. This doesn't change any functionality except that long
constant expressions of these operations will now magically start working.
llvm-svn: 12840
2004-04-11 20:56:28 +00:00
Chris Lattner
f7ed7df539
Codegen FP adds and subtracts with a constant more efficiently, generating:
...
fld QWORD PTR [%ESP + 4]
fadd QWORD PTR [.CPItest_add_0]
instead of:
fld QWORD PTR [%ESP + 4]
fld QWORD PTR [.CPItest_add_0]
faddp %ST(1)
I also intend to do this for mul & div, but it appears that I have to
refactor a bit of code before I can do so.
This is tested by: test/Regression/CodeGen/X86/fp_constant_op.llx
llvm-svn: 12839
2004-04-11 20:26:20 +00:00
Chris Lattner
b6e0b58fbc
Add some new instructions
...
llvm-svn: 12838
2004-04-11 20:24:15 +00:00
Chris Lattner
9affe3e7df
New testcase
...
llvm-svn: 12837
2004-04-11 20:24:01 +00:00
Chris Lattner
5b44472200
Relax assertion to make this function work with a broader class of instructions
...
llvm-svn: 12836
2004-04-11 20:21:06 +00:00
Chris Lattner
3f912a6f43
Two changes:
...
1. If an incoming argument is dead, don't load it from the stack
2. Do not code gen noop copies at all (ie, cast int -> uint), not even to
a move. This should reduce register pressure for allocators that are
unable to coallesce away these copies in some cases.
llvm-svn: 12835
2004-04-11 19:21:59 +00:00
Chris Lattner
5ec93a8678
Add another variant of the testcase
...
llvm-svn: 12834
2004-04-11 19:01:35 +00:00
Chris Lattner
403abb824f
operator new & operator new[] do not kill any legal memory locations.
...
llvm-svn: 12833
2004-04-11 18:16:34 +00:00
Chris Lattner
74e5c31746
new testcase
...
llvm-svn: 12832
2004-04-11 16:47:15 +00:00
Chris Lattner
c5fad355f8
Allow clients to be more efficient.
...
llvm-svn: 12831
2004-04-11 16:43:07 +00:00
Chris Lattner
9120ff3488
Make comments above APIs reflect what they should do.
...
llvm-svn: 12830
2004-04-11 16:42:50 +00:00
Chris Lattner
a55bf865ea
New method to allow more efficient clients
...
llvm-svn: 12829
2004-04-11 16:35:30 +00:00
Chris Lattner
24cf0200c7
Fix a bug in my select transformation
...
llvm-svn: 12826
2004-04-11 01:39:19 +00:00
Chris Lattner
192e326cd3
Add a missing break, which caused a crash in an obscure situation
...
llvm-svn: 12825
2004-04-11 01:29:30 +00:00
Chris Lattner
f16fe7206c
Update the value numbering interface.
...
llvm-svn: 12824
2004-04-10 22:33:34 +00:00
Chris Lattner
ffdfe64ced
Note to self: SAVE FILES!
...
llvm-svn: 12823
2004-04-10 22:32:47 +00:00
Chris Lattner
8e096ddeaf
Add an interface to update value numbering
...
llvm-svn: 12822
2004-04-10 22:32:09 +00:00
Chris Lattner
623fba1107
Implement InstCombine/select.ll:test13*
...
llvm-svn: 12821
2004-04-10 22:21:27 +00:00
Chris Lattner
1f99df6d27
New testcases
...
llvm-svn: 12820
2004-04-10 22:21:14 +00:00
Chris Lattner
cf4a996cba
Implement InstCombine/add.ll:test20
...
Canonicalize add of sign bit constant into a xor
llvm-svn: 12819
2004-04-10 22:01:55 +00:00
Chris Lattner
825a00195d
New testcase
...
llvm-svn: 12818
2004-04-10 22:01:27 +00:00
Chris Lattner
69c4900512
Rewrite the GCSE pass to be *substantially* simpler, a bit more efficient,
...
and a bit more powerful
llvm-svn: 12817
2004-04-10 21:11:11 +00:00
Chris Lattner
f9d9665138
Fix spurious warning in release mode
...
llvm-svn: 12816
2004-04-10 19:15:56 +00:00
Chris Lattner
d450df05ba
Silence a spurious warning
...
llvm-svn: 12815
2004-04-10 18:32:01 +00:00
Chris Lattner
d95ef7eff0
Simplify code a bit, and fix a bug that was breaking perlbmk
...
llvm-svn: 12814
2004-04-10 18:06:21 +00:00
Chris Lattner
7ebfe61dc1
Fix a bug in my checkin last night that was breaking programs using invoke.
...
llvm-svn: 12813
2004-04-10 16:53:29 +00:00
Chris Lattner
5093213c40
Fix previous patch
...
llvm-svn: 12811
2004-04-10 07:27:48 +00:00
Chris Lattner
6149ac8991
Correctly update counters
...
llvm-svn: 12810
2004-04-10 07:02:02 +00:00
Chris Lattner
027ccc1200
Add note
...
llvm-svn: 12809
2004-04-10 06:56:53 +00:00
Chris Lattner
4a1b03c773
Add a couple of more functions that cannot access memory (the intrinsics) and
...
don't write to memory
llvm-svn: 12808
2004-04-10 06:55:27 +00:00
Chris Lattner
cfa1adcdb8
Simplify code a bit, and use alias analysis to allow us to delete unused
...
call and invoke instructions that are known to not write to memory.
llvm-svn: 12807
2004-04-10 06:53:09 +00:00
Chris Lattner
56471868e2
New testcases
...
llvm-svn: 12806
2004-04-10 06:52:20 +00:00
Chris Lattner
f72a30b31c
Clarify interface
...
llvm-svn: 12805
2004-04-10 06:11:29 +00:00
Chris Lattner
5393e11318
Create the output directory if it's not already there
...
llvm-svn: 12804
2004-04-10 06:03:22 +00:00
Chris Lattner
d777677665
Simplify cfg now eliminates all of the branches in this testcase
...
llvm-svn: 12803
2004-04-09 23:50:29 +00:00
Chris Lattner
e4ad3e599b
Another testcase
...
llvm-svn: 12802
2004-04-09 23:47:52 +00:00
Chris Lattner
24cd6b9371
Testcase to make sure we can apply the shift to the operands of the select,
...
eliminating the shifts
llvm-svn: 12801
2004-04-09 23:47:24 +00:00
Chris Lattner
56e4d3d8ad
Implement select.ll:test12*
...
This transforms code like this:
%C = or %A, %B
%D = select %cond, %C, %A
into:
%C = select %cond, %B, 0
%D = or %A, %C
Since B is often a constant, the select can often be eliminated. In any case,
this reduces the usage count of A, allowing subsequent optimizations to happen.
This xform applies when the operator is any of:
add, sub, mul, or, xor, and, shl, shr
llvm-svn: 12800
2004-04-09 23:46:01 +00:00
Chris Lattner
be68fd036b
Add testcases for harder combining cases.
...
llvm-svn: 12799
2004-04-09 23:43:48 +00:00
Chris Lattner
0aa565647c
Fold code like:
...
if (C)
V1 |= V2;
into:
Vx = V1 | V2;
V1 = select C, V1, Vx
when the expression can be evaluated unconditionally and is *cheap* to
execute. This limited form of if conversion is quite handy in lots of cases.
For example, it turns this testcase into straight-line code:
int in0 ; int in1 ; int in2 ; int in3 ;
int in4 ; int in5 ; int in6 ; int in7 ;
int in8 ; int in9 ; int in10; int in11;
int in12; int in13; int in14; int in15;
long output;
void mux(void) {
output =
(in0 ? 0x00000001 : 0) | (in1 ? 0x00000002 : 0) |
(in2 ? 0x00000004 : 0) | (in3 ? 0x00000008 : 0) |
(in4 ? 0x00000010 : 0) | (in5 ? 0x00000020 : 0) |
(in6 ? 0x00000040 : 0) | (in7 ? 0x00000080 : 0) |
(in8 ? 0x00000100 : 0) | (in9 ? 0x00000200 : 0) |
(in10 ? 0x00000400 : 0) | (in11 ? 0x00000800 : 0) |
(in12 ? 0x00001000 : 0) | (in13 ? 0x00002000 : 0) |
(in14 ? 0x00004000 : 0) | (in15 ? 0x00008000 : 0) ;
}
llvm-svn: 12798
2004-04-09 22:50:22 +00:00
Chris Lattner
5bcb4eb13c
Fix an obvious bug in the refactoring I did a few days ago
...
llvm-svn: 12797
2004-04-09 22:28:33 +00:00
Chris Lattner
8ffe3e0b72
Expand on adding an intrinsic. Move section to before adding an instruction
...
llvm-svn: 12796
2004-04-09 19:24:20 +00:00
John Criswell
2b4c96e758
Reversed the order of the llvm.writeport() operands so that the value
...
is listed first and the address is listed second.
llvm-svn: 12795
2004-04-09 19:09:14 +00:00
Chris Lattner
183b336a54
Fold binary operators with a constant operand into select instructions
...
that have a constant operand. This implements
add.ll:test19, shift.ll:test15*, and others that are not tested
llvm-svn: 12794
2004-04-09 19:05:30 +00:00
Chris Lattner
cf7baf3519
Implement select.ll:test11
...
llvm-svn: 12793
2004-04-09 18:19:44 +00:00
Chris Lattner
755cab25ae
new testcase
...
llvm-svn: 12792
2004-04-09 18:19:29 +00:00
Alkis Evlogimenos
237f203ca9
Add definition list to each live interval.
...
llvm-svn: 12791
2004-04-09 18:07:57 +00:00
John Criswell
417228d00a
Fixed some spelling.
...
llvm-svn: 12790
2004-04-09 16:48:45 +00:00
John Criswell
aa1c3c1f23
Modified the prototypes of the llvm.readport and llvm.writeport intrinsics
...
so that they do not specify specific integer sizes (as those are
constrained by the code generator, not the intrinsic itself).
Also put these intrinsics into their own "Operating System" section.
llvm-svn: 12789
2004-04-09 16:43:20 +00:00
John Criswell
508b93c569
Added the llvm.readport and llvm.writeport intrinsics.
...
llvm-svn: 12788
2004-04-09 15:23:37 +00:00
John Criswell
2fc9983852
Changed assertions to error messages.
...
llvm-svn: 12787
2004-04-09 15:10:15 +00:00
John Criswell
c28c3b625f
Changes recommended by Chris:
...
InstSelectSimple.cpp:
Change the checks for proper I/O port address size into an exit() instead
of an assertion. Assertions aren't used in Release builds, and handling
this error should be graceful (not that this counts as graceful, but it's
more graceful).
Modified the generation of the IN/OUT instructions to have 0 arguments.
X86InstrInfo.td:
Added the OpSize attribute to the 16 bit IN and OUT instructions.
llvm-svn: 12786
2004-04-08 22:39:13 +00:00
Chris Lattner
e228ee5870
Implement InstCombine/cast-propagate.ll
...
llvm-svn: 12784
2004-04-08 20:39:49 +00:00
Chris Lattner
22b2166b36
New testcase
...
llvm-svn: 12783
2004-04-08 20:39:40 +00:00
John Criswell
10db062d41
Added the llvm.readport and llvm.writeport intrinsics for x86. These do
...
I/O port instructions on x86. The specific code sequence is tailored to
the parameters and return value of the intrinsic call.
Added the ability for implicit defintions to be printed in the Instruction
Printer.
Added the ability for RawFrm instruction to print implict uses and
defintions with correct comma output. This required adjustment to some
methods so that a leading comma would or would not be printed.
llvm-svn: 12782
2004-04-08 20:31:47 +00:00
John Criswell
5201004ef9
Added the llvm.readport and llvm.writeport intrinsics.
...
The Verifier ensures that their parameters are of integral types and have
the correct sign, but it does not enforce any size restrictions because
such restrictions are platform dependent.
llvm-svn: 12781
2004-04-08 20:27:38 +00:00
John Criswell
6d42651933
Added the llvm.readport and llvm.writeport intrinsics.
...
llvm-svn: 12780
2004-04-08 20:26:21 +00:00
Chris Lattner
3b3861d305
Implement ScalarRepl/select_promote.ll
...
llvm-svn: 12779
2004-04-08 19:59:34 +00:00
Chris Lattner
3b613818f6
New testcase, corresponding to phi_promote.ll
...
llvm-svn: 12778
2004-04-08 19:59:22 +00:00
Brian Gaeke
a8d593e947
This file does not appear to be included anywhere.
...
llvm-svn: 12777
2004-04-08 19:36:26 +00:00
Chris Lattner
d61b13c6e2
Disable strict alias analysis in the backend c compiler, as the code we
...
generate is not TBAA safe.
llvm-svn: 12774
2004-04-08 15:18:59 +00:00
Chris Lattner
a182f5bf48
Revert previous patch, I'm a moron :)
...
llvm-svn: 12773
2004-04-08 15:18:03 +00:00
Chris Lattner
177fe8d82f
Right, we break strict aliasing requirements. Make sure to disable strict
...
aliasing in the C compiler.
llvm-svn: 12772
2004-04-08 15:14:43 +00:00
Chris Lattner
4d25c86b52
Remove the "really gross hacks" that are there to deal with recursive functions.
...
Now we collect all of the call sites we are interested in inlining, then inline
them. This entirely avoids issues with trying to inline a call site we got by
inlining another call site. This also eliminates iterator invalidation issues.
llvm-svn: 12770
2004-04-08 06:34:31 +00:00
Chris Lattner
1c631e813d
Implement InstCombine/select.ll:test[7-10]
...
llvm-svn: 12769
2004-04-08 04:43:23 +00:00
Chris Lattner
ac42fd5912
Add some more cases we should combine
...
llvm-svn: 12768
2004-04-08 04:43:04 +00:00
Brian Gaeke
8a56f16700
This file is no longer used.
...
llvm-svn: 12767
2004-04-07 21:01:22 +00:00
Brian Gaeke
69ee7e1353
Don't include InstrSelectionSupport.h.
...
llvm-svn: 12766
2004-04-07 20:55:32 +00:00
Brian Gaeke
c125664927
Move ChooseRegOrImmed() prototype here, from InstrSelectionSupport.h.
...
llvm-svn: 12765
2004-04-07 20:38:57 +00:00
Brian Gaeke
5c80118367
Don't include InstrSelectionSupport.h.
...
llvm-svn: 12764
2004-04-07 20:38:56 +00:00
Chris Lattner
2b2412d0c8
Implement test/Regression/Transforms/InstCombine/getelementptr_index.ll
...
llvm-svn: 12762
2004-04-07 18:38:20 +00:00
Chris Lattner
dadf78d933
New testcase
...
llvm-svn: 12761
2004-04-07 18:38:01 +00:00
Brian Gaeke
8931345fe5
Fix insertion of SelectInsts.
...
llvm-svn: 12760
2004-04-07 18:31:47 +00:00
Brian Gaeke
85521d70dd
Don't print [%reg + 0], just print [%reg]
...
llvm-svn: 12759
2004-04-07 17:33:56 +00:00
Brian Gaeke
6d62df5422
First version of code to handle loads. Stub function for handling stores.
...
llvm-svn: 12758
2004-04-07 17:29:37 +00:00
Brian Gaeke
989c04ab58
Support loading arguments from %I0...%I5 into virtual registers in
...
function prologues, and fix an off-by-one in visitCallInst that was
putting call args into the wrong registers.
llvm-svn: 12757
2004-04-07 17:04:09 +00:00
Brian Gaeke
7985e56cf9
It's setting up the call args right now, but on the callee side, it's
...
trying to get incoming args off the stack, instead of the %i0...%i6 regs,
which is wrong.
llvm-svn: 12756
2004-04-07 16:41:22 +00:00
Chris Lattner
13de334a4e
New testcase that crashed scalarevolution on sparc
...
llvm-svn: 12755
2004-04-07 16:17:45 +00:00
Chris Lattner
74498e1066
Fix a bug Brian found.
...
llvm-svn: 12754
2004-04-07 16:16:11 +00:00
Brian Gaeke
52ad5f94e2
We have a global reg. allocator now -- thanks to Alkis.
...
Fix a typo.
Add a project I've always thought would be cool.
llvm-svn: 12747
2004-04-07 15:31:23 +00:00
Chris Lattner
d93de7a754
New file that can be useful for hand inspection of assembly required for certain
...
kinds of instructions.
llvm-svn: 12746
2004-04-07 05:06:39 +00:00
Chris Lattner
bd58b3fbe9
This is a start on handling setcc instructions. As the comment notes, we
...
have no good way of handling this until the code generator is improved.
We should probably just emit V9 instructions in the meantime.
llvm-svn: 12745
2004-04-07 05:04:51 +00:00
Chris Lattner
bb22d5a564
andd subcc instructions which is used to create the 'cmp' pseudo instruction
...
llvm-svn: 12744
2004-04-07 05:04:01 +00:00
Chris Lattner
f6245bc8e9
Avoid emitting an extra copy on each 32-bit operation
...
llvm-svn: 12743
2004-04-07 04:36:53 +00:00
Brian Gaeke
4aac81435f
Make generation of stack-slot loads and copies less ugly.
...
llvm-svn: 12742
2004-04-07 04:29:14 +00:00
Brian Gaeke
3675c30873
Fix bug in printing loads.
...
llvm-svn: 12741
2004-04-07 04:29:03 +00:00
Chris Lattner
42ffd2e32c
Add support for shift instructions, wrap some long lines
...
llvm-svn: 12740
2004-04-07 04:27:16 +00:00
Chris Lattner
8406cf3046
Fix encoding of existing shift instructions, add rr shifts
...
llvm-svn: 12739
2004-04-07 04:26:57 +00:00
Chris Lattner
a67801f0d4
New testcase
...
llvm-svn: 12738
2004-04-07 04:08:21 +00:00
Chris Lattner
fcdf82a19f
Add a bunch more instructions
...
llvm-svn: 12737
2004-04-07 04:06:46 +00:00
Chris Lattner
fd8212ef54
Merge my changes with brians
...
llvm-svn: 12736
2004-04-07 04:05:49 +00:00
Brian Gaeke
37f92b534f
Add in some things I forgot, which Chris helpfully reminded me of...
...
llvm-svn: 12735
2004-04-07 04:05:12 +00:00
Brian Gaeke
322423181b
Add support for the "Y" register, used by MUL & DIV.
...
llvm-svn: 12734
2004-04-07 04:01:11 +00:00
Brian Gaeke
5524d54c02
Add UDIV, SDIV, and a few variants of WR.
...
llvm-svn: 12733
2004-04-07 04:01:00 +00:00
Brian Gaeke
cfbfb8ac57
Preliminary support for getting 64-bit integer constants into registers.
...
Preliminary support for division. It's gross because you have to initialize
the "Y" register, which is the top 32 bits of the thing you're dividing.
llvm-svn: 12732
2004-04-07 04:00:49 +00:00
Brian Gaeke
589bf05bf4
Prune unnecessary #includes
...
llvm-svn: 12731
2004-04-06 23:25:07 +00:00
Brian Gaeke
b3deed9fae
Simple delay slot filler pass.
...
llvm-svn: 12730
2004-04-06 23:21:45 +00:00
Brian Gaeke
610c685eb6
Add references to delay slot filler pass.
...
Fill in addPassesToJITCompile method.
llvm-svn: 12729
2004-04-06 23:21:24 +00:00
Brian Gaeke
4bd246aee9
First attempt at handling frame index elimination.
...
llvm-svn: 12728
2004-04-06 22:10:22 +00:00
Brian Gaeke
3915ad7c02
First attempt at special-casing printing of [%reg + offset] for
...
ld/st instructions - doesn't seem to work yet, but I think it's
just a typo or something somewhere.
llvm-svn: 12727
2004-04-06 22:10:11 +00:00
Brian Gaeke
5e624b822b
Delete reference to "the Mach-O Runtime ABI".
...
llvm-svn: 12726
2004-04-06 22:09:59 +00:00
Brian Gaeke
2e91a3d650
Deal with call return values.
...
Don't put NOPs in delay slots at all. We'll have a fix-up pass later.
llvm-svn: 12725
2004-04-06 22:09:23 +00:00
John Criswell
5ecbed21be
Adding kimwitu++ license.
...
llvm-svn: 12719
2004-04-06 20:23:45 +00:00
Chris Lattner
4e34492569
Bugs fixed new features implemented
...
llvm-svn: 12716
2004-04-06 19:48:42 +00:00
Jakub Staszak
b8955205ce
file based off InstSelectSimple.cpp, slowly being replaced by generated code from the really simple X86 instruction selector tablegen backend
...
llvm-svn: 12715
2004-04-06 19:35:17 +00:00
Jakub Staszak
de647007d3
Tablgen files for really simple instruction selector
...
llvm-svn: 12714
2004-04-06 19:34:00 +00:00
Jakub Staszak
68a9025f50
Tablegen backend for really simple instruction selector
...
llvm-svn: 12713
2004-04-06 19:31:31 +00:00
Jakub Staszak
f9bfc7f927
add tablgen backend for really simple instruction selector
...
llvm-svn: 12712
2004-04-06 19:30:56 +00:00
Chris Lattner
4b9361254a
Fix PR313: [x86] JIT miscompiles unsigned short to floating point
...
llvm-svn: 12711
2004-04-06 19:29:36 +00:00
Chris Lattner
ba33ae5831
Fix incorrect encoding of some ADC and SBB instuctions
...
llvm-svn: 12710
2004-04-06 19:20:32 +00:00
John Criswell
4db8b67a68
Added licensing information for treecc.
...
llvm-svn: 12703
2004-04-06 17:51:10 +00:00
Chris Lattner
19c8b13ec5
Fix a minor bug in previous checking
...
Enable folding of long seteq/setne comparisons into branches and select instructions
Implement unfolded long relational comparisons against a constants a bit more efficiently
Folding comparisons changes code that looks like this:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, %EAX
or %ECX, %EDX
sete %CL
test %CL, %CL
je .LBB2 # PC rel: F
into code that looks like this:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, %EAX
or %ECX, %EDX
jne .LBB2 # PC rel: F
This speeds up 186.crafty by 6% with llc-ls.
llvm-svn: 12702
2004-04-06 17:34:50 +00:00
Misha Brukman
827c985aae
Wrap at 80 cols.
...
llvm-svn: 12701
2004-04-06 17:04:30 +00:00
Chris Lattner
e216fc01b7
Minor cleanups
...
llvm-svn: 12700
2004-04-06 16:54:04 +00:00
Chris Lattner
7f601ade01
Document new option
...
llvm-svn: 12699
2004-04-06 16:46:12 +00:00
Chris Lattner
ad733e733e
Add a new gccld -native-cbe option which causes gccld to generate native code
...
for the application with the C backend instead of the native LLVM code generator
llvm-svn: 12698
2004-04-06 16:43:13 +00:00
Chris Lattner
f2ee88eb5a
Improve codegen of long == and != comparisons against constants. Before,
...
comparing a long against zero got us this:
sub %ESP, 8
mov DWORD PTR [%ESP + 4], %ESI
mov DWORD PTR [%ESP], %EDI
mov %EAX, DWORD PTR [%ESP + 12]
mov %EDX, DWORD PTR [%ESP + 16]
mov %ECX, 0
mov %ESI, 0
mov %EDI, %EAX
xor %EDI, %ECX
mov %ECX, %EDX
xor %ECX, %ESI
or %EDI, %ECX
sete %CL
test %CL, %CL
je .LBB2 # PC rel: F
Now it gets us this:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, %EAX
or %ECX, %EDX
sete %CL
test %CL, %CL
je .LBB2 # PC rel: F
llvm-svn: 12696
2004-04-06 16:02:27 +00:00
Chris Lattner
3ef249c05e
Update docs a bit
...
llvm-svn: 12695
2004-04-06 15:22:35 +00:00
Chris Lattner
80e594fa80
Remove some options that don't really have anything to do with bugpoint
...
llvm-svn: 12694
2004-04-06 15:14:10 +00:00
Chris Lattner
6c3bf13fce
Handle various other important cases of multiplying a long constant immediate. For
...
example, multiplying X*(1 + (1LL << 32)) now produces:
test:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
mov %EAX, %ECX
add %EDX, %ECX
ret
[[[Note to Alkis: why isn't linear scan generating this code?? This might be a
problem with your intervals being too conservative:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
add %EDX, %EAX
ret
end note]]]
Whereas GCC produces this:
T:
sub %esp, 12
mov %edx, DWORD PTR [%esp+16]
mov DWORD PTR [%esp+8], %edi
mov %ecx, DWORD PTR [%esp+20]
xor %edi, %edi
mov DWORD PTR [%esp], %ebx
mov %ebx, %edi
mov %eax, %edx
mov DWORD PTR [%esp+4], %esi
add %ebx, %edx
mov %edi, DWORD PTR [%esp+8]
lea %edx, [%ecx+%ebx]
mov %esi, DWORD PTR [%esp+4]
mov %ebx, DWORD PTR [%esp]
add %esp, 12
ret
I'm not sure example what GCC is smoking here, but it looks like it has just
confused itself with a bunch of stack slots or something. The intel compiler
is better, but still not good:
T:
movl 4(%esp), %edx #2.11
movl 8(%esp), %eax #2.11
lea (%eax,%edx), %ecx #3.12
movl $1, %eax #3.12
mull %edx #3.12
addl %ecx, %edx #3.12
ret #3.12
llvm-svn: 12693
2004-04-06 04:55:43 +00:00
Chris Lattner
1f6024cbbe
Efficiently handle a long multiplication by a constant. For this testcase:
...
long %test(long %X) {
%Y = mul long %X, 123
ret long %Y
}
we used to generate:
test:
sub %ESP, 12
mov DWORD PTR [%ESP + 8], %ESI
mov DWORD PTR [%ESP + 4], %EDI
mov DWORD PTR [%ESP], %EBX
mov %ECX, DWORD PTR [%ESP + 16]
mov %ESI, DWORD PTR [%ESP + 20]
mov %EDI, 123
mov %EBX, 0
mov %EAX, %ECX
mul %EDI
imul %ESI, %EDI
add %ESI, %EDX
imul %ECX, %EBX
add %ESI, %ECX
mov %EDX, %ESI
mov %EBX, DWORD PTR [%ESP]
mov %EDI, DWORD PTR [%ESP + 4]
mov %ESI, DWORD PTR [%ESP + 8]
add %ESP, 12
ret
Now we emit:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
mov %EDX, 123
mul %EDX
imul %ECX, %ECX, 123
add %ECX, %EDX
mov %EDX, %ECX
ret
Which, incidently, is substantially nicer than what GCC manages:
T:
sub %esp, 8
mov %eax, 123
mov DWORD PTR [%esp], %ebx
mov %ebx, DWORD PTR [%esp+16]
mov DWORD PTR [%esp+4], %esi
mov %esi, DWORD PTR [%esp+12]
imul %ecx, %ebx, 123
mov %ebx, DWORD PTR [%esp]
mul %esi
mov %esi, DWORD PTR [%esp+4]
add %esp, 8
lea %edx, [%ecx+%edx]
ret
llvm-svn: 12692
2004-04-06 04:29:36 +00:00
Misha Brukman
ad3e28cbc6
* Added link to newly written ExtendingLLVM.html document
...
* Eliminated extraneous space in the HTML
llvm-svn: 12691
2004-04-06 04:22:43 +00:00
Misha Brukman
c069ca5d05
Incorporated Chris' comments.
...
llvm-svn: 12690
2004-04-06 04:17:51 +00:00
Misha Brukman
2282a6eb31
Added notes on extending LLVM with new instructions, intrinsics, types, etc.
...
llvm-svn: 12689
2004-04-06 03:53:49 +00:00
Chris Lattner
2448baea2a
Improve code generation of long shifts by 32.
...
On this testcase:
long %test(long %X) {
%Y = shr long %X, ubyte 32
ret long %Y
}
instead of:
t:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
sar %EAX, 0
mov %EDX, 0
ret
we now emit:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
mov %EDX, 0
ret
llvm-svn: 12688
2004-04-06 03:42:38 +00:00
Chris Lattner
7332d4c5fd
Bugfixes: inc/dec don't set the carry flag!
...
llvm-svn: 12687
2004-04-06 03:36:57 +00:00
Chris Lattner
decce5bc26
Improve code for passing constant longs as arguments to function calls.
...
For example, on this instruction:
call void %test(long 1234)
Instead of this:
mov %EAX, 1234
mov %ECX, 0
mov DWORD PTR [%ESP], %EAX
mov DWORD PTR [%ESP + 4], %ECX
call test
We now emit this:
mov DWORD PTR [%ESP], 1234
mov DWORD PTR [%ESP + 4], 0
call test
llvm-svn: 12686
2004-04-06 03:23:00 +00:00
Chris Lattner
5fc6f77b60
Emit more efficient 64-bit operations when the RHS is a constant, and one
...
of the words of the constant is zeros. For example:
Y = and long X, 1234
now generates:
Yl = and Xl, 1234
Yh = 0
instead of:
Yl = and Xl, 1234
Yh = and Xh, 0
llvm-svn: 12685
2004-04-06 03:15:53 +00:00
Chris Lattner
b49608afad
Fix typeo
...
llvm-svn: 12684
2004-04-06 02:13:25 +00:00
Chris Lattner
996e667ad4
Add support for simple immediate handling to long instruction selection.
...
This allows us to handle code like 'add long %X, 123456789012' more efficiently.
llvm-svn: 12683
2004-04-06 02:11:49 +00:00
Chris Lattner
9366f0347d
The sbb instructions really ARE sbb's, not adc's
...
llvm-svn: 12682
2004-04-06 02:02:11 +00:00
Chris Lattner
37ba31f740
Implement negation of longs efficiently. For this testcase:
...
long %test(long %X) {
%Y = sub long 0, %X
ret long %Y
}
We used to generate:
test:
sub %ESP, 4
mov DWORD PTR [%ESP], %ESI
mov %ECX, DWORD PTR [%ESP + 8]
mov %ESI, DWORD PTR [%ESP + 12]
mov %EAX, 0
mov %EDX, 0
sub %EAX, %ECX
sbb %EDX, %ESI
mov %ESI, DWORD PTR [%ESP]
add %ESP, 4
ret
Now we generate:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
neg %EAX
adc %EDX, 0
neg %EDX
ret
llvm-svn: 12681
2004-04-06 01:48:06 +00:00
Chris Lattner
bfe74f58d9
Minor tweak to avoid an extra reg-reg copy that the register allocator has to eliminate
...
llvm-svn: 12680
2004-04-06 01:25:33 +00:00
Chris Lattner
464e2ea567
Two changes:
...
* In promote32, if we can just promote a constant value, do so instead of
promoting a constant dynamically.
* In visitReturn inst, actually USE the promote32 argument that takes a
Value*
The end result of this is that we now generate this:
test:
mov %EAX, 0
ret
instead of...
test:
mov %AX, 0
movzx %EAX, %AX
ret
for:
ushort %test() {
ret ushort 0
}
llvm-svn: 12679
2004-04-06 01:21:00 +00:00
Chris Lattner
bf791614ed
Merge the code generator miscompilation code into the optimizer miscompilation
...
code. This "instantly" gives us loop-extractor power to assist with the
debugment of our nasty codegen issues. :)
llvm-svn: 12678
2004-04-05 22:58:16 +00:00
Chris Lattner
95053a9f28
Make a method public
...
llvm-svn: 12677
2004-04-05 22:01:48 +00:00
Chris Lattner
9af52d12d9
Minor cleanups, remove some old debug code
...
llvm-svn: 12676
2004-04-05 21:37:55 +00:00
Chris Lattner
0434ba3ed0
Refactor and genericize code
...
llvm-svn: 12675
2004-04-05 21:37:38 +00:00
Chris Lattner
b0d1e9d02e
lli no longer takes the -quiet option!
...
llvm-svn: 12674
2004-04-05 20:28:41 +00:00
Chris Lattner
c97b7b2285
Do not mangle intrinsics in any way!
...
llvm-svn: 12673
2004-04-05 20:17:53 +00:00
Chris Lattner
0f1df36bdd
Make full use of the Mangler interface to simplify code
...
llvm-svn: 12671
2004-04-05 19:31:02 +00:00
Chris Lattner
d4f78f270b
Sparc don't got not "sqrtl", bum bum bum
...
llvm-svn: 12670
2004-04-05 19:05:15 +00:00
Misha Brukman
5ebc25c818
Kill warnings during an optimized compile where assert() disappears.
...
llvm-svn: 12669
2004-04-05 19:00:46 +00:00
Chris Lattner
29153fc2e5
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
...
llvm-svn: 12668
2004-04-05 18:46:55 +00:00
Chris Lattner
6f4fea937b
New testcase for PR312
...
llvm-svn: 12667
2004-04-05 18:46:33 +00:00
Chris Lattner
4d1fcf1dcd
Fix a bug in yesterdays checkins which broke siod. siod is a great testcase! :)
...
llvm-svn: 12659
2004-04-05 16:02:41 +00:00
Chris Lattner
8953b90aaa
Fix InstCombine/2004-04-04-InstCombineReplaceAllUsesWith.ll
...
llvm-svn: 12658
2004-04-05 02:10:19 +00:00
Chris Lattner
e79fd5c766
New testcase that crashes the instcombine pass. Dominance properties have
...
no meaning if the code is not reachable.
llvm-svn: 12657
2004-04-05 02:01:32 +00:00
Chris Lattner
677202b49e
PR82 is finally fixed!
...
llvm-svn: 12656
2004-04-05 01:43:08 +00:00
Chris Lattner
6087034f3a
Minor change
...
llvm-svn: 12655
2004-04-05 01:31:50 +00:00
Chris Lattner
33fd702590
Update getelementptr instruction description
...
llvm-svn: 12654
2004-04-05 01:30:49 +00:00
Chris Lattner
69193f93b6
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
llvm-svn: 12653
2004-04-05 01:30:19 +00:00
Chris Lattner
fd9fbe187d
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
Auto-upgrade .ll files that use ubytes to index into structures to use uint's.
llvm-svn: 12652
2004-04-05 01:30:04 +00:00
Chris Lattner
15701e84d1
Implement support for a new LLVM 1.3 bytecode format, which uses uint's
...
to index into structure types and allows arbitrary 32- and 64-bit integer
types to index into sequential types.
llvm-svn: 12651
2004-04-05 01:27:26 +00:00
Chris Lattner
60cf133a8e
Be more restrictive with the index types we allow for sequential types
...
llvm-svn: 12650
2004-04-05 01:25:21 +00:00
Chris Lattner
e916f16dbb
PR305 is now fixed
...
llvm-svn: 12649
2004-04-05 00:40:55 +00:00
Chris Lattner
dd28474610
Add ConstantExpr::get(Sign|Zero)Extend methods
...
llvm-svn: 12648
2004-04-04 23:20:30 +00:00
Chris Lattner
dfcf8e34cf
In the perhaps not-to-distant future, we might support gep instructions that
...
have non-long indices for sequential types. In order to avoid trying to figure
out how the v9 backend works, we'll just hack it in the preselection pass.
llvm-svn: 12647
2004-04-04 20:44:05 +00:00
Chris Lattner
ca76d11a81
Adjust to new interface
...
llvm-svn: 12646
2004-04-04 19:47:06 +00:00
Chris Lattner
5453b2f376
Support iteration over constant instructions
...
llvm-svn: 12645
2004-04-04 19:46:54 +00:00
Chris Lattner
092d260fc1
Adjust to new gep_type_iterator prototypes.
...
llvm-svn: 12644
2004-04-04 17:30:06 +00:00
Chris Lattner
bc8ba73cf1
Remove a bunch of cruft that was used to be backwards compatible with the last
...
prerelease format for LLVM bytecode files. Now we only are compatible with
LLVM 1.0+.
llvm-svn: 12643
2004-04-03 23:43:42 +00:00
Chris Lattner
476f71e30b
Allow for use of arbitrary iterator types...
...
llvm-svn: 12642
2004-04-03 23:29:11 +00:00
Chris Lattner
8ed3c8aa13
Implement test/Regression/Transforms/GCSE/undefined_load.ll
...
llvm-svn: 12641
2004-04-03 00:45:16 +00:00
Chris Lattner
db033fa425
New testcase
...
llvm-svn: 12640
2004-04-03 00:44:56 +00:00
Chris Lattner
0defaa1cbc
Add a break in the default case
...
llvm-svn: 12639
2004-04-03 00:43:03 +00:00
Brian Gaeke
5ade501501
Add autoconf support for isStandardOutAConsole ().
...
llvm-svn: 12638
2004-04-02 21:26:04 +00:00
Brian Gaeke
0d372ee696
Regenerated using autoheader-2.57.
...
llvm-svn: 12637
2004-04-02 21:26:03 +00:00
Brian Gaeke
8bdbb3d7eb
Regenerated using autoconf-2.57.
...
llvm-svn: 12636
2004-04-02 21:26:02 +00:00
Brian Gaeke
c6dba95bbc
check for isatty function
...
llvm-svn: 12635
2004-04-02 21:06:44 +00:00
Chris Lattner
9dcd639e5c
Remove obsolete analyses
...
llvm-svn: 12634
2004-04-02 20:56:33 +00:00
Chris Lattner
6748cca268
Remove obsolete files
...
llvm-svn: 12633
2004-04-02 20:56:24 +00:00
Brian Gaeke
d0bdad38f3
Add support for many of the MRegisterInfo callbacks.
...
Eliminating call-frame pseudo instrs and frame indices are still stubs.
Flesh out the emitPrologue method based on better ABI knowledge.
llvm-svn: 12632
2004-04-02 20:53:37 +00:00
Brian Gaeke
d4869e4107
Add load, store, and NOP instructions.
...
Fix up comments.
llvm-svn: 12631
2004-04-02 20:53:37 +00:00
Brian Gaeke
b65254a34d
Add support for printing pc-relative displacements of functions (as used in
...
the CALL instruction).
llvm-svn: 12630
2004-04-02 20:53:35 +00:00
Brian Gaeke
2fd46b6e43
Add support for call instructions (0-ary only for now).
...
llvm-svn: 12629
2004-04-02 20:53:33 +00:00
Chris Lattner
6f29c89597
cleanup some long-dead code
...
llvm-svn: 12628
2004-04-02 20:46:26 +00:00
Chris Lattner
d4f122044a
Ignore configure produced files
...
llvm-svn: 12627
2004-04-02 20:34:30 +00:00
Chris Lattner
64cdd1ef55
Tweak libraries for scev changes
...
llvm-svn: 12625
2004-04-02 20:32:46 +00:00
Chris Lattner
d8d803adb9
new testcase
...
llvm-svn: 12624
2004-04-02 20:27:47 +00:00
Chris Lattner
0916921332
Comment out debugging printouts
...
llvm-svn: 12623
2004-04-02 20:26:46 +00:00
Chris Lattner
76378746c5
New testcases for the indvars pass
...
llvm-svn: 12622
2004-04-02 20:26:04 +00:00
Chris Lattner
2c416ae11f
Tweak testcase to work with new indvars pass
...
llvm-svn: 12621
2004-04-02 20:25:26 +00:00
Chris Lattner
e61b67d7d5
Rewrite the indvars pass to use the ScalarEvolution analysis.
...
This also implements some new features for the indvars pass, including
linear function test replacement, exit value substitution, and it works with
a much more general class of induction variables and loops.
llvm-svn: 12620
2004-04-02 20:24:31 +00:00
Chris Lattner
d934c70cf8
Add a new analysis
...
llvm-svn: 12619
2004-04-02 20:23:17 +00:00
Chris Lattner
eed034bcd3
Fix the obvious bug in my previous checkin
...
llvm-svn: 12618
2004-04-02 18:15:10 +00:00
Chris Lattner
9f0db32625
Implement Transforms/SimplifyCFG/return-merge.ll
...
This actually causes us to turn code like:
return C ? A : B;
into a select instruction.
llvm-svn: 12617
2004-04-02 18:13:43 +00:00
Chris Lattner
99c9b9c02f
New testcase
...
llvm-svn: 12616
2004-04-02 18:12:49 +00:00
Alkis Evlogimenos
d64e904e27
Clean up code a bit.
...
llvm-svn: 12615
2004-04-02 18:11:32 +00:00
Brian Gaeke
2845936a34
Only strip symbols if emitting bytecode to the assembly file.
...
Move lowerselect pass to come after preselection. Move machine
code construction and stack slots pass to come right before instruction
selection. This is to help fix perlbmk.
Update comments.
Make the sequence of passes in addPassesToJITCompile look more like
the sequence of passes in addPassesToEmitAssembly, including support
for -print-machineinstrs.
llvm-svn: 12614
2004-04-02 17:52:40 +00:00
Brian Gaeke
cc24411c0a
Add support for constant select expressions. Clarify the assertion failure msg.
...
llvm-svn: 12613
2004-04-02 17:52:29 +00:00
Chris Lattner
3838243d04
Minor speedup
...
llvm-svn: 12612
2004-04-02 16:28:32 +00:00
Alkis Evlogimenos
fe66caa9a0
Fix type in comments
...
llvm-svn: 12611
2004-04-02 16:02:50 +00:00
Alkis Evlogimenos
5fc4772d5e
Fix type in instruction builder instantiation
...
llvm-svn: 12610
2004-04-02 15:51:03 +00:00
Chris Lattner
a45a216ff6
Make the verifier API more complete and useful.
...
Patch contributed by Reid Spencer
llvm-svn: 12609
2004-04-02 15:45:08 +00:00
Chris Lattner
b753dd1cb4
Make the verifier API more complete and useful
...
llvm-svn: 12608
2004-04-02 15:44:33 +00:00
Alkis Evlogimenos
d186ed02e4
Add more ADC and SBB variants
...
llvm-svn: 12607
2004-04-02 07:11:10 +00:00
Chris Lattner
bcf2623cab
minor formatting change
...
llvm-svn: 12606
2004-04-02 06:32:45 +00:00
Chris Lattner
a413b08580
Fix two pretty serious bugs:
...
1. Each time the loop extractor extracted a loop, we would leak a module.
2. When we extracted a loop, we didn't add the new function to the list of
miscompiled functions. Thus if the bug was in a loop nest and we
extracted it, we could actually *LOSE THE BUG*, which is very bad.
With these patches, bugpoint has successfully found a bug for me in a function
with several nested loops, and cut it down to just one of them. :) :)
llvm-svn: 12605
2004-04-02 06:32:17 +00:00
Chris Lattner
af67dac7f4
Fix a fairly nasty bug that prevented bugpoint from working quite right when
...
hacking on programs with two functions that have the same name.
llvm-svn: 12604
2004-04-02 06:30:33 +00:00
Chris Lattner
73c141ac71
If the program returns a non-zero exit value, don't leave files laying
...
around
llvm-svn: 12603
2004-04-02 05:33:06 +00:00
Chris Lattner
46e18c7f87
Fix wonky header
...
Address PR305: LLVM tools will happily spew bytecode onto your terminal
llvm-svn: 12602
2004-04-02 05:06:57 +00:00
Chris Lattner
3af1fffd3c
Add new function
...
llvm-svn: 12601
2004-04-02 05:04:12 +00:00
Chris Lattner
454e18317d
Add new function, autoconf support required tho
...
llvm-svn: 12600
2004-04-02 05:04:03 +00:00
Chris Lattner
fd8f46b1cd
Bug fixed
...
llvm-svn: 12598
2004-04-01 20:31:29 +00:00
Chris Lattner
c24019c825
Fix PR310 and TailDup/2004-04-01-DemoteRegToStack.llx
...
llvm-svn: 12597
2004-04-01 20:28:45 +00:00
Chris Lattner
914a7d0d90
New testcase for PR310
...
llvm-svn: 12596
2004-04-01 20:28:35 +00:00
Chris Lattner
59fdf74968
Remove some assertions that are now bogus with the last patch I put in
...
llvm-svn: 12595
2004-04-01 19:21:46 +00:00
Chris Lattner
ff03fe3b13
Bug fixed
...
llvm-svn: 12593
2004-04-01 19:09:49 +00:00
Chris Lattner
146d0df5e4
Fix PR306: Loop simplify incorrectly updates dominator information
...
Testcase: LoopSimplify/2004-04-01-IncorrectDomUpdate.ll
llvm-svn: 12592
2004-04-01 19:06:07 +00:00
Chris Lattner
f475a12626
New testcase for PR306
...
llvm-svn: 12591
2004-04-01 19:05:54 +00:00
Misha Brukman
b78259a57d
Fix grammar.
...
llvm-svn: 12590
2004-04-01 17:15:42 +00:00
Chris Lattner
b28dd11e33
Add support for select constant expressions to the CBE, fixing SIOD
...
llvm-svn: 12589
2004-04-01 05:28:26 +00:00
Chris Lattner
bc7e35b3b1
Simplify code by using the more powerful BuildMI forms.
...
Implement a small optimization. In test/Regression/CodeGen/X86/select.ll,
we now generate this for foldSel3:
foldSel3:
mov %AL, BYTE PTR [%ESP + 4]
fld DWORD PTR [%ESP + 8]
fld DWORD PTR [%ESP + 12]
mov %EAX, DWORD PTR [%ESP + 16]
mov %ECX, DWORD PTR [%ESP + 20]
cmp %EAX, %ECX
fxch %ST(1)
fcmovae %ST(0), %ST(1)
*** fstp %ST(1)
ret
Instead of:
foldSel3:
mov %AL, BYTE PTR [%ESP + 4]
fld DWORD PTR [%ESP + 8]
fld DWORD PTR [%ESP + 12]
mov %EAX, DWORD PTR [%ESP + 16]
mov %ECX, DWORD PTR [%ESP + 20]
cmp %EAX, %ECX
fxch %ST(1)
fcmovae %ST(0), %ST(1)
*** fxch %ST(1)
*** fstp %ST(0)
ret
In practice, this only effects code size: performance should be basically
unaffected.
llvm-svn: 12588
2004-04-01 04:06:09 +00:00
Chris Lattner
3c8561442c
Wrap at 80 cols
...
llvm-svn: 12587
2004-04-01 04:03:27 +00:00
Chris Lattner
fb893edbe3
Allow converting a builder to an iterator
...
llvm-svn: 12586
2004-04-01 04:03:10 +00:00
Chris Lattner
cfbc023153
Tests for fp cmov's that I forgot to check in earlier
...
llvm-svn: 12585
2004-04-01 03:47:56 +00:00
Chris Lattner
1a7e43c5cf
Clear out all of the changes. Reset version numbers to 1.3
...
add note about select
llvm-svn: 12584
2004-04-01 00:41:31 +00:00
Brian Gaeke
8f177d9171
Add clear() forwarding method.
...
llvm-svn: 12580
2004-03-31 22:43:12 +00:00
Chris Lattner
d55509c281
Generate slightly smaller code, "test R, R" instead of "cmp R, 0"
...
llvm-svn: 12579
2004-03-31 22:22:36 +00:00
Chris Lattner
a4b15f04c6
The X86 backend no longer needs the select lowering pass.
...
llvm-svn: 12578
2004-03-31 22:03:46 +00:00
Chris Lattner
37a7f09d80
Codegen FP select instructions into X86 conditional moves. Annoyingly enough
...
the X86 does not support a full set of fp cmove instructions, so we can't always
fold the condition into the select. :( Yuck.
llvm-svn: 12577
2004-03-31 22:03:35 +00:00
Chris Lattner
c07c95816a
Add support for floating point conditional move instructions
...
llvm-svn: 12576
2004-03-31 22:02:36 +00:00
Chris Lattner
cbb4ed9ef2
Add support for FP cmoves
...
llvm-svn: 12575
2004-03-31 22:02:21 +00:00
Chris Lattner
9fe1646804
Add FP conditional move instructions, which annoyingly have special properties
...
that require the asmwriter to be extended (printing implicit uses before the
explicit operands)
llvm-svn: 12574
2004-03-31 22:02:13 +00:00
Chris Lattner
61fab1409d
Add warning
...
llvm-svn: 12573
2004-03-31 22:00:30 +00:00
Chris Lattner
afbafb55ea
MBB::remove should not modify the iterator passed in
...
llvm-svn: 12572
2004-03-31 21:59:59 +00:00
Chris Lattner
acccf32aa3
MachineBasicBlock::remove should not modify the iterator passed in
...
llvm-svn: 12571
2004-03-31 21:59:29 +00:00
Chris Lattner
7c92c296ba
Improve description, add warning
...
llvm-svn: 12570
2004-03-31 21:59:07 +00:00
Chris Lattner
49ed8ad580
MachineBasicBlock::remove should not change the iterator passed into it
...
llvm-svn: 12569
2004-03-31 21:58:50 +00:00
Brian Gaeke
623710bf2f
Factor out getStaticStackSize from InsertPrologCode(), so that I can more
...
easily steal it for a separate use in the reoptimizer.
llvm-svn: 12568
2004-03-31 20:58:37 +00:00
Brian Gaeke
77e78a4531
Use the true, decoded name of the archive member in getObjectType.
...
In ReadArchiveBuffer, make sure that MemberName is set in the case where
getObjectType would want to return SVR4LongFilename.
llvm-svn: 12567
2004-03-31 19:51:00 +00:00
Chris Lattner
c0ba90e35c
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
...
llvm-svn: 12566
2004-03-31 03:49:47 +00:00
Chris Lattner
709f03e2dd
Fix linking of constant expr casts due to type resolution changes. With
...
this and the other patches 253.perlbmk links again.
llvm-svn: 12565
2004-03-31 02:58:28 +00:00
Chris Lattner
467cb2bc5d
Add support for constant expr casts
...
llvm-svn: 12564
2004-03-31 02:56:11 +00:00
Chris Lattner
974efc72be
Add support for reading constantexpr select instructions
...
llvm-svn: 12563
2004-03-31 02:53:59 +00:00
Chris Lattner
b7897ce431
Fix a latent bug in select constantexpr handling that was broke 253.perlbmk
...
llvm-svn: 12562
2004-03-30 22:51:03 +00:00
Alkis Evlogimenos
a333b1382f
Correctly update LiveVariables when an instruction changes
...
llvm-svn: 12561
2004-03-30 22:44:39 +00:00
Chris Lattner
32817f5985
Fold comparisons into select instructions, making much better code and
...
using our broad selection of movcc instructions. :)
llvm-svn: 12560
2004-03-30 22:39:09 +00:00
Chris Lattner
2dfdad631f
Test folding comparisons into select instructions
...
llvm-svn: 12559
2004-03-30 22:37:04 +00:00
Chris Lattner
f78f843adf
New testcase. This now codegens to:
...
max:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
cmp %EAX, %ECX
cmovle %EAX, %ECX
ret
Someone should really implement passing arguments through registers for
known-internal functions. :)
llvm-svn: 12558
2004-03-30 22:36:52 +00:00
Chris Lattner
358c97e7ae
Implement spill code folding for all of the conditional move instructions
...
llvm-svn: 12554
2004-03-30 21:29:47 +00:00
Chris Lattner
53b58cb854
Add direct support for integer select instructions, though we still don't support
...
folding compares into the select yet.
llvm-svn: 12553
2004-03-30 21:22:00 +00:00
Chris Lattner
b5d47a9420
New testcase for select instructions
...
llvm-svn: 12552
2004-03-30 21:21:14 +00:00
Chris Lattner
deab5e212d
Fix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llx
...
llvm-svn: 12551
2004-03-30 20:58:25 +00:00
Chris Lattner
090516fe93
New testcase that crashes the assembler
...
llvm-svn: 12550
2004-03-30 20:58:00 +00:00
Chris Lattner
1563983d81
Fix some serious bugs in the cmov descriptions, which didn't cause a problem because
...
we never generated them
Make indentation a bit more consistent
llvm-svn: 12549
2004-03-30 20:18:02 +00:00
Brian Gaeke
ef327be6ed
Start cleaning up this pass so that I can debug it.
...
llvm-svn: 12548
2004-03-30 19:53:46 +00:00
Chris Lattner
f17d2d33fb
Oops, actually USE the previously computed value
...
llvm-svn: 12547
2004-03-30 19:45:39 +00:00
Chris Lattner
fdf3202d69
Test general value/value selection which we can do now that we use the
...
select instruction
llvm-svn: 12546
2004-03-30 19:45:11 +00:00
Chris Lattner
81bdcb90ce
Now that all the code generators support the select instruction, and the instcombine
...
pass can eliminate many nasty cases of them, start generating them in the optimizers
llvm-svn: 12545
2004-03-30 19:44:05 +00:00
Chris Lattner
533bc49775
Implement select.ll:test[3-6]
...
llvm-svn: 12544
2004-03-30 19:37:13 +00:00
Chris Lattner
b785d280ec
Add some testcases for select simplification
...
llvm-svn: 12543
2004-03-30 19:36:54 +00:00
Chris Lattner
0048e574fb
Fix a fairly major performance problem. If a PHI node had a constant as
...
an incoming value from a block, the selector would evaluate the constant
at the TOP of the block instead of at the end of the block. This made the
live range for the constant span the entire block, increasing register
pressure needlessly.
llvm-svn: 12542
2004-03-30 19:10:12 +00:00
Chris Lattner
1a0e9ac2f5
Add the select lowering pass to get initial support for select instructions
...
llvm-svn: 12541
2004-03-30 18:41:59 +00:00
Chris Lattner
059f390257
Add a simple select instruction lowering pass
...
llvm-svn: 12540
2004-03-30 18:41:10 +00:00
Chris Lattner
55481f78d3
Add some new methods
...
llvm-svn: 12539
2004-03-30 00:20:08 +00:00
Brian Gaeke
fd02378d3e
Don't warn about a null live range if the Value is a ConstantIntegral.
...
Otherwise, if you're in debugging mode, you get warnings for (apparently)
every immediate constant in the function during reg. allocation.
llvm-svn: 12538
2004-03-29 21:58:41 +00:00
Brian Gaeke
2fe0ac9ade
Change how the beginnings and ends of MachineFunctions are printed. Get
...
rid of the funny cast.
llvm-svn: 12537
2004-03-29 21:58:31 +00:00
Chris Lattner
5152b9ed34
Adjust to new itf
...
llvm-svn: 12534
2004-03-29 20:42:49 +00:00
Chris Lattner
8582975b62
Relax the interface a bit
...
llvm-svn: 12533
2004-03-29 20:42:38 +00:00
John Criswell
fa2f3686a3
Merged in RELEASE_12.
...
llvm-svn: 12532
2004-03-29 20:23:11 +00:00
John Criswell
d2ff5cf7e8
Merged in RELEASE_12.
...
This fixes the zlib linking problems.
llvm-svn: 12531
2004-03-29 20:22:30 +00:00
Chris Lattner
3cdc27c868
Handle -0.0 correctly
...
llvm-svn: 12530
2004-03-29 19:51:24 +00:00
Chris Lattner
87d6b404b5
Add a faq entry
...
llvm-svn: 12529
2004-03-29 19:14:35 +00:00
Chris Lattner
817175f883
Add a bunch of methods that should have been added a long time ago.
...
llvm-svn: 12526
2004-03-29 02:37:53 +00:00
Chris Lattner
5f126b74d3
Add another check
...
llvm-svn: 12525
2004-03-29 00:29:36 +00:00
Chris Lattner
587a9f1416
Fix an assertion
...
Contributed by Reid Spencer
llvm-svn: 12524
2004-03-29 00:17:20 +00:00
Chris Lattner
dd7ce6c31a
Make error message a bit nicer.
...
Contributed by Reid Spencer
llvm-svn: 12523
2004-03-29 00:16:01 +00:00
Chris Lattner
04d6d9d606
Add two methods which have been needed for a long time: Type::get(Un)signedVersion
...
llvm-svn: 12522
2004-03-26 21:43:22 +00:00
Chris Lattner
3aa7b9d08c
Make sure to get the headers from zlib correctly
...
llvm-svn: 12521
2004-03-26 17:04:53 +00:00
Chris Lattner
56b5051428
X % -1 == X % 1 == 0
...
llvm-svn: 12520
2004-03-26 16:11:24 +00:00
Chris Lattner
57c67b06e9
Two changes:
...
#1 is to unconditionally strip constantpointerrefs out of
instruction operands where they are absolutely pointless and inhibit
optimization. GRRR!
#2 is to implement InstCombine/getelementptr_const.ll
llvm-svn: 12519
2004-03-25 22:59:29 +00:00
Chris Lattner
3932cab427
New testcase
...
llvm-svn: 12518
2004-03-25 22:59:06 +00:00
Chris Lattner
82d34eb470
Minor efficiency improvement, finegrainify namespacification
...
llvm-svn: 12517
2004-03-25 22:56:03 +00:00
Chris Lattner
998c0674be
Add note about setting up linux systems to directly execute LLVM bytecode files
...
Fixes PR303
llvm-svn: 12516
2004-03-25 20:38:40 +00:00
Chris Lattner
3922d607a5
Hrm, we were leaking ~1M of garbage that valgrind never told us about because
...
it was "reachable". Cute.
llvm-svn: 12515
2004-03-19 23:34:33 +00:00
Chris Lattner
9e0b81c3e0
Add a dose of reality into the release notes
...
llvm-svn: 12510
2004-03-19 19:22:28 +00:00
Chris Lattner
abb77c9959
Teach the optimizer to delete zero sized alloca's (but not mallocs!)
...
llvm-svn: 12507
2004-03-19 06:08:10 +00:00
Chris Lattner
597f1da506
New testcase, the optimizer can delete zero sized allocas
...
llvm-svn: 12506
2004-03-19 06:07:43 +00:00
Chris Lattner
91f297d4fe
Perhaps the last bugfix before the release? HOPEFULLY! :)
...
llvm-svn: 12505
2004-03-19 04:26:04 +00:00
Chris Lattner
ba6641d598
Fix PR299: [Sparc] Code generator asserts on alloc of zero size type
...
llvm-svn: 12504
2004-03-19 04:21:43 +00:00
Chris Lattner
6ca9b89abb
Malloc doesn't kill a load. This patch need not go into 1.2 though.
...
llvm-svn: 12500
2004-03-18 17:01:26 +00:00
Chris Lattner
0b41ebe65c
Fix a minor wording bug in the manual
...
llvm-svn: 12496
2004-03-18 14:58:55 +00:00
Chris Lattner
211ae0bf05
This is the last remaining bug that I know of in the loop extractor. The loop
...
extractor has extracted hundreds of loops from the SPEC benchmarks without crashing
and without misoptimizing the programs.
This testcase could be reduced substantially more by hand, but I don't have time
to work on it right now.
llvm-svn: 12495
2004-03-18 06:41:59 +00:00
Chris Lattner
dc47e27188
Fix a really nasty bug that was breaking ijpeg in LLC mode. We were incorrectly
...
folding load instructions into other instructions across free instruction
boundaries. Perhaps this will also fix the other strange failures?
llvm-svn: 12494
2004-03-18 06:29:54 +00:00
Chris Lattner
232155dc1b
Fix bug: CodeExtractor/2004-03-17-MissedLiveIns.ll
...
With this fix we now successfully extract all 149 loops from 256.bzip2 without
crashing or miscompiling the program!
llvm-svn: 12493
2004-03-18 05:56:32 +00:00
Chris Lattner
2bcfcc90c8
New testcase, reduced from 256.bzip2
...
llvm-svn: 12492
2004-03-18 05:55:29 +00:00
Chris Lattner
e83693560a
Add statistics to the loop extractor. The loop extractor has successfully
...
extracted all 63 loops for Olden/bh without crashing and without
miscompiling the program!!!
llvm-svn: 12491
2004-03-18 05:46:10 +00:00
Chris Lattner
5bce0c807d
Fix problem with PHI nodes having multiple predecessors from different
...
exit nodes
llvm-svn: 12490
2004-03-18 05:43:18 +00:00
Chris Lattner
acd75986ee
Fix CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll
...
llvm-svn: 12489
2004-03-18 05:38:31 +00:00
Chris Lattner
4c7fcbf77b
New testcase
...
llvm-svn: 12488
2004-03-18 05:33:39 +00:00
Chris Lattner
320d59f4cd
Seriously simplify and correct the PHI node handling code.
...
llvm-svn: 12487
2004-03-18 05:28:49 +00:00
Chris Lattner
d8017a340d
Fix CodeExtractor/2004-03-17-OutputMismatch.ll
...
llvm-svn: 12486
2004-03-18 04:12:05 +00:00
Chris Lattner
b7b099d569
New testcase that crashes the code extractor
...
llvm-svn: 12485
2004-03-18 04:10:02 +00:00
Chris Lattner
37de257ef0
Fix several bugs in the extractor:
...
1. Names were not put on the new arguments created (ok, this just helps sanity :)
2. Fix outgoing pointer values
3. Do not insert stores for values that had not been computed
4. Fix some wierd problems with the outset calculation
This fixes CodeExtractor/2004-03-14-DominanceProblem.ll, making the extractor
work on at least one simple case!
llvm-svn: 12484
2004-03-18 03:49:40 +00:00
Chris Lattner
e9235d2dde
The code extractor needs dominator info. Provide it
...
llvm-svn: 12483
2004-03-18 03:48:06 +00:00
Chris Lattner
835a759686
The code extractor needs dominator information, so we provide it.
...
llvm-svn: 12482
2004-03-18 03:47:46 +00:00
Chris Lattner
cee3404d0a
Prune #includes, moving the module interface to the front. Note that this
...
exposed the fact that the header was not self-contained. There is a reason
we do things :)
llvm-svn: 12481
2004-03-18 03:15:29 +00:00
Chris Lattner
5b460d2ad7
Make this header file self-contained
...
llvm-svn: 12480
2004-03-18 03:14:56 +00:00
Chris Lattner
3022b1bc2c
Fix a HORRIBLY NASTY bug that caused siod to stop working last night.
...
llvm-svn: 12479
2004-03-17 23:22:04 +00:00
Chris Lattner
baf3f62819
Fix a tag-o
...
llvm-svn: 12477
2004-03-17 21:33:32 +00:00
Chris Lattner
8e8716518e
Rewrite the second on AnalysisUsage usage. This documents the new
...
addRequiredTransitive member that Misha added, and explains the whole
concept a lot better. Also, the document used incorrect "subsubsection"
tags instead of "doc_subsubsection" which this fixes.
llvm-svn: 12474
2004-03-17 21:09:55 +00:00
Chris Lattner
b38cc9c026
When loop extraction succeeds, make sure to map the function pointers over
...
to avoid dangling references.
llvm-svn: 12470
2004-03-17 17:42:09 +00:00
Chris Lattner
7e51a502bc
Fix an inverted condition that causes us to think that loop extraction
...
accomplished something when it really did not. This does not fix the bigger problem tho.
llvm-svn: 12469
2004-03-17 17:37:18 +00:00
Chris Lattner
425726d9c2
Fix an iterator invalidation problem in a "buggy" pass
...
llvm-svn: 12468
2004-03-17 17:29:08 +00:00
Chris Lattner
2820235689
update release notes for 1.2
...
llvm-svn: 12467
2004-03-17 03:54:41 +00:00
John Criswell
d064f2124e
Modify test to use the %t substition (temporary name). This is available
...
in the QMTest Testrunner tests.
Please note that putting output files in the Output directory no longer
works, as QMTest does not build Output directories anymore (nor does the
test run in a separate subdirectory, anyway).
llvm-svn: 12466
2004-03-17 02:31:29 +00:00
Chris Lattner
a078f47b39
Fix compilation of mesa, which I broke earlier today
...
llvm-svn: 12465
2004-03-17 02:02:47 +00:00
Chris Lattner
684fa5ac64
Be more accurate
...
llvm-svn: 12464
2004-03-17 01:59:27 +00:00
Chris Lattner
10a8d735c8
cleanup comment
...
llvm-svn: 12463
2004-03-17 01:29:36 +00:00
Alkis Evlogimenos
02a5354d9b
Make the set of fixed (preallocated) intervals be a fixed superset of
...
unhandled + handled. So unhandled is now including all fixed intervals
and fixed intervals never changes when processing a function.
llvm-svn: 12462
2004-03-17 00:48:59 +00:00
Chris Lattner
a3783a577e
Fix bug in previous checkin
...
llvm-svn: 12458
2004-03-16 23:36:49 +00:00
Chris Lattner
95057f6ad1
Okay, so there is no reasonable way for tail duplication to update SSA form,
...
as it is making effectively arbitrary modifications to the CFG and we don't
have a domset/domfrontier implementations that can handle the dynamic updates.
Instead of having a bunch of code that doesn't actually work in practice,
just demote any potentially tricky values to the stack (causing the problem
to go away entirely). Later invocations of mem2reg will rebuild SSA for us.
This fixes all of the major performance regressions with tail duplication
from LLVM 1.1. For example, this loop:
---
int popcount(int x) {
int result = 0;
while (x != 0) {
result = result + (x & 0x1);
x = x >> 1;
}
return result;
}
---
Used to be compiled into:
int %popcount(int %X) {
entry:
br label %loopentry
loopentry: ; preds = %entry, %no_exit
%x.0 = phi int [ %X, %entry ], [ %tmp.9, %no_exit ] ; <int> [#uses=3]
%result.1.0 = phi int [ 0, %entry ], [ %tmp.6, %no_exit ] ; <int> [#uses=2]
%tmp.1 = seteq int %x.0, 0 ; <bool> [#uses=1]
br bool %tmp.1, label %loopexit, label %no_exit
no_exit: ; preds = %loopentry
%tmp.4 = and int %x.0, 1 ; <int> [#uses=1]
%tmp.6 = add int %tmp.4, %result.1.0 ; <int> [#uses=1]
%tmp.9 = shr int %x.0, ubyte 1 ; <int> [#uses=1]
br label %loopentry
loopexit: ; preds = %loopentry
ret int %result.1.0
}
And is now compiled into:
int %popcount(int %X) {
entry:
br label %no_exit
no_exit: ; preds = %entry, %no_exit
%x.0.0 = phi int [ %X, %entry ], [ %tmp.9, %no_exit ] ; <int> [#uses=2]
%result.1.0.0 = phi int [ 0, %entry ], [ %tmp.6, %no_exit ] ; <int> [#uses=1]
%tmp.4 = and int %x.0.0, 1 ; <int> [#uses=1]
%tmp.6 = add int %tmp.4, %result.1.0.0 ; <int> [#uses=2]
%tmp.9 = shr int %x.0.0, ubyte 1 ; <int> [#uses=2]
%tmp.1 = seteq int %tmp.9, 0 ; <bool> [#uses=1]
br bool %tmp.1, label %loopexit, label %no_exit
loopexit: ; preds = %no_exit
ret int %tmp.6
}
llvm-svn: 12457
2004-03-16 23:29:09 +00:00
Chris Lattner
bb1a2cc7ab
This code was both incredibly complex and incredibly broken. Fix it.
...
llvm-svn: 12456
2004-03-16 23:23:11 +00:00
Chris Lattner
0e64dda7ca
Another simple testcase
...
llvm-svn: 12455
2004-03-16 23:07:52 +00:00
Brian Gaeke
d962dd5528
The .type directive on Solaris uses the # character instead of @.
...
llvm-svn: 12454
2004-03-16 22:52:04 +00:00
Brian Gaeke
3fb0e203cd
Fix bug in zero-extending of shorts.
...
llvm-svn: 12453
2004-03-16 22:45:42 +00:00
Brian Gaeke
ae22ce5370
Add UMULrr and SMULrr instructions.
...
llvm-svn: 12452
2004-03-16 22:37:13 +00:00
Brian Gaeke
ae0ca8baa6
Use ! for comment char; it works in both Solaris as and GAS.
...
llvm-svn: 12451
2004-03-16 22:37:12 +00:00
Brian Gaeke
67fcefbfef
Make getClass more robust by adding cLong.
...
Add handling for Mul instruction.
llvm-svn: 12450
2004-03-16 22:37:11 +00:00
Chris Lattner
64f2517c07
Bug fixed
...
llvm-svn: 12449
2004-03-16 21:55:23 +00:00
Chris Lattner
bd10066d97
New testcase for PR297
...
llvm-svn: 12448
2004-03-16 21:52:24 +00:00
Brian Gaeke
33e83b64b4
Add a better head-of-file comment.
...
llvm-svn: 12447
2004-03-16 21:47:20 +00:00
Chris Lattner
1ab58dd802
Bug not fixed after all
...
llvm-svn: 12446
2004-03-16 21:39:04 +00:00
Chris Lattner
618c3990c7
Fix test
...
llvm-svn: 12445
2004-03-16 21:10:15 +00:00
Chris Lattner
a0fb904d18
Fix testcase
...
llvm-svn: 12444
2004-03-16 20:04:55 +00:00
Chris Lattner
fa48edfb7d
Punt if we see gigantic PHI nodes. This improves a huge interpreter loop
...
testcase from 32.5s in -raise to take .3s
llvm-svn: 12443
2004-03-16 19:52:53 +00:00
Chris Lattner
7a7b114871
Do not try to optimize PHI nodes with incredibly high degree. This reduces SCCP
...
time from 615s to 1.49s on a large testcase that has a gigantic switch statement
that all of the blocks in the function go to (an intepreter).
llvm-svn: 12442
2004-03-16 19:49:59 +00:00
Chris Lattner
a64923ad26
Do not copy gigantic switch instructions
...
llvm-svn: 12441
2004-03-16 19:45:22 +00:00
Chris Lattner
0ea6017b87
Fix bug in bug name. It must be the painkillers that I haven't been taking
...
llvm-svn: 12440
2004-03-16 09:01:10 +00:00
Chris Lattner
d3dc850c6c
Implement a new feature in the CFE, moving a GCC extension from the unsupported
...
to the supported list
llvm-svn: 12439
2004-03-16 08:54:07 +00:00
Chris Lattner
91d855f150
New testcase
...
llvm-svn: 12437
2004-03-16 08:49:48 +00:00
Chris Lattner
e1f5161c18
boog fixed
...
llvm-svn: 12436
2004-03-16 08:40:35 +00:00
Chris Lattner
5def7a57c1
Fix PR296: [execution engines] Unhandled cast constant expression
...
llvm-svn: 12435
2004-03-16 08:38:56 +00:00
Chris Lattner
db5b8f4d6b
Fix a regression from this patch:
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/013095.html
Basically, this patch only updated the immediate dominatees of the header node
to tell them that the preheader also dominated them. In practice, ALL
dominatees of the header node are also dominated by the preheader.
This fixes: LoopSimplify/2004-03-15-IncorrectDomUpdate.
and PR293
llvm-svn: 12434
2004-03-16 06:00:15 +00:00
Chris Lattner
767858af43
New testcase for PR293
...
llvm-svn: 12433
2004-03-16 05:44:02 +00:00
Chris Lattner
0128c9a6de
Bug fixed
...
llvm-svn: 12432
2004-03-16 05:28:35 +00:00
Chris Lattner
6f67017bf4
foo Bug 291, bar PR291
...
llvm-svn: 12431
2004-03-16 05:18:24 +00:00
Chris Lattner
6b736d8b32
foo bug291 bar PR 291
...
llvm-svn: 12430
2004-03-16 05:17:07 +00:00
Chris Lattner
29db00a4e0
PR291
...
Bug 291!
llvm-svn: 12429
2004-03-16 05:16:05 +00:00
Chris Lattner
cf2608c0e9
// Testcase from Bug 291
...
llvm-svn: 12428
2004-03-16 05:14:47 +00:00
Chris Lattner
8ad948ddbd
Add some missing functions. Make sure to handle calls together in case the
...
client has another VN implementation that can VN calls.
llvm-svn: 12427
2004-03-16 03:41:35 +00:00
Chris Lattner
8726ebd326
Fix thinko, and PR292
...
llvm-svn: 12426
2004-03-16 01:51:54 +00:00
Chris Lattner
e0b49952f6
Fix PR294
...
llvm-svn: 12425
2004-03-16 01:45:55 +00:00
Alkis Evlogimenos
804dc659b6
Add LAHF instruction
...
llvm-svn: 12424
2004-03-15 17:20:14 +00:00
Chris Lattner
95ce36da0d
Restore old inlining heuristic. As the comment indicates, this is a nasty
...
horrible hack.
llvm-svn: 12423
2004-03-15 06:38:14 +00:00
Chris Lattner
7f04ebc858
Ok, the assertion was bogus. Calls that do not read/write memory should not
...
have an alias set, just like adds and subtracts don't.
llvm-svn: 12422
2004-03-15 06:28:07 +00:00
Chris Lattner
f5c8f4cea6
This assertion is bogus now that calls do not necessarily read/write memory
...
llvm-svn: 12421
2004-03-15 06:24:15 +00:00
Chris Lattner
cd83282df1
Add counters for the number of calls elimianted
...
llvm-svn: 12420
2004-03-15 05:46:59 +00:00
Chris Lattner
53a3587997
Implement CSE of call instructions in the most trivial case. This implements
...
GCSE/call_cse.ll
llvm-svn: 12419
2004-03-15 05:44:59 +00:00
Chris Lattner
2c8efdb348
New testcase for CSE of call instructions
...
llvm-svn: 12418
2004-03-15 05:44:29 +00:00
Chris Lattner
ea42c857d6
Fix a minor bug, implementing GCSE/call_pure_function.ll
...
Also, add some stuff I missed before.
llvm-svn: 12417
2004-03-15 04:18:28 +00:00
Chris Lattner
ecdbee5542
Make sure that pure calls don't kill loads
...
llvm-svn: 12416
2004-03-15 04:17:53 +00:00
Chris Lattner
20cda2645e
Implement LICM of calls in simple cases. This is sufficient to move around
...
sin/cos/strlen calls and stuff. This implements:
LICM/call_sink_pure_function.ll
LICM/call_sink_const_function.ll
llvm-svn: 12415
2004-03-15 04:11:30 +00:00
Chris Lattner
fb5d561193
New testcases to test LICM of call instructions
...
llvm-svn: 12414
2004-03-15 04:10:08 +00:00
Chris Lattner
21c60f1549
Don't be COMPLETELY pessimistic in the face of function calls
...
llvm-svn: 12413
2004-03-15 04:08:36 +00:00
Chris Lattner
2f87d5872f
Tweak argument
...
llvm-svn: 12412
2004-03-15 04:08:18 +00:00
Chris Lattner
f4c9028b06
Deinline a couple of methods. Improve comment.
...
llvm-svn: 12411
2004-03-15 04:07:59 +00:00
Chris Lattner
a67dbd02cf
Deinline some virtual methods, provide better mod/ref answers through the
...
use of the boolean queries
llvm-svn: 12410
2004-03-15 04:07:29 +00:00
Chris Lattner
d441444234
Pass through the boolean queries
...
llvm-svn: 12409
2004-03-15 04:06:46 +00:00
Chris Lattner
d82256a7a1
Teach basicaa about some stdc functions.
...
llvm-svn: 12408
2004-03-15 03:36:49 +00:00
Chris Lattner
41ab361ae2
Add two new methods which can be used to enable a bunch of transformations
...
in common cases.
llvm-svn: 12407
2004-03-15 01:58:54 +00:00
Chris Lattner
fb87cdecd8
Mostly cosmetic improvements. Do fix the bug where a global value was considered an input.
...
llvm-svn: 12406
2004-03-15 01:26:44 +00:00
Chris Lattner
73ab1fa7c8
Assert that input blocks meet the invariants we expect
...
Simplify the input/output finder. All elements of a basic block are
instructions. Any used arguments are also inputs. An instruction can only
be used by another instruction.
llvm-svn: 12405
2004-03-15 01:18:23 +00:00
Chris Lattner
fec74e7ce2
New testcase that causes the code extractor to generate bogus code.
...
llvm-svn: 12404
2004-03-15 00:08:49 +00:00
Chris Lattner
2f155d8734
Fix several bugs in the loop extractor. In particular, subloops were never
...
extracted, and a function that contained a single top-level loop never had
the loop extracted, regardless of how much non-loop code there was.
llvm-svn: 12403
2004-03-15 00:02:02 +00:00
Chris Lattner
5b2072ecd3
No correctness fixes here, just minor qoi fixes:
...
* Don't insert a branch to the switch instruction after the call, just
make it a single block.
* Insert the new alloca instructions in the entry block of the original
function instead of having them execute dynamically
* Don't make the default edge of the switch instruction go back to the switch.
The loop extractor shouldn't create new loops!
* Give meaningful names to the alloca slots and the reload instructions
* Some minor code simplifications
llvm-svn: 12402
2004-03-14 23:43:24 +00:00
Chris Lattner
b4d8bf365c
Simplify code a bit, and fix bug CodeExtractor/2004-03-14-NoSwitchSupport.ll
...
This also implements a two minor improvements:
* Don't insert live-out stores IN the region, insert them on the code path
that exits the region
* If the region is exited to the same block from multiple paths, share the
switch statement entry, live-out store code, and the basic block.
llvm-svn: 12401
2004-03-14 23:05:49 +00:00
Chris Lattner
9c431f6c44
Simplify the code a bit by making the collection of basic blocks to extract
...
a member of the class. While we're at it, turn the collection into a set
instead of a vector to improve efficiency and make queries simpler.
llvm-svn: 12400
2004-03-14 22:34:55 +00:00
Chris Lattner
99e9b17641
New testcase that crashes the loop extractor
...
llvm-svn: 12399
2004-03-14 22:16:52 +00:00
Chris Lattner
bcec7875fb
After reducing a miscompiled program down to the functions which are being
...
miscompiled, try to use the loop extractor to reduce the program down to a
loop nest that is being miscompiled. In practice, the loop extractor appears
to have too many bugs for this to be useful, but hopefully they will be fixed
soon...
llvm-svn: 12398
2004-03-14 22:08:00 +00:00
Chris Lattner
0e6549b8c7
Fix a minor bug in runPassesOn
...
llvm-svn: 12397
2004-03-14 21:37:41 +00:00
Chris Lattner
37117a0f6a
Add a new "AutoDebugCrashes" option
...
llvm-svn: 12396
2004-03-14 21:21:57 +00:00
Chris Lattner
6ce2d03352
Refactor to use a new method
...
llvm-svn: 12395
2004-03-14 21:17:22 +00:00
Chris Lattner
1a5c540c27
Add new method
...
llvm-svn: 12394
2004-03-14 21:17:03 +00:00
Chris Lattner
fd72bed301
Refactor and clean up a bunch more code. No major functionality changes.
...
* Make several methods of bugdriver global functions (ParseInputFile, PrintFunctionList)
* Make PrintFunctionList truncate the output after 10 entries, like the crash debugger
did. This allows code sharing.
* Add a couple of methods to BugDriver that allows us to eliminate some friends
* Improve comments in ExtractFunction.cpp
* Make classes that used to be friends up bugdriver now live in anon namespaces
* Rip a bunch of functionality in the miscompilation tester into a new
TestMergedProgram function for future code sharing.
* Fix a bug in the miscompilation tester induced in my last checkin
llvm-svn: 12393
2004-03-14 20:50:42 +00:00
Alkis Evlogimenos
4837f6c0d9
Another API change to MRegisterInfo::foldMemoryOperand. Instead of a
...
MachineBasicBlock::iterator take a MachineInstr*.
llvm-svn: 12392
2004-03-14 20:14:27 +00:00
Chris Lattner
3fe96bc9fd
Add a method to extract a loop
...
llvm-svn: 12391
2004-03-14 20:02:07 +00:00
Chris Lattner
a1672c1bd8
Split into two passes. Now there is the general loop extractor, usable on
...
the command line, and the single loop extractor, usable by bugpoint
llvm-svn: 12390
2004-03-14 20:01:36 +00:00
Chris Lattner
f624c99379
Rename createLoopExtractorPass to createSingleLoopExtractorPass
...
Doxygenify
llvm-svn: 12389
2004-03-14 20:00:37 +00:00
Chris Lattner
5a5e414bc0
add a fixme
...
llvm-svn: 12388
2004-03-14 19:31:00 +00:00
Chris Lattner
567543f09e
Refactor all of the "splitting a module into two pieces" code to avoid
...
code duplication. Also, don't use ReduceMiscompilingFunctions::TestFuncs
to print out the final message.
llvm-svn: 12387
2004-03-14 19:27:19 +00:00
Alkis Evlogimenos
48da2f8a6d
Change MRegisterInfo::foldMemoryOperand to return the folded
...
instruction to make the API more flexible.
llvm-svn: 12386
2004-03-14 07:19:51 +00:00
Chris Lattner
0137de5ecb
Passes don't print stuff!
...
llvm-svn: 12385
2004-03-14 04:17:53 +00:00
Chris Lattner
b68659552a
Do not create empty basic blocks when the lowerswitch pass expects blocks to
...
be non-empty! This fixes LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
llvm-svn: 12384
2004-03-14 04:14:31 +00:00
Chris Lattner
e7ae4a8cb4
New testcase that crashes the -lowerswitch pass
...
llvm-svn: 12383
2004-03-14 04:13:57 +00:00
Chris Lattner
4fca71eb44
Minor random cleanups
...
llvm-svn: 12382
2004-03-14 04:01:47 +00:00
Chris Lattner
6c3e8c78cf
FunctionPass's should not define their own 'run' method.
...
Require 'simplified' loops, not just raw natural loops. This fixes
CodeExtractor/2004-03-13-LoopExtractorCrash.ll
llvm-svn: 12381
2004-03-14 04:01:06 +00:00
Chris Lattner
d078812f96
If a block is dead, dominators will not be calculated for it. Because of this
...
loop information won't see it, and we could have unreachable blocks pointing to
the non-header node of blocks in a natural loop. This isn't tidy, so have the
loopsimplify pass clean it up.
llvm-svn: 12380
2004-03-14 03:59:22 +00:00
Chris Lattner
9ece94b02b
Catch some more cases of broken code. The loop extractor seems to be creating
...
situations where there is a branch that goes to a block in another function.
llvm-svn: 12379
2004-03-14 03:23:54 +00:00
Chris Lattner
3684469326
Verify functions as they are produced if -debug is specified. Reduce
...
curly braceage
llvm-svn: 12378
2004-03-14 03:17:22 +00:00
Chris Lattner
b870ca7766
verifyFunction has been broken for a long time now. Fix it.
...
llvm-svn: 12377
2004-03-14 03:16:15 +00:00
Chris Lattner
d828ad5089
New testcase that crashes the loop extractor
...
llvm-svn: 12376
2004-03-14 03:03:59 +00:00
Chris Lattner
78a996aec4
Move prototype to IPO.h instead of Scalar.h
...
Make sure that the file interface header (IPO.h) is included first
remove dead #incldue
llvm-svn: 12375
2004-03-14 02:37:16 +00:00
Chris Lattner
6d24a7ce8a
Move loop extractor to the IPO header
...
llvm-svn: 12374
2004-03-14 02:36:34 +00:00
Chris Lattner
692a47aeb9
Indent anon namespace properly, add copyright block
...
llvm-svn: 12373
2004-03-14 02:34:07 +00:00
Chris Lattner
41ec709e00
Move to the IPO library. Utils shouldn't contain passes.
...
llvm-svn: 12372
2004-03-14 02:32:27 +00:00
Chris Lattner
96a7fbd503
Remove dead file
...
llvm-svn: 12371
2004-03-14 02:13:57 +00:00
Chris Lattner
8eebc49884
DemoteRegToStack got moved from DemoteRegToStack.h to Local.h
...
llvm-svn: 12368
2004-03-14 02:13:38 +00:00
Chris Lattner
3b18771d9f
Move DemoteRegToStack prototype out of DemoteRegToStack.h to this file.
...
llvm-svn: 12367
2004-03-14 02:13:07 +00:00
Chris Lattner
b911de4c39
Document stuff that is known to be broken
...
llvm-svn: 12366
2004-03-14 02:03:02 +00:00
Chris Lattner
7d2a539735
Add some debugging output
...
Fix InstCombine/2004-03-13-InstCombineInfLoop.ll which caused an infinite
loop compiling (I think) povray.
llvm-svn: 12365
2004-03-13 23:54:27 +00:00
Chris Lattner
e561cb51de
New testcase, distilled from povray I think.
...
llvm-svn: 12364
2004-03-13 23:53:04 +00:00
Chris Lattner
2dc85b27e4
This change makes two big adjustments.
...
* Be a lot more accurate about what the effects will be when inlining a call
to a function when an argument is an alloca.
* Dramatically reduce the penalty for inlining a call in a large function.
This heuristic made it almost impossible to inline a function into a large
function, no matter how small the callee is.
llvm-svn: 12363
2004-03-13 23:15:45 +00:00
Chris Lattner
797cb2f6c1
This little patch speeds up the loop used to update the dominator set analysis.
...
On the testcase from GCC PR12440, which has a LOT of loops (1392 of which require
preheaders to be inserted), this speeds up the loopsimplify pass from 1.931s to
0.1875s. The loop in question goes from 1.65s -> 0.0097s, which isn't bad. All of
these times are a debug build.
This adds a dependency on DominatorTree analysis that was not there before, but
we always had dominatortree available anyway, because LICM requires both loop
simplify and DT, so this doesn't add any extra analysis in practice.
llvm-svn: 12362
2004-03-13 22:01:26 +00:00
Chris Lattner
024385ba5f
Turn on argument promotion in gccas. This can give us substantially better
...
code in cases where the file has lots of static functions or anon namespaces.
llvm-svn: 12361
2004-03-13 21:38:35 +00:00
Chris Lattner
84d0f63804
Option no more
...
llvm-svn: 12360
2004-03-13 19:36:30 +00:00
Chris Lattner
0ee372cfe3
Fix the "infinite looping unless you disable adce" bug
...
Also remove an option to disable adce :)
llvm-svn: 12359
2004-03-13 19:35:54 +00:00
Chris Lattner
652eb53dad
Fix a tiny bug that caused an incorrect assertion failure poolallocating
...
boxed-sim.
llvm-svn: 12358
2004-03-13 01:14:23 +00:00
Chris Lattner
699aa70f0c
It helps if I save the file. :)
...
llvm-svn: 12357
2004-03-13 00:24:52 +00:00
Chris Lattner
071a5e5649
Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
...
Intrinsic::va*. This avoid conflicting with macros in the stdlib.h file.
llvm-svn: 12356
2004-03-13 00:24:00 +00:00
Chris Lattner
022167f13b
Implement sub.ll:test14
...
llvm-svn: 12355
2004-03-13 00:11:49 +00:00
Chris Lattner
d689a5eb9c
Oh right, casts can interfere. Test this too
...
llvm-svn: 12354
2004-03-13 00:11:38 +00:00
Chris Lattner
92295c5031
Implement InstCombine/sub.ll:test12 & test13
...
llvm-svn: 12353
2004-03-12 23:53:13 +00:00
Chris Lattner
b4e933ba14
new testcases
...
llvm-svn: 12352
2004-03-12 23:52:51 +00:00
Chris Lattner
f9e69b4553
Fix a couple of minor problems. Because PHI nodes can use themselves, this
...
could cause infinite loops. Also, getUnderlyingObject can return null
llvm-svn: 12351
2004-03-12 23:12:55 +00:00
John Criswell
13875932b2
Performed some updates on the new options to these command line tools.
...
llvm-svn: 12350
2004-03-12 22:45:35 +00:00
Chris Lattner
a036253872
Implement mod/ref analysis for a trivial case where locals don't escape.
...
This comes up when you have a local array on the stack and you never pass
the address of elements around.
llvm-svn: 12349
2004-03-12 22:39:00 +00:00
Chris Lattner
1f91c54600
new testcase
...
llvm-svn: 12348
2004-03-12 22:38:31 +00:00
Brian Gaeke
afb74be0ce
Revise comment and error message for the Bug 38 situation. Also, make it
...
print out the name of the function being used.
llvm-svn: 12347
2004-03-12 21:37:46 +00:00
John Criswell
5d6345a01b
Fixed grammar typo.
...
llvm-svn: 12345
2004-03-12 21:29:42 +00:00
Brian Gaeke
1694dafece
Make -print-machineinstrs show us the code both before and after reg. alloc.
...
llvm-svn: 12344
2004-03-12 21:19:08 +00:00
John Criswell
eb55b52a58
Fixed grammar typo.
...
llvm-svn: 12343
2004-03-12 21:19:06 +00:00
John Criswell
faba462a9a
Added minor information on C++.
...
llvm-svn: 12341
2004-03-12 20:42:16 +00:00
John Criswell
64f13ab753
Updated to LLVM 1.2.
...
Added information on getting the LLVM GCC front end from CVS.
Added new configure script options.
Made other minor corrections and modifications.
llvm-svn: 12340
2004-03-12 20:31:37 +00:00
Chris Lattner
6e8d083a8b
Fix PR266: Make Module Not Inherit From Annotable
...
llvm-svn: 12339
2004-03-12 19:51:16 +00:00
John Criswell
d89dbd0236
Point to the new license (includes year 2004).
...
Changed crtend.o to libcrtend.a.
llvm-svn: 12338
2004-03-12 18:20:15 +00:00
John Criswell
50f289ace1
Added a header indicating that the Linux and MacOS configure procedures are
...
the same.
Added LLVM copyright and warranty disclaimer information.
llvm-svn: 12337
2004-03-12 18:02:17 +00:00
Alkis Evlogimenos
9884bda541
Add support for a wider range of CMOV instructions.
...
llvm-svn: 12336
2004-03-12 17:59:56 +00:00
John Criswell
18d7b688cf
Updated copyright to year 2004.
...
llvm-svn: 12335
2004-03-12 17:29:20 +00:00
Misha Brukman
4483c9b864
Simplify code to process CallSites (thanks to Chris).
...
llvm-svn: 12334
2004-03-12 16:20:49 +00:00
Misha Brukman
8340686112
Test the mod/ref analysis in DSA.
...
llvm-svn: 12333
2004-03-12 06:17:22 +00:00
Misha Brukman
a447feac33
Keep transitively-required passes alive for queries to work after the initial
...
user pass is destroyed.
llvm-svn: 12332
2004-03-12 06:16:28 +00:00
Misha Brukman
bf28cf6b7d
Evaluate ModRef information in addition to regular ol' pointer analysis.
...
llvm-svn: 12331
2004-03-12 06:15:08 +00:00
Misha Brukman
362841dccc
Implement getModRefInfo() for DSA to calculate whether a function modifies or
...
references a pointer.
llvm-svn: 12330
2004-03-12 06:14:22 +00:00
Misha Brukman
386ef6dec8
Add AnalysisUsage::addRequiredTransitive() to keep analysis info alive for
...
future queries by clients.
llvm-svn: 12329
2004-03-12 06:13:15 +00:00
Chris Lattner
fd747f8db8
test instruction combiner opts for select instruction
...
llvm-svn: 12328
2004-03-12 06:01:00 +00:00
Chris Lattner
8988f92470
Teach vim about the select instruction. Allow it to forget about the long-dead
...
not instruction.
llvm-svn: 12327
2004-03-12 05:55:07 +00:00
Chris Lattner
be3c688488
Teach emacs about the select instruction
...
llvm-svn: 12326
2004-03-12 05:54:48 +00:00
Chris Lattner
75648e7ae4
Add support for checking the select instruction
...
llvm-svn: 12325
2004-03-12 05:54:31 +00:00
Chris Lattner
8337d4462f
Know the opcode name of the select instruction
...
llvm-svn: 12324
2004-03-12 05:54:20 +00:00
Chris Lattner
6e415c06c2
Add support for select constant expressions. Use reserve a bit more to avoid
...
memory wasteage.
llvm-svn: 12323
2004-03-12 05:54:04 +00:00
Chris Lattner
16375e30b0
Add new function
...
llvm-svn: 12322
2004-03-12 05:53:41 +00:00
Chris Lattner
6ea4b52903
Teach the constant folder how to do select instructions
...
llvm-svn: 12321
2004-03-12 05:53:32 +00:00
Chris Lattner
52bd5cb967
Print select instructions correctly
...
llvm-svn: 12320
2004-03-12 05:53:14 +00:00
Chris Lattner
cb015ee6c0
Add constant folding wrapper support for select instructions.
...
llvm-svn: 12319
2004-03-12 05:53:03 +00:00
Chris Lattner
59db22dcd4
Add sccp support for select instructions
...
llvm-svn: 12318
2004-03-12 05:52:44 +00:00
Chris Lattner
b909e8b0d4
Add trivial optimizations for select instructions
...
llvm-svn: 12317
2004-03-12 05:52:32 +00:00
Chris Lattner
65a64e1e7a
ADd support for select instructions
...
llvm-svn: 12316
2004-03-12 05:52:14 +00:00
Chris Lattner
e7c9f6f7ae
Write select instructions to bytecode
...
llvm-svn: 12315
2004-03-12 05:52:01 +00:00
Chris Lattner
92412466b6
Read select instrs from bytecode
...
llvm-svn: 12314
2004-03-12 05:51:49 +00:00
Chris Lattner
6536f0c35f
Allow parsing select instruction and constant expr
...
llvm-svn: 12313
2004-03-12 05:51:36 +00:00
Chris Lattner
26cca63a7e
Add the visitSelectInst visitor method
...
llvm-svn: 12312
2004-03-12 05:51:22 +00:00
Chris Lattner
5dec674075
Add the SelectInst class
...
llvm-svn: 12311
2004-03-12 05:51:05 +00:00
Chris Lattner
439b128ce7
Add the Instruction::Select enum
...
llvm-svn: 12310
2004-03-12 05:50:53 +00:00
Chris Lattner
e75c0c0eac
Add support for select constant exprs
...
llvm-svn: 12309
2004-03-12 05:50:39 +00:00
Chris Lattner
ec98a76eb6
This is no longer an open project
...
llvm-svn: 12308
2004-03-12 05:50:24 +00:00
Chris Lattner
b53c28d6ca
Cleanup the cast section, add the select instruction
...
llvm-svn: 12307
2004-03-12 05:50:16 +00:00
Chris Lattner
b24b5165dc
New testcase
...
llvm-svn: 12306
2004-03-12 05:50:02 +00:00
Misha Brukman
96d3b0a6de
Make code more readable.
...
llvm-svn: 12305
2004-03-12 00:58:41 +00:00
Misha Brukman
1df51ed4e5
Fix indentation.
...
llvm-svn: 12298
2004-03-11 23:53:51 +00:00
Misha Brukman
505a0838f6
Move implementations of functions here, which avoids #including <cstdlib> in the
...
header file and all those who #include it.
llvm-svn: 12297
2004-03-11 23:52:43 +00:00
Misha Brukman
5c24fb6b48
Move function implementations to a .cpp file, avoid #including <cstdlib> here.
...
llvm-svn: 12296
2004-03-11 23:52:03 +00:00
Misha Brukman
d8abb840f2
Forward-declare templates for fix compilation when Argument.h is included first.
...
llvm-svn: 12295
2004-03-11 23:42:24 +00:00
Misha Brukman
94eeb90cd4
Doxygenified and cleand up comments.
...
llvm-svn: 12294
2004-03-11 23:08:20 +00:00
Misha Brukman
fff0ac8c3d
Miscellaneous additions are a separate section.
...
llvm-svn: 12293
2004-03-11 21:26:29 +00:00
Brian Gaeke
24d24e3e5b
Make sure libcrtend.a gets installed when you make install-bytecode.
...
llvm-svn: 12292
2004-03-11 20:55:23 +00:00
Brian Gaeke
14e98b9d96
Get rid of the abort in PhyRegAlloc::finishSavingState().
...
Make an explicit call to it from runOnFunction() if we know we're supposed to
write into the global. This is lame (esp. the const_cast), but it solves
the problem.
llvm-svn: 12291
2004-03-11 19:46:30 +00:00
Brian Gaeke
c028910d25
Give pass a name
...
llvm-svn: 12290
2004-03-11 19:23:15 +00:00
Misha Brukman
d313bdfa43
Fix compilation on Sparc: assert(0) => abort()
...
llvm-svn: 12289
2004-03-11 19:08:24 +00:00
Misha Brukman
aed39f9d1e
SparcV8 removed until it grows up becomes a mature backend.
...
llvm-svn: 12288
2004-03-11 18:16:33 +00:00
Alkis Evlogimenos
4b98c4412f
Fix spelling.
...
llvm-svn: 12287
2004-03-11 10:14:21 +00:00
Brian Gaeke
5935e0a002
In PhyRegAlloc::saveState(), dump Arguments' saved-state, and try to
...
make the output more compact.
Divorce state-saving from the doFinalization method; for some reason it's not
getting called when I want it to, at Reoptimizer time. Put the guts in
PhyRegAlloc::finishSavingState(). Put an abort() in it so that I can be really
really sure that it's getting called.
Update comments.
llvm-svn: 12286
2004-03-11 06:45:52 +00:00
Brian Gaeke
44a540e869
Remove ghostly directory from the build
...
llvm-svn: 12285
2004-03-11 04:42:41 +00:00
Alkis Evlogimenos
9d08818de9
Embed a floating frame of the bugzilla query in the page. This way
...
people looking for open projects cannot miss the link :-)
llvm-svn: 12284
2004-03-11 02:50:35 +00:00
Chris Lattner
d2d7ccdb4b
Minor additions and cleanups
...
llvm-svn: 12279
2004-03-11 00:50:54 +00:00
Brian Gaeke
0e09916d60
Move all the SaveState options and stuff inton one spot at the top of the file.
...
De-constify SaveStateToModule; we have to set both it and SaveRegAllocState
explicitly in the reoptimizer.
Make SaveRegAllocState an 'external location' option.
llvm-svn: 12278
2004-03-10 22:21:03 +00:00
Brian Gaeke
f819263cc1
Only call verifySavedState if SaveRegAllocState is set AND debugging flag is on.
...
llvm-svn: 12277
2004-03-10 22:01:59 +00:00
Chris Lattner
d68b5893a6
Bugz fixed
...
llvm-svn: 12276
2004-03-10 21:43:47 +00:00
Chris Lattner
61f57617d7
Fix PR284: [indvars] Induction variable analysis violates LLVM invariants
...
llvm-svn: 12275
2004-03-10 21:42:19 +00:00
Chris Lattner
6fdbd60ed6
New testcase for PR284: [indvars] Induction variable analysis violates LLVM invariants
...
llvm-svn: 12274
2004-03-10 21:41:47 +00:00
Alkis Evlogimenos
1ccca74a65
Add link to bugzilla query of unassigned enhancements. Specific open
...
projects like 'port glibc to llvm' or 'improve nightly tester', should
have an unassigned enhancement bug opened for them so that they can be
tracked more easily. Open projects should only list generic projects
like 'compile programs with the LLVM compiler' or 'write a new backend
for target'.
llvm-svn: 12273
2004-03-10 19:38:33 +00:00
Misha Brukman
12f1eddc90
We need a logo.
...
llvm-svn: 12272
2004-03-10 19:22:29 +00:00
Brian Gaeke
53d2513820
Add brainstorm for a random test vector generator
...
llvm-svn: 12271
2004-03-10 19:15:50 +00:00
Brian Gaeke
73121d9395
Recommend using install-bytecode target
...
llvm-svn: 12270
2004-03-10 19:08:52 +00:00
Brian Gaeke
1eec234f91
My fix for PR274 broke the build on Darwin/PPC. As I'm fairly certain this
...
bug only affects Linux systems that use GLIBC, I'm going to put ifdefs around
the array.
llvm-svn: 12269
2004-03-10 17:38:28 +00:00
Brian Gaeke
0f31060c5a
Add support for 'install-bytecode' target, used for ONLY installing
...
bytecode-libs.
llvm-svn: 12268
2004-03-10 17:38:01 +00:00
Brian Gaeke
8f1977ac07
Fix up a seriously outdated comment.
...
llvm-svn: 12267
2004-03-10 17:37:50 +00:00
Chris Lattner
6f61db7f8a
New testcase for PR275
...
llvm-svn: 12266
2004-03-10 03:07:45 +00:00
Chris Lattner
30f984671a
New testcase for PR276: llvm-g++ does not mangle method names that match stdlib function names
...
llvm-svn: 12265
2004-03-09 22:51:03 +00:00
Chris Lattner
b26b6fe9a7
implement new method
...
llvm-svn: 12264
2004-03-09 19:37:06 +00:00
Chris Lattner
f53977cd42
new method
...
llvm-svn: 12263
2004-03-09 19:36:59 +00:00
Alkis Evlogimenos
6623cd78f9
Spill explicit physical register defs as well.
...
llvm-svn: 12260
2004-03-09 08:35:13 +00:00
Brian Gaeke
0766126e2e
Now that I read it again, this part in particular strikes me as kind of
...
pushy and contentious...
llvm-svn: 12259
2004-03-09 07:20:26 +00:00
Alkis Evlogimenos
f234284986
Check if printing of implicit uses is required for all types of shift
...
instructions.
llvm-svn: 12258
2004-03-09 06:10:15 +00:00
Brian Gaeke
75a2efdd6c
b00g fixed
...
llvm-svn: 12257
2004-03-09 05:43:59 +00:00
Brian Gaeke
96e450b3b2
Address PR274 - '[JIT] Programs cannot resolve the fstat function'
...
by trying to get the compiler to generate an undefined reference for it
and related functions which live in libc_nonshared.a on Linux.
Linkers... sigh.
llvm-svn: 12256
2004-03-09 05:22:10 +00:00
Brian Gaeke
3a27bd889b
Hmm, who left this sitting around in my tree
...
llvm-svn: 12255
2004-03-09 04:49:13 +00:00
Alkis Evlogimenos
8a3f2f3600
Differentiate between extended precision floats (80-bit) and double precision floats (64-bit)
...
llvm-svn: 12254
2004-03-09 03:37:54 +00:00
Alkis Evlogimenos
8ac958bf43
Use newly added API to emit bytes for instructions that gas misassembles
...
llvm-svn: 12253
2004-03-09 03:35:34 +00:00
Alkis Evlogimenos
508b459d12
Add emitInstruction() API so that we can get the bytes of a simple instruction
...
llvm-svn: 12252
2004-03-09 03:34:53 +00:00
Alkis Evlogimenos
a7c2da3af5
Constify things a bit
...
llvm-svn: 12251
2004-03-09 03:30:12 +00:00
Chris Lattner
c567f402e5
Bug fixed
...
llvm-svn: 12250
2004-03-09 00:59:15 +00:00
Chris Lattner
349910567e
Checkin testcase for PR261
...
llvm-svn: 12249
2004-03-09 00:55:58 +00:00
Chris Lattner
0536f8df6e
John fixed this bug
...
llvm-svn: 12248
2004-03-09 00:40:49 +00:00
Brian Gaeke
d734587436
Change PhyRegAlloc::saveStateForValue()'s arg type to deal with
...
AllocInfo.Instruction becoming an int.
llvm-svn: 12247
2004-03-08 23:22:03 +00:00
Brian Gaeke
f0a73a3f42
Save argument list alloc state by recording it as the operands of Instruction
...
#-1. Other minor changes to deal with AllocInfo.Instruction becoming an int.
llvm-svn: 12246
2004-03-08 23:22:02 +00:00
Brian Gaeke
0be7ea7289
Make AllocInfo's Instruction an int, so that we can overload it for arguments.
...
(Instruction #-1's operands = argument list).
llvm-svn: 12245
2004-03-08 23:22:01 +00:00
Misha Brukman
b22926616e
Fix some spelling and grammar.
...
llvm-svn: 12244
2004-03-08 23:06:46 +00:00
Chris Lattner
d6e1b28837
Update the profiling section
...
llvm-svn: 12243
2004-03-08 22:29:35 +00:00
Chris Lattner
9bde783c5c
Switch to using edge profiling information as the basic source of profile info
...
from using basic block counts.
llvm-svn: 12242
2004-03-08 22:04:08 +00:00
Chris Lattner
d6eda1a9ef
Switch over to using edge profile information as the basic profiling representation,
...
from basic block counts.
llvm-svn: 12241
2004-03-08 22:03:45 +00:00
Chris Lattner
bd481d588a
Refactor implementations
...
llvm-svn: 12240
2004-03-08 21:30:35 +00:00
Chris Lattner
755ffeb292
We don't want to make this a pure interface, as it makes all implementors
...
bear the burden of implementing what will be all exactly the same methods.
They just want to provide the information in differing ways.
llvm-svn: 12239
2004-03-08 21:30:18 +00:00
Chris Lattner
b08e4653cb
Rearrange some methods, implement the dominates method
...
llvm-svn: 12237
2004-03-08 21:07:12 +00:00
Chris Lattner
63b49d0574
Import the trace class from the reoptimizer
...
llvm-svn: 12236
2004-03-08 20:57:27 +00:00
Chris Lattner
9c222ed4b5
Default to using edge counts
...
llvm-svn: 12234
2004-03-08 20:04:46 +00:00
Chris Lattner
c71ea6e3d4
Annotate functions with edge counts as well, if they are available.
...
llvm-svn: 12233
2004-03-08 20:04:32 +00:00
Chris Lattner
5302943ff7
If we have edge counts, we can produce block counts. I've verified that
...
using an edge profile to produce block counts gives the exact same numbers
as using a block count directly.
llvm-svn: 12232
2004-03-08 20:03:52 +00:00
Chris Lattner
96cdd27b65
Adjust to new interface
...
llvm-svn: 12231
2004-03-08 18:51:45 +00:00
Chris Lattner
03745f3e80
Add the ability to put an annotation at the end of a basic block as well.
...
llvm-svn: 12230
2004-03-08 18:51:05 +00:00
Chris Lattner
8b8a0641a1
Add initial support for reading edge counts. This will be improved to enable
...
translation of edge counts into block/function counts when possible.
llvm-svn: 12229
2004-03-08 18:20:18 +00:00
Chris Lattner
178608ee2b
Add support for representing edge counts
...
llvm-svn: 12228
2004-03-08 18:19:37 +00:00
Chris Lattner
29ba1be907
Add edge profiling support to the runtime library
...
llvm-svn: 12227
2004-03-08 18:04:31 +00:00
Misha Brukman
3702b9d79b
Fix link to license: point to current version in CVS.
...
llvm-svn: 12226
2004-03-08 17:59:31 +00:00
Chris Lattner
721264aecc
Initial support for edge profiling
...
llvm-svn: 12225
2004-03-08 17:54:34 +00:00
Chris Lattner
dae48f93b0
Split utility functions out of BlockProfiling.cpp
...
llvm-svn: 12224
2004-03-08 17:06:13 +00:00
Chris Lattner
b16526108c
Remove the comment "Constants must always have an initial value.", which
...
is incorrect. Fix some formatting nastiness.
llvm-svn: 12223
2004-03-08 16:49:10 +00:00
Chris Lattner
d91e676700
finegrainify namespacification
...
llvm-svn: 12221
2004-03-08 16:45:53 +00:00
Chris Lattner
e2b27080e7
Insert functions into the module promptly, not lazily. This fixes a bug
...
I introduced last night. Note to self: test the *correct* tree...
llvm-svn: 12220
2004-03-08 16:14:19 +00:00
Chris Lattner
ea0789ca7b
Implement test/Regression/Assembler/2004-03-07-FunctionAddressAlignment.llx
...
llvm-svn: 12218
2004-03-08 06:17:35 +00:00
Chris Lattner
be3a169d18
New testcase for folding in some important situations. The first two
...
come up a lot in the code generated by the C++ front-end for pointers
to member functions. See PR166.
llvm-svn: 12217
2004-03-08 06:17:15 +00:00
Chris Lattner
c3ecaae16c
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
...
This is one small step towards the complete obliteration of
ConstantPointerRef's entirely!! Woot!
llvm-svn: 12216
2004-03-08 06:16:10 +00:00
Chris Lattner
8301a593a9
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
...
llvm-svn: 12215
2004-03-08 06:15:33 +00:00
Chris Lattner
9f4918ab93
Eliminate nightmarish API
...
llvm-svn: 12214
2004-03-08 06:11:10 +00:00
Chris Lattner
16e27f3af3
remove *THANKFULLY* dead method
...
llvm-svn: 12213
2004-03-08 06:10:32 +00:00
Chris Lattner
75998c0885
Eliminate a REALLY HORRIBLE API: mutateReferences, which is gross gross gross.
...
llvm-svn: 12212
2004-03-08 06:09:57 +00:00
Chris Lattner
7e201ecc31
New testcase for PR269
...
llvm-svn: 12211
2004-03-08 05:35:12 +00:00
Chris Lattner
f0cbbabea7
Bug fixed
...
llvm-svn: 12210
2004-03-08 04:55:45 +00:00
Chris Lattner
451e10e46a
Testcase that crashes the C front-end.
...
llvm-svn: 12209
2004-03-08 04:41:32 +00:00
Chris Lattner
84c697d520
Fix a bug handling globals that are constants, but are still external
...
llvm-svn: 12208
2004-03-08 03:52:24 +00:00
Chris Lattner
98502aae76
Avoid allocating special registers a bit more robustly
...
llvm-svn: 12207
2004-03-08 03:48:07 +00:00
Chris Lattner
0653e1167d
New code-quality testcase.
...
llvm-svn: 12205
2004-03-08 02:12:36 +00:00
Chris Lattner
653e662a93
Implement folding explicit load instructions into binary operations. For a
...
testcase like this:
int %test(int* %P, int %A) {
%Pv = load int* %P
%B = add int %A, %Pv
ret int %B
}
We now generate:
test:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
add %EAX, DWORD PTR [%ECX]
ret
Instead of:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
mov %EAX, DWORD PTR [%EAX]
add %EAX, %ECX
ret
... saving one instruction, and often a register. Note that there are a lot
of other instructions that could use this, but they aren't handled. I'm not
really interested in adding them, but mul/div and all of the FP instructions
could be supported as well if someone wanted to add them.
llvm-svn: 12204
2004-03-08 01:58:35 +00:00
Chris Lattner
1dd6afe6a2
Rearrange and refactor some code. No functionality changes.
...
llvm-svn: 12203
2004-03-08 01:18:36 +00:00
Chris Lattner
fe6f2e3e80
Implement ArgumentPromotion/aggregate-promote.ll
...
This allows pointers to aggregate objects, whose elements are only read, to
be promoted and passed in by element instead of by reference. This can
enable a LOT of subsequent optimizations in the caller function.
It's worth pointing out that this stuff happens a LOT of C++ programs, because
objects in templates are generally passed around by reference. When these
templates are instantiated on small aggregate or scalar types, however, it is
more efficient to pass them in by value than by reference.
This transformation triggers most on C++ codes (e.g. 334 times on eon), but
does happen on C codes as well. For example, on mesa it triggers 72 times,
and on gcc it triggers 35 times. this is amazingly good considering that
we are using 'basicaa' so far.
llvm-svn: 12202
2004-03-08 01:04:36 +00:00
Chris Lattner
1f7f22c42c
New testcase
...
llvm-svn: 12201
2004-03-08 00:58:19 +00:00
Chris Lattner
cc544e57f3
Implement: ArgumentPromotion/chained.ll
...
llvm-svn: 12200
2004-03-07 22:52:53 +00:00
Chris Lattner
332a8bdf31
New testcase for missed case
...
llvm-svn: 12199
2004-03-07 22:52:41 +00:00
Chris Lattner
64b8d697ad
Fix another minor bug, exposed by perlbmk
...
llvm-svn: 12198
2004-03-07 22:43:27 +00:00
Chris Lattner
538fee7aa2
Since 'load null' is undefined, we can make it do whatever we want. Returning
...
a zero value is the most likely way to cause further simplification, so we do it.
llvm-svn: 12197
2004-03-07 22:16:24 +00:00
Chris Lattner
ac2e2d3bdd
Run the new pass in gccld now that it passes all tests
...
llvm-svn: 12196
2004-03-07 22:12:40 +00:00
Chris Lattner
6770842b67
Fix a minor bug and turn debug output into, well, debug output.
...
llvm-svn: 12195
2004-03-07 21:54:50 +00:00
Chris Lattner
1f607f2f2e
Add prototype
...
llvm-svn: 12194
2004-03-07 21:30:08 +00:00
Chris Lattner
483ae01c9c
New LLVM pass: argument promotion. This version only handles simple scalar
...
variables.
llvm-svn: 12193
2004-03-07 21:29:54 +00:00
Chris Lattner
f2b8692b73
New testcase
...
llvm-svn: 12192
2004-03-07 21:28:54 +00:00
Alkis Evlogimenos
d6f62ba55b
Add memory operand version of conditional move.
...
llvm-svn: 12190
2004-03-07 03:19:11 +00:00
Alkis Evlogimenos
cb98644e9b
As I wrote in the docs, simple is the default spiller :-)
...
llvm-svn: 12189
2004-03-06 23:08:44 +00:00
Alkis Evlogimenos
79850121ad
Add simple spiller.
...
llvm-svn: 12188
2004-03-06 22:38:29 +00:00
Alkis Evlogimenos
36fd868f08
The default register allocator is local not simple.
...
llvm-svn: 12187
2004-03-06 22:27:41 +00:00
Brian Gaeke
4e0669cef0
Support return values of basic integer types.
...
Emit RETL instruction to return instead of funny JMPL.
Fix indentation.
llvm-svn: 12186
2004-03-06 05:32:28 +00:00
Brian Gaeke
c65b97d4f6
Sort stanzas into Sparc V8 book page number order.
...
Add RET, RETL. Rename SAVE, RESTORE & JMPL for consistency.
llvm-svn: 12185
2004-03-06 05:32:13 +00:00
Brian Gaeke
84b4c9208d
Hack it so we do not try to allocate values to G0.
...
llvm-svn: 12184
2004-03-06 05:31:32 +00:00
Brian Gaeke
901cfa9e2e
Make prolog align stack properly. Make epilog not touch any registers.
...
llvm-svn: 12183
2004-03-06 05:31:21 +00:00
Brian Gaeke
5a1c7a8be3
Emit register names in lowercase, as required by the assembler.
...
llvm-svn: 12182
2004-03-06 05:30:21 +00:00
Brian Gaeke
639b04aca3
Teach getRegClassForType where to find FP registers
...
llvm-svn: 12180
2004-03-06 03:54:13 +00:00
Chris Lattner
2cb2905c96
Fix a minor bug
...
llvm-svn: 12169
2004-03-05 22:04:07 +00:00
Misha Brukman
d2e88a21b7
Unbreak the build on Sparc.
...
llvm-svn: 12161
2004-03-05 20:04:40 +00:00
Brian Gaeke
0c76d1146f
Asm output is looking a lot better; not correct for all operands yet though.
...
llvm-svn: 12143
2004-03-05 08:39:09 +00:00
Chris Lattner
6c271edcd7
Fix a bug in a previous checkin that broke 175.vpr
...
llvm-svn: 12128
2004-03-04 21:36:57 +00:00
Chris Lattner
bc3381f267
Add support for strto* and v*printf
...
llvm-svn: 12127
2004-03-04 21:03:54 +00:00
Chris Lattner
0ed8162c1a
Add non-crappy support for varargs
...
llvm-svn: 12126
2004-03-04 20:33:47 +00:00
Chris Lattner
3562ea84ab
Implement a FIXME, improving the efficiency of DSA on povray.
...
This reduces CBU time from 145s -> 122s (debug build), reduces # allocated nodes
from 129420 to 116477.
llvm-svn: 12125
2004-03-04 19:47:04 +00:00
Brian Gaeke
9c609df3c9
Support -print-machineinstrs
...
llvm-svn: 12124
2004-03-04 19:22:16 +00:00
Chris Lattner
30f94a72f4
Speed up the cbu pass from taking somewhere near the age of the universe to about 90s on povray
...
llvm-svn: 12123
2004-03-04 19:16:35 +00:00
Brian Gaeke
8351d8c1a8
make -print-machineinstrs work for both SparcV9 and X86
...
llvm-svn: 12122
2004-03-04 19:16:23 +00:00
Alkis Evlogimenos
b9501c1f8c
Add assertion for scale verification.
...
llvm-svn: 12120
2004-03-04 18:05:02 +00:00
Alkis Evlogimenos
8a4159708b
Fix bug introduced by yesterday's changes.
...
llvm-svn: 12119
2004-03-04 18:02:07 +00:00
Alkis Evlogimenos
33cb4260a5
Hide variable from other functions.
...
llvm-svn: 12118
2004-03-04 17:50:44 +00:00
Chris Lattner
536b131c9c
Fix BU datastructures with povray!
...
The problem was that we were merging a field of a node with a value that was
deleted. Thanks to bugpoint for reducing povray to a nice small 3 function
example. :)
llvm-svn: 12116
2004-03-04 17:06:53 +00:00
Chris Lattner
8db52980b7
Minor changes, remove some debugging code that got checked in somehow.
...
Make sure to scope the NodeMap passed into cloneInto so that it doesn't point
to nodes that are deleted. Add some FIXME's for future performance enhancements.
llvm-svn: 12115
2004-03-04 17:05:28 +00:00
Brian Gaeke
82ec4a561b
Asm printer support, based on x86 - only prints mnemonics for now
...
llvm-svn: 12113
2004-03-04 06:00:41 +00:00
Brian Gaeke
8ace44fe0d
Double-FP pseudo-registers.
...
llvm-svn: 12112
2004-03-04 05:15:03 +00:00
Brian Gaeke
92c95f812d
Subtract instructions; minor cleanups
...
llvm-svn: 12111
2004-03-04 04:37:45 +00:00
Brian Gaeke
d2e89190d9
Floating point regs
...
llvm-svn: 12110
2004-03-04 04:37:22 +00:00
Chris Lattner
f48eb7519a
Only clone nodes that are needed in the caller, don't clone ALL aux calls. This improves
...
povray from having ~600K nodes and 300K call nodes to 65K nodes and 25K call nodes.
llvm-svn: 12109
2004-03-04 03:57:53 +00:00
Brian Gaeke
956fb06a4a
Simple copyConstantToReg support, SETHIi and ORri
...
llvm-svn: 12107
2004-03-04 00:56:25 +00:00
Brian Gaeke
165ff998e0
Support add - note, still missing important copyConstantToRegister stuff
...
llvm-svn: 12106
2004-03-03 23:03:14 +00:00
Chris Lattner
559487301f
Fix a minor bug handling incomplete programs
...
llvm-svn: 12105
2004-03-03 23:00:19 +00:00
Chris Lattner
d9da2678fc
Fix a DSA bug that caused DSA to generate incredibly huge graphs and take forever to
...
do it on povray. The problem is that we were not copying globals from callees to
callers unless the existed in both graphs. We should have copied them in the case
where the global pointed to a node that was copied as well.
llvm-svn: 12104
2004-03-03 22:01:09 +00:00
Chris Lattner
91be5332b2
Rename method, add new method
...
llvm-svn: 12103
2004-03-03 22:00:20 +00:00
Chris Lattner
5fc189157c
Deinline methods, add fast exit
...
llvm-svn: 12102
2004-03-03 20:55:27 +00:00
Chris Lattner
06bd20676d
De-inline methods
...
llvm-svn: 12101
2004-03-03 20:55:15 +00:00
Brian Gaeke
015972103d
Make MachineOperand's value named 'contents'. Make really, really sure
...
it is always completely initialized and copied.
Also, fix up many comments and asserts.
llvm-svn: 12100
2004-03-03 19:07:27 +00:00
Brian Gaeke
3001c6e264
Squash /usr/dcs path; use a 'require <version>' instead.
...
llvm-svn: 12099
2004-03-03 17:38:51 +00:00
Brian Gaeke
c0c260dd37
Add my regression finding by binary searching cvs script.
...
llvm-svn: 12095
2004-03-03 08:14:25 +00:00
Chris Lattner
140b2cbd28
Fix a node mapping problem that was causing the pool allocator to locally allocate
...
nodes that were globally live, thus breaking programs.
llvm-svn: 12094
2004-03-03 05:34:31 +00:00
Chris Lattner
93e9878c2c
SPECIFY a target data to initialize the CBE target with. Until now we have
...
been using the default target data layout object to lower malloc instructions,
causing us to allocate more memory than we needed! This could improve the
performance of the CBE generated code substantially!
llvm-svn: 12088
2004-03-03 02:14:15 +00:00
Chris Lattner
87ed2a4096
Add a new constructor
...
llvm-svn: 12087
2004-03-03 02:12:47 +00:00
Chris Lattner
7abcc387de
Don't emit things like malloc(16*1). Allocation instructions are fixed arity now.
...
llvm-svn: 12086
2004-03-03 01:40:53 +00:00
Chris Lattner
2e92b469c8
FINALLY be able to get symbolic type names in the globals graph!
...
llvm-svn: 12082
2004-03-02 21:39:43 +00:00
Chris Lattner
9e100fc3f7
Really, only if reopen
...
llvm-svn: 12080
2004-03-02 20:46:18 +00:00
John Criswell
626f47f946
Added EH support.
...
llvm-svn: 12075
2004-03-02 15:54:25 +00:00
Alkis Evlogimenos
cb8937197e
Make <di> into <dt> (definition list term).
...
llvm-svn: 12072
2004-03-02 03:36:10 +00:00
Misha Brukman
c566ca36a1
Doxygenify comments.
...
llvm-svn: 12071
2004-03-02 00:22:19 +00:00
Misha Brukman
f44acae31e
Implement ExtractCodeRegion()
...
llvm-svn: 12070
2004-03-02 00:20:57 +00:00
Misha Brukman
1998b73492
Add prototype for ExtractCodeRegion()
...
llvm-svn: 12069
2004-03-02 00:20:32 +00:00
Misha Brukman
f272f9b3d5
Make a note that this is usually used via bugpoint.
...
llvm-svn: 12068
2004-03-02 00:19:09 +00:00
Misha Brukman
a6025e6480
Doxygenify some comments.
...
llvm-svn: 12064
2004-03-01 23:53:11 +00:00
Alkis Evlogimenos
45da18d2a4
Fix <p> missing <p> tag
...
llvm-svn: 12063
2004-03-01 23:25:38 +00:00
Alkis Evlogimenos
31953c7a10
Add a spiller option to llc. A simple spiller will come soon. When we get CFG in the machine code represenation a global spiller will also be possible. Also document the linear scan register allocator but mark it as experimental for now.
...
llvm-svn: 12062
2004-03-01 23:18:15 +00:00
Alkis Evlogimenos
b76d234ee9
Add the long awaited memory operand folding support for linear scan
...
llvm-svn: 12058
2004-03-01 20:05:10 +00:00
Misha Brukman
b22d09cc5e
* If a badref has a name, print it out for ease of debugging
...
* Doxygenify (some) comments
llvm-svn: 12057
2004-03-01 19:48:13 +00:00
Chris Lattner
d86982547f
Add new method
...
llvm-svn: 12056
2004-03-01 19:36:50 +00:00
Chris Lattner
c8d23b19fb
Correctly add an array marker on a node when appropriate!
...
llvm-svn: 12055
2004-03-01 19:02:54 +00:00
Misha Brukman
88cc178e3b
Fix grammar and doxygenify comments.
...
llvm-svn: 12054
2004-03-01 18:31:19 +00:00
Misha Brukman
5af2be7d09
* Add implementation of ExtractBasicBlock()
...
* Add comments to ExtractLoop()
llvm-svn: 12053
2004-03-01 18:28:34 +00:00
Misha Brukman
f68f121dd3
Add ability to extract a single basic block into a new function.
...
llvm-svn: 12052
2004-03-01 18:27:13 +00:00
Misha Brukman
773d6f66db
* HTML 4.01 Strict compliance
...
* Removed unnecessary tabs in the entire file
llvm-svn: 12051
2004-03-01 18:21:04 +00:00
Misha Brukman
c501f5530b
HTML 4.01 Strict compliance.
...
llvm-svn: 12050
2004-03-01 17:47:27 +00:00
Chris Lattner
f96405a1ce
Add this back, as its absence introduces assertions, and it seems to work now
...
that Instructions are annotable again
llvm-svn: 12045
2004-03-01 15:28:27 +00:00
Tanya Lattner
e63e8ea884
fix bug in previous checkin
...
llvm-svn: 12044
2004-03-01 15:05:17 +00:00
Brian Gaeke
427cec1395
TargetCacheInfo has been removed; its only uses were to propagate a constant
...
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.
llvm-svn: 12043
2004-03-01 06:43:29 +00:00
Tanya Lattner
48a503be04
Adding new Modulo Scheduling graph files.
...
llvm-svn: 12031
2004-03-01 02:50:57 +00:00
Tanya Lattner
dd10fbe775
Removing old graph files with new graph files that I wrote. Updated ModuloScheduling pass, but still in progress.
...
llvm-svn: 12030
2004-03-01 02:50:01 +00:00
Chris Lattner
6f6e0f29ad
Expand on my note-to-self
...
llvm-svn: 12029
2004-03-01 02:44:44 +00:00
Chris Lattner
1f4642c47c
Handle passing constant integers to functions much more efficiently. Instead
...
of generating this code:
mov %EAX, 4
mov DWORD PTR [%ESP], %EAX
mov %AX, 123
movsx %EAX, %AX
mov DWORD PTR [%ESP + 4], %EAX
call Y
we now generate:
mov DWORD PTR [%ESP], 4
mov DWORD PTR [%ESP + 4], 123
call Y
Which hurts the eyes less. :)
Considering that register pressure around call sites is already high (with all
of the callee clobber registers n stuff), this may help a lot.
llvm-svn: 12028
2004-03-01 02:42:43 +00:00
Brian Gaeke
b19dcc6651
Don't look in the .libs directories that libtool makes
...
llvm-svn: 12027
2004-03-01 02:41:22 +00:00
Chris Lattner
5c7d3cda78
Fix a minor code-quality issue. When passing 8 and 16-bit integer constants
...
to function calls, we would emit dead code, like this:
int Y(int, short, double);
int X() {
Y(4, 123, 4);
}
--- Old
X:
sub %ESP, 20
mov %EAX, 4
mov DWORD PTR [%ESP], %EAX
*** mov %AX, 123
mov %AX, 123
movsx %EAX, %AX
mov DWORD PTR [%ESP + 4], %EAX
fld QWORD PTR [.CPIX_0]
fstp QWORD PTR [%ESP + 8]
call Y
mov %EAX, 0
# IMPLICIT_USE %EAX %ESP
add %ESP, 20
ret
Now we emit:
X:
sub %ESP, 20
mov %EAX, 4
mov DWORD PTR [%ESP], %EAX
mov %AX, 123
movsx %EAX, %AX
mov DWORD PTR [%ESP + 4], %EAX
fld QWORD PTR [.CPIX_0]
fstp QWORD PTR [%ESP + 8]
call Y
mov %EAX, 0
# IMPLICIT_USE %EAX %ESP
add %ESP, 20
ret
Next up, eliminate the mov AX and movsx entirely!
llvm-svn: 12026
2004-03-01 02:34:08 +00:00
Chris Lattner
482cf01a1e
Fix the "partial pool allocator" on em3d and others. The problem is that
...
DSNodes, unlike other GraphTraits nodes, can have null outgoing edges, and
df_iterator doesn't take this into consideration. As a workaround, the
successor iterator now handles null nodes and 'indicates' that null has
no successors.
llvm-svn: 12025
2004-03-01 01:42:26 +00:00
Chris Lattner
b4c203ce67
Make Module annotable. Reid has a bunch of code that depends on this, and
...
we really don't win that much by eliminating this (not many Modules are
allocated), so it's not worth it. When we can, we should revisit this in
the future.
llvm-svn: 12023
2004-03-01 01:25:37 +00:00
Chris Lattner
5cf39339d1
Disable tail duplication in a case that breaks on Olden/tsp
...
llvm-svn: 12021
2004-03-01 01:12:13 +00:00
Misha Brukman
2a4c5b050e
Doxygenify comments.
...
llvm-svn: 12015
2004-02-29 23:55:11 +00:00
Misha Brukman
c91e1ff50d
* Remove function to find "main" in a Module, there's a method for that
...
* Removing extraneous empty space and empty comment lines
llvm-svn: 12014
2004-02-29 23:09:10 +00:00
Chris Lattner
43640d7138
Fix -debug-pass=Executions, which relied on Function, Module, and BasicBlock
...
being annotable
llvm-svn: 12013
2004-02-29 22:37:04 +00:00
Chris Lattner
2de229f31b
Fix bug: test/Regression/Transforms/LowerInvoke/2004-02-29-PHICrash.llx
...
... which tickled the lowerinvoke pass because it used the BCE routines.
llvm-svn: 12012
2004-02-29 22:24:41 +00:00
Chris Lattner
9c9a4c4abd
Testcase for a bug that caused a whole bunch of testcases to die in the nightly
...
tester last night.
llvm-svn: 12011
2004-02-29 22:15:51 +00:00
Chris Lattner
604cc83933
Add an assert
...
llvm-svn: 12010
2004-02-29 22:01:51 +00:00
Chris Lattner
e0c3c18802
Add back #include I messed up
...
llvm-svn: 12009
2004-02-29 21:40:53 +00:00
Chris Lattner
90ecb92838
Urg, forgot to check this in.
...
llvm-svn: 12007
2004-02-29 21:03:08 +00:00
Chris Lattner
f2bb31c5fd
Module does not need to be annotatable aka annotable
...
llvm-svn: 12005
2004-02-29 19:27:55 +00:00
Chris Lattner
fcb4f9d00b
Remove public header. It's been moved to lib/Target/SparcV9
...
llvm-svn: 12004
2004-02-29 19:13:20 +00:00
Chris Lattner
3859031b9b
Move the private MachineInstrAnnot.h into a private directory.
...
llvm-svn: 12003
2004-02-29 19:12:51 +00:00
Chris Lattner
d5a49c477d
Remove use of an ugly header
...
llvm-svn: 12002
2004-02-29 19:04:31 +00:00
Chris Lattner
6194ee84ba
Move methods out of .h file
...
llvm-svn: 12001
2004-02-29 19:02:39 +00:00
Chris Lattner
23840c7db5
Do not use explicit casts that hide the dependence on Instruction being
...
annotable
llvm-svn: 12000
2004-02-29 19:02:26 +00:00
Chris Lattner
79b8d467da
Ugh, the old sparc backend attaches MachineCodeForInstruction annotations on
...
LLVM instructions. Because it contains an explicit cast, we didn't catch it.
I guess instruction's will be annotable for the duration of the sparcv9's
existence.
llvm-svn: 11999
2004-02-29 18:54:23 +00:00
Alkis Evlogimenos
9a4653edfa
Add instruction name description.
...
llvm-svn: 11998
2004-02-29 18:44:03 +00:00
Alkis Evlogimenos
0824ffc697
Use correct template for SHLD and SHRD instructions so that the memory
...
operand size is correctly specified.
llvm-svn: 11997
2004-02-29 09:19:40 +00:00
Alkis Evlogimenos
c7fd0770a0
Improve allocation order:
...
1) For 8-bit registers try to use first the ones that are parts of the
same register (AL then AH). This way we only alias 2 16/32-bit
registers after allocating 4 8-bit variables.
2) Move EBX as the last register to allocate. This will cause less
spills to happen since we will have 8-bit registers available up to
register excaustion (assuming we use the allocation order). It
would be nice if we could push all of the 8-bit aliased registers
towards the end but we much prefer to keep callee saved register to
the end to avoid saving them on entry and exit of the function.
For example this gives a slight reduction of spills with linear scan
on 164.gzip.
Before:
11221 asm-printer - Number of machine instrs printed
975 spiller - Number of loads added
675 spiller - Number of stores added
398 spiller - Number of register spills
After:
11182 asm-printer - Number of machine instrs printed
952 spiller - Number of loads added
652 spiller - Number of stores added
386 spiller - Number of register spills
llvm-svn: 11996
2004-02-29 09:17:01 +00:00
Alkis Evlogimenos
ea81b79a97
A big X86 instruction rename. The instructions are renamed to make
...
their names more decriptive. A name consists of the base name, a
default operand size followed by a character per operand with an
optional special size. For example:
ADD8rr -> add, 8-bit register, 8-bit register
IMUL16rmi -> imul, 16-bit register, 16-bit memory, 16-bit immediate
IMUL16rmi8 -> imul, 16-bit register, 16-bit memory, 8-bit immediate
MOVSX32rm16 -> movsx, 32-bit register, 16-bit memory
llvm-svn: 11995
2004-02-29 08:50:03 +00:00
Brian Gaeke
2f80d586b8
Remove dead member variables of SparcV9SchedInfo and TargetSchedInfo
...
llvm-svn: 11994
2004-02-29 08:40:03 +00:00
Chris Lattner
1e36fb030c
Eliminate the X86-specific BMI functions, using BuildMI instead.
...
Replace uses of addZImm with addImm.
llvm-svn: 11992
2004-02-29 07:22:16 +00:00
Chris Lattner
9a97573267
Fix a miscompilation of 197.parser that occurs when you have single basic
...
block loops.
llvm-svn: 11990
2004-02-29 07:10:16 +00:00
Chris Lattner
bf2963ef91
Fix PR255: [tailduplication] Single basic block loops are very rare
...
Note that this is a band-aid put over a band-aid. This just undisables
tail duplication in on very specific case that it seems to work in.
llvm-svn: 11989
2004-02-29 06:41:20 +00:00
Brian Gaeke
d470a0f042
Update comment at head of file. Also fix C 'typedef struct' nonsense I
...
inadvertently left in here.
llvm-svn: 11988
2004-02-29 06:33:28 +00:00
Chris Lattner
ed01da8f0b
Adjust to change in TII ctor arguments
...
llvm-svn: 11987
2004-02-29 06:31:44 +00:00
Chris Lattner
f20abac9bc
Eliminate the distinction between "real" and "unreal" instructions
...
llvm-svn: 11986
2004-02-29 06:31:16 +00:00
Brian Gaeke
e65125dcdf
Add more architectures, and ELF64 stuff.
...
llvm-svn: 11985
2004-02-29 06:30:25 +00:00
Chris Lattner
ca89812db7
These two virtual methods are never called.
...
llvm-svn: 11984
2004-02-29 05:59:33 +00:00
Chris Lattner
71a899dea6
Remove a TON of flags that noone cares about
...
llvm-svn: 11983
2004-02-29 05:58:30 +00:00
Chris Lattner
59d9e9126d
Noone calls these virtual methods
...
llvm-svn: 11982
2004-02-29 05:58:16 +00:00
Chris Lattner
79d9a93a71
This is the only file in the system that uses this enum. eliminate it.
...
llvm-svn: 11981
2004-02-29 05:57:59 +00:00
Chris Lattner
f611ca055c
Scrap a huge layer of cruft out of this interface.
...
llvm-svn: 11980
2004-02-29 05:57:21 +00:00
Chris Lattner
e5f08917ae
Implement initial prolog/epilog code insertion methods.
...
llvm-svn: 11979
2004-02-29 05:18:30 +00:00
Chris Lattner
5e7b3180e5
Remove unneeded #include
...
llvm-svn: 11978
2004-02-29 05:15:56 +00:00
Chris Lattner
44b1b22a2d
int64_t -> int
...
llvm-svn: 11977
2004-02-29 05:07:02 +00:00
Chris Lattner
a33f2b3731
Continue Alkis's int64_t cleanup. This makes all of the immediate related
...
methods take an int or unsigned value instead of int64_t.
Also, add an 'addImm' method to the MachineInstrBuilder class, because the
fact that the hardware sign or zero extends it does not/should not matter
to the code generator. Once the old sparc backend is removed the difference
can be eliminated.
llvm-svn: 11976
2004-02-29 05:06:49 +00:00
Chris Lattner
349b8c928d
Add BuildMI variants that take a MBB::iterator
...
llvm-svn: 11975
2004-02-29 04:55:28 +00:00
Alkis Evlogimenos
876f6f96d0
Use correct template for ADC instruction with memory operands.
...
llvm-svn: 11974
2004-02-29 02:18:17 +00:00
Chris Lattner
b1862e4d3b
Add an instruction selector capable of selecting 'ret void'
...
llvm-svn: 11973
2004-02-29 00:27:00 +00:00
Alkis Evlogimenos
fa63580517
SHLD and SHRD take 32-bit operands but an 8-bit immediate. Rename them
...
to denote this fact.
llvm-svn: 11972
2004-02-28 23:46:44 +00:00
Alkis Evlogimenos
4953ae085a
Floating point loads/stores act on memory operands. Rename them to
...
denote this fact.
llvm-svn: 11971
2004-02-28 23:42:35 +00:00
Alkis Evlogimenos
c6948fa762
Rename instruction templates to be easier to the human eye to
...
parse. The name is now I (operand size)*. For example:
Im32 -> instruction with 32-bit memory operands.
Im16i8 -> instruction with 16-bit memory operands and 8 bit immediate
operands.
llvm-svn: 11970
2004-02-28 23:09:03 +00:00
Alkis Evlogimenos
5b5dee4afb
Uncomment instructions that take both an immediate and a memory
...
operand but their sizes differ.
llvm-svn: 11969
2004-02-28 22:06:59 +00:00
Brian Gaeke
c0f3741a16
Fix my sloppiness
...
llvm-svn: 11968
2004-02-28 22:06:03 +00:00
Alkis Evlogimenos
194939086d
Each instruction now has both an ImmType and a MemType. This describes
...
the size of the immediate and the memory operand on instructions that
use them. This resolves problems with instructions that take both a
memory and an immediate operand but their sizes differ (i.e. ADDmi32b).
llvm-svn: 11967
2004-02-28 22:02:05 +00:00
Brian Gaeke
465a5cc291
Fix typo in comment
...
llvm-svn: 11966
2004-02-28 21:55:18 +00:00
Chris Lattner
c116ede471
Add a testcase for switch instruction induction
...
llvm-svn: 11965
2004-02-28 21:30:39 +00:00
Chris Lattner
d3e6ae263c
Implement switch->br and br->switch folding by ripping out the switch->switch
...
and br->br code and generalizing it. This allows us to compile code like this:
int test(Instruction *I) {
if (isa<CastInst>(I))
return foo(7);
else if (isa<BranchInst>(I))
return foo(123);
else if (isa<UnwindInst>(I))
return foo(1241);
else if (isa<SetCondInst>(I))
return foo(1);
else if (isa<VAArgInst>(I))
return foo(42);
return foo(-1);
}
into:
int %_Z4testPN4llvm11InstructionE("struct.llvm::Instruction"* %I) {
entry:
%tmp.1.i.i.i.i.i.i.i = getelementptr "struct.llvm::Instruction"* %I, long 0, ubyte 4 ; <uint*> [#uses=1]
%tmp.2.i.i.i.i.i.i.i = load uint* %tmp.1.i.i.i.i.i.i.i ; <uint> [#uses=2]
%tmp.2.i.i.i.i.i.i = seteq uint %tmp.2.i.i.i.i.i.i.i, 27 ; <bool> [#uses=0]
switch uint %tmp.2.i.i.i.i.i.i.i, label %endif.0 [
uint 27, label %then.0
uint 2, label %then.1
uint 5, label %then.2
uint 14, label %then.3
uint 15, label %then.3
uint 16, label %then.3
uint 17, label %then.3
uint 18, label %then.3
uint 19, label %then.3
uint 32, label %then.4
]
...
As well as handling the cases in 176.gcc and many other programs more effectively.
llvm-svn: 11964
2004-02-28 21:28:10 +00:00
Chris Lattner
72bb8fcb15
Change this so that LLC actually tries to run the code generator, though it will
...
immediately abort due to lack of an instruction selector. :)
llvm-svn: 11963
2004-02-28 20:21:45 +00:00
Chris Lattner
72170c4a2e
Add a hook to run with the V8 target, though it doesn't currently work. Also
...
mark the PPC backend as experimental
llvm-svn: 11962
2004-02-28 19:55:16 +00:00
Chris Lattner
fc5232ba3a
Add hook for V8 target
...
llvm-svn: 11961
2004-02-28 19:54:16 +00:00
Chris Lattner
990c279f5c
SparcV8 now builds.
...
llvm-svn: 11960
2004-02-28 19:54:00 +00:00
Chris Lattner
daeeaa72cd
fine grainify namespacification
...
llvm-svn: 11959
2004-02-28 19:53:18 +00:00
Chris Lattner
1a3ee3e961
Finegrainify namespacification
...
llvm-svn: 11958
2004-02-28 19:52:49 +00:00
Chris Lattner
e40fd90b0b
Tab completion is our friend.
...
llvm-svn: 11957
2004-02-28 19:45:39 +00:00
Chris Lattner
0179fb5881
Clean up rules
...
llvm-svn: 11956
2004-02-28 19:43:40 +00:00
Chris Lattner
74598091a1
Bring this directory into "it actually compiles" land
...
llvm-svn: 11955
2004-02-28 19:37:18 +00:00
Chris Lattner
3290952f8b
Fix multiple inclusion problem
...
llvm-svn: 11954
2004-02-28 19:31:32 +00:00
Chris Lattner
772eafa332
if there is already a prototype for malloc/free, use it, even if it's incorrect.
...
Do not just inject a new prototype.
llvm-svn: 11951
2004-02-28 18:51:45 +00:00
Chris Lattner
36326de312
Do not remove an active template argument even if the superclass had one of the
...
same name
llvm-svn: 11950
2004-02-28 17:41:48 +00:00
Chris Lattner
178f0f1405
fix a bug in the testcase
...
llvm-svn: 11949
2004-02-28 17:33:21 +00:00
Chris Lattner
994f2d1406
Ignore X = X assignments that was causing Alkis's rewrite of X86.td to crash
...
tblgen.
llvm-svn: 11948
2004-02-28 17:31:28 +00:00
Chris Lattner
1ddddf536a
new testcase for a tblgen bug that alkis ran into
...
llvm-svn: 11947
2004-02-28 16:43:44 +00:00
Chris Lattner
d959ab9208
Assert instead of going into an infinite loop!
...
llvm-svn: 11946
2004-02-28 16:31:53 +00:00
Brian Gaeke
18577345aa
ELF constants and data structures.
...
llvm-svn: 11945
2004-02-28 06:26:20 +00:00
Alkis Evlogimenos
2debead504
Do not generate instructions with mismatched memory/immediate sized
...
operands. The X86 backend doesn't handle them properly right now.
llvm-svn: 11944
2004-02-28 06:01:43 +00:00
Chris Lattner
eff5f51807
new testcase for intrinsic folding
...
llvm-svn: 11943
2004-02-28 05:28:42 +00:00
Chris Lattner
b66f42427a
The instruction combining pass removes dead instructions, there is no need
...
to run the die pass after it.
llvm-svn: 11942
2004-02-28 05:26:06 +00:00
Chris Lattner
51ea127bf3
Rename AddUsesToWorkList -> AddUsersToWorkList, as that is what it does.
...
Create a new AddUsesToWorkList method
optimize memmove/set/cpy of zero bytes to a noop.
llvm-svn: 11941
2004-02-28 05:22:00 +00:00
Chris Lattner
f3a366062c
Turn 'free null' into nothing
...
llvm-svn: 11940
2004-02-28 04:57:37 +00:00
Misha Brukman
8a2c28fdda
Right, it's really Extractor, not Extraction.
...
llvm-svn: 11939
2004-02-28 03:37:58 +00:00
Misha Brukman
370c58a44a
New Function-level transformation utils.
...
llvm-svn: 11938
2004-02-28 03:33:30 +00:00
Misha Brukman
3151628a0d
Add the prototype for the LoopExtractor Pass.
...
llvm-svn: 11937
2004-02-28 03:33:17 +00:00
Misha Brukman
03a11340ff
A pass that uses the generic CodeExtractor to rip out *every* loop in every
...
function, as long as the loop isn't the only one in that function. This should
help debugging passes easier with BugPoint.
llvm-svn: 11936
2004-02-28 03:33:01 +00:00
Misha Brukman
caa1a5abeb
A generic code extractor: given a list of BasicBlocks, it will rip them out into
...
a new function, taking care of inputs and outputs.
llvm-svn: 11935
2004-02-28 03:26:20 +00:00
Misha Brukman
be74d5f73a
Two testcases for loops: one with outputs, one without.
...
llvm-svn: 11934
2004-02-28 03:20:41 +00:00
Alkis Evlogimenos
24b3d0bdae
Further comment updates.
...
llvm-svn: 11933
2004-02-28 03:20:31 +00:00
Alkis Evlogimenos
f87966b8c4
Update comments.
...
llvm-svn: 11932
2004-02-28 03:12:31 +00:00
Alkis Evlogimenos
2dbc79df84
My previous commit broke the jit. The shift instructions always take
...
an 8-bit immediate. So mark the shifts that take immediates as taking
an 8-bit argument. The rest with the implicit use of CL are marked
appropriately.
A bug still exists:
def SHLDmri32 : I2A8 <"shld", 0xA4, MRMDestMem>, TB; // [mem32] <<= [mem32],R32 imm8
The immediate in the above instruction is 8-bit but the memory
reference is 32-bit. The printer prints this as an 8-bit reference
which confuses the assembler. Same with SHRDmri32.
llvm-svn: 11931
2004-02-28 02:56:26 +00:00
Brian Gaeke
ffeef64177
Turn off the SparcV9MachineCodeDestructionPass for now, because it's buggy
...
llvm-svn: 11930
2004-02-27 21:15:40 +00:00
Brian Gaeke
50d19bf1de
Correct DestroyMachineFunction's getPassName
...
llvm-svn: 11929
2004-02-27 21:01:14 +00:00
Chris Lattner
06a573f63d
Only clone global nodes between graphs if both graphs have the global.
...
llvm-svn: 11928
2004-02-27 20:05:15 +00:00
Chris Lattner
98f8ca4017
ADD MORE FUNCTIONS!
...
llvm-svn: 11927
2004-02-27 20:04:48 +00:00
Alkis Evlogimenos
b10b04c5ec
Fix argument size for SHL, SHR, SAR, SHLD and SHRD families of
...
instructions.
llvm-svn: 11923
2004-02-27 19:46:30 +00:00
Alkis Evlogimenos
75ed0f67bf
Fix encoding of ADD and SUB family of instructions. Also rearrange
...
them so that they are consistent with AND, XOR, etc...
llvm-svn: 11922
2004-02-27 18:57:00 +00:00
Alkis Evlogimenos
58270fcf1f
Rename MRMS[0-7]{r,m} to MRM[0-7]{r,m}.
...
llvm-svn: 11921
2004-02-27 18:55:12 +00:00
Chris Lattner
e82c217b2f
setcond instructions don't have aliasing implications.
...
llvm-svn: 11919
2004-02-27 18:09:25 +00:00
John Criswell
a3b47cae4c
Added d and hbd MultiSource applications.
...
llvm-svn: 11915
2004-02-27 18:02:06 +00:00
Chris Lattner
3705370df1
Fix Regression/Assembler/2004-02-27-SelfUseAssertError.ll
...
llvm-svn: 11913
2004-02-27 17:28:25 +00:00
Chris Lattner
65d7e5f308
Fix a verifier bug that was preventing us from ripping povray+libpng to pieces.
...
llvm-svn: 11912
2004-02-27 17:26:08 +00:00
Chris Lattner
e8ad1347ab
Build zlib and libpng
...
llvm-svn: 11911
2004-02-27 17:00:29 +00:00
Chris Lattner
2b96fee7a6
Updates from Reid
...
llvm-svn: 11908
2004-02-27 16:17:20 +00:00
Alkis Evlogimenos
9476b7cbe5
Add memory operand folding support for the SETcc family of
...
instructions.
llvm-svn: 11907
2004-02-27 16:13:37 +00:00
Alkis Evlogimenos
a0bae43032
Make MachineOperand's immediate value an int and save 4 bytes out of
...
each MachineOperand. We don't really need an int64_t immediate :-).
llvm-svn: 11906
2004-02-27 15:05:28 +00:00
Alkis Evlogimenos
8d99063b38
Add memory operand folding support for SHLD and SHRD instructions.
...
llvm-svn: 11905
2004-02-27 15:03:18 +00:00
Alkis Evlogimenos
3537404299
Add memory operand folding support for SHL, SHR and SAR, SHLD instructions.
...
llvm-svn: 11903
2004-02-27 09:28:43 +00:00
Alkis Evlogimenos
f020dfb43c
Rename SHL, SHR, SAR, SHLD and SHLR instructions to make them
...
consistent with the rest and also pepare for the addition of their
memory operand variants.
llvm-svn: 11902
2004-02-27 06:57:05 +00:00
Chris Lattner
524ee2beee
Initial checkin of document, contributed by Reid Spencer.
...
llvm-svn: 11901
2004-02-27 06:28:34 +00:00
Chris Lattner
4f7accab96
Implement test/Regression/Transforms/InstCombine/canonicalize_branch.ll
...
This is a really minor thing, but might help out the 'switch statement induction'
code in simplifycfg.
llvm-svn: 11900
2004-02-27 06:27:46 +00:00
Chris Lattner
d58a88b28d
The instcombiner should canonicalize comparisons.
...
llvm-svn: 11899
2004-02-27 06:27:07 +00:00
Alkis Evlogimenos
e669caafe0
Rename member function to be consistent with the rest.
...
llvm-svn: 11898
2004-02-27 06:11:15 +00:00
Alkis Evlogimenos
6cf4373394
Add improvements to the code generator.
...
llvm-svn: 11896
2004-02-27 05:26:23 +00:00
Alkis Evlogimenos
941f9310bb
Make spiller push stores right after the definition of a register so
...
that they are as far away from the loads as possible.
llvm-svn: 11895
2004-02-27 04:51:35 +00:00
Alkis Evlogimenos
519e1e8c92
Fix crash caused by passing register 0 to
...
MRegisterInfo::isPhysicalRegister().
llvm-svn: 11894
2004-02-27 01:52:34 +00:00
Alkis Evlogimenos
5a3bab9402
Clear maps right after basic block is processed.
...
llvm-svn: 11892
2004-02-26 23:22:23 +00:00
Misha Brukman
61107d315b
Doxygenify comments.
...
llvm-svn: 11891
2004-02-26 23:20:29 +00:00
Misha Brukman
c49e64347c
Doxygenify and tersify comments.
...
llvm-svn: 11890
2004-02-26 23:20:08 +00:00
John Criswell
bbde7d667f
Added PR258 and 259.
...
llvm-svn: 11889
2004-02-26 23:13:34 +00:00
John Criswell
9ed08ab1f7
Added support for C++ compilation.
...
Made removing the object files a separate sh command so that it can easily
be commented out.
llvm-svn: 11888
2004-02-26 23:02:25 +00:00
John Criswell
c7ef3c61fd
C++ version of llvm-native-gcc.
...
llvm-svn: 11887
2004-02-26 23:01:21 +00:00
John Criswell
6192eeb0c5
Fixed test case to actually check for the static declaration.
...
Oops.
llvm-svn: 11886
2004-02-26 22:56:13 +00:00
John Criswell
6fd2e36fd5
Regression tests for PR258 and PR259.
...
2004-02-26-FPNotPrintableConstants.llx ensures that constants used in an
LLVM program are declared static if they are assigned to global variables.
2004-02-26-LinkOnceFunctions.llx ensures that linkonce functions get the
weak attribute.
llvm-svn: 11885
2004-02-26 22:55:11 +00:00
John Criswell
feb7c49ce4
Fixes for PR258 and PR259.
...
Functions with linkonce linkage are declared with weak linkage.
Global floating point constants used to represent unprintable values
(such as NaN and infinity) are declared static so that they don't interfere
with other CBE generated translation units.
llvm-svn: 11884
2004-02-26 22:20:58 +00:00
Chris Lattner
5ef1638da2
Be a good little compiler and handle direct calls efficiently, even if there
...
are beastly ConstantPointerRefs in the way...
llvm-svn: 11883
2004-02-26 22:07:22 +00:00
Alkis Evlogimenos
61719d48d2
Uncomment assertions that register# != 0 on calls to
...
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.
llvm-svn: 11882
2004-02-26 22:00:20 +00:00
John Criswell
44cf9fadcb
Modified the default pathname for Povray.
...
llvm-svn: 11881
2004-02-26 20:22:59 +00:00
Chris Lattner
79636d7cd5
Since LLVM uses structure type equivalence, it isn't useful to keep around
...
multiple type names for the same structural type. Make DTE eliminate all
but one of the type names
llvm-svn: 11879
2004-02-26 20:02:23 +00:00
Chris Lattner
a990863851
Annotations are evil. This makes Value not derive from Annotable, which makes
...
all dynamically allocated LLVM values 4 bytes smaller, eliminate some vtables, and
make Value's destructor faster.
This makes Function derive from Annotation now because it is the only core LLVM
class that still has an annotation stuck onto it: MachineFunction.
MachineFunction is obviously horrible and gross (like most other annotations), but
will be the subject of refactorings later in the future. Besides many fewer
Function objects are dynamically allocated that instructions blocks, constants,
types, etc... :)
llvm-svn: 11878
2004-02-26 08:08:38 +00:00
Chris Lattner
19cfc40ce0
add note
...
llvm-svn: 11876
2004-02-26 08:02:57 +00:00
Chris Lattner
7140e4696a
Use a map instead of annotations
...
llvm-svn: 11875
2004-02-26 08:02:17 +00:00
Chris Lattner
e495e774b7
Make TargetData no longer use annotations!
...
llvm-svn: 11874
2004-02-26 08:01:57 +00:00
Chris Lattner
526a80ec25
Eliminate copy-and-paste comments
...
llvm-svn: 11873
2004-02-26 08:01:30 +00:00
Chris Lattner
234a2d4f19
remove obsolete comment
...
llvm-svn: 11872
2004-02-26 07:59:22 +00:00
Chris Lattner
120035898b
Make sure that at least one virtual method is defined in a .cpp file to avoid
...
having the compiler emit RTTI and vtables to EVERY translation unit.
llvm-svn: 11871
2004-02-26 07:24:18 +00:00
Chris Lattner
21e941fbfd
turn things like:
...
if (X == 0 || X == 2)
...where the comparisons and branches are in different blocks... into a switch
instruction. This comes up a lot in various programs, and works well with
the switch/switch merging code I checked earlier. For example, this testcase:
int switchtest(int C) {
return C == 0 ? f(123) :
C == 1 ? f(3123) :
C == 4 ? f(312) :
C == 5 ? f(1234): f(444);
}
is converted into this:
switch int %C, label %cond_false.3 [
int 0, label %cond_true.0
int 1, label %cond_true.1
int 4, label %cond_true.2
int 5, label %cond_true.3
]
instead of a whole bunch of conditional branches.
Admittedly the code is ugly, and incomplete. To be complete, we need to add
br -> switch merging and switch -> br merging. For example, this testcase:
struct foo { int Q, R, Z; };
#define A (X->Q+X->R * 123)
int test(struct foo *X) {
return A == 123 ? X1() :
A == 12321 ? X2():
(A == 111 || A == 222) ? X3() :
A == 875 ? X4() : X5();
}
Gets compiled to this:
switch int %tmp.7, label %cond_false.2 [
int 123, label %cond_true.0
int 12321, label %cond_true.1
int 111, label %cond_true.2
int 222, label %cond_true.2
]
...
cond_false.2: ; preds = %entry
%tmp.52 = seteq int %tmp.7, 875 ; <bool> [#uses=1]
br bool %tmp.52, label %cond_true.3, label %cond_false.3
where the branch could be folded into the switch.
This kind of thing occurs *ALL OF THE TIME*, especially in programs like
176.gcc, which is a horrible mess of code. It contains stuff like *shudder*:
#define SWITCH_TAKES_ARG(CHAR) \
( (CHAR) == 'D' \
|| (CHAR) == 'U' \
|| (CHAR) == 'o' \
|| (CHAR) == 'e' \
|| (CHAR) == 'u' \
|| (CHAR) == 'I' \
|| (CHAR) == 'm' \
|| (CHAR) == 'L' \
|| (CHAR) == 'A' \
|| (CHAR) == 'h' \
|| (CHAR) == 'z')
and
#define CONST_OK_FOR_LETTER_P(VALUE, C) \
((C) == 'I' ? SMALL_INTVAL (VALUE) \
: (C) == 'J' ? SMALL_INTVAL (-(VALUE)) \
: (C) == 'K' ? (unsigned)(VALUE) < 32 \
: (C) == 'L' ? ((VALUE) & 0xffff) == 0 \
: (C) == 'M' ? integer_ok_for_set (VALUE) \
: (C) == 'N' ? (VALUE) < 0 \
: (C) == 'O' ? (VALUE) == 0 \
: (C) == 'P' ? (VALUE) >= 0 \
: 0)
and
#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \
{ \
if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 1))) \
(X) = gen_rtx (PLUS, SImode, XEXP (X, 0), \
copy_to_mode_reg (SImode, XEXP (X, 1))); \
if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 0))) \
(X) = gen_rtx (PLUS, SImode, XEXP (X, 1), \
copy_to_mode_reg (SImode, XEXP (X, 0))); \
if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == MULT) \
(X) = gen_rtx (PLUS, SImode, XEXP (X, 1), \
force_operand (XEXP (X, 0), 0)); \
if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == MULT) \
(X) = gen_rtx (PLUS, SImode, XEXP (X, 0), \
force_operand (XEXP (X, 1), 0)); \
if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == PLUS) \
(X) = gen_rtx (PLUS, Pmode, force_operand (XEXP (X, 0), NULL_RTX),\
XEXP (X, 1)); \
if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == PLUS) \
(X) = gen_rtx (PLUS, Pmode, XEXP (X, 0), \
force_operand (XEXP (X, 1), NULL_RTX)); \
if (GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == CONST \
|| GET_CODE (X) == LABEL_REF) \
(X) = legitimize_address (flag_pic, X, 0, 0); \
if (memory_address_p (MODE, X)) \
goto WIN; }
and others. These macros get used multiple times of course. These are such
lovely candidates for macros, aren't they? :)
This code also nicely handles LLVM constructs that look like this:
if (isa<CastInst>(I))
...
else if (isa<BranchInst>(I))
...
else if (isa<SetCondInst>(I))
...
else if (isa<UnwindInst>(I))
...
else if (isa<VAArgInst>(I))
...
where the isa can obviously be a dyn_cast as well. Switch instructions are a
good thing.
llvm-svn: 11870
2004-02-26 07:13:46 +00:00
Chris Lattner
28a0885929
No need to clear the map here, it will always be empty
...
llvm-svn: 11868
2004-02-26 05:21:21 +00:00
Chris Lattner
5e39cf9fbd
Fix a bug in the densemap that was killing the local allocator, and probably
...
other clients. The problem is that the nullVal member was left to the default
constructor to initialize, which for int's does nothing (ie, leaves it unspecified).
To get a zero value, we must use T(). It's C++ wonderful? :)
llvm-svn: 11867
2004-02-26 05:00:15 +00:00
Alkis Evlogimenos
e008a4b28f
Remove .micro references as those files no longer exist and add some more recent Makefile additions to the list
...
llvm-svn: 11866
2004-02-26 04:14:10 +00:00
Chris Lattner
973556b724
Fix typeo. grow() cannot shrink storage. clear() should really nuke storage
...
llvm-svn: 11865
2004-02-26 04:07:12 +00:00
Chris Lattner
36ab728fe5
Fix typo
...
llvm-svn: 11864
2004-02-26 03:45:03 +00:00
Chris Lattner
128e84197b
The node doesn't have to be _no_ node flags, it just has to be complete and
...
not have any globals.
llvm-svn: 11863
2004-02-26 03:43:43 +00:00
Chris Lattner
c8167b0e7e
Add _more_ functions
...
llvm-svn: 11862
2004-02-26 03:43:08 +00:00
Chris Lattner
73687be9d7
We have this snazzy link-time optimizer. How about we start using it? This
...
removes some cruft from 255.vortex, cleaning up after DAE and IPCP, which
do horrible, beautiful, things to vortex.
llvm-svn: 11861
2004-02-26 03:34:30 +00:00
Chris Lattner
9192bbdad9
Fix some warnings, some of which were spurious, and some of which were real
...
bugs. Thanks Brian!
llvm-svn: 11859
2004-02-26 01:20:02 +00:00
Misha Brukman
1743c4090d
Instructions to call and return from functions.
...
llvm-svn: 11858
2004-02-26 00:37:12 +00:00
Brian Gaeke
11331e5d59
One B00g fixed.
...
llvm-svn: 11857
2004-02-26 00:08:25 +00:00
Alkis Evlogimenos
802cf52b91
Temporarily comment out asserts as they break things. I will uncomment
...
them when all the problem areas are fixed.
llvm-svn: 11855
2004-02-25 23:56:36 +00:00
Alkis Evlogimenos
19aaae3f3b
Fix typo. I wonder how this actually worked.
...
llvm-svn: 11854
2004-02-25 23:47:17 +00:00
Alkis Evlogimenos
2cf83d3401
Complete the SPEC_ROOT and USE_SPEC to SPEC2000_ROOT and USE_SPEC200 rename.
...
llvm-svn: 11853
2004-02-25 23:41:32 +00:00
Chris Lattner
71626b8f36
Two changes:
...
1. Functions do not make things incomplete, only variables
2. Constant global variables no longer need to be marked incomplete, because
we are guaranteed that the initializer for the global will be in the
graph we are hacking on now. This makes resolution of indirect calls happen
a lot more in the bu pass, supports things like vtables and the C counterparts
(giant constant arrays of function pointers), etc...
Testcase here: test/Regression/Analysis/DSGraph/constant_globals.ll
llvm-svn: 11852
2004-02-25 23:36:08 +00:00
Chris Lattner
fc0912d02a
New testcase
...
llvm-svn: 11851
2004-02-25 23:34:04 +00:00
Chris Lattner
fab2872b6c
When building local graphs, clone the initializer for constant globals into each
...
local graph that uses the global.
llvm-svn: 11850
2004-02-25 23:31:02 +00:00
Alkis Evlogimenos
e62ddd405d
Fix bugs found with recent addition of assertions in
...
MRegisterInfo::is{Physical,Virtual}Register.
llvm-svn: 11849
2004-02-25 23:21:52 +00:00
Chris Lattner
6ce59b4a03
Simplify the dead node elimination stuff
...
Make the incompleteness marker faster by looping directly over the globals
instead of over the scalars to find the globals
Fix a bug where we didn't mark a global incomplete if it didn't have any
outgoing edges. This wouldn't break any current clients but is still wrong.
llvm-svn: 11848
2004-02-25 23:08:00 +00:00
Chris Lattner
5e5e060618
Add a bunch more functions
...
llvm-svn: 11847
2004-02-25 23:06:40 +00:00
Chris Lattner
17bce88100
Try harder to get symbol info
...
llvm-svn: 11846
2004-02-25 23:06:30 +00:00
Brian Gaeke
7b4be13f94
Represent va_list in interpreter as a (ec-stack-depth . var-arg-index)
...
pair, and look up varargs in the execution stack every time, instead of
just pushing iterators (which can be invalidated during callFunction())
around. (union GenericValue now has a "pair of uints" member, to support
this mechanism.) Fixes Bug 234.
llvm-svn: 11845
2004-02-25 23:01:48 +00:00
Brian Gaeke
84b76c9be0
Great sparc renaming fallout IV: Sparc --> SparcV9.
...
llvm-svn: 11844
2004-02-25 22:09:36 +00:00
Alkis Evlogimenos
ae54cfc19f
Duh, forgot to close the parenthesis.
...
llvm-svn: 11843
2004-02-25 22:07:14 +00:00
Alkis Evlogimenos
cb69f50cb5
Add assert to isPhysicalRegister and isVirtualRegister to fail when
...
passed the special 'register' 0.
llvm-svn: 11842
2004-02-25 22:04:28 +00:00
Alkis Evlogimenos
a9f03fba9d
Remove asssert since it is breaking cases that it shouldn't.
...
llvm-svn: 11841
2004-02-25 22:01:06 +00:00
Alkis Evlogimenos
d8bace7f60
Add DenseMap template and actually use it for for mapping virtual regs
...
to objects.
llvm-svn: 11840
2004-02-25 21:55:45 +00:00
Chris Lattner
b66a35ef9c
Add a new pass, run internalize first
...
llvm-svn: 11839
2004-02-25 21:35:13 +00:00
Chris Lattner
0f39359dd2
Add a new pass
...
llvm-svn: 11838
2004-02-25 21:35:02 +00:00
Chris Lattner
14da4ead95
Add prototype
...
llvm-svn: 11837
2004-02-25 21:34:51 +00:00
Chris Lattner
8d1da1abee
My faith in programmers has been found to be totally misplaced. One would
...
assume that if they don't intend to write to a global variable, that they
would mark it as constant. However, there are people that don't understand
that the compiler can do nice things for them if they give it the information
it needs.
This pass looks for blatently obvious globals that are only ever read from.
Though it uses a trivially simple "alias analysis" of sorts, it is still able
to do amazing things to important benchmarks. 253.perlbmk, for example,
contains several ***GIANT*** function pointer tables that are not marked
constant and should be. Marking them constant allows the optimizer to turn
a whole bunch of indirect calls into direct calls. Note that only a link-time
optimizer can do this transformation, but perlbmk does have several strings
and other minor globals that can be marked constant by this pass when run
from GCCAS.
176.gcc has a ton of strings and large tables that are marked constant, both
at compile time (38 of them) and at link time (48 more). Other benchmarks
give similar results, though it seems like big ones have disproportionally
more than small ones.
This pass is extremely quick and does good things. I'm going to enable it
in gccas & gccld. Not bad for 50 SLOC.
llvm-svn: 11836
2004-02-25 21:34:36 +00:00
Misha Brukman
564654d654
SparcV8 regs are really 32-bit, not 64! Thanks, Chris.
...
llvm-svn: 11835
2004-02-25 21:03:02 +00:00
Misha Brukman
f8dcdcc83b
Clean up the tablegen descriptions for SparcV8.
...
llvm-svn: 11834
2004-02-25 21:02:21 +00:00
Misha Brukman
2122b969f9
Fix the SparcV8 register definitions that were imported from PPC template.
...
llvm-svn: 11833
2004-02-25 21:00:05 +00:00
Misha Brukman
0e3a7ca53e
SparcV8 has different types of instructions, but F1 is only used for CALL.
...
llvm-svn: 11832
2004-02-25 20:52:20 +00:00
Brian Gaeke
232483aecc
Note that this test is currently expected to fail.
...
llvm-svn: 11831
2004-02-25 20:34:02 +00:00
Chris Lattner
f5a393a133
Add an assertion
...
llvm-svn: 11830
2004-02-25 19:37:44 +00:00
Chris Lattner
64c9b223bd
Fix failures in 099.go due to the cfgsimplify pass creating switch instructions
...
where there did not used to be any before
llvm-svn: 11829
2004-02-25 19:30:19 +00:00
Brian Gaeke
9a5bd7fca7
SparcV8 skeleton
...
llvm-svn: 11828
2004-02-25 19:28:19 +00:00
Brian Gaeke
068b4596d4
Great renaming part II: Sparc --> SparcV9 (also includes command-line options and Makefiles)
...
llvm-svn: 11827
2004-02-25 19:08:12 +00:00
Brian Gaeke
94e95d2b3e
Great renaming: Sparc --> SparcV9
...
llvm-svn: 11826
2004-02-25 18:44:15 +00:00
Chris Lattner
864c901444
Add a bunch more functions used by perlbmk
...
llvm-svn: 11824
2004-02-25 17:43:20 +00:00
John Criswell
9f547bcea9
Updated to use llc to generate CBE code.
...
llvm-svn: 11823
2004-02-25 17:15:02 +00:00
Chris Lattner
8ebf253827
Substantial improvements and cleanups for the release notes. We were missing
...
a bunch of stuff! :)
llvm-svn: 11822
2004-02-25 16:36:51 +00:00
Chris Lattner
9c6833c5ca
Fix incorrect debug code
...
llvm-svn: 11821
2004-02-25 15:15:04 +00:00
Chris Lattner
309327a4b5
Teach the instruction selector how to transform 'array' GEP computations into X86
...
scaled indexes. This allows us to compile GEP's like this:
int* %test([10 x { int, { int } }]* %X, int %Idx) {
%Idx = cast int %Idx to long
%X = getelementptr [10 x { int, { int } }]* %X, long 0, long %Idx, ubyte 1, ubyte 0
ret int* %X
}
Into a single address computation:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
lea %EAX, DWORD PTR [%EAX + 8*%ECX + 4]
ret
Before it generated:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
shl %ECX, 3
add %EAX, %ECX
lea %EAX, DWORD PTR [%EAX + 4]
ret
This is useful for things like int/float/double arrays, as the indexing can be folded into
the loads&stores, reducing register pressure and decreasing the pressure on the decode unit.
With these changes, I expect our performance on 256.bzip2 and gzip to improve a lot. On
bzip2 for example, we go from this:
10665 asm-printer - Number of machine instrs printed
40 ra-local - Number of loads/stores folded into instructions
1708 ra-local - Number of loads added
1532 ra-local - Number of stores added
1354 twoaddressinstruction - Number of instructions added
1354 twoaddressinstruction - Number of two-address instructions
2794 x86-peephole - Number of peephole optimization performed
to this:
9873 asm-printer - Number of machine instrs printed
41 ra-local - Number of loads/stores folded into instructions
1710 ra-local - Number of loads added
1521 ra-local - Number of stores added
789 twoaddressinstruction - Number of instructions added
789 twoaddressinstruction - Number of two-address instructions
2142 x86-peephole - Number of peephole optimization performed
... and these types of instructions are often in tight loops.
Linear scan is also helped, but not as much. It goes from:
8787 asm-printer - Number of machine instrs printed
2389 liveintervals - Number of identity moves eliminated after coalescing
2288 liveintervals - Number of interval joins performed
3522 liveintervals - Number of intervals after coalescing
5810 liveintervals - Number of original intervals
700 spiller - Number of loads added
487 spiller - Number of stores added
303 spiller - Number of register spills
1354 twoaddressinstruction - Number of instructions added
1354 twoaddressinstruction - Number of two-address instructions
363 x86-peephole - Number of peephole optimization performed
to:
7982 asm-printer - Number of machine instrs printed
1759 liveintervals - Number of identity moves eliminated after coalescing
1658 liveintervals - Number of interval joins performed
3282 liveintervals - Number of intervals after coalescing
4940 liveintervals - Number of original intervals
635 spiller - Number of loads added
452 spiller - Number of stores added
288 spiller - Number of register spills
789 twoaddressinstruction - Number of instructions added
789 twoaddressinstruction - Number of two-address instructions
258 x86-peephole - Number of peephole optimization performed
Though I'm not complaining about the drop in the number of intervals. :)
llvm-svn: 11820
2004-02-25 07:00:55 +00:00
Chris Lattner
d1ee55d439
* Make the previous patch more efficient by not allocating a temporary MachineInstr
...
to do analysis.
*** FOLD getelementptr instructions into loads and stores when possible,
making use of some of the crazy X86 addressing modes.
For example, the following C++ program fragment:
struct complex {
double re, im;
complex(double r, double i) : re(r), im(i) {}
};
inline complex operator+(const complex& a, const complex& b) {
return complex(a.re+b.re, a.im+b.im);
}
complex addone(const complex& arg) {
return arg + complex(1,0);
}
Used to be compiled to:
_Z6addoneRK7complex:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
*** mov %EDX, %ECX
fld QWORD PTR [%EDX]
fld1
faddp %ST(1)
*** add %ECX, 8
fld QWORD PTR [%ECX]
fldz
faddp %ST(1)
*** mov %ECX, %EAX
fxch %ST(1)
fstp QWORD PTR [%ECX]
*** add %EAX, 8
fstp QWORD PTR [%EAX]
ret
Now it is compiled to:
_Z6addoneRK7complex:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
fld QWORD PTR [%ECX]
fld1
faddp %ST(1)
fld QWORD PTR [%ECX + 8]
fldz
faddp %ST(1)
fxch %ST(1)
fstp QWORD PTR [%EAX]
fstp QWORD PTR [%EAX + 8]
ret
Other programs should see similar improvements, across the board. Note that
in addition to reducing instruction count, this also reduces register pressure
a lot, always a good thing on X86. :)
llvm-svn: 11819
2004-02-25 06:13:04 +00:00
Chris Lattner
4b3514c173
Add a helper to create an addressing mode given all of the pieces.
...
llvm-svn: 11818
2004-02-25 06:01:07 +00:00
Chris Lattner
d825d30f42
add an inefficient way of folding structure and constant array indexes together
...
into a single LEA instruction. This should improve the code generated for
things like X->A.B.C[12].D.
The bigger benefit is still coming though. Note that this uses an LEA instruction
instead of an add, giving the register allocator more freedom. We should probably
never generate ADDri32's.
llvm-svn: 11817
2004-02-25 03:45:50 +00:00
Chris Lattner
f85e33cd79
Implement special case for storing an immediate into memory so that we don't need
...
an intermediate register.
llvm-svn: 11816
2004-02-25 02:56:58 +00:00
Brian Gaeke
04cff21c2f
Cygwin defines log2 as a macro. Undef it here IFF it has already been defined,
...
so that we always get the inline function instead. Remember, kids, like it says
in the GCC manual, "An Inline Function is As Fast As a Macro."
llvm-svn: 11815
2004-02-25 01:53:45 +00:00
Brian Gaeke
01d9231855
small portability fix.
...
llvm-svn: 11814
2004-02-24 22:58:31 +00:00
Chris Lattner
9ccb1af08f
Add support for 'rename'
...
llvm-svn: 11813
2004-02-24 22:17:00 +00:00
Chris Lattner
d996e543eb
Make the verifier a little more explicit about this problem.
...
llvm-svn: 11811
2004-02-24 22:06:07 +00:00
Chris Lattner
396cdaf067
Add support for remove, fwrite, and fread
...
Also fix problem where we didn't check to see if a node pointer was null.
Though fclose(null) doesn't make a lot of sense, 300.twolf does it.
llvm-svn: 11810
2004-02-24 22:02:48 +00:00
John Criswell
47c5459cec
Added the VTune tests.
...
llvm-svn: 11809
2004-02-24 21:43:38 +00:00
Brian Gaeke
10a32da382
FunctionLiveVarInfo.h moved: include/llvm/CodeGen -> lib/Target/Sparc/LiveVar
...
llvm-svn: 11804
2004-02-24 19:46:00 +00:00
Chris Lattner
b471f0188f
Fix some unexpected fallout from the config.h changes. Because the CBE no
...
longer was getting this #include, it always fell back on the less precise
floating point initializer values, causing some testsuite failures.
llvm-svn: 11803
2004-02-24 18:34:10 +00:00
Chris Lattner
8ee0593f0d
Fix a faulty optimization on FP values
...
llvm-svn: 11801
2004-02-24 18:10:14 +00:00
John Criswell
a92e58610d
Fixed minor typos.
...
llvm-svn: 11800
2004-02-24 16:13:56 +00:00
Chris Lattner
90ea78edba
If a block is made dead, make sure to promptly remove it.
...
llvm-svn: 11799
2004-02-24 16:09:21 +00:00
Alkis Evlogimenos
1dd872ce94
Move machine code rewriter and spiller outside the register
...
allocator.
The implementation is completely rewritten and now employs several
optimizations not exercised before. For example for 164.gzip we have
997 loads and 699 stores vs the 1221 loads and 880 stores we have
before.
llvm-svn: 11798
2004-02-24 08:58:30 +00:00
Chris Lattner
a2ab489135
Implement SimplifyCFG/switch_switch_fold.ll
...
This case occurs many times in various benchmarks, especially when combined
with the previous patch. This allows it to get stuff like:
if (X == 4 || X == 3)
if (X == 5 || X == 8)
and
switch (X) {
case 4: case 5: case 6:
if (X == 4 || X == 5)
llvm-svn: 11797
2004-02-24 07:23:58 +00:00
Chris Lattner
fe7a92fe7c
New testcase. Switch instructions that go to switch instructions should be
...
merged.
llvm-svn: 11796
2004-02-24 07:21:09 +00:00
Alkis Evlogimenos
63aea0b6a5
Add predicates for checking if a virtual register has a physical
...
register mapping or a stack slot mapping.
llvm-svn: 11795
2004-02-24 06:30:36 +00:00
Chris Lattner
c7f8ba9f4f
Add some helpful methods for dealing with switch instructions
...
llvm-svn: 11794
2004-02-24 06:26:00 +00:00
Chris Lattner
3cd98f054a
Rearrange code a bit
...
llvm-svn: 11793
2004-02-24 05:54:22 +00:00
Chris Lattner
6f4b45acf5
Implement: test/Regression/Transforms/SimplifyCFG/switch_create.ll
...
This turns code like this:
if (X == 4 | X == 7)
and
if (X != 4 & X != 7)
into switch instructions.
llvm-svn: 11792
2004-02-24 05:38:11 +00:00
Chris Lattner
ae509325d6
The simplifycfg pass should be able to turn stuff like:
...
if (X == 4 || X == 7)
and
if (X != 4 && X != 7)
into switch instructions.
llvm-svn: 11791
2004-02-24 05:34:44 +00:00
Chris Lattner
cf96c6caa5
Wow, the description of the 'switch' instruction was out of date.
...
llvm-svn: 11790
2004-02-24 04:54:45 +00:00
Chris Lattner
9f8bf00ac3
we no longer include boost
...
llvm-svn: 11789
2004-02-24 04:02:20 +00:00
Chris Lattner
291ebdbfcc
Hrm, my find must have been faulty. It didn't remove these as well.
...
llvm-svn: 11788
2004-02-24 03:54:22 +00:00
Chris Lattner
0da4862a80
Boost is now unneeded, thanks to the fix for PR253, contributed by Reid Spencer!
...
llvm-svn: 11787
2004-02-24 03:53:00 +00:00
Chris Lattner
7479e1ebd7
Now that's a new feature!
...
llvm-svn: 11786
2004-02-24 03:50:24 +00:00
Chris Lattner
101e704b0b
Use the new LLVM is_class template instead of the boost one, allowing us to
...
remove our dependency on boost! Thanks to Reid Spencer for making this possible!
llvm-svn: 11785
2004-02-24 03:50:05 +00:00
Chris Lattner
78eed17a29
Check in a new type_traits header which provides the mysterious is_class
...
template. Thanks go out to Reid Spencer for skillfully extracting this
from boost!
llvm-svn: 11784
2004-02-24 03:49:29 +00:00
Chris Lattner
1302e3ac95
Noone cares about similarity to boost
...
llvm-svn: 11783
2004-02-24 03:47:25 +00:00
Alkis Evlogimenos
8b571a64ac
Make enum private as it is an implementation detail.
...
llvm-svn: 11782
2004-02-23 23:49:40 +00:00
Alkis Evlogimenos
ab77b05d8c
Remove '4Virt' from member function names as it is obvious.
...
llvm-svn: 11781
2004-02-23 23:47:10 +00:00
Alkis Evlogimenos
c794a9060f
Refactor VirtRegMap out of RegAllocLinearScan as the first part of bug
...
251 (providing a generic machine code rewriter/spiller).
llvm-svn: 11780
2004-02-23 23:08:11 +00:00
Alkis Evlogimenos
d140e3d4ff
Include Config/config.h for SHLIBEXT.
...
llvm-svn: 11779
2004-02-23 22:42:51 +00:00
Brian Gaeke
686efc0b56
DataTypes.h is now output from configure, and shortened
...
llvm-svn: 11778
2004-02-23 22:07:26 +00:00
Brian Gaeke
090ed13063
Add SUBSTing checks for sys/types.h and inttypes.h; add DataTypes.h to AC_OUTPUT.
...
llvm-svn: 11777
2004-02-23 22:07:01 +00:00
Brian Gaeke
4eea32f37a
Regenerated with autoconf-2.57.
...
llvm-svn: 11776
2004-02-23 22:07:00 +00:00
Chris Lattner
ae739aefd7
Generate much more efficient code in programs like pifft
...
llvm-svn: 11775
2004-02-23 21:46:58 +00:00
Chris Lattner
c40b9d7d51
Fix a small typeo in my checkin last night that broke vortex and other programs :(
...
llvm-svn: 11774
2004-02-23 21:46:42 +00:00
Brian Gaeke
1bc5aaefc6
Regenerated with autoheader-2.57.
...
llvm-svn: 11773
2004-02-23 21:30:39 +00:00
Brian Gaeke
d3de6c0d30
Regenerated with autoconf-2.57.
...
llvm-svn: 11772
2004-02-23 21:30:37 +00:00
Brian Gaeke
01cc3d876f
Change test for pthreads to use AC_SUBST; add ThreadSupport.h as an AC_OUTPUT.
...
llvm-svn: 11771
2004-02-23 21:30:36 +00:00
Brian Gaeke
c685388125
ThreadSupport.h is now output from configure.
...
llvm-svn: 11770
2004-02-23 21:30:29 +00:00
Brian Gaeke
d97a1201c2
Remove check for slist
...
llvm-svn: 11769
2004-02-23 21:12:58 +00:00
Chris Lattner
f5ce254692
Fix InstCombine/2004-02-23-ShiftShiftOverflow.ll
...
Also, turn 'shr int %X, 1234' into 'shr int %X, 31'
llvm-svn: 11768
2004-02-23 20:30:06 +00:00
Chris Lattner
7eaa535d4d
Test for the other way also
...
llvm-svn: 11767
2004-02-23 20:24:16 +00:00
Chris Lattner
1cc1217121
New testcase
...
llvm-svn: 11766
2004-02-23 20:19:51 +00:00
Brian Gaeke
cc7644407c
Renamed to hash_set.in; move to using autoconf substitution tags.
...
llvm-svn: 11765
2004-02-23 18:56:36 +00:00
Brian Gaeke
17d7a29d76
Renamed to hash_map.in; move to using autoconf substitution tags.
...
llvm-svn: 11764
2004-02-23 18:56:35 +00:00
Brian Gaeke
cc2b8b78bf
Add include/Support/hash_map and include/Support/hash_set as AC_OUTPUT files.
...
llvm-svn: 11763
2004-02-23 18:56:05 +00:00
Brian Gaeke
ceb6842293
Regenerated using autoheader-2.57.
...
llvm-svn: 11762
2004-02-23 18:56:04 +00:00
Brian Gaeke
37205b099b
Move HASH_* checks to using AC_SUBST instead of AC_DEFINE. Tighten up some whitespace and comments.
...
llvm-svn: 11761
2004-02-23 18:56:03 +00:00
Brian Gaeke
8588355552
Regenerated using autoconf-2.57.
...
llvm-svn: 11760
2004-02-23 18:56:02 +00:00
Alkis Evlogimenos
52de9e214c
Add number of spilled registers statistic.
...
llvm-svn: 11759
2004-02-23 18:45:32 +00:00
Chris Lattner
91a7dc0a6e
Fix bugs in finegrainification
...
llvm-svn: 11758
2004-02-23 18:40:08 +00:00
Chris Lattner
43df6c268b
Finegrainify namespacification
...
llvm-svn: 11757
2004-02-23 18:38:20 +00:00
Alkis Evlogimenos
b525d54045
Use MachineBasicBlock::getParent().
...
llvm-svn: 11756
2004-02-23 18:36:38 +00:00
Alkis Evlogimenos
d780ce6462
Remove implementation of default constructor as it is useless now.
...
llvm-svn: 11755
2004-02-23 18:28:35 +00:00
Brian Gaeke
0fa55f7909
Renamed from include/Support/iterator. Doxygenify comments; add autoconf substitution tags.
...
llvm-svn: 11754
2004-02-23 18:16:10 +00:00
Brian Gaeke
bd02d1806f
Replaced by include/Support/iterator.in.
...
llvm-svn: 11753
2004-02-23 18:16:10 +00:00
Brian Gaeke
e27fc812ca
Regenerated with autoheader-2.57.
...
llvm-svn: 11752
2004-02-23 18:16:09 +00:00
Brian Gaeke
29bb0e93af
Add include/Support/iterator as an AC_OUTPUT file.
...
llvm-svn: 11751
2004-02-23 18:16:08 +00:00
Brian Gaeke
d4754adbcf
Make all iterator checks use AC_SUBST instead of AC_DEFINE.
...
llvm-svn: 11750
2004-02-23 18:16:07 +00:00
Brian Gaeke
10e9315126
Regenerated with autoconf-2.57.
...
llvm-svn: 11749
2004-02-23 18:16:06 +00:00
Alkis Evlogimenos
af2de4848e
Refactor rewinding code for finding the first terminator of a basic
...
block into MachineBasicBlock::getFirstTerminator().
This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).
llvm-svn: 11748
2004-02-23 18:14:48 +00:00
Chris Lattner
cb185a34bb
Simplify code a bit, don't go off the end of the block, now that the current
...
block we are in might be empty
llvm-svn: 11744
2004-02-23 07:42:19 +00:00
Chris Lattner
4ffd4443ce
We were forgetting to add FP_REG_KILL instructions to basic blocks which will
...
eventually get an assignment due to elimination of PHIs.
llvm-svn: 11743
2004-02-23 07:29:45 +00:00
Chris Lattner
2b55ea38bc
Implement cast.ll::test14/15
...
llvm-svn: 11742
2004-02-23 07:16:20 +00:00
Chris Lattner
be9082a63d
Add tests for casts that should be eliminated
...
llvm-svn: 11741
2004-02-23 07:16:03 +00:00
Chris Lattner
e79e854c5c
Refactor some code. In the mul - setcc folding case, we really care about
...
whether this is the sign bit or not, so check unsigned comparisons as well.
llvm-svn: 11740
2004-02-23 06:38:22 +00:00
Chris Lattner
6ddaa24dd9
Handle the unsigned form as well
...
llvm-svn: 11739
2004-02-23 06:37:33 +00:00
Alkis Evlogimenos
f83cb74b57
Improved PhysRegTracker interface. RegAlloc lazily allocates the register tracker using a std::auto_ptr
...
llvm-svn: 11738
2004-02-23 06:10:13 +00:00
Chris Lattner
c8a10c4b6a
Implement mul.ll:test11
...
llvm-svn: 11737
2004-02-23 06:00:11 +00:00
Chris Lattner
fb302df02c
Add a slight variant of test10
...
llvm-svn: 11736
2004-02-23 05:59:52 +00:00
Chris Lattner
59611149ee
Implement "strength reduction" of X <= C and X >= C
...
llvm-svn: 11735
2004-02-23 05:47:48 +00:00
Chris Lattner
2635b52d4e
Implement InstCombine/mul.ll:test10, which is a case that occurs when dealing
...
with "predication"
llvm-svn: 11734
2004-02-23 05:39:21 +00:00
Chris Lattner
d0ffbe1cbe
This multiply can be eliminated
...
llvm-svn: 11733
2004-02-23 05:38:47 +00:00
Alkis Evlogimenos
c31ff795d5
Simplify iterator usage now that we have next(). Also don't pass iterators by reference now that MachineInstr* are in an ilist
...
llvm-svn: 11732
2004-02-23 04:12:30 +00:00
Chris Lattner
e0f79a6a55
Update the 'new features' section
...
llvm-svn: 11731
2004-02-23 03:51:34 +00:00
Chris Lattner
c6acc1076e
Bug fixed
...
llvm-svn: 11730
2004-02-23 03:36:36 +00:00
Chris Lattner
abb9162999
Work around a gas bug. Print '-9223372036854775808' as unsigned.
...
llvm-svn: 11729
2004-02-23 03:27:05 +00:00
Chris Lattner
7e90628a8a
Implement cast fp -> bool
...
llvm-svn: 11728
2004-02-23 03:21:41 +00:00
Chris Lattner
d31caa438a
Add testcase for the casts that are missing in PR249
...
llvm-svn: 11727
2004-02-23 03:21:09 +00:00
Chris Lattner
6590c29971
Stop passing iterators around by reference now that we have ilists!
...
Implement cast Type::ULongTy -> double
llvm-svn: 11726
2004-02-23 03:10:10 +00:00
Alkis Evlogimenos
887b941fbb
Some code cleanups from Chris
...
llvm-svn: 11724
2004-02-23 01:57:39 +00:00
Alkis Evlogimenos
d42c2f24ec
Fix comments in PhysRegTracker and rename isPhysRegAvail to isRegAvail to be consistent with the other two
...
llvm-svn: 11723
2004-02-23 01:25:05 +00:00
Chris Lattner
378157c3d7
Add a new cmove instruction
...
llvm-svn: 11722
2004-02-23 01:16:05 +00:00
Alkis Evlogimenos
4d7ad6713d
Move LiveIntervals.h up to be the first included header
...
llvm-svn: 11721
2004-02-23 01:01:21 +00:00
Alkis Evlogimenos
1410859484
Pull PhysRegTracker out of RegAllocLinearScan as it can be used by other allocators as well
...
llvm-svn: 11720
2004-02-23 00:53:31 +00:00
Alkis Evlogimenos
486b12b71a
Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts of the compiler
...
llvm-svn: 11719
2004-02-23 00:50:15 +00:00
Chris Lattner
cdd56634b0
Only insert FP_REG_KILL instructions in MachineBasicBlocks that actually
...
use FP instructions. This reduces the number of instructions inserted in
176.gcc (for example) from 58074 to 101 (it doesn't use much FP, which
is typical). This reduction speeds up the entire code generator. In the
case of 176.gcc, llc went from taking 31.38s to 24.78s. The passes that
sped up the most are the register allocator and the 2 live variable analysis
passes, which sped up 2.3, 1.3, and 1.5s respectively. The asmprinter
pass also sped up because it doesn't print the instructions in comments :)
Note that this patch is likely to expose latent bugs in machine code passes,
because now basicblock can be empty, where they were never empty before. I
cleaned out regalloclocal, but who knows about linscan :)
llvm-svn: 11717
2004-02-22 19:47:26 +00:00
Chris Lattner
19aef9e757
Another bug fix for empty MBB's
...
llvm-svn: 11716
2004-02-22 19:37:31 +00:00
Alkis Evlogimenos
8358cc573d
Move MOTy::UseType enum into MachineOperand. This eliminates the
...
switch statements in the constructors and simplifies the
implementation of the getUseType() member function. You will have to
specify defs using MachineOperand::Def instead of MOTy::Def though
(similarly for Use and UseAndDef).
llvm-svn: 11715
2004-02-22 19:23:26 +00:00
Chris Lattner
84b406650e
Fix a bug where we were implicitly assuming that there would be at least
...
one terminator instruction in each basic block.
llvm-svn: 11714
2004-02-22 19:08:15 +00:00
Chris Lattner
fae7564027
Reduce the number of pointless copies inserted due to constant pointer refs.
...
Also, make an assertion actually fireable!
llvm-svn: 11713
2004-02-22 17:35:42 +00:00
Chris Lattner
fa3ebd6ad5
Fix bug in previous checkout: leave the iterator at the first instruction
...
AFTER the GEP that was emitted. :(
llvm-svn: 11712
2004-02-22 17:05:38 +00:00
Alkis Evlogimenos
cb243ab173
Fix silly bug in implementation of getUseType(). Thanks Misha.
...
llvm-svn: 11711
2004-02-22 07:24:19 +00:00
Chris Lattner
6536519f6e
Completely rewrite how getelementptr instructions are expanded. This has two
...
(minor) benefits right now:
1. An extra dummy MOVrr32 is gone. This move would often be coallesced by
both allocators anyway.
2. The code now uses the gep_type_iterator to walk the gep, which should future
proof it a bit. It still assumes that array indexes are Longs though.
These don't really justify rewriting the code. The big benefit will come later
though.
llvm-svn: 11710
2004-02-22 07:04:00 +00:00
Alkis Evlogimenos
de51c65299
When folding memory operands in machine instructions be careful to
...
leave register operands with the same use/def flags as the original
instruction.
llvm-svn: 11709
2004-02-22 06:54:26 +00:00
Chris Lattner
d25dfe43b9
Significantly simplify gep_type_iterator, and make its interface more general/powerful
...
llvm-svn: 11708
2004-02-22 06:27:03 +00:00
Chris Lattner
494d510769
Fix a soon-to-be-missing #include
...
llvm-svn: 11707
2004-02-22 06:26:17 +00:00
Chris Lattner
a9eddae213
Get all instruction definitions
...
llvm-svn: 11706
2004-02-22 06:25:38 +00:00
Chris Lattner
5fc6ae2baf
Wow this is out of date. When we have _real_ code generator documentation,
...
this should be folded into it.
llvm-svn: 11705
2004-02-22 05:53:54 +00:00
Alkis Evlogimenos
cb352300c9
Print basic block boundaries in machine instruction debug output.
...
llvm-svn: 11704
2004-02-22 05:46:04 +00:00
Chris Lattner
132f6bb60f
Link to most recent "LLVM document"
...
llvm-svn: 11703
2004-02-22 05:45:02 +00:00
Chris Lattner
8d0bacbb9e
Implement Transforms/InstCombine/cast.ll:test13, a case which occurs in a
...
hot 164.gzip loop.
llvm-svn: 11702
2004-02-22 05:25:17 +00:00
Chris Lattner
9c08d09de6
Test that the instruction combiner can fold away a cast in a GEP instruction.
...
This occurs in 164.gzip, as a result of it declaring arrays extern.
llvm-svn: 11701
2004-02-22 05:24:09 +00:00
Chris Lattner
87d72eb23f
The two address pass cannot handle two addr instructions where one incoming
...
value is a physreg and one is a virtreg. For this reason, disable copy folding
entirely for physregs. Also, use the new isMoveInstr target hook which gives us
folding of FP moves as well.
llvm-svn: 11700
2004-02-22 04:44:58 +00:00
Alkis Evlogimenos
d890f59f19
Abstract merging of ranges away from number of slots per instruction.
...
Also make it less aggressive as the current implementation breaks in
some cases.
llvm-svn: 11696
2004-02-22 04:05:13 +00:00
Chris Lattner
a376aae246
Use isNull instead of getNode() to test for existence of a node, this is cheaper.
...
FIX MAJOR BUG, whereby we didn't merge null edges correctly. Correcting this
fixes poolallocation on 175.vpr, and possibly others.
llvm-svn: 11695
2004-02-22 00:53:54 +00:00
Chris Lattner
f3e2a6360c
Fix an iterator invalidation problem which was causing some nodes to not be
...
correctly merged over!
llvm-svn: 11693
2004-02-21 22:28:26 +00:00
Chris Lattner
eeb69197bf
Use handy method
...
llvm-svn: 11692
2004-02-21 22:27:31 +00:00
Chris Lattner
6983f46792
Update comments and add warning
...
llvm-svn: 11691
2004-02-21 22:27:20 +00:00
Misha Brukman
0025f1b044
`cat' is usually in /bin, not /usr/bin, at least on our systems.
...
llvm-svn: 11690
2004-02-21 21:51:41 +00:00
Chris Lattner
375e3a1d4a
When printing a stack trace, demangle it if possible. Since we are potentially
...
in a signal handler, allocating memory or doing other unsafe things is bad,
which means we should do it in a different process.
llvm-svn: 11689
2004-02-21 21:06:19 +00:00
Alkis Evlogimenos
334114bdf1
Make 'fold' statistic's description the same in both allocators.
...
llvm-svn: 11687
2004-02-21 18:07:33 +00:00
Chris Lattner
ab66f3d143
Instead of cloning the globals for main into the globals graph at the end of
...
BU propagation, clone the globals into the GG of EACH FUNCTION that finishes
processing! The GlobalsGraph *must* include all globals and effects from
all functions in the program. Fixing this makes pool allocation work better
on 175.vpr, but it still ultimately crashes.
llvm-svn: 11686
2004-02-21 00:30:28 +00:00
Chris Lattner
6a4e39677e
There is no need to merge the globals graph into the function graphs at the
...
end of the BU and CBU passes. The globals will be marked incomplete, so it
doesn't matter if they are missing some info, and merging isn't guaranteed
to bring everything in anyway!
llvm-svn: 11684
2004-02-20 23:52:15 +00:00
Chris Lattner
7b0368ee16
Add two missing returns, which caused us to be very pessimistic about the
...
printf and scanf families!
llvm-svn: 11683
2004-02-20 23:27:09 +00:00
Chris Lattner
418b3a0f20
new testcase
...
llvm-svn: 11682
2004-02-20 23:05:43 +00:00
John Criswell
4a5b21523e
Added the POVRAY_ROOT to locate Povray.
...
llvm-svn: 11681
2004-02-20 22:30:46 +00:00
John Criswell
acbd6572fd
Added an option for configuring Povray. By default, it should find my local
...
installation of Povray (and not do anything for people who don't have it).
llvm-svn: 11680
2004-02-20 22:30:22 +00:00
John Criswell
81c8f2c42a
Build an archive for use with Povray.
...
llvm-svn: 11678
2004-02-20 21:26:46 +00:00
Alkis Evlogimenos
6ad63f8da2
Some more statistics improvements.
...
llvm-svn: 11676
2004-02-20 20:53:26 +00:00
Alkis Evlogimenos
71751de25c
Disambiguate statistic descriptions.
...
llvm-svn: 11675
2004-02-20 20:46:49 +00:00
Alkis Evlogimenos
f3e77fb7a7
Rename statistic and add another one.
...
llvm-svn: 11674
2004-02-20 20:43:08 +00:00
Chris Lattner
a061c3b25b
Add support for some string functions, the scanf family, and sprintf
...
llvm-svn: 11673
2004-02-20 20:27:11 +00:00
Chris Lattner
33f9071aae
Add a simple implementation of strncpy
...
llvm-svn: 11672
2004-02-20 20:15:47 +00:00
Chris Lattner
bc7a60ffe5
New testcase, do not emit a call to __builtin_sqrt, emit a call to sqrt instead!
...
llvm-svn: 11668
2004-02-20 19:08:12 +00:00
Chris Lattner
bd086418ed
Bug fixed
...
llvm-svn: 11662
2004-02-20 17:41:35 +00:00
Chris Lattner
40a22000e4
PR244: [llvm-gcc] miscompilation when a function is re-declared as static
...
llvm-svn: 11661
2004-02-20 17:32:24 +00:00
Brian Gaeke
efe8a37506
Add checks for <execinfo.h> and backtrace().
...
llvm-svn: 11660
2004-02-20 06:41:59 +00:00
Alkis Evlogimenos
22de21ea80
Fix crash in debug output.
...
llvm-svn: 11659
2004-02-20 06:41:12 +00:00
Brian Gaeke
99983d569e
Use backtrace() and include execinfo.h, if they were detected by autoconf.
...
llvm-svn: 11658
2004-02-20 06:40:59 +00:00
Brian Gaeke
3056626e7b
Regenerated using autoheader-2.57.
...
llvm-svn: 11657
2004-02-20 06:40:58 +00:00
Brian Gaeke
6afc698fe9
Regenerated using autoconf-2.57.
...
llvm-svn: 11656
2004-02-20 06:40:57 +00:00
Alkis Evlogimenos
bcc99a83ee
Fix instruction numbering in debug output.
...
llvm-svn: 11655
2004-02-20 06:29:51 +00:00
Alkis Evlogimenos
76eca062ea
Too many changes in one commit:
...
1. LiveIntervals now implement a 4 slot per instruction model. Load,
Use, Def and a Store slot. This is required in order to correctly
represent caller saved register clobbering on function calls,
register reuse in the same instruction (def resues last use) and
also spill code added later by the allocator. The previous
representation (2 slots per instruction) was insufficient and as a
result was causing subtle bugs.
2. Fixes in spill code generation. This was the major cause of
failures in the test suite.
3. Linear scan now has core support for folding memory operands. This
is untested and not enabled (the live interval update function does
not attempt to fold loads/stores in instructions).
4. Lots of improvements in the debugging output of both live intervals
and linear scan. Give it a try... it is beautiful :-)
In summary the above fixes all the issues with the recent reserved
register elimination changes and get the allocator very close to the
next big step: folding memory operands.
llvm-svn: 11654
2004-02-20 06:15:40 +00:00
Chris Lattner
3aee2f04d9
If bugpoint can't match the reference output, at LEAST provide the output
...
we can get.
llvm-svn: 11653
2004-02-20 06:12:58 +00:00
Chris Lattner
f44220efcf
Wild and passionate uncontrolled goose chases are amusing to watch, but not
...
very helpful. Let bugpoint favor being helpful instead of determined.
llvm-svn: 11652
2004-02-20 05:58:58 +00:00
Chris Lattner
f98cc27056
Format a bit more nicely
...
llvm-svn: 11651
2004-02-20 05:56:48 +00:00
Chris Lattner
73ffc88a8b
It is totally unacceptable to print out (literally) millions of zeros when
...
compiling 129.compress... so don't!
llvm-svn: 11649
2004-02-20 05:49:22 +00:00
Chris Lattner
74b387dea1
Add strndup
...
llvm-svn: 11638
2004-02-19 21:44:41 +00:00
Chris Lattner
a7350c53d2
Add a method useful for updating DSA
...
llvm-svn: 11636
2004-02-19 21:27:50 +00:00
Chris Lattner
79b88a7590
Disable the stack trace thing until we can get an autoconf test for it. This
...
call breaks on sparcs
llvm-svn: 11635
2004-02-19 21:21:23 +00:00
Chris Lattner
56bfdecbdf
Make sure to print a stack trace whenever an error signal is delivered
...
to the tool.
llvm-svn: 11634
2004-02-19 20:33:00 +00:00
Chris Lattner
69e896bdcf
Make sure to print a stack trace whenever an error signal is delivered to
...
the tool.
llvm-svn: 11633
2004-02-19 20:32:39 +00:00
Chris Lattner
12439ffbac
Make sure to print a stack trace whenever an error signal is delivered to the
...
tool.
llvm-svn: 11632
2004-02-19 20:32:12 +00:00
Chris Lattner
b0bedfa4b2
Implement new function
...
llvm-svn: 11631
2004-02-19 20:03:14 +00:00
Chris Lattner
c62ce162ff
Add a new function
...
llvm-svn: 11630
2004-02-19 20:03:08 +00:00
Alkis Evlogimenos
3cf546037e
Fix RA::verifyAssignment()
...
llvm-svn: 11629
2004-02-19 19:24:17 +00:00
Chris Lattner
f5c5e1f458
Fix problem fusing spill code into instructions: we didn't update the live
...
variable information to take into account the change of instruction
address.
llvm-svn: 11628
2004-02-19 18:34:02 +00:00
Chris Lattner
4c988391e1
Fix an iterator invalidation problem. :(
...
llvm-svn: 11627
2004-02-19 18:32:29 +00:00
Chris Lattner
bef87a990a
ADd a method for when an instruction moves
...
llvm-svn: 11626
2004-02-19 18:28:22 +00:00
Chris Lattner
afa9d7eb85
Add method to update livevar when an instruction moves
...
llvm-svn: 11625
2004-02-19 18:28:02 +00:00
Chris Lattner
5e9868a77b
Be a bit more robust. Explicitly check for a code generator crash.
...
llvm-svn: 11624
2004-02-19 17:03:49 +00:00
Chris Lattner
63f41abfe6
Fix a __LONG__ term annoyance of mine: symbolic registers weren't being printed
...
by operator<< on MachineInstr's, and looking up what register "24" is all of the
time was greatly annoying.
llvm-svn: 11623
2004-02-19 16:17:08 +00:00
Chris Lattner
d23a882f2f
Add a MachineBasicBlock::getParent() method
...
llvm-svn: 11622
2004-02-19 16:13:54 +00:00
Alkis Evlogimenos
3562c2dd9f
Make ToolExecutionError inherit std::exception and implement its
...
interface: getMessage() is gone, use what() instead.
llvm-svn: 11621
2004-02-19 07:39:26 +00:00
Alkis Evlogimenos
c94edd6cde
Print stacktrace in STDERR before dying on a fatal signal. Currently
...
the symbols are not demangled.
llvm-svn: 11620
2004-02-19 07:36:35 +00:00
Alkis Evlogimenos
d0a60b71fc
Rename reloads/spills to loads/stores.
...
llvm-svn: 11619
2004-02-19 06:19:09 +00:00
Alkis Evlogimenos
28b0468785
This is needed by assignment verification in linear-scan.
...
llvm-svn: 11618
2004-02-19 01:10:55 +00:00
Chris Lattner
94b2bfb447
Fix the "horribly N^2'd" problem when deleting individual instructions.
...
llvm-svn: 11617
2004-02-18 23:59:11 +00:00
Chris Lattner
5f015c709c
Document the code generator debugger.
...
llvm-svn: 11616
2004-02-18 23:30:21 +00:00
Chris Lattner
4d885d9dcc
document the -march=c option
...
llvm-svn: 11615
2004-02-18 23:30:02 +00:00
Chris Lattner
8bda4c4901
* Predicate the optimizer crash debugger on a function.
...
* Implement a new code generator crash debugger which uses this predicate
llvm-svn: 11614
2004-02-18 23:26:28 +00:00
Chris Lattner
96d41dd438
Add a new method for use by the code generator crash debugger.
...
llvm-svn: 11613
2004-02-18 23:25:22 +00:00
Chris Lattner
36d48a3728
Don't crash if there are no passes in the PassesToRun list
...
llvm-svn: 11612
2004-02-18 23:24:56 +00:00
Chris Lattner
8d05ebc2f9
Add support for just running the code generator
...
llvm-svn: 11611
2004-02-18 23:24:41 +00:00
Chris Lattner
5e76384093
Add support for just compiling a program
...
llvm-svn: 11610
2004-02-18 23:24:29 +00:00
Alkis Evlogimenos
b490a12501
Implement assignment correctness verification.
...
llvm-svn: 11609
2004-02-18 23:15:23 +00:00
Alkis Evlogimenos
671f1c87df
Move unused typedefs in private section. Add method to return interval
...
given a register.
llvm-svn: 11608
2004-02-18 23:14:52 +00:00
Chris Lattner
1f80a927d4
Make the executeProgram method exception safe, not leaving around bytecode
...
files.
llvm-svn: 11607
2004-02-18 22:01:21 +00:00
Chris Lattner
b943b6b019
Make more stuff public. Make the instruction argument to
...
deleteInstructionFromProgram be const
llvm-svn: 11606
2004-02-18 21:50:26 +00:00
Chris Lattner
2fd76cfb69
make a bunch of methods public
...
llvm-svn: 11605
2004-02-18 21:35:28 +00:00
Chris Lattner
1942f98d80
A couple of minor cleanups: don't forward declare private classes, put private
...
classes in an anon namespace
llvm-svn: 11604
2004-02-18 21:29:46 +00:00
Chris Lattner
327019b495
Cleanup and simplify manipulation of the program, eliminate the need for so
...
many 'friends' of bugdriver.
llvm-svn: 11603
2004-02-18 21:24:48 +00:00
Chris Lattner
ead1dff00b
Add a stub for debugging code generator crashes
...
llvm-svn: 11602
2004-02-18 21:02:04 +00:00
Chris Lattner
03d993b265
indent correctly
...
llvm-svn: 11601
2004-02-18 20:58:00 +00:00
Chris Lattner
abcd97dcd8
Don't yell. BUGPOINT should yell, not the tool runner :)
...
llvm-svn: 11600
2004-02-18 20:57:38 +00:00
Chris Lattner
898de4a158
Update comments, if we are running with the CBE, make sure the Interpreter
...
variable and the CBE variable are pointer equal.
llvm-svn: 11599
2004-02-18 20:52:02 +00:00
Chris Lattner
3c10196aab
Byebye method
...
llvm-svn: 11598
2004-02-18 20:38:12 +00:00
Chris Lattner
3163a98492
If there is an error running a tool, include the error message (e.g. assertion failure) in the exception
...
llvm-svn: 11597
2004-02-18 20:38:00 +00:00
Chris Lattner
d8f6fbb690
Add a label for the bump when we started counting llvm/projects
...
llvm-svn: 11596
2004-02-18 20:27:06 +00:00
Chris Lattner
61dc9419e0
ctor arguments changed order
...
llvm-svn: 11595
2004-02-18 20:22:25 +00:00
Chris Lattner
947143df0e
Catch exception and print message as appropriate
...
llvm-svn: 11594
2004-02-18 20:22:11 +00:00
Chris Lattner
08180ecfcf
When an error occurs executing a tool, we now throw an exception instead
...
of calling exit(1).
llvm-svn: 11593
2004-02-18 20:21:57 +00:00
Chris Lattner
cc09204840
Change the order of the arguments to the ctor, allowing us to make the boolean default to true
...
llvm-svn: 11592
2004-02-18 20:20:52 +00:00
John Criswell
d504600b5f
Pre-emptive commit of cfrac license information.
...
llvm-svn: 11588
2004-02-18 20:00:05 +00:00
Chris Lattner
eb89dbada8
Bugpoint will be throwing exceptions soon, perpare for the worst.
...
llvm-svn: 11584
2004-02-18 17:32:54 +00:00
Chris Lattner
d69c7bdc74
This class got moved to FileUtilities.h
...
llvm-svn: 11583
2004-02-18 17:17:10 +00:00
Chris Lattner
2bcf9410de
Move a helper class out of bugpoint to here.
...
llvm-svn: 11582
2004-02-18 17:16:17 +00:00
Chris Lattner
7f059ebd78
Extract has new options
...
llvm-svn: 11581
2004-02-18 16:55:29 +00:00
Chris Lattner
3b203f56bc
Give extract -o and -f options, just like every other tool!
...
llvm-svn: 11580
2004-02-18 16:53:59 +00:00
Chris Lattner
ab920f2dc7
eliminate a pair of really inefficient methods now that noone uses them
...
llvm-svn: 11579
2004-02-18 16:45:22 +00:00
Chris Lattner
83398e5574
Eliminate operator[] is deprecated warnings
...
llvm-svn: 11578
2004-02-18 16:43:51 +00:00
Chris Lattner
e99a833c20
Fix deprecated operator[] warnings
...
llvm-svn: 11577
2004-02-18 16:38:18 +00:00
Alkis Evlogimenos
6401b22fc2
Fix argument size for MOVSX and MOVZX instructions.
...
llvm-svn: 11576
2004-02-18 16:20:40 +00:00
Alkis Evlogimenos
7bef0eafc0
Be more agressive when joining ranges.
...
llvm-svn: 11575
2004-02-18 04:38:37 +00:00
Alkis Evlogimenos
739e5e33d7
Fix overly conservative spill interval computation.
...
llvm-svn: 11574
2004-02-18 03:35:38 +00:00
Alkis Evlogimenos
26583db8b6
Beautify debug output.
...
llvm-svn: 11573
2004-02-18 00:35:06 +00:00
John Criswell
30f7be686e
Added the Malloc perl benchmark license information.
...
Corrected the GhostScript license information.
llvm-svn: 11571
2004-02-17 22:58:41 +00:00
Chris Lattner
be1c300a0f
Bug fixed
...
llvm-svn: 11567
2004-02-17 22:00:39 +00:00
Chris Lattner
c8cc3d510a
New testcase for PR245
...
llvm-svn: 11566
2004-02-17 21:58:29 +00:00
Chris Lattner
693e393fee
Fix PR245: Linking weak and strong global variables is dependent on link order
...
llvm-svn: 11565
2004-02-17 21:56:04 +00:00
Chris Lattner
2a6802ff41
When we complete the bottom-up pass, make sure to merge the globals in 'main' into
...
the globals graph.
llvm-svn: 11562
2004-02-17 19:06:47 +00:00
Chris Lattner
2b6d3c87a8
Since tail duplication is currently neutered, we have to help the optimizer to remove the overhead of __main
...
llvm-svn: 11561
2004-02-17 18:45:06 +00:00
Chris Lattner
30e73e3442
Add support for GlobalAddress's for alkis
...
llvm-svn: 11560
2004-02-17 18:23:55 +00:00
Alkis Evlogimenos
47ea17a852
These store to memory too.
...
llvm-svn: 11558
2004-02-17 17:53:48 +00:00
Chris Lattner
3d894dd3ab
Remove the -disable-kill option. The register allocator is buggy with it,
...
and it was only for debugging in the first place.
llvm-svn: 11557
2004-02-17 17:49:10 +00:00
Chris Lattner
49794be442
These store to memory, not read from it.
...
llvm-svn: 11556
2004-02-17 17:46:50 +00:00
John Criswell
3839e8e9df
Added espresso.
...
llvm-svn: 11555
2004-02-17 17:07:52 +00:00
Alkis Evlogimenos
cf7b9392ea
Instructiosn with 1 memory operand have 4 operands in our
...
representation.. duh!
llvm-svn: 11554
2004-02-17 15:58:13 +00:00
Alkis Evlogimenos
f90da5f346
Align case statements.
...
llvm-svn: 11552
2004-02-17 15:50:41 +00:00
Alkis Evlogimenos
546513ccfd
Add TEST and XCHG memory operand support.
...
llvm-svn: 11550
2004-02-17 15:48:42 +00:00
Alkis Evlogimenos
f08064b714
Add OR and XOR memory operand support.
...
llvm-svn: 11549
2004-02-17 15:33:14 +00:00
Alkis Evlogimenos
65a5ee86ba
Peephole optimize SUBmi{16,32} into SUBmi{16,32}b when immediate is 8
...
bits wide.
llvm-svn: 11548
2004-02-17 15:14:29 +00:00
Alkis Evlogimenos
e9583082a6
ADDmi{16,32} should be in the next case statement.
...
llvm-svn: 11547
2004-02-17 15:10:11 +00:00
Alkis Evlogimenos
e5585328d8
Add memory operand folding support for MUL, DIV, IDIV, NEG, NOT,
...
MOVSX, and MOVZX.
llvm-svn: 11546
2004-02-17 09:14:23 +00:00
Alkis Evlogimenos
93398df103
Add memory operand folding for CMP{rm,mr,mi}{8,16,32}, INCm{8,16,32}
...
and DECm{8,16,32} instructions.
llvm-svn: 11545
2004-02-17 08:49:20 +00:00
Alkis Evlogimenos
574c7c9ce9
Add CMP{rm,mr,mi}{8,16,32}, INCm{8,16,32} and DECm{8,16,32} instructions.
...
llvm-svn: 11544
2004-02-17 08:49:00 +00:00
Alkis Evlogimenos
d5ce14ddd1
Add SUB{rm,mr,mi}{8,16,32} instructions.
...
llvm-svn: 11543
2004-02-17 08:17:40 +00:00
Chris Lattner
4e21b2352c
Add support to the local allocator for fusing spill code into the instructions
...
that need them. This is very useful on CISCy targets like the X86 because it
reduces the total spill pressure, and makes better use of it's (large)
instruction set. Though the X86 backend doesn't know how to rewrite many
instructions yet, this already makes a substantial difference on 176.gcc for
example:
Before:
Time:
8.0099 ( 31.2%) 0.0100 ( 12.5%) 8.0199 ( 31.2%) 7.7186 ( 30.0%) Local Register Allocator
Code quality:
734559 asm-printer - Number of machine instrs printed
111395 ra-local - Number of registers reloaded
79902 ra-local - Number of registers spilled
231554 x86-peephole - Number of peephole optimization performed
After:
Time:
7.8700 ( 30.6%) 0.0099 ( 19.9%) 7.8800 ( 30.6%) 7.7892 ( 30.2%) Local Register Allocator
Code quality:
733083 asm-printer - Number of machine instrs printed
2379 ra-local - Number of reloads fused into instructions
109046 ra-local - Number of registers reloaded
79881 ra-local - Number of registers spilled
230658 x86-peephole - Number of peephole optimization performed
So by fusing 2300 instructions, we reduced the static number of instructions
by 1500, and reduces the number of peepholes (and thus the work) by about 900.
This also clearly reduces the number of reload/spill instructions that are
emitted.
llvm-svn: 11542
2004-02-17 08:09:40 +00:00
Alkis Evlogimenos
7f615d7e9a
Add support for folding memory operands for ADC, SBB and SUB instructions.
...
llvm-svn: 11541
2004-02-17 08:08:51 +00:00
Alkis Evlogimenos
b591e5de31
Add support for ADC{rm.mr}32 and SBB{rm,mr}32.
...
llvm-svn: 11540
2004-02-17 08:06:31 +00:00
Chris Lattner
7ef6d2fd0e
Add a (hidden) option to print instructions that fail to fuse. It's looking
...
like compares and test's would be the next huge win...
llvm-svn: 11539
2004-02-17 08:03:47 +00:00
Alkis Evlogimenos
6974f4758a
Add support for folding memory operands in MOVri{8,16,32} instructions.
...
llvm-svn: 11538
2004-02-17 07:47:20 +00:00
Chris Lattner
c07eeaef6b
Expand the repertoire of the forms we can print and encode.
...
llvm-svn: 11537
2004-02-17 07:40:44 +00:00
Chris Lattner
a9363fda17
Disable this peephole for now. We can't keep track of the fact that the immediate is 8 bits,
...
but the memory reference is full sized.
llvm-svn: 11536
2004-02-17 07:36:32 +00:00
Chris Lattner
d1289d0fcd
Fix a bug in my previous refactoring change... arg!
...
llvm-svn: 11535
2004-02-17 07:02:17 +00:00
Chris Lattner
6e540af8f7
The CBE is now in llc, not llvm-dis
...
llvm-svn: 11534
2004-02-17 06:40:51 +00:00
Chris Lattner
70d42f6765
The C backend is no longer in llvm-dis, it's in llc
...
llvm-svn: 11533
2004-02-17 06:40:06 +00:00
Chris Lattner
9093e9b2a1
The CBE is no longer in llvm-dis
...
llvm-svn: 11532
2004-02-17 06:39:48 +00:00
Chris Lattner
ca8f1c2716
Add an option to disable spill fusing in the X86 backend
...
llvm-svn: 11531
2004-02-17 06:30:34 +00:00
Chris Lattner
3abcdf3b90
Fix the mneumonics for the mov instructions to have the source and destination
...
order in the correct sense!! Arg!
llvm-svn: 11530
2004-02-17 06:28:19 +00:00
Chris Lattner
ebd90733b0
Fix the last crimes against nature that used the 'ir' ordering to use the
...
'ri' ordering instead... no it's not possible to store a register into an
immediate!
llvm-svn: 11529
2004-02-17 06:24:02 +00:00
Chris Lattner
9990476875
GRRR. Move instructions have swapped the order of the r/m operands.
...
llvm-svn: 11528
2004-02-17 06:20:20 +00:00
Chris Lattner
288e043e1b
Rename MOVi[mr] instructions to MOV[rm]i
...
llvm-svn: 11527
2004-02-17 06:16:44 +00:00
Chris Lattner
4c241855e6
Whoops, got my cases swapped.
...
llvm-svn: 11526
2004-02-17 06:02:15 +00:00
Chris Lattner
01dded2e69
Change to match the newer, simpler, interface
...
llvm-svn: 11525
2004-02-17 05:54:57 +00:00
Chris Lattner
1e70deff78
Simplify and document the new interface
...
llvm-svn: 11524
2004-02-17 05:54:26 +00:00
Chris Lattner
ba30c776a6
Add support for folding memory operands into AND and IMUL's
...
llvm-svn: 11523
2004-02-17 05:46:06 +00:00
Chris Lattner
8d6eebf0d7
Scrunchify code, by adding helpers. No functionality changes.
...
llvm-svn: 11522
2004-02-17 05:35:13 +00:00
Chris Lattner
c9586411cf
Add mem forms of AND instructions
...
llvm-svn: 11521
2004-02-17 05:25:50 +00:00
Alkis Evlogimenos
4d5f42f58f
Add LiveIntervals::Interval::empty() member function.
...
llvm-svn: 11520
2004-02-17 05:14:37 +00:00
Alkis Evlogimenos
cde4ade314
Add API to check and fold memory operands into instructions.
...
llvm-svn: 11519
2004-02-17 04:33:18 +00:00
Chris Lattner
818bcec247
Rename the IMULri* instructions to IMULrri, as they are actually three address
...
instructions. Add forms of these instructions that read from memory
llvm-svn: 11518
2004-02-17 04:26:43 +00:00
Chris Lattner
ba9e3e2fb1
Once we have a way to fold spill code reloads into instructions, we have a way to use it. :)
...
llvm-svn: 11517
2004-02-17 04:08:37 +00:00
Alkis Evlogimenos
4f7c2d9e5e
Fix spilled interval update. It was too conservative.
...
llvm-svn: 11516
2004-02-17 04:04:20 +00:00
Chris Lattner
ddedac59fe
Refactor code a bit. No functionality changes, though the comment hints at things to come.
...
llvm-svn: 11515
2004-02-17 03:57:19 +00:00
Chris Lattner
ecc7d6e27a
Adjust to recent changes
...
llvm-svn: 11514
2004-02-17 03:03:47 +00:00
Chris Lattner
946e46596f
Add two missing pieces from last checkin
...
llvm-svn: 11513
2004-02-17 03:03:36 +00:00
Chris Lattner
c14686440f
Rearrange code to eliminate warnings
...
llvm-svn: 11512
2004-02-17 02:58:36 +00:00
Alkis Evlogimenos
a5ef4a5da7
Add peephole optimizations for ADD [MEM], IMM8 instructions.
...
llvm-svn: 11511
2004-02-16 23:50:18 +00:00
Alkis Evlogimenos
f6ce2e313a
Add two more variants of add. Update comments.
...
llvm-svn: 11510
2004-02-16 23:48:42 +00:00
John Criswell
6d66a493e6
Preemptive additions for the MallocBench tests.
...
llvm-svn: 11507
2004-02-16 23:32:26 +00:00
Chris Lattner
0cb8855a1c
Only spit out warning for functions that take pointers, not for sin and the like
...
Add more special case handling for stdio functions. I feel dirty, how about you?
llvm-svn: 11506
2004-02-16 22:57:19 +00:00
Chris Lattner
04b60fe5ad
Move the folding of gep null, 0, 0, 0 to a place where it can be shared and
...
enjoyed by all, fixing a fixme. Add an assert
llvm-svn: 11505
2004-02-16 20:46:13 +00:00
Misha Brukman
4dd7a7245f
PreSelection isn't optional and so there's no way to turn it off.
...
llvm-svn: 11504
2004-02-16 19:45:26 +00:00
Chris Lattner
cedfcf5bca
memset and bcopy and now unified by the llvm.memset intrinsic
...
llvm-svn: 11503
2004-02-16 18:37:40 +00:00
Chris Lattner
544c9781db
Add some ADD instructions that take memory operands for Alkis
...
llvm-svn: 11502
2004-02-16 18:19:31 +00:00
John Criswell
62c832c68c
Adjusted the default pathname to the SPEC95 benchmarks. The new directory
...
has source code corrections and some input files pre-filtered for use
with the LLVM test suite.
llvm-svn: 11498
2004-02-16 14:55:18 +00:00
Alkis Evlogimenos
14f3fe81c6
Add LeakDetection to MachineInstr.
...
Move out of line member functions of MachineBasicBlock to
MachineBasicBlock.cpp.
llvm-svn: 11497
2004-02-16 07:17:43 +00:00
Chris Lattner
e42732e75f
Implement test/Regression/Transforms/SimplifyCFG/UncondBranchToReturn.ll,
...
see the testcase for the reasoning.
llvm-svn: 11496
2004-02-16 06:35:48 +00:00
Chris Lattner
58d4db3f27
New testcase, details in the comments
...
llvm-svn: 11495
2004-02-16 06:35:19 +00:00
Chris Lattner
4db2d22bea
Fold PHI nodes of constants which are only used by a single cast. This implements
...
phi.ll:test4
llvm-svn: 11494
2004-02-16 05:07:08 +00:00
Chris Lattner
e9613be389
A new testcase for a situation that occurs in 181.mcf
...
llvm-svn: 11493
2004-02-16 05:06:36 +00:00
Chris Lattner
b36d908f7b
Teach LLVM to unravel the "swap idiom". This implements:
...
Regression/Transforms/InstCombine/xor.ll:test20
llvm-svn: 11492
2004-02-16 03:54:20 +00:00
Chris Lattner
98c26a7842
Add a test for the "swap idiom", which LLVM should be able to unravel.
...
llvm-svn: 11491
2004-02-16 03:53:44 +00:00
Chris Lattner
c207635fd5
Implement Transforms/InstCombine/xor.ll:test19
...
llvm-svn: 11490
2004-02-16 01:20:27 +00:00
Chris Lattner
5c063c9348
Test for xor chains
...
llvm-svn: 11489
2004-02-16 01:19:52 +00:00
Chris Lattner
5f25fb0dd7
Fix a bug in the recent rewrite of the leakdetector that caused all of the
...
nightly tests to be really messed up. The problem was that the new leakdetector
was depending on undefined behavior: the order of destruction of static objects.
llvm-svn: 11488
2004-02-15 23:33:48 +00:00
Chris Lattner
aebc66a1ef
Document bug 240
...
llvm-svn: 11487
2004-02-15 23:09:07 +00:00
Chris Lattner
83a0044077
Moving CBE tests to test/Regression/CodeGen/CBackend
...
llvm-svn: 11486
2004-02-15 22:56:30 +00:00
Chris Lattner
5df6d8de9b
When the user runs 'llc foo.bc -march=c', write the output to "foo.cbe.c", not
...
to "foo.s".
llvm-svn: 11485
2004-02-15 22:54:19 +00:00
Chris Lattner
a95bd44282
Now that the lowerinvoke pass inserts calls to llvm.setjmp/llvm.longjmp, some
...
hacks can be banished. Also, this gives us the opportunity to emit special code
for the setjmp/longjmps which alows the elimination of one GCC warning for every
setjmp/longjmp site (which is often THOUSANDS in C++ programs). Yaay!
llvm-svn: 11484
2004-02-15 22:51:47 +00:00
Chris Lattner
303ca1e509
By default, llvm.setjmp/llvm.longjmp intrinsics get lowered to their libc counterparts
...
llvm-svn: 11483
2004-02-15 22:24:51 +00:00
Chris Lattner
d85e061575
Instead of producing calls to setjmp/longjmp, produce uses of the
...
llvm.setjmp/llvm.longjmp intrinsics.
llvm-svn: 11482
2004-02-15 22:24:27 +00:00
Chris Lattner
25530a12a1
Refactor code. Now the intrinsic lowering pass tries to recycle preexisting
...
prototypes, even if they don't precisely match what it would prefer to use.
This fixes: CBackend/2004-02-15-PreexistingExternals.llx compiling it into:
ltmp_0_30 = memcpy(l14_C, 4u, 17);
ltmp_1_30 = memcpy(((int *)l27_A), ((unsigned )(long)l27_B), ((int )123u));
instead of:
ltmp_0_30 = memcpy(l14_C, 4u, 17);
ltmp_1_27 = l43_memcpy(l27_A, l27_B, 123u);
Which does the wrong thing as you could imagine.
llvm-svn: 11481
2004-02-15 22:16:39 +00:00
Chris Lattner
5c49d123ad
New testcase
...
llvm-svn: 11480
2004-02-15 22:14:46 +00:00
Alkis Evlogimenos
e27f33f00e
This pass should not require phi elimination or live variable
...
analysis. It should only preserve them and update LiveVariables if it
already ran.
llvm-svn: 11479
2004-02-15 21:50:32 +00:00
Chris Lattner
a8d97e4e74
Finegrainify namespacification
...
Remove one of the operands of a two operand instruction
llvm-svn: 11478
2004-02-15 21:38:28 +00:00
Alkis Evlogimenos
bbf53937a4
Make dense maps keyed on physical registers smallerusing
...
MRegisterInfo::getNumRegs() instead of
MRegisterInfo::FirstVirtualRegister.
Also use MRegisterInfo::is{Physical,Virtual}Register where
appropriate.
llvm-svn: 11477
2004-02-15 21:37:17 +00:00
Alkis Evlogimenos
2c5ddd20ba
Eliminate the use of spill (reserved) registers.
...
llvm-svn: 11476
2004-02-15 10:24:21 +00:00
Chris Lattner
8579a6fafc
QOI bug fixed
...
llvm-svn: 11475
2004-02-15 06:00:04 +00:00
Chris Lattner
76b2ff4ded
Adjustments to support the new ConstantAggregateZero class
...
llvm-svn: 11474
2004-02-15 05:55:15 +00:00
Chris Lattner
7bea8084e0
Add support for the new ConstantAggregateZero class
...
llvm-svn: 11473
2004-02-15 05:54:27 +00:00
Chris Lattner
834b1272f3
Make the JIT zero out globals with memset instead of an element at a time. This
...
should speed it up a bit on a lot of programs
llvm-svn: 11472
2004-02-15 05:54:06 +00:00
Chris Lattner
218eb798a2
No need to scan zero initializers. This should make DSA a bit faster.
...
llvm-svn: 11471
2004-02-15 05:53:42 +00:00
Chris Lattner
9fba3da879
Add a new ConstantAggregateZero class, to fix PR239. This makes zero
...
initializers for constant structs and arrays take constant space, instead of
space proportinal to the number of elements. This reduces the memory usage of
the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95
benchmarks.
llvm-svn: 11470
2004-02-15 05:53:04 +00:00
Chris Lattner
2d6fca9717
finegrainify namespacification
...
llvm-svn: 11469
2004-02-15 05:52:36 +00:00
Chris Lattner
e9fbbc25a1
Bug fixed
...
llvm-svn: 11468
2004-02-15 05:47:37 +00:00
Chris Lattner
015e821279
ConstantArray::get and ConstantStruct::get now just return pointers to
...
'Constant', instead of specific subclass pointers. In the future, these will
return an instance of ConstantAggregateZero if all of the inputs are zeros.
llvm-svn: 11467
2004-02-15 04:14:47 +00:00
Chris Lattner
37a716fa80
Remove dependence on return type of ConstantStruct::get
...
llvm-svn: 11466
2004-02-15 04:07:32 +00:00
Chris Lattner
c75bf528c1
Remove dependence on the return type of ConstantArray::get
...
llvm-svn: 11463
2004-02-15 04:05:58 +00:00
Chris Lattner
5d56c478ba
Keep a cache of non-abstract null arrays and structs. This speeds up llvm-dis
...
from 16.57 -> 13.46s on 129.compress.
llvm-svn: 11462
2004-02-15 02:46:46 +00:00
Chris Lattner
0836c10052
Testcase for PR205: [llvmgcc] C front-end does not emit 'zeroinitializer' when possible
...
llvm-svn: 11461
2004-02-15 02:19:08 +00:00
Chris Lattner
3e86e1b0f7
Test for actual support, not just for lack of crashage
...
llvm-svn: 11460
2004-02-15 01:21:39 +00:00
Chris Lattner
a9084948ff
Implement llvm.(frame|return)address(0) correctly. They are used by the LLVM JIT, among other
...
applications
llvm-svn: 11459
2004-02-15 01:04:03 +00:00
Alkis Evlogimenos
636e19d4b1
Fix problem in DEBUG code. I could be pointing past the end and
...
dereferencing it causes an assertion error.
llvm-svn: 11458
2004-02-15 00:46:41 +00:00
Chris Lattner
d5eec5ebcf
New code quality fix
...
llvm-svn: 11457
2004-02-15 00:23:15 +00:00
Chris Lattner
f070437543
New testcase for PR237: [x86] wierd stack/frame pointer manipulation
...
llvm-svn: 11456
2004-02-15 00:21:04 +00:00
Chris Lattner
43e82e1152
Fix the 'have a framepointer' case, so that the frame pointer always points
...
to the old saved EBP.
llvm-svn: 11455
2004-02-15 00:15:37 +00:00
Chris Lattner
1dfa97034d
Allow for fixed objects to reside in the local area, and if they don't to not
...
clobber them by allocating other objects in the same space!
llvm-svn: 11454
2004-02-15 00:14:20 +00:00
Alkis Evlogimenos
6a35516dcc
Add back machine code deleter pass until we get a MachineCode pass
...
that will be responsible for the creation of MachineFunctions and will
be required by all MachineFunctionPass passes.
llvm-svn: 11453
2004-02-15 00:03:15 +00:00
Alkis Evlogimenos
fccb75d91e
Modularize implementation of LeakDetector into a typed template
...
implementation class. This makes the code simpler and allows for more
types to be added easily. It also implements caching for generic
objects (it was only available for llvm objects).
llvm-svn: 11452
2004-02-14 23:33:39 +00:00
Chris Lattner
2e4acc0a73
Add support for the 'pop' instruction
...
llvm-svn: 11451
2004-02-14 21:06:02 +00:00
Chris Lattner
f54cd1524d
There is no reason to align the stack pointer if there are no callees of this
...
function!
llvm-svn: 11450
2004-02-14 20:11:07 +00:00
Chris Lattner
612ce0c47c
There is no reason to align the stack pointer if there are no callees of this function!
...
llvm-svn: 11449
2004-02-14 20:10:59 +00:00
Chris Lattner
7dceed5ff9
The prologue/epilogue related method calls have no reason to return a value,
...
make them return void.
This allows us to avoid some costly MBB.size() calls
llvm-svn: 11448
2004-02-14 19:49:54 +00:00
Chris Lattner
72862f132c
The prologue/epilogue related method calls have no reason to return a value,
...
make them return void.
llvm-svn: 11447
2004-02-14 19:49:05 +00:00
Chris Lattner
34c47d967e
fix typeo
...
llvm-svn: 11446
2004-02-14 19:27:26 +00:00
Chris Lattner
9f75a55329
finegrainify namespacification, fix 80col prob
...
llvm-svn: 11445
2004-02-14 06:00:36 +00:00
Chris Lattner
0c48a03374
A target that doesn't support these intrinsics will still meet spec (the
...
intrinsic will always produce zero), but it will behave unexpectedly, so
warn like GCC does.
llvm-svn: 11444
2004-02-14 04:52:06 +00:00
Chris Lattner
d6a39eaa70
Urg, right. These need an input value...
...
llvm-svn: 11443
2004-02-14 04:47:23 +00:00
Chris Lattner
2f49d5bb35
Codegen llvm.memset into rep stos[bwd]. Simplify code for llvm.memcpy
...
llvm-svn: 11442
2004-02-14 04:46:05 +00:00
Chris Lattner
8bed37595d
add 'rep stos[bwd]' instructions
...
llvm-svn: 11441
2004-02-14 04:45:37 +00:00
Chris Lattner
2c0d1265dc
new testcase for llvm.memset generation
...
llvm-svn: 11440
2004-02-14 04:26:15 +00:00
Chris Lattner
141ebb625d
These should be mentioned
...
llvm-svn: 11439
2004-02-14 04:12:41 +00:00
Chris Lattner
3649c3aaf7
Document new intrinsics
...
llvm-svn: 11438
2004-02-14 04:08:35 +00:00
Chris Lattner
3646dadc6c
builtin_return/frame_address now work
...
llvm-svn: 11437
2004-02-14 04:08:29 +00:00
Chris Lattner
451f1bca6f
Testcase for builtin frame/return address
...
llvm-svn: 11436
2004-02-14 04:06:48 +00:00
Chris Lattner
cd947e4b8b
Test that the CFE compiles memset and bzero to llvm.memset
...
llvm-svn: 11435
2004-02-14 03:46:37 +00:00
Chris Lattner
cf81fc70a4
Add a testcase for the frameaddress and returnaddress intrinsics.
...
llvm-svn: 11434
2004-02-14 02:55:47 +00:00
Chris Lattner
f7c1088a36
Add support for the returnaddress and frameaddress intrinsics
...
llvm-svn: 11433
2004-02-14 02:55:36 +00:00
Chris Lattner
3c4bc03c8a
Test that the code generator supports these intrinsics
...
llvm-svn: 11432
2004-02-14 02:51:40 +00:00
Chris Lattner
dc632111bf
Add llvm.memset/frameaddress/returnaddress intrinsics.
...
llvm-svn: 11431
2004-02-14 02:47:17 +00:00
Alkis Evlogimenos
5a92240270
Use newly added next() and prior() utility functions.
...
llvm-svn: 11430
2004-02-14 01:18:34 +00:00
Alkis Evlogimenos
7c6e4d5ae6
Add next() and prior() iterator utility functions. Unlike std::advance
...
they do not modify the passed iterator but return a copy.
next(myIt) returns copy of myIt incremented once
next(myIt, n) returns copy of myIt incremented n times
prior(myIt) returns copy of myIt decremented once
prior(myIt, n) returns copy of myIt decremented n times
While at it remove obsolete implementation of mapped_iterator.
llvm-svn: 11429
2004-02-14 01:17:28 +00:00
Chris Lattner
a9c61b33c6
Updates for the C backend's movement
...
llvm-svn: 11428
2004-02-14 01:07:17 +00:00
Alkis Evlogimenos
ddcb4ad53e
Use std::numeric_limits<float>::infinity() instead of
...
std::numeric_limits<float>::max() for weighting preallocated
intervals.
llvm-svn: 11427
2004-02-14 00:44:07 +00:00
Chris Lattner
0997f207c2
Use intrinsic lowering like the rest of the backends. Get rid of crufty hacky
...
code that worked around problems in the mangler
llvm-svn: 11426
2004-02-14 00:31:10 +00:00
Chris Lattner
7934640709
Add method
...
llvm-svn: 11425
2004-02-14 00:30:31 +00:00
Chris Lattner
77687a9746
Fix the logic in the name mangler. If there are two symbols named 'X', and one
...
is external, make sure to mangle the *internal* one, not external one
llvm-svn: 11424
2004-02-14 00:30:23 +00:00
Misha Brukman
7c437d3226
Break a line that's over 80cols into two.
...
llvm-svn: 11423
2004-02-13 23:46:47 +00:00
Chris Lattner
7b5f374a18
There is no need to emit a shift if the size is constant, which is common
...
llvm-svn: 11420
2004-02-13 23:36:47 +00:00
Chris Lattner
23472a5a2a
Make sure to provide a prototype for the cbackend
...
llvm-svn: 11419
2004-02-13 23:36:03 +00:00
Chris Lattner
7b65a0008d
Update tests
...
llvm-svn: 11418
2004-02-13 23:33:17 +00:00
Chris Lattner
768fa7d206
Moved directory, update makefile
...
llvm-svn: 11417
2004-02-13 23:31:12 +00:00
Chris Lattner
b24eb91e2c
CBackend is no longer here
...
llvm-svn: 11416
2004-02-13 23:29:37 +00:00
Chris Lattner
1f9c6eb358
CBackend now lives here
...
llvm-svn: 11415
2004-02-13 23:29:20 +00:00
Chris Lattner
c5a4641c21
Do not advertise our -c option anymore
...
llvm-svn: 11413
2004-02-13 23:24:46 +00:00
Chris Lattner
92849b7dc9
Mercilessly rip the cbackend out of llvm-dis. Leave a helpful error message
...
for those who have not heard the news.
llvm-svn: 11412
2004-02-13 23:22:40 +00:00
Chris Lattner
c7dd48567f
The cbackend has never had anything to do with llvm assembly writing
...
llvm-svn: 11411
2004-02-13 23:19:51 +00:00
Chris Lattner
3fba9dc096
Add support for -march=c
...
llvm-svn: 11410
2004-02-13 23:19:09 +00:00
Chris Lattner
0591bb5bc8
Convert the C backend into a target, for use with LLC. This allows us to use
...
the lowerallocations pass to eliminate malloc/free warnings and hackish code
llvm-svn: 11409
2004-02-13 23:18:48 +00:00
Chris Lattner
9fae109121
Change how we create the cwriter, and add a buttload of libraries that it now
...
needs. This will be fixed shortly
llvm-svn: 11407
2004-02-13 23:01:14 +00:00
Chris Lattner
b09176a1e2
Change access to the cwriter
...
llvm-svn: 11406
2004-02-13 23:00:45 +00:00
Chris Lattner
d2b6e183e9
Make the cwriter use the lowerinvoke pass so that it can either use "disabled exceptions" or
...
"expensive exceptions" controlled by an option. Also refactor and eliminate a bunch of cruft.
This is a temporary solution and causes millions of warnings to pour out of programs that use
exceptions, but it should fix the problem with sparc and the 'write' declaration (PR190).
Subsequent changes will make this stink much less
llvm-svn: 11405
2004-02-13 23:00:29 +00:00
Chris Lattner
067b6bb9b2
New testcase. The CFE should not generate illegal LLVM intrinsics, even if
...
the input program is horribly broken (like 126.gcc).
llvm-svn: 11401
2004-02-13 22:04:41 +00:00
John Criswell
3b4195f344
Added check for target machine endian-ness and put the result into
...
Makefile.config (ENDIAN variable is set to big or little).
llvm-svn: 11398
2004-02-13 21:57:29 +00:00
Chris Lattner
d17e15eddd
Add support for a bunch more functions
...
llvm-svn: 11395
2004-02-13 21:21:48 +00:00
Alkis Evlogimenos
8cdd0215bf
Remove getAllocatedRegNum(). Use getReg() instead.
...
llvm-svn: 11393
2004-02-13 21:01:20 +00:00
Alkis Evlogimenos
ef9d025ebe
Mark MachineBasicBlock::operator[] deprecated.
...
llvm-svn: 11392
2004-02-13 20:05:56 +00:00
Alkis Evlogimenos
1aa50dfae5
Define DEPRECATED so that it can be used in function and variable
...
declarations.
llvm-svn: 11391
2004-02-13 20:05:44 +00:00
Chris Lattner
e00227248e
Add support for fopen/fclose. Specifically with fopen, we were marking all of the
...
operands as incomplete, though fopen is known to only read them. This just adds
fclose for symmetry, though it doesn't gain anything. This makes the dsgraphs for
181.mcf much more precise.
llvm-svn: 11390
2004-02-13 20:05:32 +00:00
Alkis Evlogimenos
de6a381691
Use getNumVirtualRegs().
...
Whitespace cleanups.
llvm-svn: 11389
2004-02-13 18:20:47 +00:00
Alkis Evlogimenos
0e98a0638e
Add getNumVirtualRegs().
...
Whitespace cleanups.
llvm-svn: 11388
2004-02-13 18:07:06 +00:00
Chris Lattner
963f273734
Bug fixed
...
llvm-svn: 11385
2004-02-13 17:03:01 +00:00
Chris Lattner
283ffdfac5
Fix compilation of 126.gcc: intrinsic functions cannot throw, so they are not
...
allowed in invoke instructions. Thus, if we are inlining a call to an intrinsic
function into an invoke site, we don't need to turn the call into an invoke!
llvm-svn: 11384
2004-02-13 16:47:35 +00:00
Chris Lattner
7db49ce5b4
Intrinsic functions cannot throw
...
llvm-svn: 11383
2004-02-13 16:46:46 +00:00
John Criswell
d6687b9b82
Updated to list all code/directories that have additional or alternate
...
licensing information.
Also added note to indicate that warrany disclaimer and the no-endorsement
clause applies to everything.
llvm-svn: 11382
2004-02-13 16:46:05 +00:00
Chris Lattner
c68c6a6e62
Bug fix
...
llvm-svn: 11381
2004-02-13 16:40:24 +00:00
Chris Lattner
564251ed5e
exit(1) instead of abort()'ing on error
...
llvm-svn: 11380
2004-02-13 16:37:43 +00:00
Chris Lattner
a80e9f0a19
Fix buggy error message problem
...
llvm-svn: 11379
2004-02-13 16:33:56 +00:00
Misha Brukman
29cb68f761
Fix spelling of `tendency'.
...
llvm-svn: 11378
2004-02-13 16:23:14 +00:00
Chris Lattner
6342e18571
Expose a pass ID for lower-invoke
...
llvm-svn: 11377
2004-02-13 16:16:35 +00:00
Chris Lattner
7cbb22abe6
Expose a pass ID that can be 'required'
...
llvm-svn: 11376
2004-02-13 16:16:16 +00:00
Chris Lattner
cbf0667743
Squish warning
...
llvm-svn: 11375
2004-02-13 16:14:50 +00:00
Chris Lattner
9761271f0f
Restructure code to handle memcpy/memmove
...
llvm-svn: 11374
2004-02-13 16:09:54 +00:00
Chris Lattner
7eec19cf38
Right, memcpy READS memory too :)
...
llvm-svn: 11373
2004-02-13 16:09:37 +00:00
Chris Lattner
0a49bcb009
New testcase for support for memcpy/memmove
...
llvm-svn: 11372
2004-02-13 16:04:51 +00:00
Brian Gaeke
242ebf2523
Fix off-by-one in Interpreter::getFirstVarArg(), which was punishing
...
any attempts by LLI to use varargs (possibly left over from the introduction
of IntrinsicLowering??)
llvm-svn: 11370
2004-02-13 06:18:39 +00:00
Chris Lattner
337df9b905
Fine grainify namespacification, prune #includes
...
llvm-svn: 11369
2004-02-13 06:18:21 +00:00
Brian Gaeke
51f100753c
The Interpreter was failing the AtExit UnitTest. This fixes it.
...
llvm-svn: 11367
2004-02-13 05:48:00 +00:00
Brian Gaeke
5feee4b251
Update the example here in the header file.
...
I don't know about you guys, but I rarely read the .html manuals :-)
llvm-svn: 11366
2004-02-13 04:49:04 +00:00
Brian Gaeke
bad2936826
Include <iosfwd>.
...
Add prototypes for MachineBasicBlock's dump() and print() methods.
llvm-svn: 11365
2004-02-13 04:40:15 +00:00
Brian Gaeke
52440fd481
Refactor MachineFunction::print() into MachineBasicBlock::print().
...
Add MachineBasicBlock::dump().
llvm-svn: 11364
2004-02-13 04:39:55 +00:00
Brian Gaeke
e8f7c2f863
Add head-of-file comments and Doxygen comments. Tighten up a lot of whitespace.
...
Rename SetMachineOperandConst's formal parameters to match other methods here.
Mark some methods as being used only by the SPARC back-end.
Fix a missing-paren bug in OutputValue().
llvm-svn: 11363
2004-02-13 04:39:32 +00:00
Chris Lattner
bb68a2209b
Add support for memcpy and memmove intrinsics. Why isn't the cwriter using
...
the intrinsiclowering code?? :(
llvm-svn: 11362
2004-02-12 23:13:33 +00:00
Chris Lattner
0145092b3e
New features
...
llvm-svn: 11361
2004-02-12 21:21:17 +00:00
Chris Lattner
4c67c48c42
Be a bit more specific about what the alignment value means and the restrictions on it
...
llvm-svn: 11360
2004-02-12 21:18:15 +00:00
Chris Lattner
a200310b32
New testcase for PR233: [llvmgcc] Structure copies result in a LOT of code
...
llvm-svn: 11359
2004-02-12 21:06:52 +00:00
Alkis Evlogimenos
96871385e8
Move ilist_trairs<MachineInstr> in MachineBasicBlock.
...
llvm-svn: 11358
2004-02-12 19:12:03 +00:00
Alkis Evlogimenos
de8ac749fe
Add parent pointer to MachineInstr that points to owning
...
MachineBasicBlock. Also change opcode to a short and numImplicitRefs
to an unsigned char so that overall MachineInstr's size stays the
same.
llvm-svn: 11357
2004-02-12 18:49:07 +00:00
John Criswell
407f6d46d9
Fixed minor typos.
...
llvm-svn: 11356
2004-02-12 18:11:53 +00:00
Chris Lattner
5ed171e317
Add support for the llvm.memmove intrinsic
...
Patch graciously contributed by Reid Spencer!
llvm-svn: 11355
2004-02-12 18:11:20 +00:00
Chris Lattner
f30152e480
Add support for the llvm.memmove intrinsic.
...
Patch graciously contributed by Reid Spencer!
llvm-svn: 11354
2004-02-12 18:10:10 +00:00
Chris Lattner
e0ea5cff8a
Urg, check in header I forgot. :(
...
llvm-svn: 11353
2004-02-12 17:57:11 +00:00
Chris Lattner
71957a90b3
Test that we get rep movs when calling memcpy
...
llvm-svn: 11352
2004-02-12 17:53:43 +00:00
Chris Lattner
8dc99feeaf
Add support for the rep movs[bwd] instructions, and emit them when code
...
generating the llvm.memcpy intrinsic.
llvm-svn: 11351
2004-02-12 17:53:22 +00:00
Chris Lattner
fee11469bb
Document the llvm.memcpy intrinsic. Clean up some of the formatting of other
...
sections
llvm-svn: 11350
2004-02-12 17:01:32 +00:00
Chris Lattner
17d028d52b
Implement the llvm.memcpy intrinsic
...
llvm-svn: 11349
2004-02-12 17:01:09 +00:00
Chris Lattner
6a597d6057
Rename the opCode instance variable to Opcode
...
llvm-svn: 11348
2004-02-12 16:09:53 +00:00
Chris Lattner
a6a8372a3c
Remove a dead field from MachineInstr!
...
llvm-svn: 11347
2004-02-12 16:05:03 +00:00
Chris Lattner
6108d9d5ee
This field is never read
...
llvm-svn: 11346
2004-02-12 16:04:49 +00:00
Alkis Evlogimenos
537805f315
Change interface so that we can add to the end of a basic block
...
without getting an assertion from ilist that we are dereferencing
ilist<T>::end().
llvm-svn: 11345
2004-02-12 08:11:04 +00:00
Brian Gaeke
f0eef8ef38
Add one more doxygen comment.
...
llvm-svn: 11344
2004-02-12 04:26:49 +00:00
Brian Gaeke
974a21e6fb
Express one of MachineOperand's many constructors in terms of another, by means of default arguments.
...
llvm-svn: 11343
2004-02-12 04:15:00 +00:00
Brian Gaeke
c07b64f3cb
Remove this MachineOpCodeFlags assertion - its test can never be false.
...
llvm-svn: 11342
2004-02-12 04:01:07 +00:00
Brian Gaeke
84262c112c
Remove these MachineOpCodeFlags and their accessor - they are never set.
...
llvm-svn: 11341
2004-02-12 04:00:55 +00:00
Alkis Evlogimenos
80da865f77
Change MachineBasicBlock's vector of MachineInstr pointers into an
...
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.
llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Brian Gaeke
0c3de446f6
getOpCode() --> getOpcode().
...
llvm-svn: 11339
2004-02-12 01:34:05 +00:00
Brian Gaeke
84b1008c13
Remove getOpCode(). Help doxygenify some comments.
...
llvm-svn: 11338
2004-02-12 01:34:03 +00:00
Misha Brukman
e10e2b12dd
Ooops, top-level C++-comments aren't recognized by flex.
...
llvm-svn: 11337
2004-02-12 00:03:08 +00:00
Misha Brukman
a01b30bbaa
* Convert C comments to C++ style (why are some one way, some another?!)
...
* Delete extra space, extra blank comment lines
* Convert function comments to doxygen
llvm-svn: 11336
2004-02-12 00:00:46 +00:00
Brian Gaeke
b22186adf0
MachineInstr::getOpCode() --> getOpcode() in SPARC back-end.
...
llvm-svn: 11335
2004-02-11 20:47:34 +00:00
Chris Lattner
0302beeb09
If a node has more than 64 outgoing edges, make the edges go from the 'truncated' block,
...
instead of dropping them entirely.
llvm-svn: 11334
2004-02-11 20:44:17 +00:00
Brian Gaeke
3ee3e4beea
Fix typos in comments.
...
llvm-svn: 11333
2004-02-11 19:47:43 +00:00
Chris Lattner
0d10bf8d72
s/getOpCode/getOpcode
...
llvm-svn: 11332
2004-02-11 19:26:28 +00:00
Chris Lattner
4b095b937e
Cosmetic improvements to this option.
...
llvm-svn: 11331
2004-02-11 19:14:04 +00:00
Brian Gaeke
512bd8de00
Fix bug in initial check - when recompiling everything with llvm-native-gcc,
...
you have to erase the program and re-run the linker, too, before running the
checker.
llvm-svn: 11328
2004-02-11 18:52:05 +00:00
Brian Gaeke
bc67d59ac8
add advice bullet about -check-exit-code
...
llvm-svn: 11327
2004-02-11 18:44:55 +00:00
Brian Gaeke
228a29b711
add description of -check-exit-code
...
llvm-svn: 11326
2004-02-11 18:40:04 +00:00
Brian Gaeke
35145beb61
Add check-exit-code option, defaulting to true.
...
Add ProgramExitedNonzero argument to executeProgram(), and make it
tell its caller whether the program exited nonzero.
Move executeProgramWithCBE() out of line, to ExecutionDriver.cpp, and remove
its extra arguments which are always defaulted. Make it turn off
check-exit-code if the program exits nonzero while generating a reference
output.
Make diffProgram() assume that any nonzero exit code is a failure, if
check-exit-code is turned on.
llvm-svn: 11325
2004-02-11 18:37:32 +00:00
Chris Lattner
f10f6b10f9
Actually load profiling information now! Block layout can use real, live,
...
actual profile info, and works! :)
llvm-svn: 11324
2004-02-11 18:21:05 +00:00
Chris Lattner
fa9a8f83a5
Fix a typeo
...
llvm-svn: 11323
2004-02-11 18:20:41 +00:00
Alkis Evlogimenos
8f4142616d
Increase constness.
...
llvm-svn: 11322
2004-02-11 17:55:09 +00:00
Chris Lattner
3cf970e27f
Add an important prototype
...
llvm-svn: 11320
2004-02-11 06:11:06 +00:00
Chris Lattner
b8263bb809
Fix copy-and-pastos
...
llvm-svn: 11319
2004-02-11 06:10:18 +00:00
Chris Lattner
f7a5d9874c
Add skeleton profileinfoloader pass. This will be enhanced to actually LOAD
...
a profile tommorow. :)
llvm-svn: 11318
2004-02-11 06:10:05 +00:00
Alkis Evlogimenos
2f21547208
Remove assert as the only integer registers on the sparc are physical.
...
llvm-svn: 11317
2004-02-11 06:04:51 +00:00
Chris Lattner
1dec4a1eda
Factor profile information loading OUT of llvm-prof into libanalysis
...
llvm-svn: 11316
2004-02-11 05:56:07 +00:00
Alkis Evlogimenos
fcb99fe370
Fix previous broken commit. A MachineOperand may have opType ==
...
MO_VirtualRegister but if the register number is one of a physical
register is it considered as a physical register.
llvm-svn: 11315
2004-02-11 05:55:00 +00:00
Chris Lattner
ddfc5506a7
Factor this code out of llvm-prof
...
llvm-svn: 11314
2004-02-11 05:54:25 +00:00
Chris Lattner
d4b36cf9bc
Remove obsolete comment. Unreachable blocks will automatically be left at the
...
end of the function.
llvm-svn: 11313
2004-02-11 05:20:50 +00:00
Chris Lattner
d5bab7e727
Basic functionality testing.
...
llvm-svn: 11312
2004-02-11 05:00:27 +00:00
Chris Lattner
5add05129e
Add an _embarassingly simple_ implementation of basic block layout. This is
...
more of a testcase for profiling information than anything that should reasonably
be used, but it's a starting point. When I have more time I will whip this into
better shape.
llvm-svn: 11311
2004-02-11 04:53:20 +00:00
Alkis Evlogimenos
adcc14d96a
Remove assert as it is meaningless. MachineOperands can be tagged as
...
MO_VirtualRegister but actually be representing a physical register.
llvm-svn: 11310
2004-02-11 04:52:30 +00:00
Chris Lattner
0c26f0048f
Make sure to register the 'no profile' implementation as the default for ProfileInfo
...
llvm-svn: 11309
2004-02-11 04:47:54 +00:00
Chris Lattner
6e445dc299
Simplify implementation, and probably speed things up too.
...
llvm-svn: 11308
2004-02-11 03:57:16 +00:00
Chris Lattner
18d1f19fba
Implement SimplifyCFG/PhiEliminate.ll
...
Having a proper 'select' instruction would allow the elimination of a lot
of the special case cruft in this patch, but we don't have one yet.
llvm-svn: 11307
2004-02-11 03:36:04 +00:00
Chris Lattner
4379c6b0b7
New feature testcase for simplifycfg.
...
llvm-svn: 11306
2004-02-11 03:35:04 +00:00
Chris Lattner
f3e6e63d71
Initialize the count instance variable.
...
llvm-svn: 11305
2004-02-11 03:29:16 +00:00
Chris Lattner
391e943817
Expose the "Other" value type to tablegen targets
...
llvm-svn: 11304
2004-02-11 03:08:45 +00:00
Chris Lattner
6926059d37
Remove long obsolete method. switch instructions are first class entities in the CFG, and have been for a LOOOONG time.
...
llvm-svn: 11303
2004-02-11 01:17:58 +00:00
Chris Lattner
2be4744c5e
Remove obsolete method
...
llvm-svn: 11302
2004-02-11 01:17:33 +00:00
Chris Lattner
838b845781
The hasConstantReferences predicate always returns false.
...
llvm-svn: 11301
2004-02-11 01:17:07 +00:00
John Criswell
0606da9572
Updated to handle the new SPEC95 configuration options.
...
llvm-svn: 11298
2004-02-10 22:36:35 +00:00
John Criswell
43fc5c18f6
Added support for configuring SPEC95.
...
llvm-svn: 11295
2004-02-10 22:29:06 +00:00
Chris Lattner
1f4f70425d
An initial implementation of an LLVM ProfileInfo class which is designed to
...
eventually allow Passes to use profiling information to direct them.
llvm-svn: 11294
2004-02-10 22:11:42 +00:00
Misha Brukman
5786148df5
Sprinkle liberally with comments, saute with doxygen until readable.
...
llvm-svn: 11293
2004-02-10 21:49:59 +00:00
Misha Brukman
303cf58800
Doxygenify comment.
...
llvm-svn: 11292
2004-02-10 21:48:12 +00:00
Chris Lattner
62da05d3f0
Urg, the X86 backend DOES use virtual register operands. :(
...
llvm-svn: 11288
2004-02-10 21:43:11 +00:00
Chris Lattner
3d33d64f46
Remove and simplify some of the bewildering collection of isFOORegister
...
methods which have strangely different semantics in different backends,
and noone knew what any did.
Getting rid of these ALSO allows the dependence of MachineInstr.h on
MRegisterInfo.h to be removed, which makes me much happier, and probably
alkis too. :)
llvm-svn: 11287
2004-02-10 21:21:17 +00:00
Chris Lattner
91b2fb2cec
Remove some unneeded stuff
...
llvm-svn: 11286
2004-02-10 21:19:49 +00:00
Chris Lattner
b21ec54e61
Add #include
...
llvm-svn: 11285
2004-02-10 21:18:55 +00:00
Chris Lattner
5dd5be3ec3
Do not use MachineOperand::isVirtualRegister either!
...
llvm-svn: 11283
2004-02-10 21:12:22 +00:00
Chris Lattner
1cb6d2697d
Stop using this method
...
llvm-svn: 11282
2004-02-10 21:12:06 +00:00
Chris Lattner
8d0dc12c3e
Remove uses of MachineOperand::isVirtualRegister
...
llvm-svn: 11281
2004-02-10 20:55:47 +00:00
Chris Lattner
2d5feb5e04
Remvoe use of MO.isVirtualRegister(), turn an assertion into an assert()
...
llvm-svn: 11280
2004-02-10 20:47:24 +00:00
Chris Lattner
0e615e6c20
Eliminate MachineOperand::isPhysicalRegister. The X86 backend should use
...
MRegisterInfo::isPhysicalRegister(MO.getReg()) and the Sparc backend should
use isMachineRegister()
llvm-svn: 11279
2004-02-10 20:42:11 +00:00
Chris Lattner
373fba5c1d
Eliminate users of MachineOperand::isPhysicalRegister
...
llvm-svn: 11278
2004-02-10 20:41:10 +00:00
Chris Lattner
2aea68ccfd
Remove use of isPhysicalRegister
...
llvm-svn: 11277
2004-02-10 20:35:42 +00:00
Chris Lattner
92252f42c3
Don't use MachineOperator::is(Phys|Virt)Register
...
llvm-svn: 11276
2004-02-10 20:31:28 +00:00
Chris Lattner
13d2f3bbc0
Simplify condition, this does not change the predicate at all though
...
llvm-svn: 11275
2004-02-10 20:30:40 +00:00
Chris Lattner
259e98ed27
Tighten up checks
...
llvm-svn: 11274
2004-02-10 20:25:13 +00:00
Chris Lattner
2711c12f48
Right, define the LPROF variable
...
llvm-svn: 11273
2004-02-10 19:46:14 +00:00
Chris Lattner
881d01f30c
Make sure to copy the null terminator at the end of the argv list. Some
...
programs use it instead of argc.
llvm-svn: 11270
2004-02-10 19:14:44 +00:00
Misha Brukman
9a4b8f8263
* Added class comments
...
* Doxygenified existing comments
* Compactified code to be more consistent
llvm-svn: 11268
2004-02-10 18:44:16 +00:00
Chris Lattner
cad1501db8
Fix documentation bugs
...
llvm-svn: 11267
2004-02-10 18:04:24 +00:00
Chris Lattner
7069bb2cd6
Make block profiling the default
...
add a new -function argument
Add a new -o argument to specify where to put llvmprof.out data
llvm-svn: 11265
2004-02-10 18:01:50 +00:00
Chris Lattner
6dc79e5d31
Allow the program to take a '-llvmprof-output filename' option to specify
...
where to output the profiling data, if llvmprof.out is not good enough.
llvm-svn: 11264
2004-02-10 18:01:00 +00:00
Chris Lattner
3232bbb9d8
initialization calls now return argc. If the program uses the argc value
...
passed into main, make sure they use the return value of the init call
instead of the one passed in.
llvm-svn: 11262
2004-02-10 17:41:01 +00:00
Chris Lattner
b94ff3c67c
Make the initialization calls return argc.
...
llvm-svn: 11261
2004-02-10 17:36:25 +00:00
Misha Brukman
78292b3e66
Doxygen-ify comments, make function prototypes more consistent in format.
...
llvm-svn: 11259
2004-02-10 16:39:05 +00:00
Brian Gaeke
efae456cf5
Mention install, RPM, autoconf improvements
...
llvm-svn: 11257
2004-02-10 05:22:23 +00:00
Chris Lattner
6b3dea2cc0
Bug fixed
...
llvm-svn: 11256
2004-02-10 05:19:54 +00:00
Chris Lattner
ff04d76c57
Fix PR228: [sparc] Boolean constants are emitted as true and false
...
I will observe that the concept of using WriteAsOperand is completely broken,
but then we all knew that, didn't we?
llvm-svn: 11255
2004-02-10 05:16:44 +00:00
Brian Gaeke
4766d0c680
RPM spec file for LLVM tools and libraries.
...
llvm-svn: 11254
2004-02-10 03:57:51 +00:00
Brian Gaeke
c6d8be1137
Should fix pr220 - "make install" doesn't install header files when
...
BUILD_SRC_ROOT != BUILD_OBJ_ROOT
llvm-svn: 11253
2004-02-10 01:10:01 +00:00
Misha Brukman
7f7a842bd6
Doxygenify comments.
...
llvm-svn: 11252
2004-02-09 23:18:42 +00:00
Chris Lattner
a52b206d91
Move this testcase out of /home/vadve/lattner/cvs/llvm/test/Programs/LLVMSource,
...
as it fails.
llvm-svn: 11250
2004-02-09 22:52:25 +00:00
Chris Lattner
37d46f4815
Only add the global variable with the abort message if an unwind actually
...
occurs in the program.
llvm-svn: 11249
2004-02-09 22:48:47 +00:00
Alkis Evlogimenos
56258ab1a2
Add global methods that prevent us from using ilist::iterators as
...
random access iterators.
llvm-svn: 11248
2004-02-09 22:40:50 +00:00
John Criswell
4dc5478fbc
Fix PR#226: When emitting padding, always emit it as bytes. Bytes can be
...
placed into any alignment situation.
llvm-svn: 11247
2004-02-09 22:15:33 +00:00
Chris Lattner
24fa566960
Many things have been fixed, so move them out of the "known problems" section
...
Also, PR137 is a code quality PR, not a bug
llvm-svn: 11246
2004-02-09 21:22:51 +00:00
Chris Lattner
805e5e7e52
QOI bug fixed
...
llvm-svn: 11245
2004-02-09 21:16:16 +00:00
Chris Lattner
7289e62874
It turns out that the two dimensional vectors were causing big slowdowns
...
in this for programs with lots of types (like the testcase in PR224).
The problem was that the type ID that the outer vector was using was not
very dense (as many types are getting resolved), so the vector is large
and gets reallocated a lot.
Since there are a lot of values in the program (the .ll file is 10M),
each reallocation has to copy the subvectors, which is also quite slow
(this wouldn't be a problem if C++ supported move semantics, but it
doesn't, at least not yet :(
Changing the outer data structure to a map speeds a release build of
llvm-as up from 11.21s to 5.13s on the testcase in PR224.
llvm-svn: 11244
2004-02-09 21:03:38 +00:00
Chris Lattner
54b582f11d
Remove the statistics
...
llvm-svn: 11243
2004-02-09 21:01:23 +00:00
Chris Lattner
478fac37e4
Speed up type resolution some more. On the testcase in PR224, for example,
...
this speeds up a release llvm-as from 21.95s to 11.21s, because before it
would do an expensive traversal of the type-graph of every type resolved.
llvm-svn: 11242
2004-02-09 20:23:44 +00:00
Chris Lattner
edd4500cf0
When resolving upreferences, if multiple uprefs will be resolved to the same
...
type at the same time, resolve the upreferences to each other before resolving
it to the outer type. This shaves off some time from the testcase in PR224, from
25.41s -> 21.72s.
llvm-svn: 11241
2004-02-09 18:53:54 +00:00
Brian Gaeke
0df4298547
SchedGraph doesn't need to be friends with SchedGraphNodeCommon anymore.
...
llvm-svn: 11240
2004-02-09 18:43:06 +00:00
Brian Gaeke
2e1cbb735d
Move InstrSchedule's iterator begin/end methods inline.
...
llvm-svn: 11239
2004-02-09 18:42:46 +00:00
Brian Gaeke
312e3a28d2
Make SchedGraph::dump() use SchedGraphNodeCommon's const_iterator
...
instead of randomly groping about inside its outEdges array.
Make SchedGraph::addDummyEdges() use getNumOutEdges() instead of
outEdges.size().
Get rid of ifdefed-out code in SchedGraph::buildGraph().
llvm-svn: 11238
2004-02-09 18:42:05 +00:00
Chris Lattner
aedce9d6b1
Implement the hashing scheme in an attempt to speed up the "slow" case in
...
type resolution. Unfortunately it doesn't help.
Also delete some dead debugging code.
llvm-svn: 11237
2004-02-09 18:32:40 +00:00
Brian Gaeke
12705d56ef
Fix bug in installation process: MKDIR must respect DESTDIR.
...
llvm-svn: 11236
2004-02-09 17:38:52 +00:00
Chris Lattner
e33ddf57f6
This debugging hook is no longer needed.
...
llvm-svn: 11233
2004-02-09 17:20:52 +00:00
Chris Lattner
eecaba0c33
Code cleanup in preparation for later changes. Now that ContainedTy's are
...
consistent across the various type classes, we can factor out a LOT more
almost-identical code. Also, add a couple of temporary statistics.
llvm-svn: 11232
2004-02-09 16:35:14 +00:00
Chris Lattner
cbd34b2ae6
Now that all of the derived types have disciplined interfaces, we can eliminate
...
all of the ad-hoc storage of contained types. This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.
llvm-svn: 11230
2004-02-09 05:40:24 +00:00
Chris Lattner
e3af6f73ce
Don't depend on auto data conversion
...
llvm-svn: 11229
2004-02-09 05:16:30 +00:00
Chris Lattner
ac6db755c3
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
...
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
4da68e2d7b
Increase encapsulation of the StructType class, eliminating the getElementTypes() member
...
llvm-svn: 11227
2004-02-09 04:36:50 +00:00
Chris Lattner
66aef96171
Method is gone
...
llvm-svn: 11226
2004-02-09 04:14:46 +00:00
Chris Lattner
fa829be4d3
Start using the new and improve interface to FunctionType arguments
...
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner
f5a4e33e49
Improve encapsulation in the FunctionType class, by adding param_(iterator/begin/end)
...
members, and eliminating the getParamTypes() method, and the associated typedef.
llvm-svn: 11223
2004-02-09 04:12:57 +00:00
Chris Lattner
a9634a0ee3
This #include is not needed, it should have been removed with the last patch
...
llvm-svn: 11222
2004-02-09 03:22:32 +00:00
Chris Lattner
3cb4167b26
Instead of searching the entire type graph for a type to determine if it
...
contains the type we are looking for, just search the immediately used types.
We can only do this because we keep the "current" type in the nesting level
as we decrement upreferences.
This change speeds up the testcase in PR224 from 50.4s to 22.08s, not
too shabby.
llvm-svn: 11221
2004-02-09 03:19:29 +00:00
Chris Lattner
a263b85fe6
Upreferences are always OpaqueTypes, meaning that it is impossible for a non-abstract
...
type from containing one. This speeds up the asmparser on the testcase in PR224 from
61->50s.
llvm-svn: 11220
2004-02-09 03:03:10 +00:00
Chris Lattner
80cbed4f61
Another nice speedup for the register allocator. This time, we replace
...
the Virt2PhysRegMap std::map with an std::vector. This speeds up the
register allocator another (almost) 40%, from .72->.45s in a release build
of LLC on 253.perlbmk.
llvm-svn: 11219
2004-02-09 02:12:04 +00:00
Chris Lattner
56f9b190e1
Add a new (hidden) option that is useful for profiling.
...
llvm-svn: 11218
2004-02-09 01:47:10 +00:00
Chris Lattner
bbd9a43d20
Ugh, perform an optimization that GCC should be able to do itself. This
...
speeds up livevar from .48/.32s -> .45/.31s in LLC on perlbmk
llvm-svn: 11217
2004-02-09 01:43:23 +00:00
Chris Lattner
26407384ec
Only do stuff for the REAL number of physical registers we have, not 1024.
...
This speeds up live variables a lot, from .60/.39s -> .47/.26s in LLC, for
the first/second pass respectively.
llvm-svn: 11216
2004-02-09 01:35:21 +00:00
Chris Lattner
490627a404
Change the PhysRegsUsed map into a dense array. Seeing that this is a mapping
...
from physical registers, and they are always dense, it makes sense to not have
a ton of RBtree overhead. This change speeds up regalloclocal about ~30% on
253.perlbmk, from .35s -> .27s in the JIT (in LLC, it goes from .74 -> .55).
Now live variable analysis is the slowest codegen pass. Of course it doesn't
help that we have to run it twice, because regalloclocal doesn't update it,
but even if it did it would be the slowest pass (now it's just the 2x slowest
pass :(
llvm-svn: 11215
2004-02-09 01:26:13 +00:00
Chris Lattner
2eaf58775e
Two problems with these lines of code:
...
1. The "work" was not in the assert, so it was punishing the optimized release
2. getNamedFunction is _very_ expensive in large programs. It is not designed
to be used like this, and was taking 7% of the execution time of the code
generator on perlbmk.
Since the assert "can never fail", I'm just killing it.
llvm-svn: 11214
2004-02-09 00:59:07 +00:00
Chris Lattner
57ea2e3294
The ConstantExpr::getCast call can cause a CPR to be generated. If so,
...
strip it off.
llvm-svn: 11213
2004-02-09 00:20:55 +00:00
Chris Lattner
5b6892e37c
Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
...
Have I ever mentioned how much I _hate_ constantpointerrefs?
llvm-svn: 11212
2004-02-09 00:15:41 +00:00
Misha Brukman
3480e935d0
Fix grammar-o.
...
llvm-svn: 11210
2004-02-08 22:27:33 +00:00
Chris Lattner
c5b7b24949
All of spec, including 253.perlbmk should now work. There is still the 254.gap
...
regression, but that will definitely be fixed by 1.2
llvm-svn: 11209
2004-02-08 22:23:33 +00:00
Chris Lattner
3b7f6b2217
Improve compatibility with programs that already have a prototype for 'write',
...
even if it is wierd in some way.
llvm-svn: 11207
2004-02-08 22:14:44 +00:00
Chris Lattner
85195147e1
vi failed me again. :)
...
llvm-svn: 11206
2004-02-08 21:52:30 +00:00
Chris Lattner
144f0efd4c
Rename the invoke 'except' destination to the 'unwind' destination
...
llvm-svn: 11205
2004-02-08 21:52:04 +00:00
Chris Lattner
17235712fb
Change the 'exception' destination to the 'unwind' destination. We will always
...
allow 'except' instead of 'unwind' here though.
llvm-svn: 11203
2004-02-08 21:48:25 +00:00
Chris Lattner
fae8ab3088
rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
...
llvm-svn: 11202
2004-02-08 21:44:31 +00:00
Chris Lattner
35630adf54
Add new bug, add note about llvm-db
...
llvm-svn: 11201
2004-02-08 21:20:42 +00:00
Chris Lattner
56997dd283
Fix PR225: [pruneeh] -pruneeh pass removes invoke instructions it shouldn't
...
llvm-svn: 11200
2004-02-08 21:15:59 +00:00
Chris Lattner
071bc60450
splitBasicBlock "does the right thing" now, no reason to reposition it.
...
llvm-svn: 11199
2004-02-08 20:49:07 +00:00
Chris Lattner
50ceee1ead
Bug fixed
...
llvm-svn: 11198
2004-02-08 19:59:05 +00:00
Chris Lattner
108cadc274
Implement proper invoke/unwind lowering.
...
This fixed PR16 "[lowerinvoke] The -lowerinvoke pass does not insert calls to setjmp/longjmp"
llvm-svn: 11195
2004-02-08 19:53:56 +00:00
Chris Lattner
8a9da302a8
New testcase, code generators should support invoke/unwind
...
llvm-svn: 11192
2004-02-08 19:40:58 +00:00
Chris Lattner
dc631735e6
Print out all globals as they are emitted, not just those emitted from
...
emitGlobals
llvm-svn: 11191
2004-02-08 19:33:23 +00:00
Chris Lattner
6604615a16
There is no reason to #define fd
...
llvm-svn: 11190
2004-02-08 19:33:07 +00:00
Brian Gaeke
d7b895a0c5
add pr105
...
llvm-svn: 11189
2004-02-08 18:49:13 +00:00
Brian Gaeke
3e666c1897
Fix unterminated-quote typo in echo command
...
llvm-svn: 11188
2004-02-08 08:01:00 +00:00
Brian Gaeke
8613f13cc3
Document automake as a build dependency because we use aclocal
...
llvm-svn: 11187
2004-02-08 07:49:04 +00:00
Brian Gaeke
b921039ee9
Move rules for regenerating autoconf files into this shell script.
...
llvm-svn: 11186
2004-02-08 07:44:48 +00:00
Brian Gaeke
4f99c4f75f
Remove rules for autoconf'ing files from top-level Makefile
...
llvm-svn: 11185
2004-02-08 07:44:30 +00:00
Chris Lattner
476488e669
Add a call to 'write' right before the call to abort() in the unwind path.
...
This causes the JIT, or LLC'd program to print out a nice message, explaining
WHY the program aborted.
llvm-svn: 11184
2004-02-08 07:30:29 +00:00
Brian Gaeke
d97d8faa17
Fix indentation of selectiondag.
...
I don't know why its indentation has been bugging me, but it has.
llvm-svn: 11180
2004-02-08 05:49:29 +00:00
Chris Lattner
fa616e14fc
Add one that I missed
...
llvm-svn: 11179
2004-02-08 01:53:10 +00:00
Chris Lattner
9ab85275ef
Instead of callign removeTriviallyDeadNodes on the global graph every time
...
removeDeadNodes is called, only call it at the end of the pass being run.
This saves 1.3 seconds running DSA on 177.mesa (5.3->4.0s), which is
pretty big. This is only possible because of the automatic garbage
collection done on forwarding nodes.
llvm-svn: 11178
2004-02-08 01:51:48 +00:00
Chris Lattner
e1531f3eb1
Remove another unneeded call.
...
llvm-svn: 11177
2004-02-08 01:40:40 +00:00
Chris Lattner
985282c78e
This call is no longer needed now that merging does not produce garbage
...
llvm-svn: 11176
2004-02-08 01:38:34 +00:00
Chris Lattner
b0f32183e4
Substantially improve the DSA code by removing 'forwarding' nodes from
...
DSGraphs while they are forwarding. When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted. This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.
llvm-svn: 11175
2004-02-08 01:27:18 +00:00
Chris Lattner
5592af7927
Bugfix for ilist conversion. The ilist wants to make an 'end' node which has
...
G == 0
llvm-svn: 11174
2004-02-08 01:05:37 +00:00
Chris Lattner
f3861ce4f6
Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
...
llvm-svn: 11173
2004-02-08 00:53:26 +00:00
Chris Lattner
74a99554d1
One of the 'annoying' things about ilists is that the iterators don't behave
...
quite the same as for non-intrusive lists of pointers to nodes. To support
transitioning code bases, add a new 'compatibility' iterator.
llvm-svn: 11172
2004-02-08 00:51:31 +00:00
Chris Lattner
bd16efb88f
Change to use node_iterators instead of direct access to Nodes
...
llvm-svn: 11171
2004-02-08 00:23:16 +00:00
Chris Lattner
d9a063c9a2
Change to use iterators instead of direct access
...
llvm-svn: 11170
2004-02-08 00:22:41 +00:00
Chris Lattner
8c146638b6
Minor change to breakpoint (lack of) support
...
llvm-svn: 11169
2004-02-08 00:06:20 +00:00
Chris Lattner
ce74c2f50b
getNodes() is gone, use node_begin/end instead
...
Rename stats from dsnode -> dsa
Add a new stat
llvm-svn: 11167
2004-02-07 23:58:05 +00:00
Chris Lattner
06834e6d7b
getNodes() is gone
...
llvm-svn: 11166
2004-02-07 23:57:26 +00:00
Chris Lattner
7b3d404e28
Abstract out the Nodes collection. Instead of providing a getNodes() method,
...
provide node_begin/end iterators, which are only guaranteed to be
bidirectional, not random access.
llvm-svn: 11165
2004-02-07 23:57:09 +00:00
Chris Lattner
6e69a5aa5d
Actually USE isForwarding method
...
llvm-svn: 11160
2004-02-07 23:02:32 +00:00
Chris Lattner
e37a472ef0
As Alkis pointed out to me, I forgot to commit this... :(
...
llvm-svn: 11159
2004-02-07 22:54:19 +00:00
Chris Lattner
40862c7578
There is no need to clone over nodes that are going to be dead anyway
...
llvm-svn: 11157
2004-02-07 22:00:03 +00:00
Brian Gaeke
92affee3e7
Use autoconf answers from config.h (FIXME, should autoconf this file
...
directly instead).
Fix LockHolder/MutexLocker typo.
llvm-svn: 11156
2004-02-06 22:33:17 +00:00
Chris Lattner
a1d7fcb15f
Add a missing link
...
llvm-svn: 11154
2004-02-06 20:27:41 +00:00
Misha Brukman
b596679737
Fix grammar.
...
llvm-svn: 11153
2004-02-06 18:40:35 +00:00
Alkis Evlogimenos
e82a70766e
Increase code clarity.
...
llvm-svn: 11151
2004-02-06 18:08:18 +00:00
John Criswell
977412ca35
Initial checking of the libpng library.
...
llvm-svn: 11149
2004-02-06 16:37:53 +00:00
John Criswell
07720fe4fe
Initial checking of the zlib library.
...
llvm-svn: 11148
2004-02-06 16:36:42 +00:00
Chris Lattner
55927236e8
Add information about the piece I forgot to write: parameterized tablegen classes
...
llvm-svn: 11147
2004-02-06 06:37:00 +00:00
Chris Lattner
1215e32eb7
Syntax hilight examples and add note about emacs/vim mode files
...
llvm-svn: 11146
2004-02-06 06:04:25 +00:00
Chris Lattner
149a2498d0
Add a new document describing TableGen
...
llvm-svn: 11145
2004-02-06 05:42:53 +00:00
Chris Lattner
e6540165b3
Print the record NAME not the record ADDRESS
...
llvm-svn: 11144
2004-02-06 03:19:17 +00:00
Alkis Evlogimenos
cd2e7ffcc6
Eliminate uneeded lookups by passing a Virt2PhysMap::iterator instead
...
of the virtual register to certain functions.
llvm-svn: 11143
2004-02-06 03:15:40 +00:00
Chris Lattner
2dd1c8d8ce
Fix another dominator update bug. These bugs keep getting exposed because GCSE
...
keeps finding more code motion opportunities now that the dominators are correct!
llvm-svn: 11142
2004-02-05 23:20:59 +00:00
Alkis Evlogimenos
a97abeb342
Change live interval representation. Machine instructions now have two
...
slots each. As a concequence they get numbered as 0, 2, 4 and so
on. The first slot is used for operand uses and the second for
defs. Here's an example:
0: A = ...
2: B = ...
4: C = A + B ;; last use of A
The live intervals should look like:
A = [1, 5)
B = [3, x)
C = [5, y)
llvm-svn: 11141
2004-02-05 22:55:25 +00:00
Chris Lattner
c0c953f0bc
Fix bug updating dominators
...
llvm-svn: 11140
2004-02-05 22:33:26 +00:00
Chris Lattner
f978c421e5
Add debug output
...
llvm-svn: 11139
2004-02-05 22:33:19 +00:00
Chris Lattner
aaaaec43e7
Bug fixed
...
llvm-svn: 11138
2004-02-05 21:16:42 +00:00
Chris Lattner
14ab84a483
Fix PR223: Loopsimplify incorrectly updates dominator information
...
The problem is that the dominator update code didn't "realize" that it's
possible for the newly inserted basic block to dominate anything. Because
it IS possible, stuff was getting updated wrong.
llvm-svn: 11137
2004-02-05 21:12:24 +00:00
Chris Lattner
eba3c36f99
New testcase for PR223: Loopsimplify incorrectly updates dominator information
...
llvm-svn: 11136
2004-02-05 21:11:38 +00:00
Alkis Evlogimenos
1165c1081e
We don't need to scan the blocks that we are live-in on every
...
access. Rather we only have to do it on the creation of the interval.
llvm-svn: 11135
2004-02-05 20:45:40 +00:00
Chris Lattner
66c16d144e
s/gcse/scalarrepl
...
llvm-svn: 11133
2004-02-05 17:31:37 +00:00
Chris Lattner
e3f247bcac
In a "seeing the forest through the trees" kinda situation, I realized that a
...
complete rewrite of load-vn will make it a bit faster. This changes speeds up
the gcse pass (which uses load-vn) from 25.45s to 0.42s on the testcase in
PR209.
I've also verified that this gives the exact same results as the old one.
llvm-svn: 11132
2004-02-05 17:20:00 +00:00
Chris Lattner
d3e4d81ad7
This is a big diff with no functionality change. We just reorder some code,
...
which causes big reindentation. While I'm at it, I fix the fixme by removing
some dead code.
llvm-svn: 11131
2004-02-05 05:56:23 +00:00
Chris Lattner
90b9043ea5
finegrainify namespacification
...
llvm-svn: 11130
2004-02-05 05:51:40 +00:00
Tanya Lattner
dd0c255d14
Added missing include.
...
llvm-svn: 11129
2004-02-05 05:04:39 +00:00
Tanya Lattner
cb435541c4
Fixed Chris' typo.
...
llvm-svn: 11128
2004-02-05 04:45:21 +00:00
Chris Lattner
f127d9cf33
qoi bug fixed
...
llvm-svn: 11127
2004-02-05 00:48:41 +00:00
Chris Lattner
5bab6301ac
Implement optimizations for handling large basic blocks.
...
llvm-svn: 11126
2004-02-05 00:36:43 +00:00
Alkis Evlogimenos
327426411e
Modify the two address instruction pass to remove the duplicate
...
operand of the instruction and thus simplify the register allocation.
llvm-svn: 11124
2004-02-04 22:17:40 +00:00
Chris Lattner
39ad6f2772
Minor speedup, don't query ValueMap each time through the loop
...
llvm-svn: 11123
2004-02-04 21:44:26 +00:00
Brian Gaeke
fe66239860
Always replace instead of appending when creating archive files. It may be
...
slightly slower, but I think we can handle it, especially if it means
BytecodeLibs are correctly regenerated.
llvm-svn: 11122
2004-02-04 21:41:23 +00:00
Brian Gaeke
9ce98a7e9f
Include <iosfwd> and <string> instead of <iostream>.
...
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.
llvm-svn: 11121
2004-02-04 21:41:10 +00:00
Brian Gaeke
94b5c3cb91
Take away the default iostream argument of createMachineFunctionPrinterPass(),
...
at Chris's request.
llvm-svn: 11120
2004-02-04 21:41:01 +00:00
Brian Gaeke
5e442bb3f1
Clean out DESTLIBBYTECODE when making clean in runtime.
...
llvm-svn: 11119
2004-02-04 21:40:49 +00:00
Chris Lattner
6f8865bf9f
Two changes:
...
1. Don't scan to the end of alloca instructions in the caller function to
insert inlined allocas, just insert at the top. This saves a lot of
time inlining into functions with a lot of allocas.
2. Use splice to move the alloca instructions over, instead of remove/insert.
This allows us to transfer a block at a time, and eliminates a bunch of
silly symbol table manipulations.
This speeds up the inliner on the testcase in PR209 from 1.73s -> 1.04s (67%)
llvm-svn: 11118
2004-02-04 21:33:42 +00:00
Alkis Evlogimenos
dbf4b42fde
IMULri* instructions do not require their first two registers operands
...
to be the same (IOW they are not two address instructions).
llvm-svn: 11117
2004-02-04 17:21:04 +00:00
Chris Lattner
0fa8c7c321
Optimize the case where we are inlining a function that contains only one basic block,
...
and that basic block ends with a return instruction. In this case, we can just splice
the cloned "body" of the function directly into the source basic block, avoiding a lot
of rearrangement and splitBasicBlock's linear scan over the split block. This speeds up
the inliner on the testcase in PR209 from 2.3s to 1.7s, a 35% reduction.
llvm-svn: 11116
2004-02-04 04:17:06 +00:00
Chris Lattner
4babe055d3
Check in header file I forgot before.
...
llvm-svn: 11115
2004-02-04 03:59:08 +00:00
Chris Lattner
8d414ad035
Adjust to the new BasicBlock ctor, which requires a function parameter
...
llvm-svn: 11114
2004-02-04 03:58:28 +00:00
Chris Lattner
bb5f0db8d6
Adjust to the new BB ctor
...
llvm-svn: 11113
2004-02-04 03:57:50 +00:00
Chris Lattner
040ad3afa8
Delete the BasicBlock ctor that only takes a BasicBlock to insert before. This
...
fails when the basic block points to the function->end. Instead, require that
the client pass in the function AND the basicblock to insert into.
llvm-svn: 11112
2004-02-04 03:57:34 +00:00
Chris Lattner
0ff9da5fed
Remove unneeded code now that splitBasicBlock does the "right thing"
...
llvm-svn: 11111
2004-02-04 03:21:51 +00:00
Chris Lattner
9cda4bf8e5
When splitting a basic block, insert the new half immediately after the first
...
half.
llvm-svn: 11110
2004-02-04 03:21:31 +00:00
Chris Lattner
18ef3fda57
More refactoring. Move alloca instructions and handle invoke instructions
...
before we delete the original call site, allowing slight simplifications of
code, but nothing exciting.
llvm-svn: 11109
2004-02-04 02:51:48 +00:00
Chris Lattner
9fc977eac4
Move the cloning of the function body much earlier in the inlinefunction
...
process. The only optimization we did so far is to avoid creating a
PHI node, then immediately destroying it in the common case where the
callee has one return statement. Instead, we just don't create the return
value. This has no noticable performance impact, but paves the way for
future improvements.
llvm-svn: 11108
2004-02-04 01:41:09 +00:00
Chris Lattner
a6578ef318
Give CloneBasicBlock an optional function argument to specify which function
...
to add the cloned block to. This allows the block to be added to the function
immediately, and all of the instructions to be immediately added to the function
symbol table, which speeds up the inliner from 3.7 -> 3.38s on the PR209.
llvm-svn: 11107
2004-02-04 01:19:43 +00:00
Chris Lattner
d8a232b716
If changing a parent, don't add then remove the object from the leak detector
...
llvm-svn: 11106
2004-02-04 01:06:38 +00:00
Chris Lattner
c4c7ea5288
In BasicBlock::splitBasicBlock, just use islist::splice to move the instructions,
...
instead of a loop that is really inefficient with large basic blocks.
This speeds up the inliner pass on the testcase in PR209 from 13.8s to 2.24s
which still isn't exactly speedy, but is a lot better. :)
llvm-svn: 11105
2004-02-03 23:11:21 +00:00
Chris Lattner
135dcc024b
Revised version of a patch for PR222 that works with my version of gmake.
...
llvm-svn: 11104
2004-02-03 23:05:24 +00:00
Chris Lattner
3d96eb6fa6
Bug fixed
...
llvm-svn: 11103
2004-02-03 22:59:56 +00:00
Chris Lattner
6bd75a6223
Apply Michael Kahl's patch to fix the 'make tools-only' target when OBJDIR != SRCDIR.
...
See PR222.
llvm-svn: 11102
2004-02-03 22:56:40 +00:00
Chris Lattner
ae51cae111
Bunch up all locally used allocas by the block they are allocated in, and
...
process them all as a group. This speeds up SRoA/mem2reg from 28.46s to
0.62s on the testcase from PR209.
llvm-svn: 11100
2004-02-03 22:34:12 +00:00
Chris Lattner
3784188620
Handle extremely trivial cases extremely efficiently. This speeds up
...
SRoA/mem2reg from 41.2s to 27.5s on the testcase in PR209.
llvm-svn: 11099
2004-02-03 22:00:33 +00:00
Chris Lattner
d1b1992495
Generate ftst instructions for comparison against zero
...
llvm-svn: 11098
2004-02-03 18:54:04 +00:00
Chris Lattner
8a63001939
bug fixed
...
llvm-svn: 11097
2004-02-03 08:03:41 +00:00
Chris Lattner
3c8c72c54f
Add the ftst instruction
...
llvm-svn: 11095
2004-02-03 07:27:50 +00:00
Chris Lattner
8161306139
Add support for one argument OneArgFP instructions
...
llvm-svn: 11094
2004-02-03 07:27:34 +00:00
Alkis Evlogimenos
3d100ef0ca
When an instruction like: A += B had both A and B virtual registers
...
spilled, A was loaded from its stack location twice. This fixes the bug.
llvm-svn: 11093
2004-02-03 01:13:07 +00:00
Alkis Evlogimenos
74b26f77a3
Revert changes. Will implement this using a different set of primitives
...
llvm-svn: 11091
2004-02-02 23:08:58 +00:00
Alkis Evlogimenos
6e34205653
Fix debugging output.
...
llvm-svn: 11088
2004-02-02 22:00:32 +00:00
Alkis Evlogimenos
6471e66fbb
Correctly update def/use information for modified machine operands.
...
llvm-svn: 11087
2004-02-02 21:56:40 +00:00
Alkis Evlogimenos
5f03f684ed
Add MachineOperand::setDef() and MachineOperand::setUse() so that the
...
TwoAddressInstructionPass can correctly update use/def information.
llvm-svn: 11086
2004-02-02 21:55:18 +00:00
Alkis Evlogimenos
86ff30deab
Should be more careful. The previously applied change made all counts
...
outside of loops = 0.
llvm-svn: 11085
2004-02-02 20:29:57 +00:00
Chris Lattner
bcade4b8e6
Floating point negates are -0.0 - X, not 0.0 - X
...
llvm-svn: 11084
2004-02-02 20:21:29 +00:00
Chris Lattner
c2f0aa58df
Disable (x - (y - z)) => (x + (z - y)) optimization for floating point.
...
llvm-svn: 11083
2004-02-02 20:09:56 +00:00
Chris Lattner
cacd30b957
Update comment
...
llvm-svn: 11082
2004-02-02 20:09:22 +00:00
Chris Lattner
63b61e8739
No need to declare implicit uses/defs of ST0
...
llvm-svn: 11081
2004-02-02 19:57:45 +00:00
Chris Lattner
d932cbf613
Bug fixed
...
llvm-svn: 11080
2004-02-02 19:40:06 +00:00
Brian Gaeke
6204e75c4a
Make deadarghaX0r warning louder.
...
(I just love typing haX0r. haX0r haX0r haX0r.)
llvm-svn: 11079
2004-02-02 19:32:27 +00:00
Chris Lattner
30d26ac561
Generate the fchs instruction to negate a floating point number
...
llvm-svn: 11078
2004-02-02 19:31:38 +00:00
Chris Lattner
7af8ad6444
Add support for OneArgFPRW instructions, fix a couple of typeos
...
llvm-svn: 11077
2004-02-02 19:23:15 +00:00
Brian Gaeke
ac2ced8554
Include PowerPC.h. Flesh out the stub versions of addPassesToEmitAssembly()
...
and addPassesToJITCompile() slightly.
llvm-svn: 11076
2004-02-02 19:06:36 +00:00
Brian Gaeke
57b8ef2693
Add a -march=powerpc option. Automatically select it if this looks like a
...
big-endian, 32-bit module, or if __ppc__, __POWERPC__, or __APPLE__ are
defined.
llvm-svn: 11075
2004-02-02 19:06:12 +00:00
Brian Gaeke
53f4c48393
Link in the PowerPC back-end.
...
llvm-svn: 11074
2004-02-02 19:05:52 +00:00
Brian Gaeke
2458bd6507
Add comments describing how you would add prototypes for factory methods for
...
PowerPC-specific passes here.
llvm-svn: 11073
2004-02-02 19:05:28 +00:00
Brian Gaeke
fea8eb8938
Add prototype for llvm::allocatePowerPCTargetMachine().
...
llvm-svn: 11072
2004-02-02 19:05:08 +00:00
Chris Lattner
298fdd7eb1
Codegen -0.0 correctly. Do not use fldz! This is another -0.0 == +0.0 problem, arg.
...
llvm-svn: 11070
2004-02-02 18:56:30 +00:00
Chris Lattner
6fe75845f9
Correct the method I just added to actually return false sometimes
...
llvm-svn: 11069
2004-02-02 18:53:04 +00:00
Chris Lattner
29734bccc5
Add a new method to ConstantFP
...
llvm-svn: 11068
2004-02-02 18:40:29 +00:00
Chris Lattner
7bae4ce64f
Bug fixed
...
llvm-svn: 11067
2004-02-02 17:48:56 +00:00
Alkis Evlogimenos
2cecace9b2
Create an object for tracking physical register usage. This will look
...
much better when I get rid of the reserved registers.
llvm-svn: 11066
2004-02-02 07:30:36 +00:00
Chris Lattner
e2d6189513
Bug fixed
...
llvm-svn: 11065
2004-02-01 22:52:12 +00:00
Chris Lattner
ac80ea4970
Second half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx.
...
Basically we store floating point values as their integral components, instead of relying
on the semantics of floating point < to differentiate between values. This is likely to
make the map search be faster anyway.
llvm-svn: 11064
2004-02-01 22:49:04 +00:00
Chris Lattner
5e2feb4a0f
The first half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx
...
llvm-svn: 11063
2004-02-01 22:48:09 +00:00
Chris Lattner
e55e30917a
Add another test
...
llvm-svn: 11062
2004-02-01 22:47:16 +00:00
Alkis Evlogimenos
9b9c0485fd
Change weight array into a vector and make it as big as the number of
...
registers (not as the max number of registers).
Change toSpill from a std::set into a std::vector<bool>.
Use the reverse iterator adapter to do a reverse scan of allocatable
registers.
llvm-svn: 11061
2004-02-01 20:13:26 +00:00
Alkis Evlogimenos
5e05a59bf8
Use std::map::count() instead of std::map::find() != std::map::end()
...
where appropriate.
llvm-svn: 11060
2004-02-01 18:39:53 +00:00
Chris Lattner
e1146140fc
New testcase for PR218
...
llvm-svn: 11059
2004-02-01 18:16:06 +00:00
Alkis Evlogimenos
0df32f636e
Add MRegisterInfo::getNumRegs().
...
llvm-svn: 11058
2004-02-01 17:14:20 +00:00
Alkis Evlogimenos
a3a56fa041
Change string for joined intervals.
...
llvm-svn: 11057
2004-02-01 16:13:05 +00:00
Alkis Evlogimenos
aeb8a80c71
FpMOV is also a move instruction.
...
llvm-svn: 11055
2004-02-01 08:22:16 +00:00
Alkis Evlogimenos
84a84c38b7
Change xor to ^.
...
llvm-svn: 11054
2004-02-01 08:19:25 +00:00
Chris Lattner
eddfe437c7
Now that tailduplication does not bork SSA form, run mem2reg earlier in gccas.
...
This tremendously improves the code generated by the LLVM optimizer, primarily
by making the inliner more aggressive. For example, it improves the stepanov
benchmark from 55.56 mega-additions/sec to 98.04 Ma/s. It also improves the
oopack/iterator benchmark from 338.3MFLOPS/s to 1103.4MFLOPS/s. Less noteworthy,
it improves oopack/matrix from 573 -> 641 MFLOPS/s.
llvm-svn: 11053
2004-02-01 07:24:53 +00:00
Chris Lattner
ed9b12c31a
Disable tail duplication in any "hard" cases, where it might break SSA form.
...
llvm-svn: 11052
2004-02-01 06:32:28 +00:00
Chris Lattner
cae054f59f
Fix a bug in a recent checkin
...
llvm-svn: 11050
2004-02-01 05:25:07 +00:00
Chris Lattner
7c91a6176c
Fix the count of the number of instructions removed
...
llvm-svn: 11049
2004-02-01 05:15:07 +00:00
Alkis Evlogimenos
8d4f06ed84
Missed one silly assert :-)
...
llvm-svn: 11048
2004-02-01 02:21:31 +00:00
Alkis Evlogimenos
69deb4d236
Simplify joinIntervals() code.
...
llvm-svn: 11047
2004-02-01 02:18:31 +00:00
Chris Lattner
8c285b20b7
Remove all of the annoying statistics now that I'm finished (for the near
...
term) working on bytecode size stuff.
llvm-svn: 11046
2004-02-01 01:50:31 +00:00
Alkis Evlogimenos
91dcc03c39
Use MRegisterInfo::isPhysicalRegister and
...
MRegisterInfo::isVirtualRegister.
llvm-svn: 11045
2004-02-01 01:27:01 +00:00
Chris Lattner
125ed54fdc
Fix a crasher bug in my constant folding rewrite
...
llvm-svn: 11044
2004-02-01 01:23:19 +00:00
Chris Lattner
93f7c40879
Print an error message if we can't materialize the bytecode file
...
llvm-svn: 11043
2004-02-01 01:07:25 +00:00
Chris Lattner
87d16ffdb0
Add comments
...
llvm-svn: 11042
2004-02-01 00:32:48 +00:00
Chris Lattner
8225d83e7b
Print an error message if there is an error materialize the bc file.
...
llvm-svn: 11041
2004-02-01 00:32:35 +00:00
Alkis Evlogimenos
662bb3f495
Apply final part of Chris' patch.
...
llvm-svn: 11040
2004-01-31 23:48:47 +00:00
Alkis Evlogimenos
459a67c309
Be a little smarter on the way we handle physical register defs.
...
llvm-svn: 11038
2004-01-31 23:13:30 +00:00
Chris Lattner
c330b98c1c
Finegrainify namespacification, use new MRegisterInfo::isVirtualRegister
...
method
llvm-svn: 11037
2004-01-31 21:27:19 +00:00
Chris Lattner
a2ef296994
Fix, correctly this time, the computation of the return value
...
Fix a spello
Tighten up the assertion checking
No functionality changes.
llvm-svn: 11036
2004-01-31 21:21:43 +00:00
Chris Lattner
626f431165
* Fix incorrect computation of the runOnMachineFunction return value
...
* Turn a bunch of instance variables into automatic variables
llvm-svn: 11035
2004-01-31 21:14:04 +00:00
Chris Lattner
d835aa6711
Remove unneeded #includes
...
Move Passes.h (which defines the interface to this file) to the top.
Move statistics to the top of the file.
Add a comment
llvm-svn: 11034
2004-01-31 21:07:15 +00:00
Chris Lattner
2f58ffc571
Avoid referencing deleted DSgraphs when merging an SCC into a larger SCC. This
...
fixes the crash in 176.gcc.
llvm-svn: 11033
2004-01-31 21:02:18 +00:00
Alkis Evlogimenos
50d97e33b7
Merge safe parts from last night's buggy commit. These do not break
...
any test cases :-)
llvm-svn: 11032
2004-01-31 19:59:32 +00:00
Chris Lattner
f5e7107425
Add two static methods to avoid having client code explicitly compare against
...
FirstVirtualRegister
llvm-svn: 11031
2004-01-31 19:57:11 +00:00
Alkis Evlogimenos
cdf48ab294
Optimize liveAt() and overlaps(). We now use a binary search instead
...
of a linear search to find the first range for comparisons. This cuts
down the linear scan register allocator running time by a factor of 3
in 254.perlbmk and by a factor of 2.2 in 176.gcc.
llvm-svn: 11030
2004-01-31 16:54:54 +00:00
Alkis Evlogimenos
26665e2636
Revert last night's changes as they broke some tests. Will remerge parts of the patch.
...
llvm-svn: 11029
2004-01-31 14:37:41 +00:00
Alkis Evlogimenos
f2fb0fb486
Several performance enhancements and cleanups from Chris.
...
Simplification of LiveIntervals::Interval::overlaps() and addition of
examples to overlaps() and liveAt() to make them clearer.
llvm-svn: 11028
2004-01-31 04:56:07 +00:00
Chris Lattner
729ea9e1d9
Fix thinko
...
llvm-svn: 11027
2004-01-30 22:48:02 +00:00
Chris Lattner
112902772a
Add some comments sketching out how this is to work eventually.
...
llvm-svn: 11026
2004-01-30 22:25:18 +00:00
Chris Lattner
201c487ad2
Add a new flag, which is only used for symmetry.
...
llvm-svn: 11025
2004-01-30 22:24:18 +00:00
Chris Lattner
4ab96324af
Forward method request to chained aa implementation
...
llvm-svn: 11024
2004-01-30 22:20:55 +00:00
Chris Lattner
a96066186e
New testcase for better mod/ref information that basicaa can provide
...
llvm-svn: 11023
2004-01-30 22:18:47 +00:00
Chris Lattner
f0eac5d0d3
Implement the pointsToConstantMemory() method.
...
llvm-svn: 11022
2004-01-30 22:17:24 +00:00
Chris Lattner
9605576a21
Improve mod/ref information based on the pointsToConstantMemory method.
...
llvm-svn: 11021
2004-01-30 22:16:42 +00:00
Chris Lattner
6866e18e48
Add a new pointsToConstantMemory method to the AliasAnalysis interface
...
which can be implemented to improve the quality of mod-ref information.
llvm-svn: 11020
2004-01-30 22:15:41 +00:00
Chris Lattner
4710add9dd
Add (currently disabled) support to the instruction selector to only insert
...
FP_REG_KILL instructions at the end of blocks involved with critical edges.
Fix a bug where FP_REG_KILL instructions weren't inserted in fall through
unconditional branches. Perhaps this will fix some linscan problems?
llvm-svn: 11019
2004-01-30 22:13:44 +00:00
Chris Lattner
0770862334
Finegrainify namespacification
...
Implement LiveVariables::getIndexMachineBasicBlock
llvm-svn: 11018
2004-01-30 22:08:53 +00:00
Chris Lattner
bc699a10d1
Add a new lazily constructed mapping from Idx's the MBB they represent
...
llvm-svn: 11017
2004-01-30 22:08:09 +00:00
Brian Gaeke
845c0dd196
Give clients of MachineFunctionPrinter the ability to specify a banner and
...
choose an ostream.
llvm-svn: 11016
2004-01-30 21:53:46 +00:00
Misha Brukman
81804b4cb1
Order #includes alphabetically, per style guide.
...
llvm-svn: 11015
2004-01-30 17:26:24 +00:00
Misha Brukman
78fd5d7f95
Doxygenify comments.
...
llvm-svn: 11014
2004-01-30 17:22:50 +00:00
Chris Lattner
6c9861be68
Fix a bug aflicting 265.gap
...
llvm-svn: 11006
2004-01-29 08:36:22 +00:00
Chris Lattner
c0f1e25c01
Minor bugfixes
...
llvm-svn: 11005
2004-01-29 03:32:15 +00:00
Brian Gaeke
0119fba189
I think this is a more robust fix for the Solaris wchar problems (PR206).
...
llvm-svn: 11004
2004-01-28 20:54:41 +00:00
Misha Brukman
bf43787f33
Hyphenate `target-dependent'
...
llvm-svn: 11003
2004-01-28 20:43:01 +00:00
Brian Gaeke
f429a0e6dd
Add a new (static inline) std::ostream& << AllocInfo& method. Use it.
...
llvm-svn: 11002
2004-01-28 19:05:43 +00:00
Chris Lattner
9412b70a4c
Rename DSGraph::ScalarMapTy -> DSScalarMap
...
llvm-svn: 11001
2004-01-28 09:15:42 +00:00
Chris Lattner
f30ae61683
Fix a bug
...
llvm-svn: 11000
2004-01-28 03:31:34 +00:00
Chris Lattner
68e4bb2b13
Eliminate the call to removeTriviallyDeadNodes from updateFromGlobals graph,
...
moving it to the start of removeDeadNodes. This speeds up DSA by 2s on perlbmk
from 41s
llvm-svn: 10999
2004-01-28 03:24:41 +00:00
Chris Lattner
5e14d69d6b
In the TD pass, iterate over globals directly instead of through the whole scalar
...
map. This saves 5s in the TD pass, from 22->17s on perlbmk
llvm-svn: 10998
2004-01-28 03:12:48 +00:00
Chris Lattner
461310139a
In the TD pass, don't iterate over the scalar map to find the globals, iterate over
...
the globals directly. This doesn't save any substantial time, however, because the
globals graph only contains globals!
llvm-svn: 10997
2004-01-28 03:07:30 +00:00
Chris Lattner
63c649a9fa
In updateFromGlobalsGraph, instead of iterating over all of the scalars in the
...
function to find the globals, iterate over all of the globals directly. This
speeds the function up from 14s to 6.3s on perlbmk, reducing DSA time from
53->46s.
llvm-svn: 10996
2004-01-28 03:03:06 +00:00
Chris Lattner
0c0e0d8d6c
Keep track of all of the globals inserted into the scalar map
...
llvm-svn: 10995
2004-01-28 03:01:22 +00:00
Chris Lattner
779ed4f1de
Pull the ScalarMap out into something that is more structured than what we had
...
before. This allows us to have a place to implement optimizations in a
structured way.
llvm-svn: 10994
2004-01-28 02:42:12 +00:00
Chris Lattner
06a40fc140
Minor tweaks, eliminate useless integer pruning optimziation, turn on
...
timers by default
llvm-svn: 10993
2004-01-28 02:41:32 +00:00
Chris Lattner
9f0f7ca74e
Further reduce the number of nodes cloned with getClonedNH, using merge instead.
...
This reduces the number of nodes allocated, then immediately merged and DNE'd
from 2193852 to 1298049. unfortunately this only speeds DSA up by ~1.5s (of
53s), because it's spending most of its time waddling through the scalar map :(
llvm-svn: 10992
2004-01-28 02:11:49 +00:00
Chris Lattner
6ee2b154d4
Add a timer, fix a minor bug.
...
Also, use RC::merge when possible, reducing the number of nodes allocated, then immediately merged away from 2985444 to 2193852 on perlbmk.
llvm-svn: 10991
2004-01-28 02:05:05 +00:00
Chris Lattner
f6f97f9f90
Another bugfix, disable "spurious" output.
...
You gotta love spurious
llvm-svn: 10990
2004-01-28 01:19:52 +00:00
Chris Lattner
26acc890f9
fix bug in previous checkin
...
llvm-svn: 10989
2004-01-27 22:54:56 +00:00
Chris Lattner
54a52e53f0
* Add a new commandline argument to control the "global roots hack". Default
...
it to be off. If it looks like it's completely unnecessary after testing, I
will remove it completely (which is the hope).
* Callers of the DSNode "copy ctor" can not choose to not copy links.
* Make node collapsing not create a garbage node in some cases, avoiding a
memory allocation, and a subsequent DNE.
* When merging types, allow two functions of different types to be merged
without collapsing.
* Use DSNodeHandle::isNull more often instead of DSNodeHandle::getNode() == 0,
as it is much more efficient.
*** Implement the new, more efficient reachability cloner class
In addition to only cloning nodes that are reachable from interesting
roots, this also fixes the huge inefficiency we had where we cloned lots
of nodes, only to merge them away immediately after they were cloned.
Now we only actually allocate a node if there isn't one to merge it into.
* Eliminate the now-obsolete cloneReachable* and clonePartiallyInto methods
* Rewrite updateFromGlobalsGraph to use the reachability cloner
* Rewrite mergeInGraph to use the reachability cloner
* Disable the scalar map scanning code in removeTriviallyDeadNodes. In large
SCC's, this is extremely expensive. We need a better data structure for the
scalar map, because we really want to scan the unique node handles, not ALL
of the scalars.
* Remove the incorrect SANER_CODE_FOR_CHECKING_IF_ALL_REFERRERS_ARE_FROM_SCALARMAP code.
* Move the code for eliminating integer nodes from the trivially dead
eliminator to the dead node eliminator.
* removeDeadNodes no longer uses removeTriviallyDeadNodes, as it contains a
superset of the node removal power.
* Only futz around with the globals graph in removeDeadNodes if it is modified
llvm-svn: 10987
2004-01-27 22:03:40 +00:00
Chris Lattner
070afeb77b
Rewrite to use the reachability cloner interface. Also, make this much more
...
efficient in the case where a function calls into the same graph multiple times
(ie, it either contains multiple calls to the same function, or multiple calls
to functions in the same SCC graph)
llvm-svn: 10986
2004-01-27 21:53:14 +00:00
Chris Lattner
0e43b44c31
minor cleanups
...
llvm-svn: 10985
2004-01-27 21:51:19 +00:00
Chris Lattner
b529730af0
Get clone flags right, so we don't build InlinedGlobals only to clear them
...
llvm-svn: 10984
2004-01-27 21:50:41 +00:00
Chris Lattner
91c33446ca
Minor tweaks
...
llvm-svn: 10983
2004-01-27 21:49:42 +00:00
Chris Lattner
e11e9b9e15
Add comments, allow DSNode "copy ctor" to ignore outgoing links, add more
...
structured access to the globals list, add a couple helper methods.
llvm-svn: 10982
2004-01-27 21:49:25 +00:00
Chris Lattner
748b56f76b
* cloneReachable* and clonePartiallyInto are not obsolete
...
* Make AssertNodeInGraph not be HORRIBLY time consuming
* Eliminate the dead mergeInGlobalsGraph method
*** Add the definition for the new ReachabilityCloner class
llvm-svn: 10981
2004-01-27 21:48:35 +00:00
Chris Lattner
7cd8061230
Start counting projects
...
llvm-svn: 10980
2004-01-27 21:46:23 +00:00
John Criswell
36eebb51f2
Fixed PR#197. The libcrtend library is removed from the library linking list
...
when creating native executables.
llvm-svn: 10979
2004-01-26 23:51:10 +00:00
John Criswell
2edea847fc
Clarified the extension to shared library objects.
...
llvm-svn: 10978
2004-01-26 21:26:54 +00:00
John Criswell
47b48bf951
Updating release notes for PR214.
...
llvm-svn: 10977
2004-01-26 21:03:54 +00:00
John Criswell
e6a41815f3
Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
...
every file.
llvm-svn: 10976
2004-01-26 20:59:41 +00:00
Brian Gaeke
666aaf715f
Fix a couple of places I noticed where "X86" was hard-coded.
...
llvm-svn: 10974
2004-01-24 09:23:46 +00:00
Alkis Evlogimenos
59e3325c26
Fix failing test cases with joined live intervals. It turns out that
...
when joining we need to check if we overlap with the second interval
or any of its aliases.
Also make joining intervals the default.
llvm-svn: 10973
2004-01-23 13:37:51 +00:00
Brian Gaeke
f0cc848602
Add the JITInfo object, accessor & initializer.
...
llvm-svn: 10972
2004-01-23 06:39:30 +00:00
Brian Gaeke
4880432af8
Add CodeEmitter and JITInfo stubs. Dump the old
...
PowerPCTargetMachine::addPassesToJITCompile() method, in favor of the
TargetJITInfo interface.
llvm-svn: 10971
2004-01-23 06:35:43 +00:00
Chris Lattner
78c36d2112
Initial support for implementing clonePartiallyInto in terms of cloneReachableSubgraph, though this support is currently disabled.
...
llvm-svn: 10970
2004-01-23 01:44:53 +00:00
Chris Lattner
7fd9f4ecdc
Add new flag, other minor modifications
...
llvm-svn: 10969
2004-01-23 01:42:32 +00:00
Chris Lattner
f0406a9739
Fix grammar
...
llvm-svn: 10968
2004-01-23 01:42:16 +00:00
Chris Lattner
241ed4c500
Fix a problem brian ran into with the bytecode reader asserting. It turns
...
out that the problem was actually the writer writing out a 'null' value
because it didn't normalize it. This fixes:
test/Regression/Assembler/2004-01-22-FloatNormalization.ll
llvm-svn: 10967
2004-01-23 00:55:21 +00:00
Chris Lattner
6fd5e2bdaf
New testcase for problem brian ran into
...
llvm-svn: 10966
2004-01-23 00:54:26 +00:00
Alkis Evlogimenos
73df113676
Add option to join live intervals. Two intervals are joined if there
...
is a move between two registers, at least one of the registers is
virtual and the two live intervals do not overlap.
This results in about 40% reduction in intervals, 30% decrease in the
register allocators running time and a 20% increase in peephole
optimizations (mainly move eliminations).
The option can be enabled by passing -join-liveintervals where
appropriate.
llvm-svn: 10965
2004-01-22 23:08:45 +00:00
Brian Gaeke
ecc92bfe6e
Move bytecode_libdir def'n to Makefile.config.in from Makefile.rules, so it
...
lives near the other installation dirs (like libdir, bindir, etc.).
Move the rule for making bytecode_libdir out of the ifdef LIBRARYNAME...endif.
llvm-svn: 10964
2004-01-22 22:53:48 +00:00
Brian Gaeke
3f58a875f1
Add autoconf check for the version of etags we have detected, and select
...
appropriate "force C++" command-line option.
llvm-svn: 10963
2004-01-22 21:55:15 +00:00
Brian Gaeke
740515afa2
Regenerated using autoconf-2.57.
...
llvm-svn: 10962
2004-01-22 21:55:02 +00:00
Brian Gaeke
14197679b4
Get autoconf'd ETAGSFLAGS value from configure.
...
llvm-svn: 10961
2004-01-22 21:55:01 +00:00
Brian Gaeke
83d485cfed
Move support for building tags database from Makefile.rules to Makefile, because
...
it's only used in the top-level directory.
llvm-svn: 10960
2004-01-22 21:54:51 +00:00
Alkis Evlogimenos
e1c24c06f9
Remove unneeded check. An interval in active, by definition overlaps
...
with the current one.
llvm-svn: 10959
2004-01-22 20:07:18 +00:00
Alkis Evlogimenos
4716d76d22
Improve debugging output. Remove unneeded virtReg->0 mapping when
...
virtReg lives on the stack. Now a virtual register has an entry in the
virtual->physical map or the virtual->stack slot map but never in
both.
llvm-svn: 10958
2004-01-22 19:24:43 +00:00
Alkis Evlogimenos
19638ab2bd
Revert previous change. The code was correct...
...
llvm-svn: 10957
2004-01-22 19:17:52 +00:00
Alkis Evlogimenos
0aa9d0278d
Fix incorrect negatives in LiveIntervals::Interval::liveAt().
...
llvm-svn: 10956
2004-01-22 18:33:50 +00:00
Chris Lattner
80f89ea522
Eliminated the CompletedNodes argument to the cloneReachable* methods. This
...
map was only used to implement a marginal GlobalsGraph optimization, and it
actually slows the analysis down (due to the overhead of keeping it), so just
eliminate it entirely.
llvm-svn: 10955
2004-01-22 16:56:13 +00:00
Chris Lattner
5750d46ccd
Ok, I'm tired of pulling out all my timers to check stuff in, just do it.
...
llvm-svn: 10954
2004-01-22 16:36:28 +00:00
Chris Lattner
2a0bc1224d
Bug fix: X.mergeWith(Y) was not updating Y if Y was a null node handle!
...
llvm-svn: 10953
2004-01-22 16:31:08 +00:00
Chris Lattner
94f4b2a78b
It doesn't make sense for one side to be const, but not the other.
...
llvm-svn: 10952
2004-01-22 16:08:51 +00:00
Chris Lattner
e75ae61b47
Start implementing DSGraph::clonePartiallyInto and implement mergeInGraph
...
in terms of it.
Though clonePartiallyInto is not cloning partial graphs yet, this change
dramatically speeds up inlining of graphs with many scalars. For example,
this change speeds up the BU pass on 253.perlbmk from 69s to 36s, because
it avoids iteration over the scalar map, which can get pretty large.
llvm-svn: 10951
2004-01-22 15:30:58 +00:00
Chris Lattner
c47cf33346
Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
...
why this one was)
Add new method proto
llvm-svn: 10950
2004-01-22 15:26:52 +00:00
Chris Lattner
11d773f8f8
Specialize std::swap correctly
...
llvm-svn: 10949
2004-01-22 15:26:15 +00:00
Chris Lattner
45fd9d59c0
Allow disabling of ALL printing overhead when performing timings
...
llvm-svn: 10948
2004-01-22 13:42:43 +00:00
Brian Gaeke
4f4cf4b01c
Add DESTDIR support for installing. Use (and depend on) $(bytecode_libdir).
...
llvm-svn: 10947
2004-01-21 23:57:46 +00:00
Brian Gaeke
96deb7dd86
Give the ".../llvm-gcc/bytecode-libs" directory a variable of its own,
...
called bytecode_libdir. Make install-bytecode-library depend on
the existence of that directory, and add a rule for creating it if
it does not exist by calling mkinstalldirs.
llvm-svn: 10946
2004-01-21 23:57:21 +00:00
Brian Gaeke
adfa73d0cf
Part 2 of DESTDIR support
...
llvm-svn: 10945
2004-01-21 23:28:03 +00:00
Misha Brukman
ba3c670292
Implement ModuleProvider::materializeModule() by only materializing functions
...
that are still left in the lazy reader map.
llvm-svn: 10944
2004-01-21 22:55:34 +00:00
Misha Brukman
2cbec5de52
Let subclasses implement ModuleProvider::materializeModule() which is based on
...
their implementation of book-keeping for which functions need to be materialized
and which don't.
llvm-svn: 10943
2004-01-21 22:54:50 +00:00
Misha Brukman
2b5dc166a1
To materialize a module, you need to know what functions NEED to be read and
...
which ones don't, which is state that the parent class doesn't know without
knowing the implementation. Let the children classes implement
materializeModule().
llvm-svn: 10942
2004-01-21 22:54:10 +00:00
Misha Brukman
6e2c6054c1
If you call abort(), #include <cstdlib>
...
llvm-svn: 10941
2004-01-21 22:50:12 +00:00
Brian Gaeke
ec2a01f5fd
Add DESTDIR support for installation, to support RPM etc.
...
llvm-svn: 10940
2004-01-21 21:20:44 +00:00
Brian Gaeke
6cbf285b37
Maybe Misha isn't so buggy after all. He caught the rest of my huge thinko
...
w.r.t. SHLIBEXT starting with a dot.
:-)
llvm-svn: 10939
2004-01-21 21:17:37 +00:00
Brian Gaeke
c38abbd571
Build the PowerPC directory, so it is less likely to bit-rot (again)
...
llvm-svn: 10938
2004-01-21 21:16:10 +00:00
Brian Gaeke
b14a3f73cd
Import of skeletal PowerPC backend I have had laying around for months...
...
llvm-svn: 10937
2004-01-21 21:13:19 +00:00
Brian Gaeke
e00d637c15
Remember, SHLIBEXT begins with a period.
...
llvm-svn: 10936
2004-01-21 19:59:19 +00:00
Brian Gaeke
8625f68ca5
Modified version of patch from mkahl@apple.com to stop hardcoding ".so".
...
llvm-svn: 10935
2004-01-21 19:53:11 +00:00
Brian Gaeke
a2404521d5
Regenerated using autoconf-2.57 and autoheader-2.57.
...
llvm-svn: 10934
2004-01-21 19:39:29 +00:00
Brian Gaeke
20196070c8
Get SHLIBEXT variable from configure script.
...
llvm-svn: 10933
2004-01-21 19:39:07 +00:00
Brian Gaeke
cc3676b0b2
Get the shlib suffix from Libtool, and define it both in config.h and Makefile.config as SHLIBEXT.
...
llvm-svn: 10932
2004-01-21 19:38:56 +00:00
Chris Lattner
c70b3f63cc
SlotCalculator.h moved
...
llvm-svn: 10931
2004-01-20 19:50:34 +00:00
Chris Lattner
ef6883bdcf
Move SlotCalculator.h from include/llvm to include/llvm/Analysis
...
llvm-svn: 10930
2004-01-20 19:50:12 +00:00
Chris Lattner
1d19937343
bug fixed
...
llvm-svn: 10929
2004-01-20 19:16:50 +00:00
Chris Lattner
467d977868
Fix PR212 - Bytecode reader misreads 'long -9223372036854775808'!
...
Fix testcase test/Regression/Assembler/2004-01-20-MaxLongLong.llx
llvm-svn: 10928
2004-01-20 19:13:07 +00:00
Chris Lattner
32afecc336
New testcase for incorrect bytecode reading of MAXLONG. The reader is getting
...
it as zero.
llvm-svn: 10927
2004-01-20 19:00:12 +00:00
Tanya Lattner
7117b9751d
Moved iterators around.
...
llvm-svn: 10926
2004-01-20 17:51:13 +00:00
Tanya Lattner
72494e04be
Moved iterators to common file.
...
llvm-svn: 10925
2004-01-20 17:49:42 +00:00
Chris Lattner
6cc66d93f1
Fix bogus warning and simplify code
...
llvm-svn: 10924
2004-01-20 17:06:29 +00:00
Chris Lattner
083c99e347
Major changes. Now we only compactify individual type planes if it is in
...
fact "profitable" to do so. This makes compactification "free" for small
programs (ie, it is completely disabled) and even helps large programs by
not having to encode pointless compactification planes.
On 176.gcc, this saves 50K from the bytecode file, which is, alas only
a couple percent.
This concludes my head bashing against the bytecode format, at least for
now.
llvm-svn: 10922
2004-01-20 00:57:32 +00:00
Chris Lattner
da550c1efb
add a method proto, make a method not inline
...
llvm-svn: 10921
2004-01-20 00:54:47 +00:00
Chris Lattner
a395324383
Bugfixes for dealing with partially compactified functions
...
llvm-svn: 10920
2004-01-20 00:54:06 +00:00
Misha Brukman
d3de5c6182
Now with HTML 4.01 comliance flavor.
...
llvm-svn: 10919
2004-01-20 00:20:17 +00:00
Chris Lattner
5a66bb7507
Save another 30K from 176.gcc by encoding the compaction table a bit more
...
intelligently.
llvm-svn: 10918
2004-01-18 22:35:34 +00:00
Chris Lattner
979ca2fccd
Remove -debug output
...
llvm-svn: 10917
2004-01-18 22:26:53 +00:00
Chris Lattner
e6f99bd3a9
Add enum for compaction table.
...
llvm-svn: 10916
2004-01-18 21:09:23 +00:00
Chris Lattner
bc02f4ce97
Add support for writing bytecode files with compactiontables for bytecode files.
...
This shrinks the bytecode file for 176.gcc by about 200K (10%), and 254.gap by
about 167K, a 25% reduction. There is still a lot of room for improvement in
the encoding of the compaction table.
llvm-svn: 10915
2004-01-18 21:08:52 +00:00
Chris Lattner
e104d88f83
Add support for reading bytecode files with compactiontables for bytecode files.
...
This shrinks the bytecode file for 176.gcc by about 200K (10%), and 254.gap by
about 167K, a 25% reduction. There is still a lot of room for improvement in
the encoding of the compaction table.
llvm-svn: 10914
2004-01-18 21:08:15 +00:00
Chris Lattner
ca1f8afe85
Add support for building the compactiontable for bytecode files. This shrinks
...
the bytecode file for 176.gcc by about 200K (10%), and 254.gap by about 167K,
a 25% reduction. There is still a lot of room for improvement in the encoding
of the compaction table.
llvm-svn: 10913
2004-01-18 21:07:07 +00:00
Chris Lattner
23e583b5dc
Add support for representing the "compaction table"
...
Change protected members to private. Nothing should subclass SlotCalculator
llvm-svn: 10912
2004-01-18 21:03:49 +00:00
Chris Lattner
f78819d9ad
Eliminate special case handling for CPR's
...
Fix some problem cases where I was building the slot calculator in bytecode
writer mode instead of asmwriter mode.
llvm-svn: 10911
2004-01-18 21:03:06 +00:00
Chris Lattner
e18faa4805
Clarify situation w.r.t the -lowerinvoke pass.
...
llvm-svn: 10909
2004-01-18 20:13:43 +00:00
Chris Lattner
677af4a1cb
Bytecode format for LLVM 1.2 no longer explicitly encodes zeros in primitive
...
type planes. This saves about 5k on 176.gcc, and is needed for a subsequent
patch of mine I'm working on.
llvm-svn: 10908
2004-01-17 23:25:43 +00:00
Chris Lattner
4533ba592b
fix copy-and-pasto
...
llvm-svn: 10907
2004-01-17 22:48:06 +00:00
Chris Lattner
a75f858ac4
Revision of Brian's threading support library to be a bit more generic and
...
platform independent. This code is completely untested (but never used),
and needs autoconf support for detecting pthreads, but it's a start, and
deletes two emails from my inbox. :)
llvm-svn: 10906
2004-01-17 19:54:29 +00:00
Chris Lattner
14004da36c
This file goes away
...
llvm-svn: 10905
2004-01-17 19:35:57 +00:00
Brian Gaeke
8b05e4fcd9
Add a fixed bug
...
llvm-svn: 10904
2004-01-16 21:55:04 +00:00
John Criswell
7a32336316
Remove the use of LLVMGCCARCH. Instead, query the compiler for the
...
location of libgcc.a; that will tell us the name of the directory to find
the libraries that we're looking for.
llvm-svn: 10903
2004-01-16 21:53:23 +00:00
Brian Gaeke
f3aa892409
Remove some whitespace and fix up some comments.
...
Take settings of LCC and LCC1XX from configure.
llvm-svn: 10902
2004-01-16 21:31:34 +00:00
Brian Gaeke
423cecaded
Get paths to cc1 and cc1plus by asking llvm-gcc, and AC_SUBST them.
...
llvm-svn: 10901
2004-01-16 21:31:22 +00:00
Brian Gaeke
6073c44a7f
Regenerated using autoconf-2.57.
...
llvm-svn: 10900
2004-01-16 21:31:21 +00:00
Brian Gaeke
eac97bf984
Take settings of LCC and LCC1XX from configure.
...
llvm-svn: 10899
2004-01-16 21:31:20 +00:00
Brian Gaeke
9d7984408c
Clarify comment.
...
llvm-svn: 10898
2004-01-16 21:13:10 +00:00
Brian Gaeke
6fb3da0c1b
I'm fairly certain this was just a typo.
...
llvm-svn: 10897
2004-01-16 21:12:34 +00:00
Alkis Evlogimenos
d844972574
Handle printing of intervals that are not assign to any physical
...
register yet (2nd try).
llvm-svn: 10896
2004-01-16 20:33:13 +00:00
Alkis Evlogimenos
8672af1cc8
Handle printing of intervals that are not assign to any physical
...
register yet.
llvm-svn: 10895
2004-01-16 20:29:42 +00:00
Alkis Evlogimenos
d86933d21d
Fold open interval ends handling into
...
LiveIntervals::Interval::expiredAt() and simplify regalloc code.
llvm-svn: 10894
2004-01-16 20:17:05 +00:00
Alkis Evlogimenos
e9c6ba891e
Add asserts to previous change.
...
llvm-svn: 10893
2004-01-16 16:23:23 +00:00
Alkis Evlogimenos
3010b3e38e
Use a list instead of a vector to store intervals. This will be needed
...
when we join intervals and one of the two will need to be removed.
llvm-svn: 10892
2004-01-16 16:06:59 +00:00
Misha Brukman
929d1d1ca1
Use the LLVM standard name mangling infrastructure instead of reinventing the
...
wheel.
llvm-svn: 10891
2004-01-15 22:44:19 +00:00
Brian Gaeke
f39fa9e2e5
This is my script for narrowing down miscompilations to a single file.
...
llvm-svn: 10890
2004-01-15 22:35:43 +00:00
Chris Lattner
4c57267ece
If these blocks are empty, there is no reason to even emit the bytecode blocks.
...
This saves about 15K in 176.gcc, coupled with another patch that I'm working on.
llvm-svn: 10889
2004-01-15 21:06:57 +00:00
Chris Lattner
2d0e6f6326
Cleanups & efficiency improvements
...
llvm-svn: 10888
2004-01-15 20:24:09 +00:00
Misha Brukman
c6ef5598ef
Put stylesheet after the title.
...
llvm-svn: 10887
2004-01-15 19:04:12 +00:00
Misha Brukman
67db86a0cc
* HTML 4.01 Strict DTD compliance
...
* Added icons to check document easily
llvm-svn: 10886
2004-01-15 19:03:47 +00:00
Chris Lattner
21699e8f55
The bcwriter does not want ConstantPointerRef's to be indexed, and the asmwriter never did!
...
llvm-svn: 10885
2004-01-15 18:47:15 +00:00
Chris Lattner
f4572852dc
ConstantPointerRef's are no longer emitted. This saves 20028 bytes in the
...
bytecode files when compiling 176.gcc, but more importantly will make it
easier to eliminate CPR's in the future (no new .bc revision will be
required to support them)
llvm-svn: 10884
2004-01-15 18:46:56 +00:00
Chris Lattner
e2f6317436
Allow bytecode files to refer directly to global values as constants, instead
...
of forcing them to go through ConstantPointerRef's. This allows bytecode
files to mirror .ll files, allows more efficient encoding, and makes it easier
to eventually eliminate CPR's.
llvm-svn: 10883
2004-01-15 18:45:25 +00:00
Chris Lattner
980ff78e3c
Fix more breakage with string change.
...
llvm-svn: 10882
2004-01-15 18:39:06 +00:00
Misha Brukman
f5edf1e931
* HTML 4.01 Strict DTD compliance
...
* Use stylesheets instead of adhoc formatting
* Fix broken links in doxygen due to llvm namespace
llvm-svn: 10881
2004-01-15 18:34:11 +00:00
Brian Gaeke
16d4009a1b
Include TargetRegInfo.h and declare SparcTargetMachine forward, to make this
...
header more easily includable.
llvm-svn: 10880
2004-01-15 18:17:07 +00:00
Brian Gaeke
361c004b88
Make this assertion more self-explanatory.
...
llvm-svn: 10879
2004-01-15 18:15:58 +00:00
Chris Lattner
a38ebcc476
Hrm, thanks to misha for paying attention to my foolishness!
...
llvm-svn: 10878
2004-01-15 17:59:29 +00:00
Chris Lattner
6ea3d24663
PR73 is finally fixed
...
llvm-svn: 10877
2004-01-15 17:55:21 +00:00
Chris Lattner
394fc96f39
Fix PR73: bytecode format inconsistent
...
llvm-svn: 10876
2004-01-15 17:55:09 +00:00
Chris Lattner
7c73b19bb8
Fix PR73
...
llvm-svn: 10875
2004-01-15 17:55:01 +00:00
Chris Lattner
f63a4ecc0b
Fix brokenness in my last checking
...
llvm-svn: 10874
2004-01-15 16:56:15 +00:00
Brian Gaeke
456f9a502b
Remove configure support for endianness checking, the need for which
...
Chris has helpfully expunged.
llvm-svn: 10873
2004-01-15 06:22:37 +00:00
Chris Lattner
b3d765f5dd
Remove ENDIAN_* support. LLVM does not need it anymore.
...
llvm-svn: 10872
2004-01-15 06:13:58 +00:00
Chris Lattner
faaf32db19
Change all of the bytecode reader primitives to throw exceptions instead of
...
returning error codes. Because they don't return an error code, they can
return the value read, which simplifies the code and makes the reader more
efficient (yaay!).
Also eliminate the special case code for little endian machines.
llvm-svn: 10871
2004-01-15 06:13:09 +00:00
Chris Lattner
1af644d9d6
Remove the optimization that depends on ENDIAN_LITTLE: it's not worth it.
...
llvm-svn: 10870
2004-01-15 06:11:30 +00:00
Chris Lattner
604d5f36fe
Remove broken doxygen comments
...
llvm-svn: 10869
2004-01-15 04:37:10 +00:00
Misha Brukman
7f67e378be
* Conform to HTML 4.01 strict DTD
...
* Use stylesheets instead of hard-coding formatting
llvm-svn: 10868
2004-01-15 00:14:41 +00:00
Misha Brukman
0bb8e9c3de
Make the stylesheet conform to CSS standard.
...
llvm-svn: 10867
2004-01-15 00:13:59 +00:00
Chris Lattner
b05f02336c
Improve comments, add support for remembering the constants strings that
...
are to be emitted.
llvm-svn: 10866
2004-01-14 23:37:43 +00:00
Chris Lattner
d8087822be
add support for -- for symmetry
...
llvm-svn: 10865
2004-01-14 23:37:22 +00:00
Chris Lattner
6229fbf328
The new bytecode format supports emitting strings a special case. This is
...
intended to save size (and does on small programs), but on big programs it
actually increases the size of the program slightly. The deal is that many
functions end up using the characters that the string contained, and the
characters are no longer in the global constant table, so they have to be
emitted in function specific constant pools.
This pessimization will be fixed in subsequent patches.
llvm-svn: 10864
2004-01-14 23:36:54 +00:00
Chris Lattner
394afe0f90
Version 1.2 now supports encoding strings as a special case, to avoid having
...
to emit all of those sbyte constants.
llvm-svn: 10863
2004-01-14 23:35:21 +00:00
Chris Lattner
de36304453
When emitting bytecode, handle strings specially. Do not add the characters
...
that make up the strings to the slotcalculator.
llvm-svn: 10862
2004-01-14 23:34:39 +00:00
Chris Lattner
c6098c06d5
Like output_data, it's obvious that input_data was only used with 1 character
...
data.
llvm-svn: 10861
2004-01-14 23:03:22 +00:00
Chris Lattner
369dbe2a09
"fix" a nasty race condition
...
llvm-svn: 10860
2004-01-14 21:18:03 +00:00
Chris Lattner
55ca34ab8a
Fix some exception safety problems
...
llvm-svn: 10859
2004-01-14 20:58:17 +00:00
Chris Lattner
2d6902b4b6
Hrm, apparently I missed lowering this intrinsic. :(
...
llvm-svn: 10858
2004-01-14 20:41:29 +00:00
Chris Lattner
eeb4ffd8ea
It is obvious that this has never been used for outputing more than a single
...
byte, it's totally endian incorrect!
llvm-svn: 10857
2004-01-14 18:50:28 +00:00
Chris Lattner
29f9590e82
Be const correct
...
llvm-svn: 10856
2004-01-14 18:41:38 +00:00
Chris Lattner
e8701f690f
Fix bug in previous checkin: Demorgan would be ashamed of me, I need to
...
lay off the crack.
llvm-svn: 10855
2004-01-14 17:51:53 +00:00
Chris Lattner
93cd755c05
Eliminate the isStringCompatible function, using ConstantArray::isString.
...
It's not clear why the code was looking for signed chars < 0, but it can't
matter to the assembler anyway, so the check goes away. This also fixes
compatibility with arrays of [us]byte that have constantexprs in them.
Also slightly restructure some code to be cleaner.
llvm-svn: 10854
2004-01-14 17:15:17 +00:00
Chris Lattner
ac2b198ec5
Eliminate the isStringCompatible function, using ConstantArray::isString.
...
It's not clear why the code was looking for signed chars < 0, but it can't
matter to the assembler anyway, so the check goes away.
llvm-svn: 10853
2004-01-14 17:14:42 +00:00
Chris Lattner
3dc08ebb5f
Use new method
...
llvm-svn: 10852
2004-01-14 17:07:46 +00:00
Chris Lattner
e8dfccaabd
Implement ConstantArray::isString
...
llvm-svn: 10851
2004-01-14 17:06:38 +00:00
Chris Lattner
87ce7dcb3e
Add new ConstantArray::isString(), as the conditions for using getString()
...
are complex enough to check that it should be a seperate method.
While I'm here, improve ConstantArray::getNullValue a bit, though the
FIXME is still quite valid.
llvm-svn: 10850
2004-01-14 17:06:21 +00:00
Chris Lattner
9a38c78fe6
Ok, I can't handle it. This is a temporary checkin of a ton of statistics that
...
i'm using in my work to reduce the bytecode file sizes. These will eventually
be removed.
llvm-svn: 10849
2004-01-14 16:54:21 +00:00
Chris Lattner
893b184db0
Remove support for the pre-1.0 bytecode version #1 . This will become
...
the bytecode revision generated by LLVM 1.2.
llvm-svn: 10848
2004-01-14 16:44:44 +00:00
Alkis Evlogimenos
0680572553
Properly update #intervals statistic.
...
llvm-svn: 10847
2004-01-14 10:44:29 +00:00
Chris Lattner
1f7942fe7d
Fix InstCombine/2004-01-13-InstCombineInvokePHI.ll, which also fixes lots
...
of C++ programs in Shootout-C++, including lists1 and moments, etc
llvm-svn: 10845
2004-01-14 06:06:08 +00:00
Brian Gaeke
1c0133ffd9
Don't pass anything to the IntrinsicLowering class that is not_intrinsic,
...
because that makes it abort. Also, fix a typo in a comment.
This checkin brought to you by the "It only takes about 30 seconds to run
ENABLE_LLI tests on Shootout on zion, even if they all dump core" fund.
llvm-svn: 10844
2004-01-14 06:02:53 +00:00
Chris Lattner
062f3ddaf5
new testcase
...
llvm-svn: 10843
2004-01-14 05:53:11 +00:00
Chris Lattner
02062823f7
Fix check. PHI nodes must be handled specially, of course.
...
llvm-svn: 10842
2004-01-14 05:42:52 +00:00
Chris Lattner
ec5089a223
Tighten up verifier checks. The result of an invoke instruction only
...
dominates the normal destination, not the exceptional dest (ie, the result
of a call is undefined on an exception)
llvm-svn: 10841
2004-01-14 04:25:59 +00:00
Chris Lattner
298d2f090f
Make sure to verify the result before writing out the bytecode file. Not doing
...
so can cause obscure errors downstream.
llvm-svn: 10840
2004-01-14 03:39:46 +00:00
Chris Lattner
2f1aa118a4
finegrainify namespacification
...
llvm-svn: 10839
2004-01-14 03:38:37 +00:00
Chris Lattner
1f018c2d01
Toggle sense of flag
...
llvm-svn: 10838
2004-01-14 02:50:16 +00:00
Chris Lattner
6089bb1f19
The only clients of the slot calculator are now the asmwriter and bcwriter.
...
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not. This makes it
reasonable to add bcwriter specific stuff to it as necessary.
llvm-svn: 10837
2004-01-14 02:49:34 +00:00
Alkis Evlogimenos
2615c98042
Fix bug in LiveIntervals::Interval::overlaps and
...
LiveIntervals::Interval::liveAt. Both were considering the live ranges
closed in the end, when they are actually open.
llvm-svn: 10835
2004-01-14 00:20:09 +00:00
Alkis Evlogimenos
a0865cec3f
Improve debugging output.
...
llvm-svn: 10834
2004-01-14 00:09:36 +00:00
Alkis Evlogimenos
0431621429
Fix miscomputation of live intervals. The catch is that registers can
...
be dead at the defining instruction but can only be killed in
subsequent ones.
llvm-svn: 10833
2004-01-13 22:26:14 +00:00
Brian Gaeke
edf6c9d5a4
You know you like Makefiles with fewer variables. Next up on the victim list
...
is TOOLS, which is how you say LLVMTOOLCURRENT in Oldspeak.
llvm-svn: 10832
2004-01-13 22:22:19 +00:00
Alkis Evlogimenos
1a01c80f1b
Remove allocatable registers vector. It is already provided by
...
LiveVariables.
llvm-svn: 10830
2004-01-13 22:10:43 +00:00
Brian Gaeke
c0e7e5341e
Get rid of dead defns of LCC, LCXX, LAS, as per FIXME.
...
llvm-svn: 10829
2004-01-13 22:10:06 +00:00
Brian Gaeke
b96e5772f0
Fix overzealous fixme fixing
...
llvm-svn: 10827
2004-01-13 21:59:51 +00:00
Brian Gaeke
493c4c7f12
Remove dead definitions of NATGCC and CP, and dead .tll, .tbc rules.
...
Make should continue even if compilation cmds fail, for the sake of
the nightly tester, so use minuses on them.
Use LLVMAS, LLVMGCC, LLVMGXX instead of LAS, LCC, LCXX (as per FIXME).
llvm-svn: 10825
2004-01-13 21:56:30 +00:00
Alkis Evlogimenos
13e8623a3f
Cleanup debugging output.
...
llvm-svn: 10824
2004-01-13 21:53:20 +00:00
Chris Lattner
66f33ff6c2
Finegrainify namespacification
...
Using the SlotCalculator is total overkill for this file, a simple map
will suffice. Why doesn't this use the NameMangler interface?
llvm-svn: 10823
2004-01-13 21:27:59 +00:00
Alkis Evlogimenos
33f9cb1da7
Fix output of live intervals to show correctly its closed, open
...
ranges, i.e. [a,b)
llvm-svn: 10822
2004-01-13 21:17:47 +00:00
Alkis Evlogimenos
9d0c3d21c8
Remove unneeded check (with the recent change in live variables a use
...
of a physical register is always dominated by a def).
llvm-svn: 10821
2004-01-13 21:16:25 +00:00
Alkis Evlogimenos
65bc990bda
Indentation and whitespace cleanups.
...
llvm-svn: 10820
2004-01-13 20:42:08 +00:00
Alkis Evlogimenos
6b1ec75da9
Fix bug introduced by previous commit: check if fixed intervals
...
overlap before adding their spill weight.
llvm-svn: 10819
2004-01-13 20:37:01 +00:00
Brian Gaeke
dbd9c33e5e
Remove dump-input option.
...
Make addPassesToEmitAssembly() look slightly more like addPassesToJITCompile().
llvm-svn: 10818
2004-01-13 19:26:21 +00:00
Brian Gaeke
f26dad5432
Regenerated using autoheader-2.57.
...
llvm-svn: 10817
2004-01-13 07:09:57 +00:00
Brian Gaeke
663a05917e
Simplify configure rules. (I don't know if anyone else cares...)
...
llvm-svn: 10816
2004-01-13 07:09:56 +00:00
Brian Gaeke
07e46214d0
Whoopsie. I should remember to use aclocal next time.
...
llvm-svn: 10815
2004-01-13 06:52:10 +00:00
Brian Gaeke
2abe7ae3b6
Remove and/or shorten many comments in configure.ac.
...
Remove checks for many common Unix programs. Our build process currently
assumes they are there and makes no provisions for any other world-views.
(We can add some of these checks back at some later time if it should prove
useful, but right now, we do not need to check to see whether "rm" exists.)
Remove checks for many common standard C headers and functions. We assume
ISO/ANSI C++, and we always use the <cfoo> versions of ANSI C's <foo.h>
headers, so these checks will not help anything.
Edit configure's warning messages for clarity and content.
Change checks for "optional" programs to default to using "true" instead of
"false", so that a failure to find, e.g., etags, will be less likely to result
in make failing.
No longer shall we check for --enable-purify or --with-purify options.
No longer shall we propagate these to the Makefiles.
configure regenerated using autoconf-2.57.
Please feel free to send me any questions or comments you have. :-)
llvm-svn: 10814
2004-01-13 06:43:16 +00:00
Alkis Evlogimenos
ebbd66c042
Correctly compute live variable information for physical registers
...
when an implicitely defined register is later used by an alias. For example:
call foo
%reg1024 = mov %AL
The call implicitely defines EAX but only AL is used. Before this fix
no information was available on AL. Now EAX and all its aliases except
AL get defined and die at the call instruction whereas AL lives to be
killed by the assignment.
llvm-svn: 10813
2004-01-13 06:24:30 +00:00
Chris Lattner
061da2f059
Implement a bunch of symbolic constant folding opportunities. This implements
...
testcase test/Regression/Assembler/ConstantExprFold.llx
Note that these kinds of things only rarely show up in source code, but are
exceedingly common in the intermediate stages of algorithms like SCCP. By
folding things (especially relational operators) that use symbolic constants,
we are able to speculatively fold more conditional branches, which can
lead to some big simplifications.
It would be easy to add a lot more special cases here, so if you notice
SCCP missing anything "obvious", you know what to make smarter. :)
llvm-svn: 10812
2004-01-13 05:51:55 +00:00
Chris Lattner
29d0a24201
New testcase for symbolic constant folding opportunities that LLVM should get.
...
llvm-svn: 10811
2004-01-13 05:32:27 +00:00
Chris Lattner
dab8b6bb50
Implement new Instruction::isRelational method
...
llvm-svn: 10810
2004-01-12 23:18:25 +00:00
Chris Lattner
bf007407c5
Add new method
...
llvm-svn: 10809
2004-01-12 23:18:06 +00:00
Chris Lattner
1dd054c41b
Rearrange and comment code better. No functionality changes
...
llvm-svn: 10808
2004-01-12 22:07:24 +00:00
Chris Lattner
5a945e3616
Rename ConstantHandling.* -> ConstantFolding.*
...
Move a bunch of (now) private stuff from ConstantFolding.h into
ConstantFolding.cpp.
This _finally_ gets us to a place where we have a sane constant folder. The
rules are:
1. LLVM clients now use ConstantExpr::get* methods to fold constants. If they
cannot be folded, a constantexpr is created, so these methods always return
valid Constant*'s.
2. The implementation of ConstantExpr::get* uses the functions exposed by
ConstantFolding.h to try to fold constants. If they cannot be folded,
they should return a null pointer.
3. The implementation of ConstantFolding can do whatever it wants, and only
has one client (Constants.cpp)
This cuts down on the wierd dependencies, and eliminates the two interfaces.
The old constanthandling interface was especially bad for clients to use
because almost none of them took the failure condition into consideration,
thus leading to obscure problems.
llvm-svn: 10807
2004-01-12 21:13:12 +00:00
Chris Lattner
6ff6ceaf75
Remove a whole bunch more ugliness. This is actually getting to the point of
...
this whole refactoring: allow constant folding methods to return something
other than predefined classes, allow them to return generic Constant*'s.
llvm-svn: 10806
2004-01-12 21:02:29 +00:00
Chris Lattner
2361bd02a1
Move ConstantHandling.h into lib/VMCore and out of include/llvm
...
llvm-svn: 10805
2004-01-12 20:48:11 +00:00
Chris Lattner
e4867d75dd
Move this file to lib/VMCore
...
llvm-svn: 10804
2004-01-12 20:47:29 +00:00
Chris Lattner
7998ce01d4
Eliminate a lot of out-of-date comments, and all of the wierd overloaded
...
operator constant folding stuff.
llvm-svn: 10803
2004-01-12 20:43:44 +00:00
Chris Lattner
f8348c3549
Eliminate usage of the wierd overloaded operator constant folders
...
llvm-svn: 10802
2004-01-12 20:41:05 +00:00
Chris Lattner
0bba771f49
Eliminate ConstantFoldShiftInstruction reference
...
llvm-svn: 10801
2004-01-12 20:40:42 +00:00
Chris Lattner
b1505c8594
Remove use of ConstantHandling itf
...
llvm-svn: 10800
2004-01-12 20:13:04 +00:00
Chris Lattner
6b052f2154
Clean up #includes
...
llvm-svn: 10799
2004-01-12 19:56:36 +00:00
Chris Lattner
fcf21a75b0
Fix bug in previous checkin
...
llvm-svn: 10798
2004-01-12 19:47:05 +00:00
Chris Lattner
abc7519fc8
The getShift method is no obsolete
...
llvm-svn: 10797
2004-01-12 19:37:26 +00:00
Chris Lattner
c1e7cc0fbe
Eliminate use of ConstantHandling and ConstantExpr::getShift interfaces
...
llvm-svn: 10796
2004-01-12 19:35:11 +00:00
Chris Lattner
d7ccc9e5a5
Add header file I accidentally removed in teh shuffle
...
llvm-svn: 10795
2004-01-12 19:15:20 +00:00
Chris Lattner
9eb2b527ad
Fix out of date comment, remove use of ConstantExpr::getShift
...
llvm-svn: 10794
2004-01-12 19:12:58 +00:00
Chris Lattner
c9fb4a3b89
Remove use of the ConstantHandling interfaces
...
llvm-svn: 10793
2004-01-12 19:12:50 +00:00
Chris Lattner
429963742e
Remove use of ConstantExpr::getShift
...
llvm-svn: 10792
2004-01-12 19:10:58 +00:00
Chris Lattner
1b7d4d7b63
Don't use ConstantExpr::getShift anymore
...
llvm-svn: 10791
2004-01-12 19:08:43 +00:00
Chris Lattner
5645e8a82d
Make ConstantExpr::get work for shifts as well
...
llvm-svn: 10790
2004-01-12 19:04:55 +00:00
Chris Lattner
2853a7ed22
Remove use of ConstantHandling
...
llvm-svn: 10789
2004-01-12 18:35:03 +00:00
Chris Lattner
118a76cb2f
Remove unneeded #include
...
llvm-svn: 10788
2004-01-12 18:33:54 +00:00
Chris Lattner
c04cf98fb6
llvm::ConstantFoldInstruction
...
llvm-svn: 10787
2004-01-12 18:25:56 +00:00
Chris Lattner
aecd3e8a10
Move prototype of llvm::ConstantFoldInstruction
...
llvm-svn: 10786
2004-01-12 18:25:44 +00:00
Chris Lattner
fc6c859a0c
Move llvm::ConstantFoldInstruction from VMCore to here, next to ConstantFoldTerminator
...
llvm-svn: 10785
2004-01-12 18:25:22 +00:00
Chris Lattner
0df14b3f2b
Move llvm::ConstantFoldInstruction from here to Transforms/Utils
...
llvm-svn: 10784
2004-01-12 18:25:03 +00:00
Chris Lattner
81d8822396
Remove uses of ConstantHandling itf
...
llvm-svn: 10783
2004-01-12 18:12:44 +00:00
Chris Lattner
fe2aafe08a
Eliminate use of ConstantHandling itf
...
llvm-svn: 10782
2004-01-12 18:08:18 +00:00
Chris Lattner
85f325b544
Remove use of ConstantHandling itf
...
llvm-svn: 10781
2004-01-12 18:02:15 +00:00
Chris Lattner
c99dd898af
Eliminate use of ConstantHandling itf
...
llvm-svn: 10780
2004-01-12 17:57:32 +00:00
Chris Lattner
0fe5b32c01
Use constantexprs for casts. Eliminate use of the ConstantHandling interfaces
...
llvm-svn: 10779
2004-01-12 17:43:40 +00:00
Chris Lattner
fe992d4332
Fix fairly severe bug in my last checking where we treated all unfoldable
...
constants as being "true" when evaluating branches. This was introduced
because we now create constantexprs for the constants instead of failing the
fold.
llvm-svn: 10778
2004-01-12 17:40:36 +00:00
Chris Lattner
4bb9bc3a65
Eliminate annoying warnings from the tester, hopefully for real this time.
...
llvm-svn: 10777
2004-01-12 16:55:30 +00:00
John Criswell
42967349be
Modified the configure script so that it defines BISON as the bison
...
binary and YACC as bison -y.
llvm-svn: 10776
2004-01-12 16:18:21 +00:00
John Criswell
cd08e2815f
The configure script now defines BISON as the name of the bison program and
...
YACC as bison -y. In this way, we ensure that bison is being used, but
the Makefiles have macros for using bison itself and for getting bison to
act like it is traditional yacc.
llvm-svn: 10774
2004-01-12 16:14:54 +00:00
Alkis Evlogimenos
975c8bde79
Output mov %REG = 0 instead of xor %REG, %REG, %REG to clear a
...
register so that LiveVariable analysis is not confused.
llvm-svn: 10773
2004-01-12 07:22:45 +00:00
Chris Lattner
69fba00b85
Bug fixed
...
llvm-svn: 10770
2004-01-12 05:15:04 +00:00
Chris Lattner
e0536857aa
Testcase for PR204
...
llvm-svn: 10769
2004-01-12 05:01:48 +00:00
Chris Lattner
950b713d22
Add support for %llvmgcc
...
llvm-svn: 10768
2004-01-12 05:01:13 +00:00
Chris Lattner
49f74522ec
* Implement minor performance optimization for the getelementptr case
...
* Implement SCCP of load instructions, implementing Transforms/SCCP/loadtest.ll
This allows us to fold expressions like "foo"[2], even if the pointer is only
a conditional constant.
llvm-svn: 10767
2004-01-12 04:29:41 +00:00
Chris Lattner
2ca9b10b6a
Test to make sure we can SCCP load instructions
...
llvm-svn: 10766
2004-01-12 04:28:32 +00:00
Chris Lattner
7e8af38637
Do not hack on volatile loads. I'm not sure what the point of a volatile load
...
from constant memory is, but lets not take chances.
llvm-svn: 10765
2004-01-12 04:13:56 +00:00
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
Chris Lattner
e7670a0bbb
Add a faq entry for the demo page
...
llvm-svn: 10488
2003-12-16 22:33:55 +00:00
Brian Gaeke
b69acf9a87
Fix typo in comment.
...
llvm-svn: 10487
2003-12-16 21:55:45 +00:00
Chris Lattner
e5ac39d664
There is no reason to add -load support to LLC
...
llvm-svn: 10483
2003-12-15 23:10:25 +00:00
Misha Brukman
34cba91956
Added info about PR186: weak linkage on memory functions.
...
llvm-svn: 10479
2003-12-15 22:48:12 +00:00
Misha Brukman
97f451555d
Make all memory functions have weak linkage so that they can be overridden with
...
custom memory-management implementations (e.g., bash).
llvm-svn: 10478
2003-12-15 22:32:50 +00:00
Chris Lattner
6c08bb8b8e
Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx
...
llvm-svn: 10473
2003-12-15 17:34:02 +00:00
Chris Lattner
98c265a382
New testcase, for PR185
...
llvm-svn: 10471
2003-12-15 17:33:41 +00:00
Chris Lattner
83025b214b
This header is dead
...
llvm-svn: 10470
2003-12-15 06:39:18 +00:00
Alkis Evlogimenos
8870674da7
Change preserve all claim to just preserve live variables and phielimination.
...
llvm-svn: 10469
2003-12-15 04:55:38 +00:00
Chris Lattner
ab475b85f7
New testcase
...
llvm-svn: 10468
2003-12-15 00:03:53 +00:00
Chris Lattner
884e824534
Refactor code just a little bit, allowing us to implement TailCallElim/return_constant.ll
...
llvm-svn: 10467
2003-12-14 23:57:39 +00:00
Chris Lattner
0fcc74f1df
new test
...
llvm-svn: 10466
2003-12-14 23:39:34 +00:00
Chris Lattner
1809966189
Finegrainify namespacification
...
llvm-svn: 10465
2003-12-14 23:25:48 +00:00
Chris Lattner
c9499b6a20
Finegrainify namespacification
...
llvm-svn: 10464
2003-12-14 21:35:53 +00:00
Chris Lattner
dd978ce8c5
Finegrainify namespacification
...
Make the Timer code give correct user/system/user+system times when -track-memory is enabled
llvm-svn: 10463
2003-12-14 21:27:33 +00:00
Alkis Evlogimenos
fc2234ff4b
I wonder how this didn't cause any tests to fail...
...
llvm-svn: 10462
2003-12-14 13:30:19 +00:00
Alkis Evlogimenos
aaba4639f8
Change interface of MachineOperand as follows:
...
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
b) add isUse(), isDef()
c) rename opHiBits32() to isHiBits32(),
opLoBits32() to isLoBits32(),
opHiBits64() to isHiBits64(),
opLoBits64() to isLoBits64().
This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.
llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Alkis Evlogimenos
fbeb3b02c3
Change preserve all claim to just preserve live variables and phielimination.
...
llvm-svn: 10460
2003-12-14 10:14:23 +00:00
Chris Lattner
5a8a7282dc
Rev the release notes to 1.2
...
llvm-svn: 10459
2003-12-14 05:03:43 +00:00
Chris Lattner
d1c371c32c
Do not promote volatile alias sets into registers
...
llvm-svn: 10458
2003-12-14 04:52:31 +00:00
Chris Lattner
0a14060ce2
Finegrainify namespacification
...
Add capability to represent volatile AliasSet's
Propagate this information from loads&stores into the aliassets
llvm-svn: 10457
2003-12-14 04:52:11 +00:00
Chris Lattner
310da97240
Add capability to represent volatile AliasSet's
...
llvm-svn: 10456
2003-12-14 04:51:34 +00:00
Chris Lattner
29da20f96c
Testcase for PR179
...
llvm-svn: 10455
2003-12-14 04:46:07 +00:00
Alkis Evlogimenos
4f7f017ab5
When reserving a preallocated register spill the aliases of this
...
register too.
llvm-svn: 10450
2003-12-13 11:58:10 +00:00
Alkis Evlogimenos
7dbdf3839c
Ignore non-allocatable physical registers in live interval analysis.
...
llvm-svn: 10449
2003-12-13 11:11:02 +00:00
Alkis Evlogimenos
ed53b35076
Expire any active intervals left when register allocation is done.
...
llvm-svn: 10448
2003-12-13 05:50:19 +00:00
Alkis Evlogimenos
e6dc614c3c
Add instruction numbers to debugging output.
...
llvm-svn: 10447
2003-12-13 05:48:57 +00:00
Alkis Evlogimenos
904cd6d48c
Add a floating point killer pass. This pass runs before register
...
allocaton on the X86 to add information to the machine code denoting
that our floating point stackifier cannot handle virtual point
register that are alive across basic blocks. This pass adds an
implicit def of all virtual floating point register at the end of each
basic block.
llvm-svn: 10446
2003-12-13 05:36:22 +00:00
Alkis Evlogimenos
06f379a278
Handle explicit physical register defs.
...
llvm-svn: 10445
2003-12-13 05:26:39 +00:00
Alkis Evlogimenos
9bced9455a
Remove unecessary if statements when looping on ImplicitDefs.
...
llvm-svn: 10444
2003-12-13 01:20:58 +00:00
Chris Lattner
6f9e65ef7a
Try rewording stuff talking about unwinding. Hopefully it will make llvm sound less bad, and still make John happy. :)
...
llvm-svn: 10439
2003-12-12 21:33:08 +00:00
Chris Lattner
b84f3323f7
Link to lists, incorporate feedback from Tanya
...
llvm-svn: 10438
2003-12-12 21:22:16 +00:00
John Criswell
8cc89ca6bc
Updated configure script so that it does not configure llvm/project
...
directories that do not contain a configure script.
llvm-svn: 10437
2003-12-12 20:15:23 +00:00
John Criswell
6f73d28adf
Don't configure directories that don't have a configure script (i.e Stacker).
...
llvm-svn: 10436
2003-12-12 20:09:33 +00:00
John Criswell
c6efb11f02
Modified cast so that it converts the int to a long before casting to
...
a pointer. This evades a warning emitted by GCC when we cast from
unsigned int (32 bit) to void * (64 bit) on SparcV9.
llvm-svn: 10435
2003-12-12 19:57:48 +00:00
John Criswell
604cd3c85f
Fixed some minor typos.
...
Moved the new gccld feature to be in the list of enhancements.
Re-worded information on SPEC 2000 and Sparc support to try to make them
more accurate and precise.
llvm-svn: 10434
2003-12-12 19:54:20 +00:00
Brian Gaeke
13a2e54e0c
Dynamically get the right-sized member of a GenericValue to hold a size_t, and
...
use it to return the result of strlen.
llvm-svn: 10433
2003-12-12 15:38:06 +00:00
Chris Lattner
542d24f530
PR177 is no longer among the open
...
llvm-svn: 10432
2003-12-12 07:26:25 +00:00
Chris Lattner
89af2d5a36
Implement the ExecutionEngine::getPointerToFunctionOrStub by forwarding the
...
request on to the TargetMachine if it supports the getJITStubForFunction method
llvm-svn: 10431
2003-12-12 07:12:02 +00:00
Chris Lattner
2e7416cb04
Implement the TargetMachine::getJITStubForFunction method for X86, finegrainify
...
namespacification.
llvm-svn: 10430
2003-12-12 07:11:18 +00:00
Chris Lattner
538dffd9fa
Add new getJITStubForFunction method, which may optionally be implemented by
...
targets for better performance.
llvm-svn: 10429
2003-12-12 07:10:32 +00:00
Chris Lattner
fa41ea3397
Doxygenify comments, remove extraneous #include
...
llvm-svn: 10428
2003-12-12 06:31:42 +00:00
Chris Lattner
4b34b35549
Note about bytecode format
...
llvm-svn: 10427
2003-12-12 05:52:39 +00:00
Brian Gaeke
8657acc07e
Since we are using a gep_type_iterator, we apparently must get the type
...
index by using I.getOperand() here. This was failing an assertion on
basically every struct access.
llvm-svn: 10426
2003-12-12 05:13:05 +00:00
Brian Gaeke
e60a0289d4
Use uintptr_t for pointer values in the ExecutionEngine.
...
llvm-svn: 10425
2003-12-12 05:06:09 +00:00
Brian Gaeke
1fe9f83b52
Fix typo in comment
...
llvm-svn: 10424
2003-12-12 04:58:13 +00:00
Chris Lattner
eb8b184825
These aren't bugs, don't phrase them like they are.
...
llvm-svn: 10423
2003-12-12 04:56:02 +00:00
Chris Lattner
88e24cffe6
I'm a spaz
...
llvm-svn: 10422
2003-12-12 04:51:00 +00:00
Chris Lattner
d25f26fce8
Add note about Stacker, duh!
...
llvm-svn: 10421
2003-12-12 04:45:09 +00:00
Misha Brukman
8395d737f2
Break lines and add space after ':' to be consistent in layout.
...
llvm-svn: 10420
2003-12-12 04:37:31 +00:00
Chris Lattner
e76e9abeab
More updates for the release
...
llvm-svn: 10419
2003-12-12 04:25:33 +00:00
Brian Gaeke
d24cfed317
Throw better error messages, by calling strerror(errno) when we
...
get an error inside the bytecode reader.
llvm-svn: 10415
2003-12-12 00:47:44 +00:00
Brian Gaeke
1f147379b7
Add an assertion to make sure we are at least getting argv[0] right.
...
Use a clearer error message when we fail to load a program.
llvm-svn: 10414
2003-12-12 00:47:19 +00:00
Chris Lattner
e4151eba68
Update release notes for PR86 and C++ support
...
llvm-svn: 10413
2003-12-11 23:31:21 +00:00
Chris Lattner
1eed55d6b9
Factor out some duplicated code, implement the rest of the cases in
...
BasicAA/2003-12-11-ConstExprGEP.ll
llvm-svn: 10412
2003-12-11 23:20:16 +00:00
Chris Lattner
ace41617c7
Rename variable to avoid confusing it with the global G
...
llvm-svn: 10411
2003-12-11 22:49:32 +00:00
Chris Lattner
6ea17f77f8
Fix PR86. This makes basicaa _SIGNIFICANLY_ more aggressive with getelementptr's
...
llvm-svn: 10410
2003-12-11 22:44:13 +00:00
Chris Lattner
34399dda2d
Fix LICM/2003-12-11-SinkingToPHI.ll, and quite possibly all of the other known problems in the universe.
...
llvm-svn: 10409
2003-12-11 22:23:32 +00:00
Chris Lattner
99146bb2a7
New testcase that LICM is breaking crafty on
...
llvm-svn: 10408
2003-12-11 22:15:11 +00:00
Chris Lattner
62aff8412a
Finegrainify namespacification
...
Add new -print-cfg-only pass
llvm-svn: 10407
2003-12-11 21:48:18 +00:00
Chris Lattner
027253b0d5
verifyFunction depends on dominator info, which levelraise does not declare
...
that it needs. This is pretty scary code! This fixes
Regression.Transforms.LevelRaise.2002-07-16-SourceAndDestCrash
Regression.Transforms.LevelRaise.2002-07-31-AssertionFailure
llvm-svn: 10406
2003-12-11 21:47:37 +00:00
Chris Lattner
15b2e377ae
Fix test that was failing because we were optimizing the program better than expected :)
...
llvm-svn: 10404
2003-12-11 21:06:43 +00:00
Chris Lattner
659a500e57
New testcase for PR86
...
llvm-svn: 10403
2003-12-11 19:16:30 +00:00
Chris Lattner
ed9fc4baad
Run tailcall elimination in a more logical place
...
llvm-svn: 10402
2003-12-11 17:50:32 +00:00
Chris Lattner
17790fbb5b
Fix a glaring bug
...
llvm-svn: 10400
2003-12-11 06:06:28 +00:00
Chris Lattner
bc1197f292
Realize the gep P, <zeros> must aliases P.
...
This is a partial fix for PR 86
llvm-svn: 10399
2003-12-11 06:02:00 +00:00
Chris Lattner
abb3bea6ce
With Brian's change to AA.h we can now clean out this uglyness
...
llvm-svn: 10398
2003-12-11 05:44:59 +00:00
Brian Gaeke
b453bc5957
IncludeFile hack to pull in BasicValueNumbering whenever ValueNumbering.h
...
is included.
llvm-svn: 10397
2003-12-11 05:05:56 +00:00
Brian Gaeke
b06e7b1766
IncludeFile hack to pull in BasicAliasAnalysis whenever AliasAnalysis.h
...
is included.
llvm-svn: 10396
2003-12-11 05:05:02 +00:00
Brian Gaeke
a03eeb0b7d
Separate out target for cleaning up qmtest garbage.
...
llvm-svn: 10395
2003-12-11 04:48:38 +00:00
Brian Gaeke
4c563b8af1
Add more fixed bugs. Keep llvm core section sorted by pr#. (Is that ok?)
...
llvm-svn: 10394
2003-12-11 04:40:58 +00:00
Chris Lattner
95c13c92ff
Stop laughing Misha
...
llvm-svn: 10393
2003-12-11 00:58:34 +00:00
Brian Gaeke
36fb4f19cd
In getObjectType(), doxygenify comment, and take a pointer to the
...
beginning of the archive member data as an argument.
Get rid of ParseLongFilenameSection(), which is dead.
In ReadArchiveBuffer(), implement support for 4.4BSD/MacOSX long filenames.
This is kind of invasive, because they prepend the long filename to the archive
member data, and then lie about the size. So we have to keep track of the real
size.
llvm-svn: 10392
2003-12-11 00:38:04 +00:00
Brian Gaeke
e869e0cfa8
Turn off "attribute weak" to pacify Mac OS X's system compiler, which prints a
...
warning whenever it sees it.
llvm-svn: 10391
2003-12-11 00:24:36 +00:00
Brian Gaeke
2bba152fb8
Fix typo in comment. Add prototype for getConstantExprValue().
...
llvm-svn: 10390
2003-12-11 00:23:28 +00:00
Brian Gaeke
5a8ec7d5f6
Add support for --debug-only=interpreter, to print out instrs before
...
interpreting them.
Move support for getting the value of a ConstantExpr into
getConstantExprValue(), and add support for the rest of the different
kinds of ConstantExprs. (I don't think I like ConstantExprs!)
This requires separate procedures executeShlInst() and executeShrInst().
Reduce the number of references to TheEE.
Get rid of an old comment mentioning annotations.
Fix exitCalled(), which was crashing the Interpreter. This was a
leftover from the return-value code refactoring.
llvm-svn: 10389
2003-12-11 00:22:59 +00:00
John Criswell
fb55ac24ec
This appears to fix Bug 172 and does not break any other feature tests or
...
regression tests.
llvm-svn: 10388
2003-12-10 22:51:41 +00:00
Chris Lattner
6281fd3ead
Fix bug: LICM/sink_multiple_exits.ll
...
Thanks for pointing this out John :)
llvm-svn: 10387
2003-12-10 22:35:56 +00:00
Chris Lattner
55c2113b7b
Don't allow dead instructions to stop sinking early.
...
llvm-svn: 10386
2003-12-10 20:43:29 +00:00
Chris Lattner
713907e2b8
Fix bug: IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx
...
llvm-svn: 10385
2003-12-10 20:43:04 +00:00
Chris Lattner
a8953e38d2
A new testcase, reduced by bugpoint
...
llvm-svn: 10384
2003-12-10 20:39:53 +00:00
Chris Lattner
7e5bd59da2
Finegrainify namespacification
...
Fix bug: LowerInvoke/2003-12-10-Crash.llx
llvm-svn: 10382
2003-12-10 20:22:42 +00:00
Chris Lattner
02f7e71d35
new testcase
...
llvm-svn: 10381
2003-12-10 20:18:09 +00:00
John Criswell
3c721a8b15
Fixed a comma error.
...
Added the --disable-threads option to GCC configure (to avoid pthread errors
when building code with LLVM).
llvm-svn: 10380
2003-12-10 20:04:13 +00:00
Brian Gaeke
f2484742b7
Support 'make install' for LLVM include files.
...
llvm-svn: 10378
2003-12-10 18:41:20 +00:00
John Criswell
65b3acdd5b
Upon Chris's suggestion, moved the #ifdef's to the generated C code.
...
This makes LLVM and the generated C code more portable.
llvm-svn: 10377
2003-12-10 18:17:57 +00:00
Chris Lattner
ccd9f3c1f8
Finegrainify namespacification
...
Reorder #includes
Implement: IndVarsSimplify/2003-12-10-IndVarDeadCode.ll
llvm-svn: 10376
2003-12-10 18:06:47 +00:00
John Criswell
83fb097ed0
Fixed the CBE on Solaris/Sparc. We need to define the return value of
...
the write() system call because it returns 64 bits on Solaris 64 bit,
and an implicit return value of int says it returns 32 bits.
Admittedly, this is a bit of a hack.
llvm-svn: 10375
2003-12-10 18:06:34 +00:00
Chris Lattner
ae974caa05
New testcase
...
llvm-svn: 10374
2003-12-10 17:57:38 +00:00
Chris Lattner
7710f2f49e
Finegrainify namespacification
...
Fix bug: LoopSimplify/2003-12-10-ExitBlocksProblem.ll
llvm-svn: 10373
2003-12-10 17:20:35 +00:00
Chris Lattner
679b49d7f5
New testcase which caused a bunch of tests to break last night with more
...
aggressive LICM
llvm-svn: 10372
2003-12-10 17:09:35 +00:00
Chris Lattner
6364314a6e
Simplify code
...
llvm-svn: 10371
2003-12-10 16:58:24 +00:00
Chris Lattner
48b4b852b4
Avoid performing two identical lookups when one will suffice
...
llvm-svn: 10370
2003-12-10 16:57:24 +00:00
Chris Lattner
edda1af35a
Make LICM itself a bit more efficient, and make the generated code more efficient too: don't insert a store in every exit block, because a particular block may be exited to more than once by a loop
...
llvm-svn: 10369
2003-12-10 15:56:24 +00:00
John Criswell
cf657689bb
Removed the pthread_once() function because it doesn't actually do
...
what it's supposed to do.
Just leave this library as a dummy library for now until we have time to
port a real pthread library (or get glibc working).
llvm-svn: 10368
2003-12-10 15:43:07 +00:00
Chris Lattner
bff5116da6
Finegrainify namespacification
...
llvm-svn: 10367
2003-12-10 15:34:03 +00:00
Chris Lattner
8dee84159f
Finegrainify namespacification
...
Provide a context module to WriteAsOperand
llvm-svn: 10366
2003-12-10 15:33:59 +00:00
John Criswell
c619c3cd14
Added the --host= option to the Sparc configuration directions.
...
llvm-svn: 10364
2003-12-10 15:27:29 +00:00
John Criswell
eaf4835c65
Dummy implementation of the pthread library.
...
This is needed since libstdc++ uses pthread_once().
llvm-svn: 10360
2003-12-10 14:46:36 +00:00
Chris Lattner
98cd4bf06f
Make 'opt -o -' work correctly instead of creating a file named './-'
...
llvm-svn: 10359
2003-12-10 14:41:33 +00:00
Chris Lattner
aaaea51090
Implement instruction sinking out of loops. This still can do a little bit
...
better job, but this is the majority of the work. This implements
LICM/sink*.ll
llvm-svn: 10358
2003-12-10 06:41:05 +00:00
Chris Lattner
289df6b3de
new testcase, checking to ensure we handle yet-another spiffy case correctly
...
llvm-svn: 10357
2003-12-10 05:42:23 +00:00
Brian Gaeke
e545345131
Don't assume that system headers define 'uint' or 'ulong' as types.
...
llvm-svn: 10356
2003-12-10 05:06:38 +00:00
Brian Gaeke
09db53be57
Fix apparent copy-and-paste-o.
...
Get rid of %debug - Mac OS X bison doesn't have it. sigh.
llvm-svn: 10352
2003-12-10 04:33:07 +00:00
Brian Gaeke
0f148bcbc0
Add support for installing tool executables.
...
llvm-svn: 10351
2003-12-10 00:26:28 +00:00
Brian Gaeke
a3664d9d18
Add installation directories and commands, standardly provided by configure.
...
llvm-svn: 10350
2003-12-10 00:25:32 +00:00
Chris Lattner
9c450fc665
Yet another hard testcase
...
llvm-svn: 10349
2003-12-09 23:29:25 +00:00
Chris Lattner
6c237bcdf2
Do not insert one entry PHI nodes in split exit blocks!
...
llvm-svn: 10348
2003-12-09 23:12:55 +00:00
Brian Gaeke
ddc088a9e4
Check in the llvm-native-gcc script, which I use in the process of
...
debugging front-end miscompilations.
llvm-svn: 10347
2003-12-09 22:23:24 +00:00
Chris Lattner
720348331c
Add a new testcase which breaks the sinker because the loop canonnicalization
...
pass does not do a canonnicalization that the sinker wants.
llvm-svn: 10346
2003-12-09 22:05:08 +00:00
Chris Lattner
b7924b166a
Fix buggy test
...
llvm-svn: 10345
2003-12-09 21:45:23 +00:00
Chris Lattner
88ca84b809
New testcase for sinking operations from loops with multiple exits
...
llvm-svn: 10344
2003-12-09 21:40:36 +00:00
Chris Lattner
eea64fd916
Make the test a bit harder so that we test to ensure that _both_ instructions
...
are sunk
llvm-svn: 10343
2003-12-09 20:50:20 +00:00
Chris Lattner
65c1193d55
Refactor code a little bit, eliminating the gratuitous InstVisitor, which
...
should make subsequent changes simpler. This also allows us to hoist vaarg
and vanext instructions
llvm-svn: 10342
2003-12-09 19:32:44 +00:00
Chris Lattner
c05176843e
Fine grainify namespacification
...
Code cleanups
Make LICM::SafeToHoist marginally more efficient
llvm-svn: 10341
2003-12-09 17:18:00 +00:00
Chris Lattner
d719cd1e5b
New testcases for LICM improvement: code sinking.
...
llvm-svn: 10339
2003-12-09 16:56:51 +00:00
Chris Lattner
9056881d76
Improve portability with Mac OS/X
...
llvm-svn: 10338
2003-12-09 16:49:12 +00:00
Chris Lattner
9c9240447b
Improve testcase portability on OS/X
...
llvm-svn: 10337
2003-12-09 16:48:24 +00:00
Chris Lattner
db677331f2
New testcase that is not actually handled yet, but should be in the future.
...
This is here to remind me to get back to this after a while.
llvm-svn: 10336
2003-12-09 16:26:42 +00:00
John Criswell
7dd715180d
Added the -h option for compatibility with other linkers.
...
llvm-svn: 10335
2003-12-09 15:39:11 +00:00
Chris Lattner
18b6f0f46d
Whoops, forgot to check this in. :)
...
llvm-svn: 10334
2003-12-08 23:41:09 +00:00
Chris Lattner
50663a1a78
Implement: TailCallElim/accum_recursion_constant_arg.ll
...
Also make sure to clean up any PHI nodes that are inserted which are pointless.
llvm-svn: 10333
2003-12-08 23:37:35 +00:00
Chris Lattner
198e620752
Implement: test/Regression/Transforms/TailCallElim/accum_recursion.ll
...
We now insert accumulator variables as necessary to eliminate tail recursion
more aggressively. This is still fairly limited, but allows us to transform
fib/factorial, and other functions into nice happy loops. :)
llvm-svn: 10332
2003-12-08 23:19:26 +00:00
Chris Lattner
3c31f8c5c3
New testcase for automatic insertion of accumulator variables to eliminate
...
tail recursion
llvm-svn: 10331
2003-12-08 23:16:25 +00:00
Chris Lattner
b662b064f6
Add a missing semi colon, which breaks bison 1.5
...
llvm-svn: 10325
2003-12-08 20:15:33 +00:00
Chris Lattner
102779e12a
Simplify makefiles by just explicitly listing directories
...
llvm-svn: 10324
2003-12-08 20:12:46 +00:00
John Criswell
ffc722a7f3
Updated build instructions for Sparc.
...
llvm-svn: 10323
2003-12-08 19:59:14 +00:00
John Criswell
beb0b29871
Fixed the dynamic generation of the list of subdirectories to compile.
...
llvm-svn: 10322
2003-12-08 17:52:32 +00:00
Chris Lattner
86ad4c05d0
implement method
...
llvm-svn: 10321
2003-12-08 08:23:04 +00:00
Chris Lattner
e6492f1057
Use the new method, though noone currently implements it any better than before
...
llvm-svn: 10320
2003-12-08 08:22:48 +00:00
Chris Lattner
d71a033370
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
llvm-svn: 10319
2003-12-08 08:22:01 +00:00
Chris Lattner
c0e1b071b9
Finegrainify namespacification
...
llvm-svn: 10318
2003-12-08 08:06:28 +00:00
Chris Lattner
bd7356a5d3
Makefile updates contributed by Reid
...
llvm-svn: 10317
2003-12-08 07:08:00 +00:00
Chris Lattner
d2a55f3041
New bug
...
llvm-svn: 10316
2003-12-08 06:33:19 +00:00
Misha Brukman
d899432617
effect' is the noun, affect' is the verb.
...
llvm-svn: 10315
2003-12-08 06:22:05 +00:00
Chris Lattner
b8d989e055
New testcase for PR165
...
llvm-svn: 10314
2003-12-08 06:18:37 +00:00
Chris Lattner
408916bc32
Add note about sucky suse compiler
...
llvm-svn: 10313
2003-12-08 05:43:19 +00:00
Chris Lattner
a7b6f3ab9c
Cleanup and restructure the code to make it easier to read and maintain.
...
The only functionality change is that we now implement:
Regression/Transforms/TailCallElim/intervening-inst.ll
Which is really kinda pointless, because it means that trivially dead code
does not interfere with -tce, but trivially dead code probably wouldn't be
around anytime when this pass is run anyway.
The point of including this change it to support other more aggressive
transformations when we have the analysis capabilities to do so.
llvm-svn: 10312
2003-12-08 05:34:54 +00:00
Chris Lattner
82ac26c8ba
New testcase, this should be -tailcallelim'inated
...
llvm-svn: 10311
2003-12-08 05:32:48 +00:00
Chris Lattner
16f1a8f761
Since ssaification of the varargs builtings, the vaarg instruction no longer
...
can write to memory.
llvm-svn: 10310
2003-12-08 05:29:33 +00:00
Brian Gaeke
ed16349810
Regenerated using autoheader-2.57
...
llvm-svn: 10309
2003-12-08 00:57:01 +00:00
Chris Lattner
69d47e7314
Bugpoint had appalingly bad grammar. Fix some of it.
...
llvm-svn: 10308
2003-12-07 02:43:09 +00:00
Chris Lattner
233b069113
Do not leave a bunch of crud lying around
...
llvm-svn: 10307
2003-12-07 02:31:03 +00:00
Chris Lattner
b762ddbdf1
It is now after pldi. This issue has been fixed, so remove the hack
...
llvm-svn: 10306
2003-12-07 01:44:18 +00:00
Chris Lattner
771804b541
Implement RaiseAllocations/FreeCastConstantExpr.ll
...
llvm-svn: 10305
2003-12-07 01:42:08 +00:00
Chris Lattner
ffb2d08c4a
New testcase that the raiseallocations pass should be able to handle.
...
llvm-svn: 10304
2003-12-07 01:25:36 +00:00
Chris Lattner
8427bffb9a
* Finegrainify namespacification
...
* Transform: free <ty>* (cast <ty2>* X to <ty>*) into free <ty2>* X
llvm-svn: 10303
2003-12-07 01:24:23 +00:00
Chris Lattner
d1ea9cd345
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.
llvm-svn: 10302
2003-12-07 00:55:32 +00:00
Chris Lattner
00f5167693
Completely rewrite domset, idom, and domtree implementation. Now it is based
...
on the algorithm for directly computing immediate dominators presented in this
paper:
A Fast Algorithm for Finding Dominators in a Flowgraph
T. Lengauer & R. Tarjan, ACM TOPLAS July 1979, pgs 121-141.
This _substantially_ speeds up construction of all dominator related information.
Post-dominators to follow.
llvm-svn: 10301
2003-12-07 00:38:08 +00:00
Chris Lattner
31b77bbf7e
Rewrite dominators implementation. Now domset is constructed from immdom,
...
instead of the other way around.
llvm-svn: 10300
2003-12-07 00:36:16 +00:00
Chris Lattner
f9f7c2d302
Finegrainify namespacification
...
Move method out of generic dominators construction code
llvm-svn: 10299
2003-12-07 00:35:42 +00:00
Chris Lattner
d48220fabe
Move this method out of the generic dominators calculation code
...
llvm-svn: 10298
2003-12-07 00:35:19 +00:00
Tanya Lattner
c970a38824
New command line parsing. This isn't as perfect as I would have liked. The CommandLine Library needs to be extended, in order to parse the options and allow for optional dashes. In addition, the help option isn't correct since I do the parsing mostly myself. But this is in the ocorrect ar format.
...
llvm-svn: 10297
2003-12-06 23:01:25 +00:00
Chris Lattner
dca8b84bde
Stop using the -fshort-enum compile option
...
llvm-svn: 10296
2003-12-06 20:59:45 +00:00
Chris Lattner
d98fecb76e
Fix awkward wording
...
llvm-svn: 10295
2003-12-06 20:24:46 +00:00
Chris Lattner
ba7bd4720d
Cleanup the release notes in preparation for the release.
...
llvm-svn: 10294
2003-12-06 20:22:41 +00:00
Brian Gaeke
7ee7b40af5
Add check for pthread_mutex_lock() in -lpthread (or otherwise).
...
Regenerated configure w/ autoconf-2.57.
llvm-svn: 10293
2003-12-05 19:29:01 +00:00
Alkis Evlogimenos
e59ad4b441
Make assertion stricter. Since the source operands are allocated at
...
this point, the second operand must be a physical register (it cannot
be a virtual one).
llvm-svn: 10292
2003-12-05 11:31:39 +00:00
Alkis Evlogimenos
f8fe176204
Fix bug in register spilling when a preallocated live range overlaps a
...
potential register assignment.
llvm-svn: 10291
2003-12-05 11:17:55 +00:00
Alkis Evlogimenos
2de099e54f
Move operator<<(std::ostream&, const LiveInterval&) out of the header file.
...
llvm-svn: 10290
2003-12-05 10:38:28 +00:00
Alkis Evlogimenos
ed28ca93ef
Sort live intervals by increasing start point.
...
llvm-svn: 10289
2003-12-05 10:32:01 +00:00
Alkis Evlogimenos
5fe0031c68
Improve debugging output and clean up some code.
...
llvm-svn: 10288
2003-12-04 03:57:28 +00:00
Chris Lattner
40d2aeb28f
Finegrainify namespacification
...
Fix regressions ScalarRepl/basictest.ll & arraytest.ll
llvm-svn: 10287
2003-12-02 17:43:55 +00:00
Brian Gaeke
93823ed30c
Lock abstraction, introduced with a view toward making the JIT thread-safe.
...
Eventually.
llvm-svn: 10284
2003-12-01 21:33:31 +00:00
Chris Lattner
e0da6ec8b6
Make stripped-bytecode a recursive target
...
llvm-svn: 10283
2003-12-01 07:28:25 +00:00
Chris Lattner
9b0eb852c7
Add new block number
...
llvm-svn: 10281
2003-12-01 07:08:06 +00:00
Chris Lattner
d9cf9b30eb
Emit & read more compressed bytecode by not emitting a bytecodeblock for
...
each basic block in function. Instead, just emit a stream of instructions,
chopping up basic blocks based on when we find terminator instructions. This
saves a fairly substantial chunk of bytecode space. In stripped, sample
cases, for example, we get this reduction in size:
197.parser: 163036 -> 137180: 18.8% reduction
254.gap : 844936 -> 689392: 22.6%
255.vortex: 621724 -> 528444: 17.7%
...
Not bad for something this simple. :) Note that this doesn't require a new
bytecode version number at all, though version 1.1 should not need to support
the old format.
llvm-svn: 10280
2003-12-01 07:05:31 +00:00
Chris Lattner
7c290ed25a
Remove unused enum value
...
llvm-svn: 10279
2003-12-01 05:40:37 +00:00
Brian Gaeke
fed9ed96a4
This may fix the "0 dirs" stuff we get in the nightly tests when they are
...
checking out over remote cvs connections.
llvm-svn: 10278
2003-12-01 05:31:12 +00:00
Chris Lattner
cc04614ee5
Add some "useful" methods
...
llvm-svn: 10277
2003-12-01 05:30:29 +00:00
Chris Lattner
6d760d7cb3
Add an option to enable the SSA based peephole optimizer.
...
Eventually this pass will provide substantially better code in the interim between when we
have a crappy isel and nice isel. Unfortunately doing so requires fixing the backend to
actually SUPPORT all of the fancy addressing modes that we now generate, and writing a DCE
pass for machine code. Each of these is a fairly substantial job, so this will remain disabled
for the immediate future. :(
llvm-svn: 10276
2003-12-01 05:18:30 +00:00
Chris Lattner
a913723309
Add a new SSA-based peephole optimizer which includes copy propagation and
...
folding of instructions into addressing modes. This creates lots of dead
instructions, which are currently not deleted. It also creates a lot of
instructions that the X86 backend currently cannot handle. :(
llvm-svn: 10275
2003-12-01 05:15:28 +00:00
Chris Lattner
128937bbe2
generalize the instruction types permitted a bit
...
llvm-svn: 10274
2003-12-01 05:13:56 +00:00
Chris Lattner
6cf03df531
fix broken link
...
llvm-svn: 10273
2003-12-01 05:12:09 +00:00
Alkis Evlogimenos
26f17e73eb
Print instructions before register allocation is performed. Also fix
...
bug where spill instructions were added to the next basic block
instead of the end of the current one if the instruction that required
the spill was the last in the block.
llvm-svn: 10272
2003-11-30 23:40:39 +00:00
Chris Lattner
0fcba7f6b3
add missing dependency
...
llvm-svn: 10271
2003-11-30 09:22:42 +00:00
Chris Lattner
d8218923ae
Finegrainify namespacification
...
llvm-svn: 10270
2003-11-30 06:13:25 +00:00
Chris Lattner
121d04d1ae
A line was missing
...
llvm-svn: 10269
2003-11-30 05:46:14 +00:00
Alkis Evlogimenos
0aa40f8db0
Remove "numReloaded" statistic.
...
llvm-svn: 10268
2003-11-30 05:15:36 +00:00
Chris Lattner
98e72b4bb3
Emit constants to one contiguous block, but this time, respect alignment constraints.
...
If this doesn't work Misha, feel free to revert it.
llvm-svn: 10267
2003-11-30 04:23:21 +00:00
Misha Brukman
873cf93b6e
Go back to allocating memory for each constant separately. Since SPARCs do not
...
allow unaligned loads, that is probably the problem I've been seeing in numerous
SPARC test cases failing. X86, on the other hand, just slows down unaligned
accesses, since it must make 2 aligned accesses for each unaligned one.
llvm-svn: 10266
2003-11-30 00:50:53 +00:00
Chris Lattner
58efc9e0fe
be 3.4 happy
...
llvm-svn: 10265
2003-11-29 20:04:13 +00:00
Chris Lattner
839030b3a8
be GCC 3.4 clean
...
llvm-svn: 10264
2003-11-29 19:55:12 +00:00
Chris Lattner
594654f17d
Hrm, how could this compile?
...
llvm-svn: 10263
2003-11-29 19:55:02 +00:00
Chris Lattner
982b285232
Fix compatibility with gcc 3.4
...
llvm-svn: 10262
2003-11-29 19:45:47 +00:00
Chris Lattner
3edb8478a4
Build _lib_crtend.a, not crtend.a
...
llvm-svn: 10260
2003-11-29 10:24:57 +00:00
Chris Lattner
d52319f54e
Don't print out tons of crap
...
llvm-svn: 10259
2003-11-29 10:14:17 +00:00
Chris Lattner
910c8d834e
Rewrite makefile logic to build an archive instead of a .o file. This is
...
intended to address PR142
llvm-svn: 10257
2003-11-29 10:05:30 +00:00
Chris Lattner
fe8f8b4947
Simplify some rules
...
Move LGCCLDPROG from test/Makefile.tests
llvm-svn: 10256
2003-11-29 09:50:15 +00:00
Chris Lattner
462444e1ea
Move rule to top-level makefile
...
llvm-svn: 10255
2003-11-29 09:49:14 +00:00
Chris Lattner
46c6693781
Add readme and spiff up makefile header
...
llvm-svn: 10254
2003-11-29 09:22:53 +00:00
Chris Lattner
212e596ede
Testcase for duplicated cleanup work (PR11). Note that this testcase is not actually
...
tested automatically, so it is practically useless. However, it seemed silly to throw
away my testcase, so here it is.
llvm-svn: 10253
2003-11-29 09:10:50 +00:00
Chris Lattner
8384f97ee4
Fix test: Transforms/LevelRaise/2003-11-28-IllegalTypeConversion.ll
...
Some gep generalization changes
llvm-svn: 10252
2003-11-29 05:31:25 +00:00
Chris Lattner
6d94d10377
new testcase for problem causing 2003-10-12-GlobalVarInitializers failures
...
llvm-svn: 10251
2003-11-29 05:19:15 +00:00
Chris Lattner
8abd7dca76
The function resolving pass must be run, even if -disable-opt is specified
...
llvm-svn: 10250
2003-11-28 09:44:03 +00:00
Chris Lattner
fcaa6fbbd8
* The return value of LinkLibraries is ignored, so remove it.
...
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
CONTINUE ANYWAY! Instead, just output the warning, and keep going. :)
llvm-svn: 10249
2003-11-28 07:44:09 +00:00
Chris Lattner
1fdd8a45c3
fix gcc 3.4 compatibility problem
...
llvm-svn: 10248
2003-11-28 01:46:06 +00:00
Chris Lattner
68ac670086
Testcase for PR160
...
llvm-svn: 10247
2003-11-28 01:32:03 +00:00
Chris Lattner
9201586a98
New testcase for PR158
...
llvm-svn: 10246
2003-11-27 21:25:07 +00:00
Chris Lattner
40487e450b
Fix grammaro
...
llvm-svn: 10245
2003-11-27 21:17:48 +00:00
Chris Lattner
ff4aa6dbe2
testcase for PR159
...
llvm-svn: 10244
2003-11-27 20:47:16 +00:00
Chris Lattner
a24a54d2f4
PR11 is now fixed for 1.1!
...
llvm-svn: 10243
2003-11-27 09:52:03 +00:00
Chris Lattner
8139b78c03
PR11 is now fixed for 1.1
...
llvm-svn: 10242
2003-11-27 09:51:54 +00:00
Chris Lattner
2a7033255e
* Squelch warning on Sun
...
* stdlib and friends are system headers
* 'long long' is the type that consistently turns into the LLVM 'long' type.
llvm-svn: 10241
2003-11-27 07:48:45 +00:00
John Criswell
f1387a59bf
Makefiles are now copies over to the object root directory dynamically.
...
llvm-svn: 10240
2003-11-26 20:09:49 +00:00
John Criswell
96be650984
Renamed intermediate values that used the same type and name as previous
...
values. All of these files should assemble now.
llvm-svn: 10239
2003-11-26 14:45:37 +00:00
Chris Lattner
0548bc2472
Bugz die!
...
llvm-svn: 10238
2003-11-26 08:20:34 +00:00
Chris Lattner
9192f90865
Testcase for PR157
...
llvm-svn: 10237
2003-11-26 07:35:52 +00:00
Chris Lattner
6789a0b1d4
To not barf when an error occurs.
...
llvm-svn: 10236
2003-11-26 07:24:58 +00:00
Chris Lattner
b27353c892
Boogs
...
llvm-svn: 10235
2003-11-26 02:48:00 +00:00
Chris Lattner
86d5c1ca2b
More dead boogers
...
llvm-svn: 10233
2003-11-26 01:18:49 +00:00
Chris Lattner
eb64b6a922
output foo(void) as appropriate
...
llvm-svn: 10232
2003-11-26 00:09:17 +00:00
Chris Lattner
883b73f0a8
Fix bug in previous checkin
...
llvm-svn: 10231
2003-11-25 23:44:40 +00:00
John Criswell
a0d50d2ebc
Fixed a small grammatical error.
...
Explained that function return types cannot be aggregate types.
Explained that functions with the same name but different type signatures
are considered to be different functions.
llvm-svn: 10230
2003-11-25 21:45:46 +00:00
Chris Lattner
f5569bb9a5
Fix const correctness
...
llvm-svn: 10229
2003-11-25 21:28:00 +00:00
Chris Lattner
ad70d4a15b
Relax constrains on GEP type indexes
...
llvm-svn: 10228
2003-11-25 21:21:46 +00:00
Chris Lattner
1c45d5185f
It is legal to index into sequential types with any integer
...
llvm-svn: 10227
2003-11-25 21:20:19 +00:00
Chris Lattner
52310702a1
Do not use index type to determine what it is indexing into!
...
llvm-svn: 10226
2003-11-25 21:09:18 +00:00
Chris Lattner
637ee39933
Do not depend on the gep index types to determine what flavor of index it is
...
llvm-svn: 10225
2003-11-25 20:49:55 +00:00
Chris Lattner
f078808a2b
Do not depend on structure elements being of type UByteTy
...
llvm-svn: 10224
2003-11-25 20:44:56 +00:00
John Criswell
4d29d2d222
Adjusted the projects Makefile so that it picks up the name of projects
...
by scanning the source tree (not the object tree).
llvm-svn: 10223
2003-11-25 20:37:45 +00:00
John Criswell
297baed1ec
Configure all project directories contained in llvm/projects.
...
The autoconf program will generate a warning about how we should use a
literal in AC_CONFIG_SUBDIRS. This warning can be ignored.
llvm-svn: 10222
2003-11-25 20:36:46 +00:00
Chris Lattner
567444309a
Do not depend on index type to determine whether it is a structure or sequential index
...
llvm-svn: 10221
2003-11-25 20:19:55 +00:00
Chris Lattner
be157c0303
Work with gepi's and constant exprs. Also, add versions of iterator ctors that take references
...
llvm-svn: 10220
2003-11-25 20:17:49 +00:00
Chris Lattner
a346e64218
Fix file header
...
llvm-svn: 10219
2003-11-25 20:11:47 +00:00
Chris Lattner
c3de7c4ec2
Remove dead variable
...
llvm-svn: 10218
2003-11-25 20:11:00 +00:00
Chris Lattner
388bc98954
Use gep_type_begin/end instead of looking for ubytes
...
llvm-svn: 10217
2003-11-25 20:10:07 +00:00
John Criswell
ec83537e24
Configure script for ModuleMaker.
...
llvm-svn: 10216
2003-11-25 20:02:07 +00:00
John Criswell
7cf9343ff2
Auto-confed ModuleMaker.
...
llvm-svn: 10215
2003-11-25 19:59:59 +00:00
John Criswell
f7f165d79b
Auto-conf'ed the ModuleMaker code.
...
Moved Makefile.common to Makefile.common.in.
llvm-svn: 10214
2003-11-25 19:59:21 +00:00
Chris Lattner
fbcc1bf418
Rename class to be consistent with other iterator classes
...
llvm-svn: 10213
2003-11-25 19:58:35 +00:00
Chris Lattner
4fc8dc08b4
Initial checkin of gep_type_begin/end which will be used to address PR82
...
llvm-svn: 10212
2003-11-25 19:37:28 +00:00
John Criswell
6df35dd70d
All directory targets now install the Makefile only if it is missing.
...
Directory targets no longer check for existance of the directory in the
object tree; if the Makefile doesn't exist, we will re-create the directory.
This seems to be a pretty good assumption and saves us from checking
directory existance each time.
llvm-svn: 10211
2003-11-25 19:32:22 +00:00
Chris Lattner
359974801e
Finegrainify namespacification
...
llvm-svn: 10210
2003-11-25 18:33:40 +00:00
John Criswell
e8eab29899
Added a pseudo-hack: The Makefile now copies Makefiles from source tree to
...
object tree if it is missing. This means that new Makefiles should get
picked up automagically, requiring less bothersome re-configuring after
updates.
llvm-svn: 10209
2003-11-25 17:49:22 +00:00
Chris Lattner
83f43a0469
boog
...
llvm-svn: 10207
2003-11-25 08:49:12 +00:00
Chris Lattner
1ffe97d37e
testcase for PR 148
...
llvm-svn: 10206
2003-11-25 08:45:38 +00:00
Chris Lattner
4d9a30c0c4
Testcase for PR147
...
llvm-svn: 10205
2003-11-25 03:58:49 +00:00
Chris Lattner
2a18c640df
Fix PR147
...
llvm-svn: 10204
2003-11-25 03:54:16 +00:00
Chris Lattner
7471686252
add link to the stacker dox
...
llvm-svn: 10203
2003-11-25 03:32:57 +00:00
Chris Lattner
866cf53102
Minor fixes
...
llvm-svn: 10202
2003-11-25 01:44:27 +00:00
Chris Lattner
89e5fc82bb
Apply docs patch fro Reid
...
llvm-svn: 10201
2003-11-25 01:35:06 +00:00
Chris Lattner
48b383b015
checkin reid's docpatch
...
llvm-svn: 10200
2003-11-25 01:02:51 +00:00
John Criswell
b1367f4af7
Modified directory building rules so that using the cd program/alias is
...
not necessary.
llvm-svn: 10199
2003-11-24 18:31:01 +00:00
Brian Gaeke
31715d3a42
Apply doc patch from PR136.
...
llvm-svn: 10198
2003-11-24 17:03:38 +00:00
Misha Brukman
bb718f14e0
Fix copy-pasto.
...
llvm-svn: 10197
2003-11-24 05:36:38 +00:00
Misha Brukman
c10bf39a7d
I'm gonna be picky and say we don't really need that trailing slash "lib/"
...
llvm-svn: 10196
2003-11-24 05:31:57 +00:00
Misha Brukman
44a562bba6
Make sure we ONLY add a `-load' switch to the JIT command line if the file is
...
verified as having an ELF header. This fixes PR151.
llvm-svn: 10195
2003-11-24 05:29:42 +00:00
Misha Brukman
f0c7647c11
Expose functionality to query if a file is an ELF shared object.
...
llvm-svn: 10194
2003-11-24 05:28:39 +00:00
Misha Brukman
7c9144b5f5
Add ability to query if a file is a legitimate ELF shared object.
...
llvm-svn: 10193
2003-11-24 05:28:12 +00:00
Brian Gaeke
49f7a39017
Apply patches from PR136
...
llvm-svn: 10192
2003-11-24 02:57:25 +00:00
Brian Gaeke
cd52465b70
Regenerated using autoconf-2.57
...
llvm-svn: 10191
2003-11-24 02:54:57 +00:00
Brian Gaeke
afa30637ec
Add Stacker directories.
...
llvm-svn: 10190
2003-11-24 02:54:17 +00:00
Brian Gaeke
af20761f7e
Add documentation for Stacker.
...
llvm-svn: 10189
2003-11-24 02:52:51 +00:00
Chris Lattner
d23b79e525
Add a script I missed
...
llvm-svn: 10188
2003-11-23 18:12:51 +00:00
Chris Lattner
6484bf7423
Checkin tests
...
llvm-svn: 10187
2003-11-23 18:12:22 +00:00
Chris Lattner
75759839b2
Disable test.
...
llvm-svn: 10186
2003-11-23 18:10:25 +00:00
Chris Lattner
210bccc1c2
Fix these assertions:
...
stkrc -e -f -o testing.bc testing.st
Global is external, but doesn't have external linkage!
[1024 x int]* %_stack_
Global is external, but doesn't have external linkage!
long* %_index_
Broken module found, compilation aborted!
llvm-svn: 10185
2003-11-23 18:06:37 +00:00
Chris Lattner
3425ec0764
Checkin the stacker compiler
...
llvm-svn: 10184
2003-11-23 18:01:26 +00:00
Chris Lattner
f2f20d2940
Fix file header
...
llvm-svn: 10183
2003-11-23 17:59:43 +00:00
Chris Lattner
67ac5055cf
Initial checkin
...
llvm-svn: 10182
2003-11-23 17:58:46 +00:00
Chris Lattner
1a12f7c9ca
Initial checkin of stacker samples
...
llvm-svn: 10181
2003-11-23 17:55:19 +00:00
Chris Lattner
ce06685210
Adjust file header
...
llvm-svn: 10180
2003-11-23 17:54:18 +00:00
Chris Lattner
3e6e58efc0
Initial checkin of stacker runtime
...
llvm-svn: 10179
2003-11-23 17:53:46 +00:00
Chris Lattner
42472ef3bc
Initial stacker checkin
...
llvm-svn: 10178
2003-11-23 17:52:55 +00:00
Chris Lattner
cea87e289f
Update file header
...
llvm-svn: 10177
2003-11-23 17:51:56 +00:00
Chris Lattner
4594ed9048
initial checkin of stacker makefile
...
llvm-svn: 10176
2003-11-23 17:51:37 +00:00
Chris Lattner
3f1ad878ac
Do not DESTROY programs by default. No wonder bugpoint was not being useful all this time!
...
llvm-svn: 10175
2003-11-23 04:51:05 +00:00
Brian Gaeke
edb102c266
A better way to get std::pair into the compiler's little, walnut-sized brain.
...
llvm-svn: 10174
2003-11-23 03:50:31 +00:00
Brian Gaeke
124d7fd7f0
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.
llvm-svn: 10173
2003-11-23 00:55:27 +00:00
Chris Lattner
db8a179838
Revert the previous patch since it causes lots of miscompilations. :( :(
...
llvm-svn: 10172
2003-11-22 19:07:47 +00:00
Brian Gaeke
84c0efc946
Support constant casting constant pointers to ints/uints, and/or
...
the other way around, instead of failing a large, tumor-like assertion.
llvm-svn: 10171
2003-11-22 07:18:25 +00:00
Brian Gaeke
9ba9225b35
Constant shift expressions, meet InstSelectSimple. Yow!!
...
llvm-svn: 10170
2003-11-22 06:49:41 +00:00
Brian Gaeke
8581a625df
Unbreak this test case - llvm-as no longer tolerates redefining names in any
...
given type plane.
llvm-svn: 10169
2003-11-22 06:18:35 +00:00
Brian Gaeke
e42b8fd298
Stub for constant shift expr support.
...
llvm-svn: 10168
2003-11-22 05:18:35 +00:00
Brian Gaeke
03f3611633
Fix PR149 - support constant shift expressions.
...
llvm-svn: 10167
2003-11-22 05:02:56 +00:00
Brian Gaeke
27a077209b
Strengthen test case.
...
llvm-svn: 10166
2003-11-22 05:01:57 +00:00
Brian Gaeke
b4c1782c7a
C Writer was dumping core on this test case.
...
llvm-svn: 10165
2003-11-22 04:58:25 +00:00
Chris Lattner
28ebb3e0a6
Delete dead line
...
llvm-svn: 10164
2003-11-22 02:26:17 +00:00
Chris Lattner
f40cdbe856
Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx
...
llvm-svn: 10163
2003-11-22 02:20:36 +00:00
Chris Lattner
519900a36d
New testcase that breaks the pruneeh pass
...
llvm-svn: 10162
2003-11-22 02:20:08 +00:00
Chris Lattner
4cc2cc5c58
Do not crash when deleing a region with a dead invoke instruction
...
llvm-svn: 10161
2003-11-22 02:13:08 +00:00
Chris Lattner
7b233af247
Do not crash when dealing with invoke and unwind instructions!
...
llvm-svn: 10160
2003-11-22 02:10:38 +00:00
Chris Lattner
1e6089c2d6
Use new interfaces
...
llvm-svn: 10159
2003-11-22 02:10:26 +00:00
Misha Brukman
74d4df83cd
Switch to the standard footer. This page is not yet W3C-compliant.
...
llvm-svn: 10158
2003-11-22 01:30:01 +00:00
Chris Lattner
1ad805977d
Finegrainify namespacification
...
The module stripping pass should not strip symbols on external globals
llvm-svn: 10157
2003-11-22 01:29:35 +00:00
Misha Brukman
e8e932a671
Align the W3C images on the right side, bottom of page.
...
llvm-svn: 10156
2003-11-22 01:26:21 +00:00
Misha Brukman
85ea4bb678
Styles for the page footer to align images properly.
...
llvm-svn: 10155
2003-11-22 01:23:53 +00:00
Misha Brukman
68aab3b3cf
Put the W3C graphics on the right side of the page.
...
llvm-svn: 10154
2003-11-22 01:23:39 +00:00
Chris Lattner
3a9b2322e3
Add newly fixed pr
...
llvm-svn: 10153
2003-11-22 01:14:58 +00:00
Misha Brukman
58ec434f03
This page now uses valid HTML 4.01 Strict and valid CSS.
...
llvm-svn: 10152
2003-11-22 01:07:30 +00:00
Misha Brukman
7cb4e38e2e
This document is now valid HTML 4.01 Strict and valid CSS.
...
We shall display images to that effect.
If you modify this file, check that you haven't broken anything by clicking on
those links, or I will hunt you down and force you to memorize the HTML and CSS
specs!!
llvm-svn: 10151
2003-11-22 01:00:11 +00:00
Misha Brukman
bff6032a34
* No borders on images used as links
...
* Drop font-size from doc_footer class
This is now valid CSS.
llvm-svn: 10150
2003-11-22 00:59:08 +00:00
Misha Brukman
80731b92ee
* Use stylesheets
...
* Close <li>, <a>, and <p> tags
llvm-svn: 10149
2003-11-22 00:38:41 +00:00
Misha Brukman
d181666052
* Add code to flush the ICache, which any self-respecting SMC must do
...
* Restore registers *after* everything else to avoid any possible side effects
This fixes McCat-imp.
llvm-svn: 10147
2003-11-21 23:48:54 +00:00
Chris Lattner
3ae303cc8c
Check return types of functions
...
llvm-svn: 10146
2003-11-21 22:32:23 +00:00
Misha Brukman
bc2d3308fe
Made paragraph structure more consistent.
...
llvm-svn: 10145
2003-11-21 22:30:25 +00:00
Chris Lattner
0e10ae4d0b
New testcase
...
llvm-svn: 10144
2003-11-21 22:28:49 +00:00
Misha Brukman
ffec0b7730
Added note about PR140: gccld generates script to run apps and load libraries.
...
llvm-svn: 10143
2003-11-21 22:11:12 +00:00
Chris Lattner
61b3f20bf1
Considering that CI is not even IN SCOPE here, I wooda thought the compiler
...
would have caught this. *sigh*
llvm-svn: 10142
2003-11-21 21:57:29 +00:00
Chris Lattner
f52e03c79e
Finegrainify namespacification
...
llvm-svn: 10138
2003-11-21 21:54:22 +00:00
Chris Lattner
456031eed7
Get rid of using decls, finegrainify namespacification
...
llvm-svn: 10137
2003-11-21 21:52:10 +00:00
Chris Lattner
51c28a5c1b
* Finegrainify namespacification
...
* Make the cost metric for passing constants in as arguments to functions MUCH
more accurate, by actually estimating the amount of code that will be constant
propagated away.
llvm-svn: 10136
2003-11-21 21:46:09 +00:00
Chris Lattner
a82f131abb
Finegrainify namespacification
...
Print out the costs for functions that AREN'T inlined as well
llvm-svn: 10135
2003-11-21 21:45:31 +00:00
Chris Lattner
52b4fb3fde
Reorder passes a bit. In particular, it makes sense to run globaldce IMMEDIATELY after funcresolve. Also, run the mem2reg pass _early_ so that IPCP and DAE actually do stuff.
...
Run instcombine and simplify cfg after this to cleanup the intraprocedural messes we create.
llvm-svn: 10134
2003-11-21 21:44:35 +00:00
Chris Lattner
dcdc371522
Fix problem Reid was having with external globals and nonexternal linkage
...
llvm-svn: 10133
2003-11-21 20:33:27 +00:00
Chris Lattner
199bb859a9
Don't crash on bogus source value
...
llvm-svn: 10132
2003-11-21 20:27:35 +00:00
Chris Lattner
189d19fb04
Finegrainify namespacification
...
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
John Criswell
745d0a5414
Fixed another minor grammatical error.
...
llvm-svn: 10130
2003-11-21 17:42:22 +00:00
Chris Lattner
7e5e456d96
Fix some problems with assertions printing
...
llvm-svn: 10129
2003-11-21 17:35:51 +00:00
Chris Lattner
9d72c2f229
improve error message
...
llvm-svn: 10128
2003-11-21 17:06:29 +00:00
Chris Lattner
a29600046d
Minor cleanups and simplifications
...
llvm-svn: 10127
2003-11-21 16:52:05 +00:00
John Criswell
cc32e6e62a
Minor grammatical and punctuation corrections.
...
llvm-svn: 10126
2003-11-21 16:09:42 +00:00
Brian Gaeke
71040f9251
Clean more qmtest files.
...
llvm-svn: 10125
2003-11-21 01:12:47 +00:00
Chris Lattner
3bf4fd9030
This function REALLY DOES return void
...
llvm-svn: 10124
2003-11-20 21:22:32 +00:00
Chris Lattner
8791e26de1
* Finegrainify namespacification
...
* Implement FuncResolve/2003-11-20-BogusResolveWarning.ll
... which eliminates a large number of annoying warnings. I know misha
will miss them though!
llvm-svn: 10123
2003-11-20 21:21:31 +00:00
Chris Lattner
4eb18ce26d
Fix an all too common form of the 'Found global types that are not compatible' warning
...
llvm-svn: 10122
2003-11-20 21:04:35 +00:00
Chris Lattner
5eac2d6615
Bug
...
llvm-svn: 10121
2003-11-20 20:59:57 +00:00
Chris Lattner
72e6b0c252
New testcase for PR143
...
llvm-svn: 10120
2003-11-20 20:57:33 +00:00
Brian Gaeke
ce9a00cea6
Blow away compiled versions of qmtest classes on 'make clean'.
...
llvm-svn: 10119
2003-11-20 19:57:17 +00:00
Brian Gaeke
67ae512a4b
Fix0r a test that mistakenly used %llvmg++ instead of %llvmgxx.
...
llvm-svn: 10118
2003-11-20 19:51:11 +00:00
Chris Lattner
16bbed20fa
Bug
...
llvm-svn: 10117
2003-11-20 19:30:17 +00:00
Chris Lattner
e5c6861b70
New testcase for PR132
...
llvm-svn: 10116
2003-11-20 19:27:12 +00:00
Chris Lattner
65334f117c
Bug fix
...
llvm-svn: 10115
2003-11-20 19:11:47 +00:00
Misha Brukman
1df12628a0
When writing out the runner script, add -load=<lib> lines to pull in all the
...
shared objects automagically, so it doesn't have to be done by hand.
llvm-svn: 10114
2003-11-20 19:08:42 +00:00
Misha Brukman
c0e6157f99
Add ability to search only for native shared object, and expose the
...
functionality to the rest of gccld.
llvm-svn: 10113
2003-11-20 19:08:06 +00:00
Chris Lattner
f636784489
New testcase for PR141
...
llvm-svn: 10112
2003-11-20 19:05:21 +00:00
Chris Lattner
2af517281d
Start using the nicer terminator auto-insertion API
...
llvm-svn: 10111
2003-11-20 18:25:24 +00:00
Chris Lattner
63a0ccff44
Spew symbolic types!
...
llvm-svn: 10110
2003-11-20 18:23:14 +00:00
Chris Lattner
18e5d5228a
When spewing out warnings during function resolution, do not vomit out pages
...
and pages of non-symbolic types.
llvm-svn: 10109
2003-11-20 18:19:35 +00:00
Chris Lattner
9ab47d1625
Somehow I forgot poor little UnwindInst
...
*sniff*
llvm-svn: 10108
2003-11-20 18:11:56 +00:00
Chris Lattner
0e03ab67c3
* Finegrainify namespacification
...
* Add new constructors to allow insertion of terminator instructions at the
end of basic blocks.
* 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.
llvm-svn: 10107
2003-11-20 17:45:12 +00:00
Chris Lattner
1183b6f5b0
* 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.
llvm-svn: 10106
2003-11-20 17:44:37 +00:00
Misha Brukman
aa525937c7
For consistency, removed space between function name and left paren in function
...
call, i.e. [ addPass (...) ] => [ addPass(...) ]
llvm-svn: 10105
2003-11-20 06:26:15 +00:00
Misha Brukman
d16a03727b
* Doxygenified comments, simplifying them and shortening in the process
...
* Eliminated extra space
llvm-svn: 10104
2003-11-20 06:21:54 +00:00
Alkis Evlogimenos
0e9ded74c0
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.
...
llvm-svn: 10103
2003-11-20 03:32:25 +00:00
Chris Lattner
c4fe9729a2
One new bug fixed, one old bug fixed.
...
llvm-svn: 10102
2003-11-20 01:07:41 +00:00
Chris Lattner
5a3a2398f4
Testcase for PR113
...
llvm-svn: 10101
2003-11-20 00:32:57 +00:00
Chris Lattner
2447ef59c4
Don't crash if we are printing an orphaned basic block!
...
llvm-svn: 10100
2003-11-20 00:09:43 +00:00
Brian Gaeke
d2553359a8
Unbreak the "-" as filename hack.
...
llvm-svn: 10099
2003-11-19 22:15:00 +00:00
Chris Lattner
592db40359
bugz
...
llvm-svn: 10098
2003-11-19 22:05:38 +00:00
Brian Gaeke
618026afb2
Also print an error msg. for files we cannot currently deal with.
...
llvm-svn: 10097
2003-11-19 21:57:30 +00:00
Brian Gaeke
55447b4541
Fix PR134, by checking FileOpenable() on each input file before analyzing its
...
type.
llvm-svn: 10096
2003-11-19 21:52:09 +00:00
Chris Lattner
b1b4359294
New testcase for PR133
...
llvm-svn: 10095
2003-11-19 21:37:52 +00:00
John Criswell
f4720a1575
We now support different expectations for different OS's/architectures.
...
llvm-svn: 10094
2003-11-19 21:13:25 +00:00
Chris Lattner
29681dee09
Fine grainify namespaceification
...
llvm-svn: 10093
2003-11-19 21:08:57 +00:00
Chris Lattner
20816bc43e
update test
...
llvm-svn: 10092
2003-11-19 19:47:36 +00:00
Chris Lattner
efdc952714
Genericize tests
...
llvm-svn: 10091
2003-11-19 19:44:28 +00:00
Chris Lattner
ff675bf580
Cleanup test
...
llvm-svn: 10090
2003-11-19 19:42:12 +00:00
Chris Lattner
45cfe54683
Really, there was a reason for me factoring that out
...
llvm-svn: 10089
2003-11-19 19:20:20 +00:00
Chris Lattner
1a02ca932c
*** Significantly speed up type resultion
...
This change speeds up type resolution by checking to see if a type is
recursive, and if it's not, using a more efficient algorithm.
This dramatically reduces bytecode loading time of kc++, reducing time-to-jit
kc++ --version to 17s from 33s
llvm-svn: 10088
2003-11-19 19:10:23 +00:00
Chris Lattner
c39fcfff0d
Improve test portability
...
llvm-svn: 10087
2003-11-19 18:37:06 +00:00
Chris Lattner
d19da4ce5b
Fix testcase. This should no longer be XFAIL'd
...
llvm-svn: 10086
2003-11-19 18:34:44 +00:00
Chris Lattner
9c68fa3ab1
* Finegrainify namespacification
...
* Strength reduce several data structures which were left over from the
"bad old days"
* Minor efficiency improvements
* Major efficiency improvement: In BytecodeParser::insertValue, do not allocate
a new ValueTab entry just because some value exists with a large type. This
dramatically reduces the number of allocations/deallocations performed by the
bytecode reader, and speeds up parsing of Kimwitu++ from 34s to 17s. This is
to help address PR127
llvm-svn: 10085
2003-11-19 17:27:18 +00:00
Chris Lattner
8700c28ac9
Minor efficiency improvements, finegrainify namespacification
...
llvm-svn: 10084
2003-11-19 17:21:11 +00:00
Chris Lattner
bf346b526f
In the future, these slabs can be null...
...
llvm-svn: 10083
2003-11-19 17:20:42 +00:00
Chris Lattner
11e8f1b595
Minor efficiency improvements all over. Finegrainify Namespacification
...
llvm-svn: 10082
2003-11-19 17:17:36 +00:00
Chris Lattner
e8de15976a
Fine grainify namespacification, #include file that defines the interface!
...
llvm-svn: 10081
2003-11-19 16:06:55 +00:00
Chris Lattner
a11f78167b
Finegrainify namespacification
...
llvm-svn: 10080
2003-11-19 06:14:38 +00:00
Chris Lattner
ffa9d511f9
Minor speedup to do less linear time searches of information we already have.
...
speeds up disassembly of kc++ by .6s
llvm-svn: 10079
2003-11-19 06:01:12 +00:00
Chris Lattner
2335331635
add new FAQ entry
...
llvm-svn: 10078
2003-11-19 05:53:12 +00:00
Chris Lattner
983c667a41
More bugz
...
llvm-svn: 10077
2003-11-19 01:08:24 +00:00
Chris Lattner
eedde31b7d
New testcase for PR 130
...
llvm-svn: 10076
2003-11-19 01:03:16 +00:00
Chris Lattner
74c55dd4f9
Fix PR130, and testcase test/Regression/Linker/2003-11-18-TypeResolution.ll
...
llvm-svn: 10075
2003-11-19 01:02:52 +00:00
Chris Lattner
c4cc197549
Testcase for PR131
...
llvm-svn: 10074
2003-11-18 23:46:07 +00:00
Chris Lattner
cf40b3f394
Add a few new bugs
...
llvm-svn: 10073
2003-11-18 23:04:02 +00:00
Chris Lattner
ef8c3fed25
new testcase for PR126
...
llvm-svn: 10072
2003-11-18 21:05:55 +00:00
Chris Lattner
47487608a9
New testcase for PR125
...
llvm-svn: 10071
2003-11-18 20:30:00 +00:00
Chris Lattner
05906cf0f0
Testcase for PR128
...
llvm-svn: 10070
2003-11-18 20:24:46 +00:00
Chris Lattner
8c09ecf0c9
Fix PR123
...
llvm-svn: 10069
2003-11-18 17:47:05 +00:00
John Criswell
956cf45674
Added the new GCC front end section to the table of contents.
...
llvm-svn: 10068
2003-11-18 16:08:49 +00:00
John Criswell
5e0f07e0c2
Added information on the GCC front end.
...
llvm-svn: 10067
2003-11-18 16:05:23 +00:00
Brian Gaeke
921440c309
Only use -Wl,-R. if HAVE_LINK_R.
...
llvm-svn: 10066
2003-11-18 06:31:17 +00:00
Chris Lattner
37d449d870
Add new bug fixed in the CFE
...
llvm-svn: 10065
2003-11-18 06:25:05 +00:00
Brian Gaeke
d2ca66ee8c
Regenerated using autoheader-2.57
...
llvm-svn: 10064
2003-11-18 06:21:24 +00:00
Brian Gaeke
3f6b856c7d
Regenerated using autoconf-2.57
...
llvm-svn: 10063
2003-11-18 06:20:41 +00:00
Brian Gaeke
3ed17192d0
Fix breakage caused by typos. Use 3-arg form of AC_DEFINE.
...
llvm-svn: 10062
2003-11-18 06:19:27 +00:00
Brian Gaeke
e86d843420
Update to reflect the fact that llvm-nm can read archives now.
...
llvm-svn: 10061
2003-11-18 06:18:09 +00:00
Misha Brukman
be755279f3
Emit the MachineConstantPool constants in one contiguous memory `pool'.
...
llvm-svn: 10060
2003-11-17 20:40:07 +00:00
Misha Brukman
fc16bb1af5
* Order #includes as per style guide
...
* Delete blank comment lines
* Eliminate space between function name and open-paren ( to be consistent
llvm-svn: 10059
2003-11-17 20:37:02 +00:00
Chris Lattner
dc2e39191a
Implement == and != correctly. Before they would incorrectly return !=
...
for some constant exprs when they could really be the same value
llvm-svn: 10058
2003-11-17 20:19:35 +00:00
Chris Lattner
e120a73166
The ConstantPointer class is now gone.
...
llvm-svn: 10057
2003-11-17 19:47:21 +00:00
John Criswell
6ee0ed5745
Added a check for the -R linker option.
...
llvm-svn: 10056
2003-11-17 19:46:02 +00:00
Misha Brukman
4f7ce560d5
This file was somehow missing a top-level comment line.
...
llvm-svn: 10055
2003-11-17 19:35:17 +00:00
Chris Lattner
77f20dc13f
No REALLY, get rid of ConstantPointer references
...
llvm-svn: 10054
2003-11-17 19:21:04 +00:00
Chris Lattner
4b6addf98a
Eliminate use of the ConstantPointer class
...
llvm-svn: 10053
2003-11-17 19:19:32 +00:00
Chris Lattner
9d9cbcf246
Constant folding shalt not be built on annotations
...
llvm-svn: 10052
2003-11-17 19:05:17 +00:00
Chris Lattner
ea25538936
Remove usage of ConstantPointer
...
llvm-svn: 10051
2003-11-17 17:28:29 +00:00
Chris Lattner
c96e96b26d
Be a bit more tolerant of broken code
...
llvm-svn: 10050
2003-11-17 01:17:04 +00:00
Chris Lattner
a3bdbd0f82
Fix copy-and-pasteo
...
llvm-svn: 10049
2003-11-17 01:07:58 +00:00
Brian Gaeke
3589140eb7
Regenerated using autoconf-2.57.
...
llvm-svn: 10048
2003-11-17 00:31:43 +00:00
Brian Gaeke
7027ed8cd8
Edit some comments slightly.
...
Set OS (build OS) and ARCH (target arch) based on the proper elements (SYSTEM,
and CPU, respectively) of the CPU-COMPANY-SYSTEM tuples.
Add OS and ARCH settings for PowerPC/Darwin (Mac OS X).
llvm-svn: 10047
2003-11-17 00:30:48 +00:00
Brian Gaeke
c5961314fa
add PR117
...
llvm-svn: 10046
2003-11-16 23:49:26 +00:00
Brian Gaeke
9c917abe9f
Document -disable-opt option that I added.
...
llvm-svn: 10045
2003-11-16 23:39:11 +00:00
Brian Gaeke
747777795f
Include Support/FileUtilities.h.
...
Print module identifier in DumpSymbolNamesFromModule().
In DumpSymbolNamesFromFile(), check whether it is an archive or a bytecode
file, and call the corresponding reader function (ParseBytecodeFile or
ReadArchiveFile).
Unconditionally set MultipleFiles for archives.
Fixes PR117.
llvm-svn: 10044
2003-11-16 23:34:13 +00:00
Brian Gaeke
900cc96e08
Implement skeletal support for __.SYMDEF (ranlib) sections in archives.
...
Correctly parse the Long Filename section of the archive.
When reading in archive members, set their ModuleIDs to
"ARCHIVENAME(MEMBERNAME)", as is traditional.
llvm-svn: 10043
2003-11-16 23:08:48 +00:00
Brian Gaeke
fda1f1835b
When you hand WriteAsOperand a type, it now prints out its symbolic name.
...
llvm-svn: 10042
2003-11-16 23:08:27 +00:00
Brian Gaeke
9f47927b28
When failing a Verifier assertion, use WriteAsOperand to print out the
...
offending types and/or values.
llvm-svn: 10041
2003-11-16 23:07:42 +00:00
Brian Gaeke
eb3de8f39a
Add a -verify option to verify the results of gccld passes.
...
Add a -disable-opt option to turn off gccld optimization passes.
llvm-svn: 10040
2003-11-16 23:07:28 +00:00
Brian Gaeke
7ff0d09adc
When we find a module we want, in an archive, in verbose mode,
...
print out the module's identifier (which should now contain the name
of both the archive and the module.)
Wrap some lines at 80 cols.
llvm-svn: 10039
2003-11-16 23:07:13 +00:00
Chris Lattner
00211f1d80
Don't print 'No predecessors!' on the entry block
...
llvm-svn: 10038
2003-11-16 22:59:57 +00:00
Chris Lattner
9dd6a82318
Bugz fixed
...
llvm-svn: 10037
2003-11-16 22:11:42 +00:00
Chris Lattner
5529caeba7
There is no need to rely on LLI working for this test
...
llvm-svn: 10036
2003-11-16 22:07:45 +00:00
Chris Lattner
9005b8000c
ISO 9899 7.13.2.1 (3) says that "[...] the values of objects of automatic
...
storage duration that are local to the function containing the invocation of the
[...] setjmp macro that do not have volatile-qualified type and have been
changed between the setjmp invocation and longjmp call are indeterminate."
As such, we have to mark all variables in a function that uses 'invoke' as
volatile.
This fixes PR77
llvm-svn: 10035
2003-11-16 22:06:14 +00:00
Chris Lattner
eec1307f43
Testcase for PR116
...
llvm-svn: 10034
2003-11-16 21:47:01 +00:00
Chris Lattner
2f486b8bde
add adce bug
...
llvm-svn: 10033
2003-11-16 21:42:48 +00:00
Chris Lattner
841dd53555
Fix PR116
...
llvm-svn: 10032
2003-11-16 21:39:27 +00:00
Chris Lattner
1765b4cfbd
New testcase, for PR 115
...
llvm-svn: 10031
2003-11-16 20:47:05 +00:00
Chris Lattner
b2e4d6d847
Bugz
...
llvm-svn: 10030
2003-11-16 20:25:24 +00:00
Chris Lattner
82f87e63e8
Fixes for PR114: Thanks to Reid Spencer!
...
llvm-svn: 10029
2003-11-16 20:21:15 +00:00
Brian Gaeke
27b10bc781
Regenerated with autoconf-2.57.
...
llvm-svn: 10025
2003-11-16 18:38:14 +00:00
Brian Gaeke
dfbd3d466a
Only default to the llvm-gcc in ~lattner if that directory exists.
...
Only warn if python version is not right; don't abort.
Add sanity checks for --with-llvmgccdir, with a big warning message at the end.
llvm-svn: 10024
2003-11-16 18:37:46 +00:00
Brian Gaeke
2b00004734
As per PR96, don't build subdirs if LLVMGCCDIR is not set to something
...
reasonable, instead, print out a "LOUD warning".
llvm-svn: 10023
2003-11-16 06:51:53 +00:00
Misha Brukman
c40257f1e5
Stylesheets: they do a website good!
...
llvm-svn: 10003
2003-11-14 17:34:38 +00:00
Chris Lattner
ab6895ea76
Implement a small optimization to handling of GEP's that are equivalent to casts.
...
This results in substantially reduced collapsing for some testcases
llvm-svn: 10002
2003-11-14 17:09:46 +00:00
Chris Lattner
93dea78f85
I can't believe the incompetence of the people I have to deal with around here.
...
These fools don't even wrap code at 80 columns.
Oh wait, _I_ wrote that. That explains a lot!!
llvm-svn: 9999
2003-11-14 16:34:25 +00:00
Chris Lattner
7c04a29ea6
Bugz come in, bugs go out
...
llvm-svn: 9995
2003-11-14 06:42:01 +00:00
Chris Lattner
cd45bc4086
Fix PR 110: the constant folding code assumes that if something is not a
...
constant expression, but is of (for example) ubyte type, then it is a
ConstantUInt. This was not true for placeholders.
llvm-svn: 9994
2003-11-14 06:38:46 +00:00
Chris Lattner
116c4f73ad
This is obviously illegal C++ code, but was apparently accepted by 3.3
...
bork
llvm-svn: 9993
2003-11-14 06:03:05 +00:00
Misha Brukman
8b6d804cd3
Give props to Reid Spencer for the namespacification work.
...
llvm-svn: 9992
2003-11-14 05:37:10 +00:00
Misha Brukman
133b35ef95
Brian implemented the vaarg instruction in the interpreter.
...
llvm-svn: 9989
2003-11-14 03:30:43 +00:00
Chris Lattner
ef901291c6
Expose the verifier to opt
...
llvm-svn: 9984
2003-11-13 19:47:29 +00:00
Brian Gaeke
d8a4d2b08d
Removed link from the docs index too.
...
llvm-svn: 9983
2003-11-13 19:32:14 +00:00
Chris Lattner
093cc6dc92
As the comments indicate, this is a temporary, repulsive, hack
...
llvm-svn: 9982
2003-11-13 19:26:54 +00:00
Chris Lattner
d76fe4ea7d
Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
...
llvm-svn: 9981
2003-11-13 19:17:02 +00:00
Chris Lattner
7ef8dfa9c3
Instcombine should promote this, and because it isn't, we are failing poolalloc tests
...
llvm-svn: 9980
2003-11-13 19:05:15 +00:00
Chris Lattner
a8150c3f8d
Trying to get the dsgraph for an external function is bad for DSA's health
...
llvm-svn: 9979
2003-11-13 18:48:11 +00:00
Misha Brukman
1608115bfc
Fixed word order.
...
llvm-svn: 9978
2003-11-13 18:03:11 +00:00
Chris Lattner
133ba7a2a6
NEW testcase for PR84 :(
...
llvm-svn: 9967
2003-11-13 06:19:56 +00:00
Brian Gaeke
d81ca471dd
Change LLI's internal representation of va_list to a pointer to the next
...
argument to be returned by va_arg. This allows va_lists to be passed
between different LLVM procedures (though it is unlikely that an LLI
va_list would make sense to an external function, except by chance.)
llvm-svn: 9965
2003-11-13 06:06:01 +00:00
Chris Lattner
baef234ce3
Implement the CompleteBU pass
...
llvm-svn: 9964
2003-11-13 05:05:41 +00:00
Chris Lattner
6d27d46a08
Add methods for implementation
...
llvm-svn: 9963
2003-11-13 05:05:34 +00:00
Chris Lattner
71d3377010
Minor code cleanup
...
llvm-svn: 9962
2003-11-13 05:04:19 +00:00
Chris Lattner
9d7587238b
Remove needless dependence on boost
...
llvm-svn: 9961
2003-11-13 04:11:30 +00:00
Chris Lattner
fb4c057c4c
Disable integer tracking by default
...
llvm-svn: 9960
2003-11-13 03:10:49 +00:00
Chris Lattner
97cf7cf400
Add namespace qualifier
...
llvm-svn: 9959
2003-11-13 02:30:22 +00:00
Chris Lattner
537bb3cc53
Minor cleanups
...
llvm-svn: 9958
2003-11-13 02:01:41 +00:00
Chris Lattner
04946381b9
Add an initial version of the CompleteBUDataStructures class, which is currently
...
identical to the BU pass, but has an accurate call graph
llvm-svn: 9956
2003-11-13 01:43:00 +00:00
Chris Lattner
b5be72ff30
Add an initial version of the CompleteBUDataStructures pass
...
llvm-svn: 9955
2003-11-13 01:42:38 +00:00
Misha Brukman
0e2e1f121a
Include the file before we close the llvm namespace.
...
llvm-svn: 9954
2003-11-13 00:23:05 +00:00
Misha Brukman
6675f982de
Substantially re-organized this file:
...
* There is now only one pass to print out assembly instead of two
* It is a FunctionPass
* The Module-level printing of globals is now in doFinalization() method of the
FunctionPass
* The code has been reformatted to follow LLVM coding standards
* Some comments, not all, were doxygenified
* Last but not least, the function to create an instance of this pass is also no
longer a method in the UltraSparc class.
llvm-svn: 9953
2003-11-13 00:22:19 +00:00
Misha Brukman
2558e8c852
The function to create an instance of this pass is no longer a method of
...
the UltraSparc class.
llvm-svn: 9952
2003-11-13 00:19:02 +00:00
Misha Brukman
167026f8c8
The functions to create new instances of passes are no longer methods in the
...
UltraSparc class. Comments are also doxygen-compatible now.
llvm-svn: 9951
2003-11-13 00:17:20 +00:00
Misha Brukman
b26c6fa4eb
* Put command-line switches in their own namespace
...
* Pass creation functions are no longer in the UltraSparc class
llvm-svn: 9950
2003-11-13 00:16:28 +00:00
Misha Brukman
893e793739
Force a dependency on the .inc file, which must be generated!
...
llvm-svn: 9949
2003-11-13 00:05:09 +00:00
Chris Lattner
9e876556fd
Fine-grainify namespaces for this library
...
llvm-svn: 9948
2003-11-12 23:11:14 +00:00
Misha Brukman
ec4f37a19b
You cannot debug namespacified LLVM with GDB 5.x anymore.
...
llvm-svn: 9946
2003-11-12 22:55:13 +00:00
Brian Gaeke
b8b238b12a
Add another fixed bug.
...
llvm-svn: 9945
2003-11-12 22:48:52 +00:00
Chris Lattner
9580ce235b
Fix faulty namespacification
...
llvm-svn: 9943
2003-11-12 22:45:14 +00:00
Misha Brukman
bca83f4a47
Regenerated `configure' for adding Makefiles and test.in to FreeBench
...
benchmarks.
llvm-svn: 9942
2003-11-12 22:16:51 +00:00
Misha Brukman
77a8be8016
OK, scratch my last post, this actually *does* work, those syntax errors were
...
imaginary.
llvm-svn: 9941
2003-11-12 22:16:23 +00:00
Chris Lattner
2203f2509e
Add new testcase for PR112
...
llvm-svn: 9940
2003-11-12 22:15:55 +00:00
Misha Brukman
902cd7689c
Apparently adding these entries and regenerating llvm/configure results in
...
syntax errors. Reverting the patch until I can figure out what's going on.
llvm-svn: 9939
2003-11-12 21:51:44 +00:00
Misha Brukman
3a9abb84c1
Some programs actually require an input to run. The nerve!
...
llvm-svn: 9938
2003-11-12 21:45:04 +00:00
Brian Gaeke
0afc434b71
Mention LLVM cast instructions.
...
llvm-svn: 9936
2003-11-12 21:39:31 +00:00
Brian Gaeke
e1fd80a246
Update section on GNU lightning fp.
...
llvm-svn: 9935
2003-11-12 21:38:50 +00:00
Brian Gaeke
c806b22110
I won't claim we're "better than and/or different from..." at Misha's behest.
...
llvm-svn: 9934
2003-11-12 21:36:29 +00:00
John Criswell
9537a75c23
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.
llvm-svn: 9932
2003-11-12 21:32:06 +00:00
Brian Gaeke
e6406a8cd2
Make the beginning of this page look like the beginnings of other pages.
...
llvm-svn: 9930
2003-11-12 20:47:30 +00:00
Brian Gaeke
56d3cc5793
index.html: Add link to llvm vs. the world
...
llvm.css: Add padding on top and bottom so that letters do not merge with
surrounding whitespace
llvm-svn: 9929
2003-11-12 20:31:18 +00:00
Chris Lattner
a146c31bde
This color is making me want to puke :)
...
llvm-svn: 9928
2003-11-12 20:24:39 +00:00
Brian Gaeke
3bac762f0f
Whoops, a div got closed in the wrong place.
...
llvm-svn: 9927
2003-11-12 20:20:55 +00:00
Brian Gaeke
63dbb1f591
First draft of LLVM-to-anything comparison document.
...
llvm-svn: 9926
2003-11-12 20:19:40 +00:00
Misha Brukman
dc6863ad64
Add FreeBench benchmarks to our test suite -- they weren't available by default
...
before when one didn't build in his source root.
llvm-svn: 9924
2003-11-12 19:39:10 +00:00
Chris Lattner
da03a8a792
Add new argument to disable checking
...
llvm-svn: 9922
2003-11-12 17:58:22 +00:00
Chris Lattner
e6383ab55e
Add argument
...
llvm-svn: 9921
2003-11-12 17:58:09 +00:00
Chris Lattner
f88e8d9c12
The bytecode reader/writer is borking this testcase
...
llvm-svn: 9919
2003-11-12 16:40:08 +00:00
Chris Lattner
a360143bed
This is not the instruction combiner's fault! No really!
...
llvm-svn: 9918
2003-11-12 16:38:32 +00:00
Chris Lattner
33f27de303
Reduced testcase for PR 110
...
llvm-svn: 9917
2003-11-12 16:24:30 +00:00
Chris Lattner
3b93c91836
Detect problems with PHI node operands!
...
llvm-svn: 9916
2003-11-12 07:13:37 +00:00
Chris Lattner
7cb5070672
Restore the -llvm option
...
llvm-svn: 9915
2003-11-12 04:59:59 +00:00
Chris Lattner
b740afb2b0
Print return nodes for graphs with multiple functions in them correctly
...
llvm-svn: 9914
2003-11-12 04:58:19 +00:00
Chris Lattner
12c71c00ef
Don't crash if no gg
...
llvm-svn: 9913
2003-11-12 04:57:58 +00:00
Chris Lattner
a723537540
PR107 is now fixed
...
llvm-svn: 9912
2003-11-12 04:42:37 +00:00
Chris Lattner
ebcf5a5dba
Fix bug PR107, patch contributed by Reid Spencer!
...
llvm-svn: 9911
2003-11-12 04:40:30 +00:00
Chris Lattner
b0aa83ee0a
New testcase for PR107
...
llvm-svn: 9910
2003-11-12 04:40:11 +00:00
Brian Gaeke
81545ad1f5
I don't think this was supposed to have gotten into the namespaceify patch, but
...
it did. Oops!
llvm-svn: 9908
2003-11-12 01:11:54 +00:00
Chris Lattner
a9450bd4ac
Cleanups
...
llvm-svn: 9907
2003-11-12 00:40:34 +00:00
Chris Lattner
74a2299748
reword a bit, be less aggressive with my link
...
llvm-svn: 9906
2003-11-11 23:46:35 +00:00
Chris Lattner
ed6d53f512
Add a link to the llvmdev posting
...
llvm-svn: 9905
2003-11-11 23:45:03 +00:00
Brian Gaeke
10ea82301f
Mention that all LLVM C++ code has been moved into the 'llvm' C++ namespace.
...
llvm-svn: 9904
2003-11-11 22:45:41 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
da3f675edd
Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
...
llvm-svn: 9902
2003-11-11 21:54:01 +00:00
Brian Gaeke
251b979943
Move IsArchive and IsBytecode here from gccld. Refactor into CheckMagic.
...
llvm-svn: 9901
2003-11-11 21:53:50 +00:00
Brian Gaeke
c30c5db05f
Add prototypes for CheckMagic, IsArchive, and IsBytecode.
...
llvm-svn: 9900
2003-11-11 21:53:29 +00:00
Brian Gaeke
7aeb2b7e42
Add another fixed bug.
...
llvm-svn: 9899
2003-11-11 21:52:34 +00:00
Chris Lattner
da05b05197
Compute node offsets correctly
...
llvm-svn: 9895
2003-11-11 20:12:32 +00:00
Misha Brukman
895b12faff
'Tis quite silly to check for a cached version of the entire executable. That
...
amounts to checking for a completely-native version. We'll cache on a
function-by-function basis instead (in the JIT's CodeEmitter).
llvm-svn: 9894
2003-11-11 18:38:56 +00:00
Brian Gaeke
ec21f8e9bf
This version of Linker.cpp works a lot better, but it's a little messy. Sorry.
...
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.
llvm-svn: 9893
2003-11-11 18:27:37 +00:00
Brian Gaeke
ca35fbf33d
Add implementation of FileOpenable().
...
Refactor MakeFileExecutable() & MakeFileExecutable() into AddPermissionsBits().
llvm-svn: 9892
2003-11-11 18:27:21 +00:00
Brian Gaeke
1f41970f9c
VS: ----------------------------------------------------------------------
...
Add prototype for FileOpenable().
llvm-svn: 9891
2003-11-11 18:27:11 +00:00
Misha Brukman
8bbd8c2689
The caching will not live in LLEE's execve() handler; that's suboptimal.
...
llvm-svn: 9890
2003-11-11 18:23:09 +00:00
Chris Lattner
fdc8d6547b
Add new method for computing node mappings. This is used by the pool allocator
...
llvm-svn: 9880
2003-11-11 05:08:59 +00:00
Chris Lattner
a6ad46d9f4
Add new method
...
llvm-svn: 9879
2003-11-11 05:08:36 +00:00
Misha Brukman
10ff946838
Added link to ``CVS Branching and Tags Primer''.
...
llvm-svn: 9875
2003-11-11 00:14:41 +00:00
Misha Brukman
b617253a16
Shorten the "updating Makefile" status print-out.
...
llvm-svn: 9874
2003-11-11 00:05:29 +00:00
Brian Gaeke
8f53a89edf
Fix problems linking against the reoptimizer; _llvm_regAllocState must have
...
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.
llvm-svn: 9858
2003-11-10 07:12:01 +00:00
Chris Lattner
1e6d3053f2
Reorganize code for locality, improve comments
...
llvm-svn: 9857
2003-11-10 04:42:42 +00:00
Chris Lattner
6d839e50c9
Include forms of SplitCriticalEdge which work correctly with pred/succ iterators
...
llvm-svn: 9856
2003-11-10 04:42:13 +00:00
Chris Lattner
47acfeda62
No really, I'm not on crack
...
llvm-svn: 9855
2003-11-10 04:23:52 +00:00
Chris Lattner
f8deeafd91
Helper method
...
llvm-svn: 9854
2003-11-10 04:16:50 +00:00
Chris Lattner
4474336166
Adjust to new critical edge interface
...
llvm-svn: 9853
2003-11-10 04:10:50 +00:00
Chris Lattner
f650861760
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.
llvm-svn: 9852
2003-11-10 04:10:27 +00:00
Chris Lattner
a5397c883a
Move isCriticalEdge & SplitCritical edge out of this file, which is only
...
for passes.
llvm-svn: 9851
2003-11-10 04:09:44 +00:00
Brian Gaeke
59c321782f
Regenerated.
...
llvm-svn: 9850
2003-11-10 03:06:28 +00:00
Brian Gaeke
b621857f01
Patch to fix PR102, contributed by Reid Spencer.
...
llvm-svn: 9849
2003-11-10 03:06:09 +00:00
Brian Gaeke
cac06a5c46
add Reid Spencer
...
llvm-svn: 9848
2003-11-10 03:05:36 +00:00
Brian Gaeke
c0c23c29aa
Operand numbers are now ints. Save the register allocation of the value
...
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().
llvm-svn: 9842
2003-11-10 00:05:26 +00:00
Misha Brukman
b891ffbc7e
If the source tree's Makefile is more up-to-date, copy it over into the build
...
tree.
llvm-svn: 9836
2003-11-09 21:36:19 +00:00
Chris Lattner
b2d575769b
Give gccld more guts
...
llvm-svn: 9835
2003-11-09 19:55:09 +00:00
Chris Lattner
9a010038f1
More additions
...
llvm-svn: 9834
2003-11-09 19:54:30 +00:00
Chris Lattner
881cb48619
Bugz bugz bugz
...
llvm-svn: 9833
2003-11-09 19:44:07 +00:00
Chris Lattner
a570f7b681
Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
...
and wrote it up. Thanks!!
llvm-svn: 9832
2003-11-09 19:39:48 +00:00
Chris Lattner
da8571b464
Add an assertion
...
llvm-svn: 9831
2003-11-09 15:51:07 +00:00
Brian Gaeke
75bc7cec4b
Fix PR103
...
llvm-svn: 9830
2003-11-09 07:08:34 +00:00
Chris Lattner
b09ad87eb9
New testcase
...
llvm-svn: 9829
2003-11-09 07:05:02 +00:00
Chris Lattner
984e11792f
Do NOT inline self recursive calls into other functions. This is causing the
...
pool allocator no end of trouble, and doesn't make a lot of sense anyway. This
does not solve the problem with mutually recursive functions, but they are much less common.
llvm-svn: 9828
2003-11-09 05:05:36 +00:00
Chris Lattner
d61abe82d3
Untypo
...
llvm-svn: 9827
2003-11-09 05:04:25 +00:00
Chris Lattner
950c75f135
Add more functions
...
llvm-svn: 9826
2003-11-09 04:10:41 +00:00
Chris Lattner
5011b956a9
None of the __llvm_* functions call into the program. This makes the
...
callgraph MUCH simpler for eh using program.
llvm-svn: 9825
2003-11-09 04:00:59 +00:00
Chris Lattner
cff83a2f24
Add support for memmove
...
llvm-svn: 9824
2003-11-09 03:32:52 +00:00
Brian Gaeke
c3c242c3ac
Remove #include of PassManager.h which was marked FIXME, and apparently is no
...
longer used.
llvm-svn: 9823
2003-11-09 03:15:40 +00:00
Chris Lattner
9a06c2bc25
Totally disable assert, in order to fix PR101
...
llvm-svn: 9818
2003-11-09 00:29:51 +00:00
Chris Lattner
3faf03a00f
new testcase
...
llvm-svn: 9817
2003-11-09 00:23:05 +00:00
Chris Lattner
123ba49839
new testcase
...
llvm-svn: 9815
2003-11-08 23:00:49 +00:00
Chris Lattner
12dd38aa99
Handle bzero and memset in the local analysis, because we were missing the fact
...
that memset returns its argument!!
llvm-svn: 9811
2003-11-08 21:55:50 +00:00
Chris Lattner
c129e009eb
Fix broken makefile dependency generation
...
llvm-svn: 9810
2003-11-08 21:23:06 +00:00
Chris Lattner
2cb1db763e
This doesn't use DSCallSiteIterator
...
llvm-svn: 9809
2003-11-08 21:17:37 +00:00
Chris Lattner
5c94491743
* Add units to the yaxis of each chart
...
* Add charts to the nightly test report
llvm-svn: 9808
2003-11-08 20:48:39 +00:00
Chris Lattner
1388c6765f
Since we are collecting all of this data, we might as well graph it!
...
llvm-svn: 9807
2003-11-08 20:33:04 +00:00
Brian Gaeke
f8cb2419ee
Fix two typos I found in comments.
...
llvm-svn: 9806
2003-11-08 18:12:24 +00:00
Chris Lattner
14b5d5a98e
Update the portability section
...
llvm-svn: 9803
2003-11-08 05:22:09 +00:00
Chris Lattner
699a58d77a
sjlj bug
...
llvm-svn: 9802
2003-11-08 05:18:50 +00:00
Chris Lattner
78396549bc
Fix wierd problems linking C programs which look for symbols in libstdc++.
...
This was due to the 'assert' macro expanding into a function call on some
platforms which could throw. The C++ compiler then added checks for the
exception specifications in these functions, which pulled in the C++ runtime.
This was bad, and the assertions can never fire (the library is now debugged)
so just remove them.
llvm-svn: 9801
2003-11-08 05:13:40 +00:00
Chris Lattner
4491de6e97
Add news from brian
...
llvm-svn: 9800
2003-11-08 04:28:55 +00:00
Misha Brukman
7630785925
First pass at cleaning up LangRef.html: stylesheet-ification, consistent
...
formatting, more strict adherence to HTML 4.01, other misc. cleanups.
llvm-svn: 9799
2003-11-08 01:05:38 +00:00
Misha Brukman
a1eefa40dc
For some reason, LICM and GCSE like to crash the FunctionPassManager when they
...
are being added as FunctionPasses... Sigh.
llvm-svn: 9798
2003-11-08 00:01:39 +00:00
Chris Lattner
59c3985777
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.
llvm-svn: 9795
2003-11-07 23:20:56 +00:00
Brian Gaeke
9ef636c698
Implement vaarg instruction. This is not quite perfect: 2003-08-11-VaListArg
...
still causes a crash. But it's better than before.
llvm-svn: 9794
2003-11-07 21:20:47 +00:00
Misha Brukman
508cc3e7a9
Implement branching to a PC-relative constant (not a BasicBlock).
...
llvm-svn: 9793
2003-11-07 21:07:30 +00:00
Brian Gaeke
85baf8c65a
popStackAndReturnValueToCaller() must advance instruction pointer to normal
...
destination, if returning from an invoke.
Implement 'unwind' instruction.
llvm-svn: 9792
2003-11-07 20:44:58 +00:00
Misha Brukman
3b2343eae9
PreSelection is not optional, it performs a necessary and vital transformation
...
for the Sparc backend: breaking up constant expressions. Thus, we cannot have it
guarded by a conditional, it should never be disabled.
Also, it's now available for the JIT since it is a FunctionPass.
llvm-svn: 9791
2003-11-07 20:33:25 +00:00
Misha Brukman
d7bcd99325
Remove the *BIG UGLY HACK* from the JIT: PreSelection is now a FunctionPass.
...
llvm-svn: 9790
2003-11-07 20:32:08 +00:00
Brian Gaeke
6d145eb65f
Add stub version of unwind support
...
llvm-svn: 9789
2003-11-07 20:07:06 +00:00
Brian Gaeke
a6454d3532
visitCallInst --> visitCallSite.
...
Use visitCallSite to implement both CallInsts and InvokeInsts.
llvm-svn: 9788
2003-11-07 20:04:22 +00:00
Brian Gaeke
a6d48e4db2
Make the operation of visitCallInst() only depend on the CallSite.
...
llvm-svn: 9787
2003-11-07 19:59:08 +00:00
Misha Brukman
560e989585
Completely hacked apart the file and put it back together using stylesheets.
...
llvm-svn: 9786
2003-11-07 19:43:14 +00:00
Misha Brukman
403ff618bc
Actually have a target "#introduction" if we're making a link to it.
...
llvm-svn: 9785
2003-11-07 19:42:44 +00:00
Brian Gaeke
18b59578c9
Use CallSites for call sites, instead of CallInsts. A revolutionary concept.
...
llvm-svn: 9784
2003-11-07 19:26:23 +00:00
Brian Gaeke
f578c05d57
Mention class CallSite
...
llvm-svn: 9783
2003-11-07 19:25:45 +00:00
Brian Gaeke
a730103518
Add a warning about not "new"ing or "delete"ing CallSites
...
llvm-svn: 9782
2003-11-07 19:25:22 +00:00
Misha Brukman
d3af61d883
Added ability to register FunctionPasses as optimizations, with
...
TargetMachine-accepting constructors (thanks to Chris).
llvm-svn: 9781
2003-11-07 18:56:32 +00:00
Misha Brukman
7120c837fb
Make the page footer consistent with the rest of the site.
...
llvm-svn: 9779
2003-11-07 18:11:14 +00:00
Misha Brukman
2c3068026a
Switch to emitting MachineConstantPool the way it was meant to be done.
...
llvm-svn: 9777
2003-11-07 18:06:26 +00:00
Misha Brukman
2133b0513d
Switch to using the standard representation of the constant pool -- namely, the
...
MachineConstantPool. This involved refactoring the two classes involved in
printing out Sparc assembly. In fact, they should share all this code anyway.
llvm-svn: 9776
2003-11-07 17:45:28 +00:00
Misha Brukman
faa42d264f
We accept TargetMachine as a const reference.
...
llvm-svn: 9775
2003-11-07 17:44:18 +00:00
Misha Brukman
bd4a8ed139
PreSelection and PeepholeOpts are now FunctionPasses.
...
llvm-svn: 9774
2003-11-07 17:43:43 +00:00
Misha Brukman
81c748c1e2
* Stop making a global for each constant that cannot live in an instruction;
...
it will be converted to a MachineConstantPool index during instruction
selection
* This is now eligible to become a FunctionPass since it does not have any side
effects outside of the function it is processing.
llvm-svn: 9773
2003-11-07 17:31:22 +00:00
Misha Brukman
bf9ed7ac1f
* Use the MachineConstantPool for storing constants instead of a hash_set;
...
* Do not create new globals for constants!
Also, order #includes as per coding style guide
llvm-svn: 9772
2003-11-07 17:29:48 +00:00
Misha Brukman
c16149d7dd
Use basename $< to get just the filename, not full path, for ease of reading.
...
llvm-svn: 9770
2003-11-07 17:26:27 +00:00
Misha Brukman
ad03afcb34
Declare FunctionPasses as such so that they can be used in FunctionPassManager.
...
llvm-svn: 9768
2003-11-07 17:20:18 +00:00
Misha Brukman
53b3d182d1
Declare FunctionPasses as such.
...
llvm-svn: 9767
2003-11-07 17:19:39 +00:00
Chris Lattner
fc42785a60
Add some ctors for this allocator
...
llvm-svn: 9766
2003-11-07 15:20:06 +00:00
Brian Gaeke
65cac90a92
Refactor the return-from-function code into popStackAndReturnValueToCaller().
...
Make external function calls slightly less special; now they get a stack frame.
llvm-svn: 9765
2003-11-07 05:22:49 +00:00
Chris Lattner
34596d7048
Add bugz
...
llvm-svn: 9764
2003-11-07 04:46:56 +00:00
Chris Lattner
cd4f3e601c
Fix a really bad build problem for users who have .o in their build directory!
...
Thanks to Reid Spencer for figuring this out! :)
llvm-svn: 9763
2003-11-07 04:39:53 +00:00
Chris Lattner
5285e9c9a0
Hopefully this will fix PR98
...
llvm-svn: 9762
2003-11-07 00:38:09 +00:00
Chris Lattner
395aef6bbe
Hopefully fix the objdir != srcdir issue
...
llvm-svn: 9761
2003-11-07 00:34:33 +00:00
Misha Brukman
6c91a333ea
* Added a "contents"-like list of questions at the beginning of the file
...
* Use stylsheets. Really, people, work with me here.
* Stop using those silly <dl> and <dt> and whatever else tags
* Close tags
llvm-svn: 9760
2003-11-06 21:55:44 +00:00
Chris Lattner
cd213197dc
fix warnings on sparc
...
llvm-svn: 9759
2003-11-06 21:30:15 +00:00
Chris Lattner
72a4db8b92
Fix warnings building on sparc
...
llvm-svn: 9758
2003-11-06 21:30:05 +00:00
Brian Gaeke
18027874ef
All 'llvmgcc' tests should specify %llvmgcc so that the path is passed
...
in by qmtest.
llvm-svn: 9757
2003-11-06 21:13:45 +00:00
Chris Lattner
2a09659109
No wonder noone can set up LLVMGCCDIR correctly!
...
llvm-svn: 9756
2003-11-06 20:51:45 +00:00
Chris Lattner
dc79f6c776
Add new commandline option
...
llvm-svn: 9755
2003-11-06 20:29:33 +00:00
Chris Lattner
7985d3664d
Add new command line option
...
llvm-svn: 9754
2003-11-06 20:29:25 +00:00
Chris Lattner
38cd27e450
Various cleanups and efficiency improvements
...
llvm-svn: 9753
2003-11-06 19:46:29 +00:00
Chris Lattner
b0a4b49b23
Fix bug: PR93
...
llvm-svn: 9752
2003-11-06 19:18:49 +00:00
Misha Brukman
b4ad4c3d4c
* Make the comment header 80 columns long
...
* Alphabetize #includes
llvm-svn: 9751
2003-11-06 18:06:13 +00:00
Misha Brukman
2b8724acc6
Let's not forget about our friends -- Constant Pool indices.
...
llvm-svn: 9750
2003-11-06 00:04:11 +00:00
Brian Gaeke
6f54518e08
Give this header file an Emacs mode-line.
...
llvm-svn: 9749
2003-11-05 22:13:10 +00:00
Brian Gaeke
1d9515b0a1
Do not assume the first file is a bytecode file. Instead, construct a dummy
...
Module and link things into that.
Also, fix a typo in an error message.
llvm-svn: 9748
2003-11-05 22:13:00 +00:00
Brian Gaeke
31af708ef6
Shorten and correct some function-header comments.
...
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.
Make LinkFiles not skip the first file in Files.
Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.
llvm-svn: 9747
2003-11-05 22:12:52 +00:00
Chris Lattner
83bc0a06b6
new testcase
...
llvm-svn: 9746
2003-11-05 22:06:03 +00:00
Chris Lattner
4e1b467594
Fix the problem with running cleanups in bugpoint: We were deleting arguments
...
of intrinsic functions, causing the verifier to fail.
llvm-svn: 9745
2003-11-05 21:53:41 +00:00
Chris Lattner
a616c55ba9
Bugpoint no longer has this option
...
llvm-svn: 9744
2003-11-05 21:46:13 +00:00
Chris Lattner
2920100e4d
I hate it when bugpoint is all ready to give me a bytecode file, then crashes
...
in final cleanups. Then you had to run the whole mess again with
-disable-final-cleanups.
This makes bugpoint run the cleanups in a protected environment so that if
they crash, bugpoint itself doesn't crash. This makes things much happier,
implements a FIXME, and gets rid of YABPO (yet another bugpoint option).
llvm-svn: 9743
2003-11-05 21:45:35 +00:00
Chris Lattner
a2e48a82fe
Split the DAE pass into DAE and DAH passes
...
llvm-svn: 9742
2003-11-05 21:43:42 +00:00
Chris Lattner
9e60aced2e
Split behavior into two pieces
...
llvm-svn: 9741
2003-11-05 21:43:02 +00:00
Chris Lattner
debac38f5e
Simplify the performFinalCleanups interface
...
llvm-svn: 9740
2003-11-05 21:15:19 +00:00
Chris Lattner
8055fb3afa
Yet more fixes for constant expr shifts
...
llvm-svn: 9739
2003-11-05 20:43:58 +00:00
Chris Lattner
ba55bd37fe
Further fixes for PR93
...
llvm-svn: 9738
2003-11-05 20:37:01 +00:00
Brian Gaeke
7f3327fc2c
A few handy methods that seem to mesh well with what CallSite already provides.
...
llvm-svn: 9737
2003-11-05 20:25:33 +00:00
Chris Lattner
c3d6f21bbe
no need for endl
...
llvm-svn: 9736
2003-11-05 19:53:32 +00:00
Chris Lattner
b36e8a1a2e
Add support for constant expr shifts
...
llvm-svn: 9735
2003-11-05 19:53:03 +00:00
Misha Brukman
07b385da27
Since this function returns an int, let's actually return something.
...
llvm-svn: 9734
2003-11-05 19:48:05 +00:00
Chris Lattner
51b560602e
New testcase
...
llvm-svn: 9733
2003-11-05 19:43:36 +00:00
Chris Lattner
e225507193
If we're not checking, don't check!
...
llvm-svn: 9732
2003-11-05 19:09:40 +00:00
Chris Lattner
7c94d1171a
Fix flawed logic that was breaking several SPEC benchmarks, including gzip and crafty.
...
llvm-svn: 9731
2003-11-05 17:31:36 +00:00
Misha Brukman
e5b358c829
We know exactly what the value of $< is, so instead of using basename $< to
...
get just the filename and not the full path, just use the filename directly.
llvm-svn: 9730
2003-11-05 06:43:36 +00:00
Misha Brukman
8330f2be73
Output only the .y filename, not the full path to it for ease of reading.
...
llvm-svn: 9729
2003-11-05 06:41:14 +00:00
Chris Lattner
ab77bc588d
Add three more bugs
...
llvm-svn: 9728
2003-11-05 06:30:04 +00:00
Chris Lattner
a9e7fe9ea2
Do not use a class before it is defined.
...
Be gcc 3.4 clean
llvm-svn: 9727
2003-11-05 06:25:06 +00:00
Chris Lattner
b5b9ba6ff6
Be friendly to gcc 3.4... good compiler. Nice compiler.
...
llvm-svn: 9726
2003-11-05 06:20:27 +00:00
Chris Lattner
813ec04735
Be gcc 3.4 clean
...
llvm-svn: 9725
2003-11-05 06:12:18 +00:00
Chris Lattner
c17fe1cdfe
Make -r work, fixing PR 91
...
llvm-svn: 9724
2003-11-05 06:05:21 +00:00
Alkis Evlogimenos
43b0bbe12c
Add std::pair tier. This is a much simplified version of boost::tie
...
that works only for std::pair.
llvm-svn: 9723
2003-11-05 05:58:26 +00:00
Chris Lattner
5f6463c041
Fix name collision
...
llvm-svn: 9722
2003-11-05 05:55:45 +00:00
Chris Lattner
21c7894ea0
Add a dtor to ensure that they are called the right number of times.
...
llvm-svn: 9721
2003-11-05 05:31:24 +00:00
Chris Lattner
b3a9b6626f
NEw testcase
...
llvm-svn: 9720
2003-11-05 05:22:15 +00:00
Chris Lattner
41baa98478
Make code gcc 3.4 clean
...
llvm-svn: 9719
2003-11-05 05:15:42 +00:00
Chris Lattner
d4741c5ee9
New testcase
...
llvm-svn: 9718
2003-11-05 01:36:49 +00:00
Chris Lattner
2b553e69d8
This works with GCC 3.4 also
...
llvm-svn: 9717
2003-11-05 01:31:12 +00:00
Brian Gaeke
4e106f0649
Abort when the user program calls abort, instead of printing a funny message and calling exit(1).
...
llvm-svn: 9716
2003-11-05 01:18:49 +00:00
Chris Lattner
8f2f598024
Fix bug with previous implementation:
...
- // ~(c-X) == X-(c-1) == X+(-c+1)
+ // ~(c-X) == X-c-1 == X+(-c-1)
Implement: C - ~X == X + (1+C)
llvm-svn: 9715
2003-11-05 01:06:05 +00:00
Chris Lattner
b6ca46e0f9
New testcase for the other side
...
llvm-svn: 9714
2003-11-05 01:05:22 +00:00
Brian Gaeke
221827ab07
Use regular old malloc to emulate malloc/alloca instructions.
...
llvm-svn: 9713
2003-11-05 01:02:14 +00:00
Brian Gaeke
175018317e
Remove a comment which no longer applies.
...
llvm-svn: 9712
2003-11-05 00:59:28 +00:00
Chris Lattner
e580666532
Minor cleanup, plus implement InstCombine/xor.ll:test17
...
llvm-svn: 9711
2003-11-04 23:50:51 +00:00
Chris Lattner
f6368c803c
Since we're in the neighborhood, test for the inverse
...
llvm-svn: 9710
2003-11-04 23:49:53 +00:00
Chris Lattner
d6a5d90ae2
Fix spello
...
Add negate overload
llvm-svn: 9709
2003-11-04 23:37:40 +00:00
Chris Lattner
0f68fa6569
Implement InstCombine/xor.ll:test(15|16)
...
llvm-svn: 9708
2003-11-04 23:37:10 +00:00
Chris Lattner
e3a932c6d0
Add a generalization of the previous case
...
llvm-svn: 9707
2003-11-04 23:36:50 +00:00
Chris Lattner
f622d7c31e
New testcase for masking operation that frequently occurs in the pool allocator
...
for converting a number that is a power of two into a mask
llvm-svn: 9706
2003-11-04 23:21:22 +00:00
Alkis Evlogimenos
20d03bb166
Update documentation since it was misleading: make it clear that a
...
negative instruction count is returned if instructions are removed
from a basic block.
llvm-svn: 9705
2003-11-04 23:07:00 +00:00
Alkis Evlogimenos
9118a426d3
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.
llvm-svn: 9704
2003-11-04 22:57:09 +00:00
Brian Gaeke
69c2841b2a
Update verifySavedState()'s comment, so that it reflects its current
...
status. In doFinalization(), skip over external functions, just like
Anand's mapping info does.
llvm-svn: 9703
2003-11-04 22:42:41 +00:00
Chris Lattner
ee0ba89dd1
New file, for use by the pool allocator project
...
llvm-svn: 9702
2003-11-04 22:38:28 +00:00
Chris Lattner
c679fbbab4
Substantial release notes updates
...
llvm-svn: 9700
2003-11-04 20:06:53 +00:00
Chris Lattner
12d304d4d8
New testcase for PR80
...
llvm-svn: 9699
2003-11-04 18:52:01 +00:00
Chris Lattner
ba4b1c47c1
New testcase
...
llvm-svn: 9698
2003-11-04 18:34:05 +00:00
Brian Gaeke
2a262ef095
Add comments.
...
llvm-svn: 9697
2003-11-04 18:25:56 +00:00
Chris Lattner
604ac9cfc0
While working on the pool allocator, I noticed that basicaa is failing a scary
...
number of simple cases. Someday when I get a chance to work on it again, this
testcase should be corrected.
llvm-svn: 9695
2003-11-04 16:40:40 +00:00
Chris Lattner
47dfa641c3
Fix problems in previous changes. This fixes several regressions last night.
...
llvm-svn: 9694
2003-11-04 16:04:32 +00:00
John Criswell
81587e798a
Checking in Chris's suggestions:
...
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.
llvm-svn: 9693
2003-11-04 15:22:26 +00:00
Chris Lattner
72974ffdbf
New testcase for PR84
...
llvm-svn: 9690
2003-11-03 21:37:08 +00:00
John Criswell
28f8fc669d
Modified build rules so that a messages appears before and after linking.
...
This helps to disambiguate when linking begins and when the library/program
is linked and ready to be used.
This is sort of as preference thing, so feel free to modify/revert the change.
llvm-svn: 9687
2003-11-03 21:12:49 +00:00
Chris Lattner
b71c3f7430
Significantly simplify constant emission by unifying the stuff which used to build up
...
strings with the stuff that used to print to an ostream directly. We now NEVER build
up big strings, only to print them once they are formed.
llvm-svn: 9686
2003-11-03 20:19:49 +00:00
Chris Lattner
ef114d52e8
updates to release notes
...
llvm-svn: 9685
2003-11-03 20:08:08 +00:00
Chris Lattner
469e404370
Incorporate printSingleConstantValue into its single caller
...
llvm-svn: 9684
2003-11-03 19:44:05 +00:00
Chris Lattner
72e516f0d1
* Reformat some code
...
* Emit bools as 1/0 instead of true/false, fixing compilation of eon and
PR 83 & Jello/2003-11-03-GlobalBool.llx
llvm-svn: 9683
2003-11-03 19:33:45 +00:00
Chris Lattner
bf1b435d04
New testcase
...
llvm-svn: 9682
2003-11-03 19:27:17 +00:00
Chris Lattner
7c18b18c46
Fix InstCombine/2003-11-03-VarargsCallBug.ll
...
llvm-svn: 9681
2003-11-03 18:44:58 +00:00
Chris Lattner
05f448173e
New testcase for a bug in instcombine
...
llvm-svn: 9680
2003-11-03 18:33:44 +00:00
Chris Lattner
39c0a19894
Work around a bug in GCC where it can't handle common variables marked weak.
...
llvm-svn: 9679
2003-11-03 17:35:00 +00:00
Chris Lattner
e4e2595f71
Fix bugs with attribute weak emission
...
llvm-svn: 9678
2003-11-03 17:32:38 +00:00
Chris Lattner
cbf2aeb684
If linking a library, do not link other libraries, like libc, into it!
...
This fixes lots of annoying warnings and error messages
llvm-svn: 9677
2003-11-03 17:27:17 +00:00
John Criswell
907720dfe1
Closed the h2 header for the LLVM Test Suite Organization section.
...
llvm-svn: 9676
2003-11-03 14:59:59 +00:00
Chris Lattner
d33bc06316
More testcases
...
llvm-svn: 9675
2003-11-03 05:42:50 +00:00
Chris Lattner
e600cec9ec
Move a test from cast-set to a new bit-tracking.ll file. Update file comments
...
llvm-svn: 9674
2003-11-03 05:30:34 +00:00
Chris Lattner
6444c37488
Implement InstCombine/cast-set.ll:test6[a]. This improves code generated for
...
a hot function in em3d
llvm-svn: 9673
2003-11-03 05:17:03 +00:00
Chris Lattner
11bea4f7c7
Add another case, which an implementation of test6 must be sure to handle
...
correctly.
llvm-svn: 9672
2003-11-03 05:08:53 +00:00
Chris Lattner
7be3ab2fb7
This simplifies the CWriter code, makes the generated code easier to read,
...
and makes the output work with the intel compiler. Overall, a win.
llvm-svn: 9671
2003-11-03 04:31:54 +00:00
Chris Lattner
1693079e92
Implement InstCombine/cast-set.ll: test1, test2, test7
...
llvm-svn: 9670
2003-11-03 04:25:02 +00:00
Chris Lattner
efde768bf5
Add the testcase from PR8
...
llvm-svn: 9669
2003-11-03 03:52:34 +00:00
Chris Lattner
c75cfac56d
Add another case, which occurs in em3d
...
llvm-svn: 9668
2003-11-03 03:51:26 +00:00
Chris Lattner
af7893203b
Fix bug with zero sized casts
...
llvm-svn: 9667
2003-11-03 01:29:41 +00:00
Chris Lattner
7af7d94df2
Eliminate the silly namedContext member of printType
...
llvm-svn: 9666
2003-11-03 01:01:59 +00:00
Chris Lattner
2e8d28d082
Allow CallSites to be used as the key of a map
...
llvm-svn: 9660
2003-11-02 23:04:33 +00:00
Chris Lattner
2b9926fc8e
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.
llvm-svn: 9659
2003-11-02 22:27:28 +00:00
Chris Lattner
53e8fab411
Fix bug: test/Regression/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll
...
llvm-svn: 9658
2003-11-02 21:02:20 +00:00
Chris Lattner
175c0839ca
New testcase for DSA which is improperly collapsed!
...
llvm-svn: 9657
2003-11-02 20:43:10 +00:00
Chris Lattner
d4d987dd4a
Fix bug in previous checkin
...
llvm-svn: 9656
2003-11-02 06:54:48 +00:00
Chris Lattner
1f30e93306
The 'thefunc' function should not have weak linkage, it should have linkonce linkage.
...
llvm-svn: 9655
2003-11-02 06:30:39 +00:00
Chris Lattner
f4ad165e8b
Implement transmogriphication of allocation instructions
...
llvm-svn: 9654
2003-11-02 05:57:39 +00:00
Chris Lattner
fd2183a9cc
Add test for instcombine transmogrifying allocation instructions
...
llvm-svn: 9653
2003-11-02 05:56:58 +00:00
Chris Lattner
38e692da04
Add note about profile.sh
...
llvm-svn: 9652
2003-11-02 05:20:44 +00:00
Chris Lattner
5d8e552cf1
Add -help option
...
llvm-svn: 9651
2003-11-02 05:17:32 +00:00
Chris Lattner
dd024a09d9
Bugz fixed
...
llvm-svn: 9650
2003-11-02 02:15:11 +00:00
Chris Lattner
d57aa5e8a5
Checkin an initial version of the llvm-prof documentation
...
llvm-svn: 9649
2003-11-02 02:10:54 +00:00
Chris Lattner
7f7285bab7
Fix PR78
...
llvm-svn: 9648
2003-11-02 02:06:27 +00:00
Chris Lattner
4fa54568a3
The "correct" fix for CBackend/2003-10-23-UnusedType.ll is to not even try
...
to emit types which are not used.
llvm-svn: 9647
2003-11-02 01:29:27 +00:00
Chris Lattner
7949bf0d54
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.
llvm-svn: 9646
2003-11-02 01:28:41 +00:00
Chris Lattner
91d79bb4be
New testcase for PR79
...
llvm-svn: 9645
2003-11-02 00:57:56 +00:00
Chris Lattner
22c19cdf99
new testcase, for PR 81
...
llvm-svn: 9644
2003-11-02 00:22:27 +00:00
Chris Lattner
ecbf07b6cd
Regression test for PR 80
...
llvm-svn: 9643
2003-11-01 23:42:08 +00:00
Chris Lattner
e9cdb46520
Escape "'s, which are frequent visitors to C++ types
...
llvm-svn: 9642
2003-10-31 22:16:41 +00:00
Chris Lattner
b45d9077cb
Strip off CPR's manually, because if we don't, the inliner doesn't delete dead
...
functions. GRR
llvm-svn: 9641
2003-10-31 21:05:58 +00:00
Chris Lattner
9c4a58b780
Make the call graph more precise despite the hated constantpointerrefs.
...
Do you detect the animosity I feel towards CPRs yet?
llvm-svn: 9640
2003-10-31 21:05:12 +00:00
Chris Lattner
9157ec025b
Did I mention that I _HATE_ CPRs?
...
llvm-svn: 9639
2003-10-31 18:38:06 +00:00
Misha Brukman
ff91940879
Use stylesheets as much as we can. I admit, I still cannot make CSS do what I
...
can do with tables, which annoys me.
llvm-svn: 9638
2003-10-31 18:37:20 +00:00
Chris Lattner
0989953b31
Obsolete file goes byebye
...
llvm-svn: 9637
2003-10-31 18:06:32 +00:00
Misha Brukman
9dc2a3d05c
Use some style(sheets).
...
llvm-svn: 9636
2003-10-31 18:01:30 +00:00
Chris Lattner
f6925da295
Constant pointer refs are causing these to fail unnecessarily, which is causing
...
a lot of code to be pessimized. I hate CPRs. :(
llvm-svn: 9635
2003-10-31 17:51:16 +00:00
Brian Gaeke
b8c28f3553
Well, to be honest, -array-checks and -trace are gone, too. :-)
...
llvm-svn: 9631
2003-10-31 05:12:04 +00:00
Alkis Evlogimenos
6029d4032c
Use already existing classes for post order iterator.
...
llvm-svn: 9629
2003-10-31 03:02:34 +00:00
Misha Brukman
47e7fd2c0f
* Not much point to indent the whole file
...
* Let CVS keep track of our last-modified timestamp
llvm-svn: 9628
2003-10-31 00:39:28 +00:00
Misha Brukman
c64b74554a
The `-q' option has gone away.
...
llvm-svn: 9627
2003-10-31 00:34:52 +00:00
Chris Lattner
9061d70325
never print zero executions blocks
...
llvm-svn: 9626
2003-10-31 00:34:05 +00:00
Chris Lattner
a36f81a3ea
Simplify code
...
llvm-svn: 9625
2003-10-31 00:20:09 +00:00
Chris Lattner
34e1549e1b
Add percentage info
...
llvm-svn: 9624
2003-10-31 00:13:26 +00:00
Chris Lattner
0575f97e4b
Hrm, some of my counters are wrapping around 32 bits
...
llvm-svn: 9623
2003-10-31 00:06:57 +00:00
Chris Lattner
babc99cf80
If only have function profile, don't print out "not executed" for all of the blocks :)
...
llvm-svn: 9622
2003-10-30 23:44:28 +00:00
Chris Lattner
2a5767e4f1
Add the ability to print out llvm code when the -annotated-llvm option is given
...
llvm-svn: 9621
2003-10-30 23:42:09 +00:00
Chris Lattner
eeabc3f846
Expose new print methods
...
llvm-svn: 9620
2003-10-30 23:41:19 +00:00
Chris Lattner
8339f7d379
Make use of the new AssemblyAnnotationWriter interface
...
llvm-svn: 9619
2003-10-30 23:41:03 +00:00
Chris Lattner
de171b3d18
New interface
...
llvm-svn: 9618
2003-10-30 23:39:52 +00:00
Brian Gaeke
8541bd9db9
Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
...
implementing verifySavedState().
In saveState(), use the new AllocInfo::AllocStateTy enum, and increment
Insn each time through the loop.
llvm-svn: 9617
2003-10-30 21:21:33 +00:00
Brian Gaeke
727ec9bec5
Make AllocState an enum.
...
Move the stringifying method for that enum into class AllocInfo.
llvm-svn: 9616
2003-10-30 21:21:22 +00:00
Alkis Evlogimenos
5a320efd3b
Output types in reverse postorder. This will allow the ByteCode/Reader
...
to create the minimum number of opaque types for each type with a
cycle in its type graph.
llvm-svn: 9615
2003-10-30 21:04:44 +00:00
Alkis Evlogimenos
404beb98ef
Put DEBUG_OUTPUT at the top along with TRACE_LEVEL. Also fix the code
...
inside DEBUG_OUTPUT so that it compiles.
llvm-svn: 9614
2003-10-30 18:33:58 +00:00
Chris Lattner
b45e1f990c
Bugz fixed
...
llvm-svn: 9613
2003-10-30 16:20:15 +00:00
Brian Gaeke
8d09fd1ea6
Apparently my Mac OS X fixes were not entirely compatible with SPARC...hmm.
...
llvm-svn: 9612
2003-10-30 15:03:49 +00:00
Chris Lattner
dd63f9e22b
When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
...
llvm-svn: 9611
2003-10-30 05:17:30 +00:00
Chris Lattner
30aad2a98e
Fix typo
...
llvm-svn: 9610
2003-10-30 04:35:26 +00:00
Chris Lattner
a306dd2c05
New bug
...
llvm-svn: 9609
2003-10-30 01:43:33 +00:00
Chris Lattner
9e167cd6ab
Tighten up what we consider to be first class types.
...
llvm-svn: 9608
2003-10-30 01:38:41 +00:00
Chris Lattner
0fc43a6048
Make sure that PHI node operands are first class types
...
llvm-svn: 9607
2003-10-30 01:38:18 +00:00
Chris Lattner
78293b7023
Clarify that all manipulatable values must be of first class type, and specifically
...
update the PHI node entry to mention this as well.
llvm-svn: 9606
2003-10-30 01:31:37 +00:00
Misha Brukman
d8c3ba3315
* Send people to the LLVMdev archive/subscription page rather than just state
...
the address
* Somewhat standardize the footer of the page
llvm-svn: 9605
2003-10-30 01:23:40 +00:00
Chris Lattner
a2bd4e07ee
Another day, another bug
...
llvm-svn: 9604
2003-10-30 01:20:42 +00:00
Misha Brukman
da6f521ab0
Add a link to the C/C++ front-end building instructions.
...
llvm-svn: 9603
2003-10-30 01:19:16 +00:00
Misha Brukman
5b4dea338e
The answer to this question is "Yes". Let's make that absolutely clear even to
...
those just skimming the FAQ.
llvm-svn: 9602
2003-10-30 01:16:18 +00:00
Misha Brukman
8a98cd1097
Call me picky, but it's not the state of Illinois' license, it's the
...
University's.
llvm-svn: 9601
2003-10-30 01:13:56 +00:00
Chris Lattner
686767f3f6
Fix bug: 2003-10-29-CallSiteResolve.ll & PR70
...
llvm-svn: 9600
2003-10-30 00:46:41 +00:00
Chris Lattner
3cffc56451
New testcase crashing the instruction combiner
...
llvm-svn: 9599
2003-10-30 00:39:25 +00:00
Chris Lattner
f14ead9210
Print the names of more opaque types
...
llvm-svn: 9598
2003-10-30 00:22:33 +00:00
Chris Lattner
92d60539c8
Make sure to print opaque types names if they are available.
...
llvm-svn: 9597
2003-10-30 00:12:51 +00:00
Chris Lattner
3538c9d2d3
Pass unrecognized options into llvmprof
...
llvm-svn: 9596
2003-10-29 21:51:00 +00:00
Chris Lattner
a79d2b54d2
Add the ability to synthesize function counts from block count information
...
llvm-svn: 9595
2003-10-29 21:47:44 +00:00
Chris Lattner
e4fb19033e
Print the top 20 most frequently executed blocks. Fix sort predicate problem
...
llvm-svn: 9594
2003-10-29 21:41:17 +00:00
Chris Lattner
3420137e63
Refactor code, initial implementation of -insert-block-profiling pass
...
llvm-svn: 9593
2003-10-29 21:24:22 +00:00
Chris Lattner
ab8873dde3
More bugs fixed!
...
llvm-svn: 9592
2003-10-29 20:59:45 +00:00
Dinakar Dhurjati
043b4b0bc3
Fixed LinkO, LinkP error in TOOLLINKOPTSB
...
llvm-svn: 9591
2003-10-29 20:34:13 +00:00
Brian Gaeke
45eb2eeb74
Explicitly cast type, so we aren't passing output_vbr a size_t.
...
llvm-svn: 9590
2003-10-29 20:09:01 +00:00
Brian Gaeke
adc07972bc
Tweak sed commands so that they filter out more # stuff and also
...
work on Mac OS X. Also turn ${...} into $(...); we do not speak BSD
Make.
llvm-svn: 9589
2003-10-29 20:07:35 +00:00
Brian Gaeke
7086bbb33c
Add support for utostr(unsigned long)
...
llvm-svn: 9588
2003-10-29 20:06:19 +00:00
Chris Lattner
cbeda5ad9b
New testcase
...
llvm-svn: 9587
2003-10-29 19:18:48 +00:00
Chris Lattner
5b83b56e17
Add two new bugs
...
llvm-svn: 9586
2003-10-29 18:49:14 +00:00
Chris Lattner
bcb0f4bf2e
Fix PR66 & ScalarRepl/2003-10-29-ArrayProblem.ll
...
llvm-svn: 9585
2003-10-29 17:55:44 +00:00
Chris Lattner
9e761b40af
New testcase distilled from:
...
UnitTests/2003-10-29-ScalarReplBug.c
llvm-svn: 9584
2003-10-29 16:24:10 +00:00
Dinakar Dhurjati
3ac83a9bb3
Added TOOLLINKOPTSB to pass options to the linker (e.g. adding search
...
path for external libraries).
llvm-svn: 9582
2003-10-29 14:28:35 +00:00
Chris Lattner
a1a090eff4
New bug fixed
...
llvm-svn: 9581
2003-10-29 07:17:13 +00:00
Chris Lattner
5f6286f1e4
Another bug fixed
...
llvm-svn: 9580
2003-10-29 06:05:55 +00:00
Chris Lattner
e5f15cdc5f
Fix bug: ConstantMerge/2003-10-28-MergeExternalConstants.ll & PR64
...
llvm-svn: 9579
2003-10-29 06:01:26 +00:00
Chris Lattner
fa979bd78b
New testcase
...
llvm-svn: 9578
2003-10-29 05:51:03 +00:00
Brian Gaeke
0a82d78d8c
Pull in stdint.h here, if we have it. Some systems keep
...
the INT*_MAX macros there.
llvm-svn: 9577
2003-10-29 04:25:48 +00:00
Brian Gaeke
9d2020003b
In VM::create(), comment out almost the whole function if NO_JITS_ENABLED,
...
because the Arch variable will likely be undefined.
llvm-svn: 9576
2003-10-29 04:24:09 +00:00
Alkis Evlogimenos
d478d3d19c
Add more debugging info to help tracing the SlotCalculator.
...
llvm-svn: 9575
2003-10-29 03:12:12 +00:00
Chris Lattner
56df0a53af
Yet another bugfix for 1.1
...
llvm-svn: 9574
2003-10-29 01:26:07 +00:00
Chris Lattner
c0a9905d1d
New testcase
...
llvm-svn: 9573
2003-10-29 01:23:01 +00:00
Chris Lattner
3e5ff2568c
Check in statistifying patch for Bill
...
llvm-svn: 9572
2003-10-28 23:14:59 +00:00
Chris Lattner
36213c7f97
Add fixed PR
...
llvm-svn: 9571
2003-10-28 23:13:03 +00:00
Chris Lattner
8d1464e2d6
Add new method
...
llvm-svn: 9570
2003-10-28 23:10:44 +00:00
Chris Lattner
54ac910a5c
Fix PR62, and llvm/test/Regression/CBackend/2003-10-28-CastToPtrToStruct.ll
...
ConstantExpr's can use unrelated types, make sure to scan them.
llvm-svn: 9569
2003-10-28 23:09:45 +00:00
Brian Gaeke
329265fa87
New testcase, reduced from DOOM.
...
llvm-svn: 9568
2003-10-28 22:54:56 +00:00
Chris Lattner
c88f7bb317
Cleanup output a bit
...
llvm-svn: 9567
2003-10-28 22:53:49 +00:00
Chris Lattner
2c14d253c4
Add option for block profiling, pass in the "correct" argv[0] to the program
...
llvm-svn: 9566
2003-10-28 22:52:05 +00:00
Chris Lattner
5564406f6e
Add the ability for users to specify a specific argv[0] to pass into the
...
program
llvm-svn: 9565
2003-10-28 22:51:44 +00:00
Chris Lattner
3e659233aa
Actually save and pass in argument information
...
llvm-svn: 9564
2003-10-28 22:45:25 +00:00
Chris Lattner
183fa7ceb3
Pass in argc & argv
...
llvm-svn: 9563
2003-10-28 22:42:24 +00:00
Chris Lattner
2343a0eed2
Print out command lines used to run the programs
...
llvm-svn: 9562
2003-10-28 22:30:37 +00:00
Brian Gaeke
8fb7af1ee7
Fix extract to use the right TargetData, like Bugpoint does.
...
llvm-svn: 9561
2003-10-28 22:22:16 +00:00
Chris Lattner
10c91cccff
Helper script for collecting profiling instrumentation. Simply run
...
$ profile.pl foo.bc <args>
... to instrument, run, then print a program profile!
llvm-svn: 9560
2003-10-28 22:11:31 +00:00
Chris Lattner
2091cc4310
Add support for reading block frequencies. Fix bug in attribution of counts
...
to functions
llvm-svn: 9559
2003-10-28 21:25:23 +00:00
Misha Brukman
b7c3b6dc4d
* Put LLVM in title of page so readers know which CFE we're talking about
...
* Use <ol> instead of <ul> if we're gonna number the list items
* Close <li> tags
* Stylize the document footer to be consistent
llvm-svn: 9558
2003-10-28 21:09:29 +00:00
Chris Lattner
8b8a777e41
Provide an accessor for getting function count information. Print a simple
...
report
llvm-svn: 9557
2003-10-28 21:08:18 +00:00
Chris Lattner
fc8bd0622f
Read in the bytecode and profile information, but don't do anything with
...
it yet.
llvm-svn: 9556
2003-10-28 20:13:07 +00:00
Chris Lattner
5b78ea3473
We need to output the number of records we have, so we know how many to read in! Doh.
...
llvm-svn: 9555
2003-10-28 19:35:56 +00:00
John Criswell
c3ee97dc76
Generated autoconf script for Chris.
...
llvm-svn: 9554
2003-10-28 19:21:11 +00:00
Chris Lattner
cccd090942
Add profiling runtime and llvm-prof tools. Would someone please regen the
...
configure script for me? :)
llvm-svn: 9553
2003-10-28 19:17:11 +00:00
Chris Lattner
f6c89c91ae
Build the llvm-prof directory
...
llvm-svn: 9552
2003-10-28 19:16:49 +00:00
Chris Lattner
14b392fdea
Initial checkin of llvmprof stub
...
llvm-svn: 9551
2003-10-28 19:16:35 +00:00
Brian Gaeke
c4fdf65e5a
Remove __STDC_LIMIT_MACROS from here.
...
llvm-svn: 9550
2003-10-28 19:11:29 +00:00
Brian Gaeke
be9e03f0e4
Add __STDC_LIMIT_MACROS here.
...
llvm-svn: 9549
2003-10-28 19:09:28 +00:00
Chris Lattner
3c0254e47e
Reorder #includes, drop unneeded one
...
llvm-svn: 9548
2003-10-28 19:08:15 +00:00
Chris Lattner
c8ba0672ac
Initial checkin of profiling instrumentation pass. So far, despite the
...
file name, we only support function profiling. This will be fixed in the
near future.
llvm-svn: 9547
2003-10-28 18:59:04 +00:00
Chris Lattner
fa5846a33f
Initial checkin of function and block profiling runtime library
...
llvm-svn: 9546
2003-10-28 18:56:51 +00:00
Misha Brukman
11d1f015af
Publications do not get distributed with docs/; hence, their stylesheet need not
...
be distributed either.
llvm-svn: 9545
2003-10-28 18:55:27 +00:00
Chris Lattner
d09f339bed
I'm tired of the nightly tester stopping, aren't you?
...
llvm-svn: 9544
2003-10-28 18:37:24 +00:00
Chris Lattner
233989316c
Eliminate using declarations
...
llvm-svn: 9543
2003-10-27 21:44:09 +00:00
Chris Lattner
5e004e8ce0
Propagating constants to arguments can make other arguments constant. For now
...
do something dumb, and inefficient, but more complete.
llvm-svn: 9542
2003-10-27 21:09:00 +00:00
Chris Lattner
d2a7427caa
Clarify what is a bug and what isn't
...
llvm-svn: 9539
2003-10-27 18:30:37 +00:00
John Criswell
f531f319d2
Merged in RELEASE_1.
...
llvm-svn: 9538
2003-10-27 18:18:16 +00:00
John Criswell
867d59abbc
Merged in RELEASE_1.
...
llvm-svn: 9537
2003-10-27 18:02:06 +00:00
Chris Lattner
d16d975ac3
Add a new bugfix
...
llvm-svn: 9536
2003-10-27 17:58:57 +00:00
John Criswell
8f04bf6426
Merged in RELEASE_1.
...
llvm-svn: 9535
2003-10-27 17:56:26 +00:00
Chris Lattner
2a4349e1bd
New testcase which crashes the C++ FE
...
llvm-svn: 9534
2003-10-27 17:51:31 +00:00
John Criswell
cdde075fa9
Merged RELEASE_1.
...
llvm-svn: 9533
2003-10-27 17:46:42 +00:00
John Criswell
9d977d58db
Updated with Vikram's comments.
...
llvm-svn: 9532
2003-10-27 17:41:53 +00:00
Chris Lattner
639579c884
Update release notes for recent bug fixes
...
llvm-svn: 9531
2003-10-27 17:06:39 +00:00
Chris Lattner
b727fb2663
Fix test: Linker/2003-10-27-LinkOncePromote.ll
...
Fix PR58
llvm-svn: 9530
2003-10-27 16:39:39 +00:00
Chris Lattner
f38da836f0
Fix initializers to match
...
llvm-svn: 9529
2003-10-27 16:30:29 +00:00
Chris Lattner
eba4dbf28d
New testcase
...
llvm-svn: 9528
2003-10-27 16:18:28 +00:00
Chris Lattner
25fd5c107f
Update release notes
...
llvm-svn: 9527
2003-10-27 05:41:39 +00:00
Chris Lattner
d9f4ffdf5e
Get the list of PHI node values before the basic block is split. Also, add
...
PHI node entries for unwind instructions just like for call instructions which
became invokes! This fixes PR57, tested by
Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll
llvm-svn: 9526
2003-10-27 05:33:09 +00:00
Chris Lattner
0fd9c24e56
New testcase.
...
llvm-svn: 9525
2003-10-27 05:13:47 +00:00
Chris Lattner
9b3c460a1e
Make sure to syntax hilight the 'unwind' keyword!
...
llvm-svn: 9524
2003-10-27 05:09:15 +00:00
Chris Lattner
4f50ebda32
Do not print out lists with thousands of elements in them, that's kinda silly
...
llvm-svn: 9523
2003-10-27 04:44:59 +00:00
Chris Lattner
7c4bd1d30f
Bump the release number, add a skeleton to be filled in as stuff changes.
...
llvm-svn: 9521
2003-10-27 01:31:14 +00:00
Chris Lattner
ffcc4ddd68
This file is obsolete
...
llvm-svn: 9520
2003-10-27 01:25:58 +00:00
Vikram S. Adve
227e6191fb
Gotta use gmake, not make. make on Solaris is Sun's make which does not work.
...
llvm-svn: 9510
2003-10-26 13:41:18 +00:00
Chris Lattner
276db4acf7
Add a link to the bug tracker
...
llvm-svn: 9509
2003-10-25 18:41:16 +00:00
Vikram S. Adve
4da8cb0da7
Rephrase the OSI answer.
...
llvm-svn: 9508
2003-10-25 17:22:08 +00:00
Vikram S. Adve
a2274887e8
Dang...these different file locations make it a pain to get the URLs right.
...
llvm-svn: 9507
2003-10-25 17:20:38 +00:00
Vikram S. Adve
c021b23041
Fix license URL and typo.
...
llvm-svn: 9506
2003-10-25 17:19:21 +00:00
Vikram S. Adve
26c901ed88
Improve formatting of licensing section.
...
llvm-svn: 9505
2003-10-25 17:14:52 +00:00
Vikram S. Adve
71e433ef98
Add a section on licensing questions.
...
llvm-svn: 9504
2003-10-25 17:06:55 +00:00
Chris Lattner
4d5767c703
Attempt to provide support for those without RTLD_DEFAULT.
...
llvm-svn: 9503
2003-10-25 16:55:32 +00:00
Chris Lattner
37edb43831
Unbreak the build
...
llvm-svn: 9502
2003-10-25 16:18:03 +00:00
John Criswell
ebe140be16
Added answers to test suite questions.
...
llvm-svn: 9501
2003-10-24 22:48:20 +00:00
Brian Gaeke
eca381c7e8
Publicize the type of FnAllocState.
...
Prototype option to save state in a global instead of as a Constant in
the Module. (Turned off, for now, with the on/off switch welded in the off
position. You get the idea.)
llvm-svn: 9500
2003-10-24 21:21:58 +00:00
Chris Lattner
9ab7fbef60
standardize command line option names
...
llvm-svn: 9496
2003-10-24 20:05:58 +00:00
Brian Gaeke
055148bdc1
TraceMode, as you may have heard, is history.
...
ExecutionEngine::create no longer takes a TraceMode argument.
llvm-svn: 9495
2003-10-24 20:00:17 +00:00
Brian Gaeke
275811125d
lli -q is history. Rebuild your gccld shell scripts, folks!
...
llvm-svn: 9494
2003-10-24 20:00:06 +00:00
Brian Gaeke
b77e589bd1
ExecutionEngine::create no longer takes a TraceMode argument.
...
CurFrame, TraceMode, and the CachedWriter are history.
The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.
ExecutionContext now keeps Values for each stack frame in a std::map.
printValue() and print() are history.
executeInstruction() is now part of run().
llvm-svn: 9493
2003-10-24 19:59:37 +00:00
Brian Gaeke
65c60e24cd
ExecutionEngine::create no longer takes a TraceMode argument.
...
CurFrame, TraceMode, and the CachedWriter are history.
llvm-svn: 9492
2003-10-24 19:59:28 +00:00
Misha Brukman
c86e8b1261
* Use stylesheets and <div>s for layout instead of <ul>
...
* Close <a>, <li>, and <p> tags
* This isn't quite HTML 4.01 Strict-compliant, but it's almost there.
llvm-svn: 9491
2003-10-24 19:59:21 +00:00
Brian Gaeke
759ba76905
The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.
...
llvm-svn: 9490
2003-10-24 19:59:18 +00:00
Brian Gaeke
e278c22380
Reduce the number of #includes.
...
CurFrame, TraceMode, and the CachedWriter are history.
ArrayChecksEnabled and non-QuietMode are history.
The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.
ExecutionContext now keeps Values for each stack frame in a std::map.
Stop pre-initializing Values on the stack to 42.
Remove some dead variables, excess whitespace and commented-out code.
executeInstruction() is now part of run().
printValue() and print() are history.
llvm-svn: 9489
2003-10-24 19:59:01 +00:00
Brian Gaeke
65cd504822
ExecutionEngine::create no longer takes a TraceMode argument.
...
llvm-svn: 9488
2003-10-24 19:58:38 +00:00
Misha Brukman
f314a4b7aa
Added a style for making test red, which is used in CommandLine.html
...
llvm-svn: 9487
2003-10-24 19:58:36 +00:00
Chris Lattner
b1e8187c31
Turn on the inliner by default at link-time
...
llvm-svn: 9477
2003-10-24 18:09:23 +00:00
Misha Brukman
084a3a0773
This is now valid HTML 4.01 Strict.
...
llvm-svn: 9475
2003-10-24 18:06:11 +00:00
Misha Brukman
f196dbb65c
* Use HTML 4.01 Strict DTD
...
* Stop using UTF-8, the webserver sends out iso-8859-1 anyway
* Use style sheets and <div>s instead of <font> tags
* Stop using <ul> for layout
llvm-svn: 9474
2003-10-24 17:57:33 +00:00
Misha Brukman
2ca41fb2c2
Add a style for document footers.
...
llvm-svn: 9473
2003-10-24 17:56:09 +00:00
Misha Brukman
03d4b0f9af
* Made into valid CSS that W3C accepts
...
* Added document subsubsection styles for usage in documentation
llvm-svn: 9472
2003-10-24 17:34:50 +00:00
Chris Lattner
d6f136c6b1
Add note about multilibs. THis should go into the 1.0 release if possible
...
llvm-svn: 9467
2003-10-24 16:02:34 +00:00
Chris Lattner
b28c3289df
Update list of passes and buglist.
...
llvm-svn: 9460
2003-10-24 04:03:19 +00:00
Brian Gaeke
98b618270a
Destroy MachineFunction for any Function that we are about to
...
recompile and relink. This keeps it from failing an assertion when
it goes and tries to construct a new MachineFunction for that Function.
llvm-svn: 9459
2003-10-24 03:55:37 +00:00
Vikram S. Adve
3326329b03
Organized in 4 parts. The last two are the same as before: LLVM Docs and
...
Mailing Lists. The first two are ""Getting Started" and "Getting Help."
llvm-svn: 9457
2003-10-24 02:36:15 +00:00
Brian Gaeke
24fb8f07f3
Move the implementations of ==, != on AllocInfos here, from UnpackTraceFunction.
...
llvm-svn: 9452
2003-10-23 20:39:18 +00:00
Brian Gaeke
390d31cde4
Move AllocInfo structure to a private AllocInfo.h header file.
...
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
Give doFinalization a method comment, and let it do the work of converting
AllocInfos to LLVM Constants.
llvm-svn: 9451
2003-10-23 20:32:55 +00:00
Brian Gaeke
a6bfe8eb9e
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
...
llvm-svn: 9450
2003-10-23 20:32:02 +00:00
Brian Gaeke
8e766c7ab3
New file, containing AllocInfo structure.
...
llvm-svn: 9449
2003-10-23 20:31:51 +00:00
Chris Lattner
0e18c62fa5
Recommend using -z3
...
llvm-svn: 9445
2003-10-23 19:49:01 +00:00
Chris Lattner
4541bf7206
Remove explicit paths
...
llvm-svn: 9444
2003-10-23 19:48:11 +00:00
Chris Lattner
97b5b1fd58
Add assertions
...
llvm-svn: 9443
2003-10-23 19:33:49 +00:00
Chris Lattner
7eb71b4bd8
Fix bug in eon hopefully
...
llvm-svn: 9442
2003-10-23 19:33:44 +00:00
Chris Lattner
fb8e19b7ca
Fix bug: CBackend/2003-10-23-UnusedType.ll and hopefully 252.eon
...
llvm-svn: 9441
2003-10-23 19:30:30 +00:00
Chris Lattner
70a3b9024e
New testcase, which failes to compile. 252.eon hits this problem
...
llvm-svn: 9440
2003-10-23 19:25:53 +00:00