Reid Spencer
e61dec5896
Allow this to compile even on machines that HAVE the bzlib library but do
...
NOT have the bzlib.h header file. Go figure.
llvm-svn: 17989
2004-11-19 15:56:28 +00:00
Chris Lattner
0169ce5e9e
This is a horrible hack to work around libstdc++ bugs :(
...
llvm-svn: 17988
2004-11-19 08:44:07 +00:00
Nate Begeman
83cded0ecb
Eliminate another 6k register copies that the register allocator would just
...
coalesce out of hbd. Speeds up compilation by 2% (0.6s)
llvm-svn: 17987
2004-11-19 08:01:16 +00:00
Reid Spencer
c385bbef7b
Undo last change as its unnecessary.
...
llvm-svn: 17985
2004-11-19 04:59:07 +00:00
Reid Spencer
640ab4f4f6
Don't save an iterator, just use post-increment.
...
llvm-svn: 17981
2004-11-19 03:44:10 +00:00
Reid Spencer
fb0e585554
Eliminate unsightly ;;
...
llvm-svn: 17979
2004-11-19 03:27:05 +00:00
Reid Spencer
a2e2f5c878
Make a cast explicit.
...
llvm-svn: 17977
2004-11-19 03:20:09 +00:00
Reid Spencer
a181a37bb4
Make findModulesDefiningSymbols modify its symbols argument so we can \
...
eliminate symbols defined by the archive efficiently
llvm-svn: 17976
2004-11-19 03:18:22 +00:00
Reid Spencer
119f824e80
Reduce the amount of work in LinkInArchive by not searching the archive for
...
symbols it has already identified as not defining.
llvm-svn: 17975
2004-11-19 03:13:25 +00:00
Nate Begeman
de1fd6a162
Generate fewer reg-reg copies for the register allocator to deal with.
...
This eliminates over 2000 in hbd alone.
llvm-svn: 17973
2004-11-19 02:06:40 +00:00
Chris Lattner
ce8249f570
Delete stoppoints that occur for the same source line.
...
llvm-svn: 17970
2004-11-18 21:41:39 +00:00
Tanya Lattner
bd01287efd
Fixed to fit in 80 columns.
...
llvm-svn: 17961
2004-11-18 18:47:29 +00:00
Tanya Lattner
d29c748a57
Adding option to llc for ModuloScheduling. By default it is turned off.
...
llvm-svn: 17959
2004-11-18 18:38:01 +00:00
Chris Lattner
a06c8cfe80
These methods are inlined
...
llvm-svn: 17958
2004-11-18 17:47:13 +00:00
Chris Lattner
7fb7c81ebf
Check in hook that I forgot
...
llvm-svn: 17956
2004-11-18 17:24:20 +00:00
Brian Gaeke
23969d8817
Rewrite LoadArgumentsToVirtualRegs, making it match almost exactly how
...
visitCallInst works. Support cast of byte/short/int to long.
llvm-svn: 17949
2004-11-18 07:43:33 +00:00
Brian Gaeke
b01ef957b9
Update current expected failures list - expand it to include all of
...
SingleSource. Update to-do list (open-coding refers to binary operations on
longs, not to passing them into functions, which we already support.)
llvm-svn: 17948
2004-11-18 07:43:32 +00:00
Nate Begeman
567d30174a
Eliminate another common source of moves that the register allocator
...
shouldn't be forced to coalesce for us: folded GEP operations. This too
fires thousands of times across the testsuite.
llvm-svn: 17947
2004-11-18 07:22:46 +00:00
Nate Begeman
3e1aaef2b5
When accessing the base register for global variables, use the register
...
directly rather than making a copy for the register allocator to coalesce.
This kills thousands of live intervals across the testsuite.
llvm-svn: 17946
2004-11-18 06:51:29 +00:00
Chris Lattner
ccd7bfb561
* There is no reason for SpillWeights to be an instance var
...
* Do not put fixed registers into the unhandled set. This means they will
never find their way into the inactive, active, or handled sets, so we
can simplify a bunch of code.
llvm-svn: 17945
2004-11-18 06:01:45 +00:00
Chris Lattner
60c90d623f
There is no need to check to see if j overflowed in this loop as we're only
...
incrementing i.
llvm-svn: 17944
2004-11-18 05:28:21 +00:00
Chris Lattner
2c16205a0d
Moderate head scratching reveals that this conditional is not needed. If
...
i->start == j->start, then certainly i->end > j->start.
llvm-svn: 17943
2004-11-18 05:19:02 +00:00
Nate Begeman
7e254235e2
Clean up and fix cast codegen by removing cases that are handled elsewhere,
...
and properly emitting signed short to unsigned int. This fixes the last
regression vs. the CBE, MultiSource/Applications/hbd.
llvm-svn: 17942
2004-11-18 04:56:53 +00:00
Reid Spencer
c1871a4eaa
Dynamic Library abstraction. This makes the abstraction of a single dynamic
...
library (shared library/shared object) whose symbols can be looked up
dynamically. Used for plug-ins.
llvm-svn: 17940
2004-11-18 04:33:39 +00:00
Chris Lattner
e9ab36314d
Fix a couple of bugs where we considered physregs past their range as possibly
...
intersecting an interval.
llvm-svn: 17939
2004-11-18 04:33:31 +00:00
Chris Lattner
c23cebb206
Fix typeo
...
llvm-svn: 17938
2004-11-18 04:31:10 +00:00
Chris Lattner
3a6991f745
Start using the iterators in the fixed_ intervals to avoid having to binary
...
search physreg intervals every time we access it. This takes another
half second off of linscan.
llvm-svn: 17937
2004-11-18 04:13:02 +00:00
Chris Lattner
189acb3955
Take another .7 seconds off of linear scan time.
...
llvm-svn: 17936
2004-11-18 04:02:11 +00:00
Chris Lattner
a52650a18a
Add a counter for the number of times linscan has to backtrack. Start using
...
the iterator hints we have to speed up overlaps(). This speeds linscan up
by about .2s (out of 8.7) on 175.vpr for PPC.
llvm-svn: 17935
2004-11-18 03:49:30 +00:00
Chris Lattner
2edc3cec62
Add ability to give hints to the overlaps routines.
...
llvm-svn: 17934
2004-11-18 03:47:34 +00:00
Chris Lattner
18ced80110
* Improve comments/documentation substantially
...
* Eliminate the releaseMemory method, this is not an analysis
* Change the fixed, active, and inactive lists of intervals to maintain an
iterator for the current position in the interval. This allows us to do
constant time increments of the iterator instead of having to do a binary
search to find our liverange in our liveinterval all of the time, which
substantially speeds up cases where LiveIntervals have many LiveRanges
- which is very common for physical registers. On targets with many
physregs, this can make a noticable difference.
With a release build of LLC for PPC, this halves the time in
processInactiveIntervals and processActiveIntervals, from 1.5s to .75s.
This also lays the ground for more to come.
llvm-svn: 17933
2004-11-18 02:42:27 +00:00
Chris Lattner
3bf87c8f95
Add new advanceTo method
...
llvm-svn: 17932
2004-11-18 02:37:31 +00:00
Chris Lattner
77a4102d91
Fix a minor bug in expiredAt. endNumber() is the first number that is not valid.
...
llvm-svn: 17931
2004-11-18 01:34:44 +00:00
Chris Lattner
ddc898639f
Rename some methods, use 'begin' instead of 'start', add new LiveInterval
...
iterator/begin/end members.
llvm-svn: 17930
2004-11-18 01:29:39 +00:00
Brian Gaeke
77ddfa2495
Allocate fewer registers and tighten up alignment restrictions.
...
llvm-svn: 17929
2004-11-18 00:25:20 +00:00
Brian Gaeke
cc4074987b
Update to-do list.
...
llvm-svn: 17927
2004-11-17 22:33:55 +00:00
Brian Gaeke
0963d035c6
Update list of failing SingleSource Benchmarks
...
llvm-svn: 17926
2004-11-17 22:33:28 +00:00
Brian Gaeke
70a111317a
We were (somehow) getting the wrong branch opcode for setcc float instrs.
...
llvm-svn: 17925
2004-11-17 22:06:56 +00:00
Alkis Evlogimenos
b9e38d3cc5
Make ReturnInst accept a value of type void as the return value. The
...
ReturnInst constructed is the same as if NULL was passed instead of
the void value.
llvm-svn: 17923
2004-11-17 21:02:25 +00:00
Reid Spencer
a98ccac6fc
Fix some things for Mac OSX archives:
...
* ensure trailing spaces are eliminated so they don't factor into the
length of a member's name.
* make sure all the bytes of a name are written even if the name ends in
multiple null characters (bug in OSX ar)
* make sure we provide the full member name when searching for symbols so
the module name is not accidentally duplicated.
llvm-svn: 17918
2004-11-17 18:28:29 +00:00
Reid Spencer
3e245bd4d5
Make sure we parse bytecode with a module identifier that reflects the full
...
name of the module: "Archive.a(object.o)"
llvm-svn: 17917
2004-11-17 18:25:21 +00:00
Chris Lattner
5a2ce1faab
Generalize this code to turn any cast-to-first-element-of into a gep constexpr
...
llvm-svn: 17914
2004-11-17 17:59:35 +00:00
Chris Lattner
bd02c10b87
Simplify conditional and fix LICM/2004-11-17-UndefIndexCrash.ll
...
by saying what we mean
llvm-svn: 17913
2004-11-17 17:39:39 +00:00
Reid Spencer
b9fbea4c79
Adjust long file name writing to match BSD 4.4 and Mac OSX style archives.
...
llvm-svn: 17910
2004-11-17 16:14:21 +00:00
Reid Spencer
f59013e0fa
Despite documentation to the contrary, Mac OSX and BSD 4.4 archive formats
...
*do* include the length of the long file in the length of the member and
they are *not* null terminated.
llvm-svn: 17909
2004-11-17 16:13:11 +00:00
Tanya Lattner
18118cf0c3
Added my own defMap. Only saving values that are not loop invariant. Fixed a couple of assertions that were triggered due to registers not being allocated. These both had to do with PHINodes.
...
llvm-svn: 17907
2004-11-16 21:31:37 +00:00
Chris Lattner
4725ecbbd6
Minor cleanup and speedup. This reduces link-time for 252.eon from 35.5s
...
to 34.7s with a profile build.
llvm-svn: 17906
2004-11-16 20:39:04 +00:00
Chris Lattner
7fdc458443
Make this function work with non-abstract types.
...
llvm-svn: 17905
2004-11-16 20:30:53 +00:00
Chris Lattner
8906663505
Don't increment a dead iterator
...
llvm-svn: 17904
2004-11-16 19:04:40 +00:00
Chris Lattner
a7eec14b04
Fix a major bug in the signed shr code, which apparently only breaks 134.perl!
...
llvm-svn: 17902
2004-11-16 18:40:52 +00:00
Reid Spencer
24a84793ba
* Use low-level unix I/O interface since we're on Unix.
...
* Don't use variable length arrays (replaced with alloca)
llvm-svn: 17901
2004-11-16 17:14:08 +00:00
Chris Lattner
b40f8214ea
Simplify the remapper by only needing one map, since the body of the functions
...
being linked do not need to be remapped any longer.
llvm-svn: 17900
2004-11-16 17:12:38 +00:00
Chris Lattner
92e712b00f
Do not delete dead invoke instructions!
...
llvm-svn: 17897
2004-11-16 16:32:28 +00:00
Misha Brukman
3885f4ec6d
Erase non-applicable Unix comment, this is Win32
...
llvm-svn: 17896
2004-11-16 07:35:32 +00:00
Brian Gaeke
c68a1fb6b9
Update list of failing benchmarks
...
llvm-svn: 17895
2004-11-16 07:32:58 +00:00
Brian Gaeke
effc63fac5
Correct the implicit-defs information for indirect and direct calls.
...
You can't have implicit defs that overlap explicit defs, or implicit
defs that alias one another.
llvm-svn: 17894
2004-11-16 07:32:09 +00:00
Chris Lattner
0493754bcf
Take advantage of the fact that we are allowed to clobber the input module
...
by splicing function bodies from the src module to the destination module.
This speeds up linking quite a bit, e.g. gccld time on 176.gcc from 26s -> 20s
when forming the .rbc file, with a profile build. One of the really strange
but cool effects of this patch is that it speeds up the optimizers as well,
from 12s -> 10.7s, presumably because of better locality???
In any case, this is just a first step. We can trivially get rid of the
LocalMap now and do other simplifications.
llvm-svn: 17893
2004-11-16 07:31:51 +00:00
Reid Spencer
35a3e7eacc
Fix typeo in comment.
...
llvm-svn: 17892
2004-11-16 07:05:16 +00:00
Reid Spencer
026d2183e7
Remove useless #include.
...
Patch contributed by Jeff Cohen.
llvm-svn: 17891
2004-11-16 07:00:23 +00:00
Reid Spencer
0d16952663
Simplify code.
...
Patch contributed by Jeff Cohen.
llvm-svn: 17890
2004-11-16 06:59:53 +00:00
Reid Spencer
cdc0b6d962
Standardize on 'class' instead of 'struct'. Gets rid of warnings in VC++
...
Patch contributed by Jeff Cohen.
llvm-svn: 17889
2004-11-16 06:58:55 +00:00
Brian Gaeke
23b56332bc
Give a better message for a common assertion failure.
...
llvm-svn: 17887
2004-11-16 06:52:35 +00:00
Reid Spencer
e64ca0563a
Add a comment to some code that at first glance just doesn't look right.
...
llvm-svn: 17886
2004-11-16 06:50:36 +00:00
Reid Spencer
ddfafa643a
Per code review:\
...
* Adjust indentation\
* Ensure memory do not leak if exceptions happen (std::auto_ptr use)
llvm-svn: 17885
2004-11-16 06:47:41 +00:00
Reid Spencer
2d66bbb7c3
Per code review:\
...
* Make the numVbrBytes function more efficient and better documented \
* Fix a bug in name truncation \
* Add comments before functions \
* Get rid of functions that are now inlined into the header \
* Do not have Archive doing symbol table printing \
* Put assert comments into the assert so they print out \
* Make sure foreign symbol tables are written
llvm-svn: 17884
2004-11-16 06:47:30 +00:00
Reid Spencer
b6d946d19d
Per code review:\
...
* Make sure we write out the foreign symbol table if we read one \
* Make the padding calculation more efficiently and avoid Solaris warnings
llvm-svn: 17883
2004-11-16 06:47:19 +00:00
Reid Spencer
e39cdbd7f7
Per code review:\
...
* Make sure all members are initialized upon construction
llvm-svn: 17882
2004-11-16 06:47:07 +00:00
Chris Lattner
be4c91f75f
The second arg may be clobbered by this function
...
llvm-svn: 17880
2004-11-16 06:41:36 +00:00
Reid Spencer
2fe884dad8
Per code review:\
...
* Get rid of memory leaks on exception \
* Provide better comments of how the memory handling works
llvm-svn: 17876
2004-11-16 06:41:05 +00:00
Chris Lattner
e816a3abc2
use an autoptr
...
llvm-svn: 17875
2004-11-16 06:40:54 +00:00
Reid Spencer
bcef3fef1d
Per code review:
...
* get rid of (void) construct in function declarations
* make toString a const member
* add a default implementation of toString for Win32
llvm-svn: 17873
2004-11-16 06:22:17 +00:00
Reid Spencer
4031ff44bb
Per code review:
...
* Clean up the StatusInfo constructor to construct all members and give
them reasonable values.
* Get rid of the Vector typedef and make the interface to
getDirectoryContent use a std::set instead of a std::vector so the dir
content is sorted.
* Make the getStatusInfo method const and not return a useless boolean.
llvm-svn: 17872
2004-11-16 06:15:19 +00:00
Reid Spencer
fdf8ac8d29
Per code review:
...
*Implement/Document the cl::extrahelp feature instead of the MoreHelp ptr.
llvm-svn: 17871
2004-11-16 06:11:52 +00:00
Chris Lattner
c13149e03e
Simplify namespaces
...
llvm-svn: 17870
2004-11-16 04:47:33 +00:00
Chris Lattner
41d31d7461
Remove a dead function, which died when we got GAS emission working (phwew,
...
hold your nose!)
llvm-svn: 17869
2004-11-16 04:34:29 +00:00
Chris Lattner
b378786c97
Implement a simple FIXME: if we are emitting a basic block address that has
...
already been emitted, we don't have to remember it and deal with it later,
just emit it directly.
llvm-svn: 17868
2004-11-16 04:30:51 +00:00
Chris Lattner
3f73c77ace
* Merge some win32 ifdefs together
...
* Get rid of "emitMaybePCRelativeValue", either we want to emit a PC relative
value or not: drop the maybe BS. As it turns out, the only places where
the bool was a variable coming in, the bool was a dynamic constant.
llvm-svn: 17867
2004-11-16 04:21:18 +00:00
Chris Lattner
89536fedee
Now that we have ghost linkage, we can force resolution of external symbols
...
immediately instead of lazily.
In this program, for example:
int main() {
printf("hello world\n");
printf("hello world\n");
printf("hello world\n");
printf("hello world\n");
}
We used to have to go through compilation callback 4 times (once for each
call to printf), now we don't go to it at all.
Thanks to Misha for noticing this, and for adding the initial ghost linkage
patches.
llvm-svn: 17864
2004-11-15 23:20:04 +00:00
Chris Lattner
583ea4764c
There is no reason to try to materialize the function from bytecode if it
...
already has been. This may be a small speedup.
llvm-svn: 17863
2004-11-15 23:18:09 +00:00
Chris Lattner
3ed3e8669f
Add debug-only=jit printout, so we see when lazily resolved symbols are
...
set up.
llvm-svn: 17862
2004-11-15 23:16:55 +00:00
Chris Lattner
9ef34d44e1
Simplify and rearrange long shift code
...
llvm-svn: 17861
2004-11-15 23:16:34 +00:00
Chris Lattner
10b5a5c0da
Do not emit FunctionBlock blocks for external functions. This shrinks
...
bytecode files by about 8 bytes per external function
llvm-svn: 17859
2004-11-15 22:39:49 +00:00
Chris Lattner
558ce75905
Use a per-function flag bit to indicate whether or not there is a function
...
body for the function.
llvm-svn: 17858
2004-11-15 22:38:52 +00:00
Chris Lattner
c199d448e9
Disable this change, it was premature
...
llvm-svn: 17857
2004-11-15 21:56:33 +00:00
Chris Lattner
704cad0375
Make *SURE* to null out the pointer before throwing an exception, otherwise
...
the dtor for the BytecodeReader class will try to free it again!
llvm-svn: 17856
2004-11-15 21:55:33 +00:00
Chris Lattner
4a2ae87435
Cleanups. Null out pointer after freeing it for paranoia
...
llvm-svn: 17855
2004-11-15 21:55:06 +00:00
Chris Lattner
571b490404
If a function is external, do not output a FunctionBlock for the function
...
AT ALL. This saves 11 bytes per external function from the bytecode file,
and is also required to make GhostLinkage work.
llvm-svn: 17854
2004-11-15 21:46:40 +00:00
Chris Lattner
d1e621acc6
Make functions default to having external linkage if they have no
...
FunctionBlock.
llvm-svn: 17853
2004-11-15 21:43:03 +00:00
Misha Brukman
757502af07
Add BCTR and LWZU instruction opcodes
...
llvm-svn: 17851
2004-11-15 21:20:09 +00:00
Misha Brukman
a3b5e5f569
Remove extra space char
...
llvm-svn: 17834
2004-11-15 19:30:05 +00:00
Reid Spencer
e986ef23d7
Remove unused variable for compilation by VC++.
...
Patch contributed by Morten Ofstad.
llvm-svn: 17830
2004-11-15 17:29:41 +00:00
Reid Spencer
247d690431
Provide the ThrowErrno utility.
...
Patch contributed by Morten Ofstad
llvm-svn: 17827
2004-11-15 17:21:57 +00:00
Reid Spencer
238e966215
Adjust implementation to match new interface.
...
Patch provided by Morten Ofstad
llvm-svn: 17826
2004-11-15 17:20:28 +00:00
Chris Lattner
f95f7e05a5
Minor cleanups. There is no reason for SCCP to derive from instvisitor anymore.
...
llvm-svn: 17825
2004-11-15 07:15:04 +00:00
Chris Lattner
4aa7dc02bf
Count more accurately
...
llvm-svn: 17824
2004-11-15 07:02:42 +00:00
Brian Gaeke
56da74bd11
Update list of failing Benchmarks.
...
llvm-svn: 17823
2004-11-15 05:57:26 +00:00
Brian Gaeke
075be51e61
Expand Defs to encompass all the possibly-call-clobbered regs.
...
llvm-svn: 17822
2004-11-15 05:56:53 +00:00
Chris Lattner
20a9efa189
Quiet warnings on the persephone tester
...
llvm-svn: 17821
2004-11-15 05:54:07 +00:00
Chris Lattner
e87a1360b3
Two minor improvements:
...
1. Speedup getValueState by having it not consider Arguments. It's better
to just add them before we start SCCP'ing.
2. SCCP can delete the contents of dead blocks. No really, it's ok! This
reduces the size of the IR for subsequent passes, even though
simplifycfg would do the same job. In practice, simplifycfg does not
run until much later than sccp in gccas
llvm-svn: 17820
2004-11-15 05:45:33 +00:00
Chris Lattner
4ad574191b
rename InstValue to LatticeValue, as it holds for more than instructions.
...
llvm-svn: 17818
2004-11-15 05:03:30 +00:00
Reid Spencer
5fc587b13e
Actually get the #include correct so it compiles .. duh.
...
llvm-svn: 17817
2004-11-15 04:47:22 +00:00
Chris Lattner
bde8da9e43
Substantially refactor the SCCP class into an SCCP pass and an SCCPSolver
...
class. The only changes are minor:
* Do not try to SCCP instructions that return void in the rewrite loop.
This is silly and fool hardy, wasting a map lookup and adding an entry
to the map which is never used.
* If we decide something has an undefined value, rewrite it to undef,
potentially leading to further simplications.
llvm-svn: 17816
2004-11-15 04:44:20 +00:00
Reid Spencer
8d0de0688c
Make it actually compile on Solaris.
...
llvm-svn: 17815
2004-11-15 04:42:44 +00:00
Reid Spencer
2638dac5e9
Consolidate the implementation of TimeValue::now() for Unix to use the
...
seemingly ubiquitous gettimeofday(3) call.
llvm-svn: 17813
2004-11-15 04:36:35 +00:00
Reid Spencer
52da956231
* Make sure the string table gets read even if there isn't a foreign
...
symbol table.
* Make sure we update the file pointer for each member when rebuilding the
symbol table.
llvm-svn: 17812
2004-11-15 01:40:20 +00:00
Reid Spencer
bfc924424d
Changes necessary to enable linking of archives without LLVM symbol tables.
...
llvm-svn: 17811
2004-11-15 01:20:11 +00:00
Reid Spencer
29eb55846f
Remove a forgotten debug output line.
...
llvm-svn: 17810
2004-11-14 23:49:55 +00:00
Reid Spencer
2012d091b2
Implement functionality suggested from code review: getStatusInfo should
...
returnn false if the file doesn't exist rather than throw ane exception.
llvm-svn: 17809
2004-11-14 23:30:38 +00:00
Reid Spencer
7850852268
Linker.h moved to include/llvm from include/llvm/Support.
...
llvm-svn: 17807
2004-11-14 23:27:04 +00:00
Reid Spencer
7de5984452
Make sure IdentifyFileType is in the sys namespace.
...
llvm-svn: 17806
2004-11-14 23:26:18 +00:00
Reid Spencer
7a004d2749
Linker.h has a new home.
...
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer
85698d2435
Moved to lib/Bytecode/Archive.
...
llvm-svn: 17800
2004-11-14 22:38:32 +00:00
Alkis Evlogimenos
a29bf44bde
Add missing include.
...
llvm-svn: 17799
2004-11-14 22:37:42 +00:00
Reid Spencer
e51435be09
Moved to lib/Linker
...
llvm-svn: 17786
2004-11-14 22:15:31 +00:00
Reid Spencer
542b5216bf
Forget strerror_r, it causes problems. Fix later when threading matters
...
llvm-svn: 17783
2004-11-14 22:10:54 +00:00
Reid Spencer
bd1d413e4e
Implement the toString method
...
llvm-svn: 17782
2004-11-14 22:10:08 +00:00
Reid Spencer
3dfb002523
Update for prototype changes
...
llvm-svn: 17781
2004-11-14 22:09:22 +00:00
Reid Spencer
b73d75e4ff
* Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo * Implement renameFile
...
llvm-svn: 17780
2004-11-14 22:08:36 +00:00
Reid Spencer
59872e60ef
Fix bugs in class invariant
...
llvm-svn: 17779
2004-11-14 22:07:50 +00:00
Reid Spencer
a6b803539a
Include the correct implementation file
...
llvm-svn: 17778
2004-11-14 22:07:04 +00:00
Reid Spencer
85b6b57c5e
Don't exceed 80 columns.
...
llvm-svn: 17777
2004-11-14 22:06:18 +00:00
Reid Spencer
381c80ec88
Implement IdentifyFileType function
...
llvm-svn: 17776
2004-11-14 22:05:32 +00:00
Reid Spencer
f3923a1cf7
Implement the high level interface to make (de)compression easier.
...
llvm-svn: 17775
2004-11-14 22:04:46 +00:00
Reid Spencer
8bf3328ca7
Implement the MoreHelp utility that calls a function to printmore help information if the MoreHelp global is not null.
...
llvm-svn: 17774
2004-11-14 22:04:00 +00:00
Reid Spencer
292678447a
Don't bother with a re-linked library, ensure archive library is built.
...
llvm-svn: 17773
2004-11-14 22:03:14 +00:00
Reid Spencer
8a2a29e286
*Adjust prototypes for public interface. *Rewrite LinkInArchive to use symbol tables.
...
llvm-svn: 17772
2004-11-14 22:02:27 +00:00
Reid Spencer
5c112bc910
Simplify compression code by using the high level interface to the Compressor
...
llvm-svn: 17771
2004-11-14 22:01:41 +00:00
Reid Spencer
cc354b445d
Add wrappers to get defined symbols from bytecode
...
llvm-svn: 17770
2004-11-14 22:00:48 +00:00
Reid Spencer
b9baef5ca8
Simplify handling of decompression
...
llvm-svn: 17769
2004-11-14 22:00:09 +00:00
Reid Spencer
115f252d2a
Simplify decompression code by using the high level interface to the Compressor
...
llvm-svn: 17768
2004-11-14 21:59:21 +00:00
Reid Spencer
2917639a35
Completely rewritten to allow reading of archives and symbol table lookup in a more efficient manner.
...
llvm-svn: 17767
2004-11-14 21:58:33 +00:00
Reid Spencer
0a3e3a41c3
Implementation declarations for Archive
...
llvm-svn: 17766
2004-11-14 21:57:46 +00:00
Reid Spencer
131f129398
First working version
...
llvm-svn: 17765
2004-11-14 21:56:59 +00:00
Reid Spencer
0a3ec41881
Add the Archive library
...
llvm-svn: 17764
2004-11-14 21:55:27 +00:00
Reid Spencer
08a949d512
Add the Linker library
...
llvm-svn: 17763
2004-11-14 21:54:41 +00:00
Misha Brukman
8d4e1d62dd
GhostLinkage not allowed in LLVM AsmWriter, either
...
llvm-svn: 17751
2004-11-14 21:04:34 +00:00
Misha Brukman
8c1b4a5b9d
GhostLinkage should not reach asm printing stage
...
llvm-svn: 17750
2004-11-14 21:03:49 +00:00
Misha Brukman
0d900050be
Handle GhostLinkage (should not ever reach the assembly printing stage!)
...
llvm-svn: 17749
2004-11-14 21:03:30 +00:00
Misha Brukman
6da7a2e054
Mark an unmaterialized function as having GhostLinkage
...
llvm-svn: 17748
2004-11-14 21:02:55 +00:00
Chris Lattner
e4a97f4bee
If a global is just loaded and restored, realize that it is not changing
...
value. This allows us to turn more globals into constants and eliminate them.
This patch implements GlobalOpt/load-store-global.llx.
Note that this patch speeds up 255.vortex from:
Output/255.vortex.out-cbe.time:program 7.640000
Output/255.vortex.out-llc.time:program 9.810000
to:
Output/255.vortex.out-cbe.time:program 7.250000
Output/255.vortex.out-llc.time:program 9.490000
Which isn't bad at all!
llvm-svn: 17746
2004-11-14 20:50:30 +00:00
Misha Brukman
c98cd22aae
Fix build on Linux/PowerPC64 using SuSE GCC (#undef PPC)
...
llvm-svn: 17744
2004-11-14 20:34:01 +00:00
Reid Spencer
9534caa3bb
Moved to lib/Bytecode/Archive in preparation for re-write.
...
llvm-svn: 17742
2004-11-14 19:59:40 +00:00
Chris Lattner
3d61b688a9
This optimization makes MANY phi nodes that all have the same incoming value.
...
If this happens, detect it early instead of relying on instcombine to notice
it later. This can be a big speedup, because PHI nodes can have many
incoming values.
llvm-svn: 17741
2004-11-14 19:29:34 +00:00
Chris Lattner
1e4cad9176
Implement instcombine/phi.ll:test6 - pulling operations through PHI nodes.
...
This exposes subsequent optimization possiblities and reduces code size.
This triggers 1423 times in spec.
llvm-svn: 17740
2004-11-14 19:13:23 +00:00
Chris Lattner
fdd41995d8
Transform this:
...
%X = alloca ...
%Y = alloca ...
X == Y
into false. This allows us to simplify some stuff in eon (and probably
many other C++ programs) where operator= was checking for self assignment.
Folding this allows us to SROA several additional structs.
llvm-svn: 17735
2004-11-14 07:33:16 +00:00
Chris Lattner
d6d9a04344
Remove note to self
...
llvm-svn: 17734
2004-11-14 06:57:47 +00:00
Brian Gaeke
f9ec4c8ee2
Fix problem with insertion point for ADJCALLSTACKDOWN.
...
llvm-svn: 17733
2004-11-14 06:32:08 +00:00
Brian Gaeke
0e77dab4e8
Update lists of failing unit tests.
...
Exclude bigfib, so that we effectively exclude all C++ benchmarks.
Update to-do list: mention va_start.
llvm-svn: 17732
2004-11-14 06:32:07 +00:00
Chris Lattner
363e78c357
If a function always returns a constant, replace all calls sites with that
...
constant value. This makes the return value dead and allows for
simplification in the caller.
This implements IPConstantProp/return-constant.ll
This triggers several dozen times throughout SPEC.
llvm-svn: 17730
2004-11-14 06:10:11 +00:00
Brian Gaeke
ab60855423
Fix NotTest - round up extraStack to the nearest doubleword, if it is
...
not zero.
llvm-svn: 17728
2004-11-14 05:19:00 +00:00
Chris Lattner
d0a0af0818
Teach SROA how to promote an array index that is variable, if the dimension
...
of the array is just two. This occurs 8 times in gcc, 6 times in crafty, and
12 times in 099.go.
This implements ScalarRepl/sroa_two.ll
llvm-svn: 17727
2004-11-14 05:00:19 +00:00
Brian Gaeke
79f5f96a60
Update failing Benchmarks; point out that I'm skipping Shootout-C++.
...
llvm-svn: 17725
2004-11-14 04:43:12 +00:00
Chris Lattner
bc35272f86
Rearrange some code, no functionality changes.
...
llvm-svn: 17724
2004-11-14 04:24:28 +00:00
Brian Gaeke
505a9ee73d
Update expected UnitTests failures.
...
llvm-svn: 17723
2004-11-14 03:22:08 +00:00
Brian Gaeke
1b3d701769
Rewrite outgoing arg handling to handle more weird corner cases.
...
llvm-svn: 17722
2004-11-14 03:22:07 +00:00
Brian Gaeke
294af88a7a
Support UndefValue emission.
...
llvm-svn: 17721
2004-11-14 03:22:05 +00:00
Chris Lattner
9b2f0f93e3
Remove debugging code
...
llvm-svn: 17719
2004-11-13 23:32:53 +00:00
Chris Lattner
9749bf21f8
Argument promotion transforms functions to unconditionally load their
...
argument pointers. This is only valid to do if the function already
unconditionally loaded an argument or if the pointer passed in is known
to be valid. Make sure to do the required checks.
This fixed ArgumentPromotion/control-flow.ll and the Burg program.
llvm-svn: 17718
2004-11-13 23:31:34 +00:00
Chris Lattner
09b7f968e0
Don't print unneeded labels
...
llvm-svn: 17714
2004-11-13 23:27:11 +00:00
Chris Lattner
3684294c71
Hack around stupidity in GCC, fixing Burg with the CBE and
...
CBackend/2004-11-13-FunctionPointerCast.llx
llvm-svn: 17710
2004-11-13 22:21:56 +00:00
Chris Lattner
1cde11aa95
shld is a very high latency operation. Instead of emitting it for shifts of
...
two or three, open code the equivalent operation which is faster on athlon
and P4 (by a substantial margin).
For example, instead of compiling this:
long long X2(long long Y) { return Y << 2; }
to:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
shldl $2, %eax, %edx
shll $2, %eax
ret
Compile it to:
X2:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl %eax, %edx
shrl $30, %edx
leal (%edx,%ecx,4), %edx
shll $2, %eax
ret
Likewise, for << 3, compile to:
X3:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl %eax, %edx
shrl $29, %edx
leal (%edx,%ecx,8), %edx
shll $3, %eax
ret
This matches icc, except that icc open codes the shifts as adds on the P4.
llvm-svn: 17707
2004-11-13 20:48:57 +00:00
Chris Lattner
c531e090db
Add missing check
...
llvm-svn: 17706
2004-11-13 20:04:38 +00:00
Chris Lattner
d1381380ae
Compile:
...
long long X3_2(long long Y) { return Y+Y; }
int X(int Y) { return Y+Y; }
into:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
addl %eax, %eax
adcl %edx, %edx
ret
X:
movl 4(%esp), %eax
addl %eax, %eax
ret
instead of:
X3_2:
movl 4(%esp), %eax
movl 8(%esp), %edx
shldl $1, %eax, %edx
shll $1, %eax
ret
X:
movl 4(%esp), %eax
shll $1, %eax
ret
llvm-svn: 17705
2004-11-13 20:03:48 +00:00
Chris Lattner
70e351fb1c
Simplify handling of shifts to be the same as we do for adds. Add support
...
for (X * C1) + (X * C2) (where * can be mul or shl), allowing us to fold:
Y+Y+Y+Y+Y+Y+Y+Y
into
%tmp.8 = shl long %Y, ubyte 3 ; <long> [#uses=1]
instead of
%tmp.4 = shl long %Y, ubyte 2 ; <long> [#uses=1]
%tmp.12 = shl long %Y, ubyte 2 ; <long> [#uses=1]
%tmp.8 = add long %tmp.4, %tmp.12 ; <long> [#uses=1]
This implements add.ll:test25
Also add support for (X*C1)-(X*C2) -> X*(C1-C2), implementing sub.ll:test18
llvm-svn: 17704
2004-11-13 19:50:12 +00:00
Chris Lattner
7a8d26a581
Fold:
...
(X + (X << C2)) --> X * ((1 << C2) + 1)
((X << C2) + X) --> X * ((1 << C2) + 1)
This means that we now canonicalize "Y+Y+Y" into:
%tmp.2 = mul long %Y, 3 ; <long> [#uses=1]
instead of:
%tmp.10 = shl long %Y, ubyte 1 ; <long> [#uses=1]
%tmp.6 = add long %Y, %tmp.10 ; <long> [#uses=1]
llvm-svn: 17701
2004-11-13 19:31:40 +00:00
Chris Lattner
d348f5b9fb
Lazily create the abort message, so only translation units that use unwind
...
will actually get it.
llvm-svn: 17700
2004-11-13 19:07:32 +00:00
Chris Lattner
ab917141d0
Fix: CodeExtractor/2004-11-12-InvokeExtract.ll
...
llvm-svn: 17699
2004-11-13 00:06:45 +00:00
Chris Lattner
c6b1d7a081
Fix a bug where the code extractor would get a bit confused handling invoke
...
instructions, setting DefBlock to a block it did not have dom info for.
llvm-svn: 17697
2004-11-12 23:50:44 +00:00
Chris Lattner
922a1b4601
Simplify handling of constant initializers
...
llvm-svn: 17696
2004-11-12 22:42:57 +00:00
Reid Spencer
f6caf3b1c2
Makefile for lib/Linker
...
llvm-svn: 17695
2004-11-12 20:38:45 +00:00
Reid Spencer
f755c169b3
This file originated in lib/VMCore/Linker.cpp but now lives in
...
lib/Linker/LinkModules.cpp
llvm-svn: 17694
2004-11-12 20:37:43 +00:00
Reid Spencer
13a6af95ad
This file originated in tools/gccld/Linker.cpp but now lives in
...
lib/Linker/LinkArchives.cpp
llvm-svn: 17693
2004-11-12 20:34:32 +00:00
Chris Lattner
1a469385bd
Actually, leave the check in. This prevents us from counting dead arguments
...
as IPCP opportunities.
llvm-svn: 17680
2004-11-11 07:47:54 +00:00
Chris Lattner
dba9c2b0ef
Fix bug: IPConstantProp/deadarg.ll
...
llvm-svn: 17679
2004-11-11 07:46:29 +00:00
Chris Lattner
d920b5b770
Make IP Constant prop more aggressive about handling self recursive calls.
...
This implements IPConstantProp/recursion.ll
llvm-svn: 17666
2004-11-10 19:43:59 +00:00
John Criswell
402e338f11
Correct the name of stosd for the AT&T syntax:
...
It's stosl (l for long == 32 bit).
llvm-svn: 17658
2004-11-10 04:48:15 +00:00
Chris Lattner
b214a04a16
Do not let dead constant expressions hanging off of functions prevent IPCP.
...
This allows to elimination of a bunch of global pool descriptor args from
programs being pool allocated (and is also generally useful!)
llvm-svn: 17657
2004-11-09 20:47:30 +00:00
Reid Spencer
d17e35893c
Fix isBytecodeFile to correctly recognized compressed bytecode too.
...
llvm-svn: 17655
2004-11-09 20:27:23 +00:00
Reid Spencer
28ceb24005
* Implement getStatusInfo for getting stat(2) like information
...
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.
llvm-svn: 17654
2004-11-09 20:26:31 +00:00
John Criswell
5be81b837b
Recognize compressed LLVM bytecode files.
...
This should fix the problem of not being able to link compressed LLVM
bytecode files from LLVM libraries.
llvm-svn: 17648
2004-11-09 19:37:07 +00:00
Reid Spencer
d9387fee02
Tune compression:
...
bzip2: block size 9 -> 5, reduces memory by 400Kbytes, doesn't affect speed
or compression ratio on all but the largest bytecode files (>1MB)
zip: level 9 -> 6, this speeds up compression time by ~30% but only
degrades the compressed size by a few bytes per megabyte. Those few
bytes aren't worth the effort.
llvm-svn: 17647
2004-11-09 17:58:09 +00:00
Chris Lattner
9f035c9fdb
Change this back so that I get stable numbers to reflect the change from the
...
nightly testers
llvm-svn: 17646
2004-11-09 08:05:23 +00:00
Chris Lattner
b924e8be62
Fix bug: 2004-11-08-FreeUseCrash.ll
...
llvm-svn: 17642
2004-11-09 05:10:56 +00:00
Misha Brukman
5718caa3ab
* Convert tabs to spaces
...
* Order #includes according to style guide
* Remove extraneous blank lines
llvm-svn: 17639
2004-11-09 04:27:19 +00:00
Nate Begeman
398bd2b9f6
Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen
...
llvm-svn: 17637
2004-11-09 04:01:18 +00:00
Misha Brukman
f28a01454d
Handle headers for compressed bytecode files
...
llvm-svn: 17634
2004-11-08 22:03:32 +00:00
Chris Lattner
0efef015fa
Fix a bug that was preventing povray and namd from pool allocating correctly.
...
llvm-svn: 17632
2004-11-08 21:08:46 +00:00
Chris Lattner
dcee21898f
Handle assert_fail special
...
llvm-svn: 17631
2004-11-08 21:08:28 +00:00
Reid Spencer
af24480f3e
Fix a typo: isvalid -> isValid
...
llvm-svn: 17621
2004-11-08 08:27:51 +00:00
Nate Begeman
a0c15f3ffd
Put int the getReg cast optimization from x86 so that we generate fewer
...
move instructions for the register allocator to coalesce.
llvm-svn: 17608
2004-11-08 02:25:40 +00:00
Misha Brukman
8c397821a5
Implement ExecutionEngine::freeMachineCodeForFunction()
...
llvm-svn: 17601
2004-11-07 23:58:46 +00:00
Chris Lattner
a9e56ddaa3
VERY large functions that are only called from one place are not really
...
exciting to inline. Only inline medium or small sized functions with a
single call site.
llvm-svn: 17588
2004-11-07 21:46:47 +00:00
Nate Begeman
a7541b19fc
Disable bogus cast elimination when the cast is used by a setcc instruction.
...
llvm-svn: 17583
2004-11-07 20:23:42 +00:00
Reid Spencer
c9c7c7fbee
* Comments & cleanup per CL code review.
...
* Accept 'llvc' as signature for compressed bytecode
llvm-svn: 17579
2004-11-07 18:20:55 +00:00
Reid Spencer
152f895e9b
Add comments per CL code review.
...
llvm-svn: 17578
2004-11-07 18:19:00 +00:00
Reid Spencer
1446cd065f
* Add comments and cleanup per CL code review
...
* Make signature for compressed bytecode llvc instead of unreadable
* Make the CompressionContext have a constructor and destructor.
llvm-svn: 17576
2004-11-07 18:17:38 +00:00
Misha Brukman
ce8c2c2aee
Replace uses of llvm.org with llvm.cs.uiuc.edu
...
llvm-svn: 17549
2004-11-07 00:58:38 +00:00
Misha Brukman
820aa44589
Consistently use llvm.cs.uiuc.edu instead of llvm.org
...
llvm-svn: 17548
2004-11-07 00:58:20 +00:00
Chris Lattner
f5c5cb033e
Decompose* is V9 specific, make it internal
...
llvm-svn: 17547
2004-11-07 00:43:24 +00:00
Chris Lattner
a060b55dea
This is V9 specific, move it there.
...
llvm-svn: 17545
2004-11-07 00:39:26 +00:00
Chris Lattner
f11d034489
Move this file from lib/Transforms/Scalar
...
llvm-svn: 17544
2004-11-07 00:39:09 +00:00
Reid Spencer
a81994464f
Add support for compressed bytecode
...
llvm-svn: 17535
2004-11-06 23:17:23 +00:00
Reid Spencer
bf14271ed6
Implement the GetBytecodeSymbols interface function to extract just the
...
externally visible defined symbols from a bytecode file.
llvm-svn: 17503
2004-11-06 08:56:40 +00:00
Reid Spencer
c3a4c8a346
Makefile for the LLVMArchive library.
...
llvm-svn: 17500
2004-11-06 08:52:36 +00:00
Reid Spencer
8907e56650
First kinda/sorta working version of the Archive library. Reading is not
...
yet supported but writing works. Way too early to review this. More to come
llvm-svn: 17499
2004-11-06 08:51:45 +00:00
Reid Spencer
7090e6a875
Stop propagating method names that violate the coding standard
...
llvm-svn: 17498
2004-11-05 22:15:36 +00:00
John Criswell
97da76178c
Fix compilation problem; make the cast and the LHS be the same type.
...
llvm-svn: 17488
2004-11-05 16:17:06 +00:00
Chris Lattner
9f23af6d68
Remove dead var
...
llvm-svn: 17485
2004-11-05 04:52:08 +00:00
Chris Lattner
499e1b16a7
Quiet VC++ warnings
...
llvm-svn: 17484
2004-11-05 04:50:59 +00:00
Chris Lattner
bde92f3c03
Do not make i have bigger scope that we need
...
llvm-svn: 17483
2004-11-05 04:47:37 +00:00
Chris Lattner
b5ff07e46e
Remove dead vars
...
llvm-svn: 17482
2004-11-05 04:46:22 +00:00
Chris Lattner
064071600d
Fix some warnings on VC++
...
llvm-svn: 17481
2004-11-05 04:45:43 +00:00
Nate Begeman
bc8bc24d28
Thanks to sabre for pointing out that we were incorrectly codegen'ing
...
int test(int x) { return 32768 - x; }
Fixed by teaching the function that checks a constant's validity to be used
as an immediate argument about subtract-from instructions.
llvm-svn: 17476
2004-11-04 19:43:18 +00:00
Brian Gaeke
85e7df8097
Handle "call" operands of type long/ulong passed in registers.
...
llvm-svn: 17464
2004-11-04 00:27:04 +00:00
Chris Lattner
3b6d1045d3
Don't call Constant::getNullValue when the argument could be VoidTy
...
llvm-svn: 17457
2004-11-03 18:51:26 +00:00
Chris Lattner
f2976f16ce
Fix this function to not say that longs have 8-byte alignment on X86/PPC.
...
This method is really a gross hack, but at least we can make it work on
the targets we support right now.
This bug fix stops a crash in a testcase reduced from 176.gcc
llvm-svn: 17443
2004-11-02 22:18:18 +00:00
Tanya Lattner
bd82bbff7c
Added gross hacks such as creating my own def-use map, and picking on Instruction that I can add all my TmpInstructions to its MCFI.
...
llvm-svn: 17441
2004-11-02 21:04:56 +00:00
Chris Lattner
d9696aa7b8
Fix a warning
...
llvm-svn: 17431
2004-11-02 15:27:57 +00:00
Chris Lattner
33ed2c8984
* Rearrange code slightly
...
* Disable broken transforms for simplifying (setcc (cast X to larger), CI)
where CC is not != or ==
llvm-svn: 17422
2004-11-02 03:50:32 +00:00
Chris Lattner
10de12fd46
Add placeholder variable to make Win32 work, applied for Morten Ofstad
...
llvm-svn: 17406
2004-11-01 20:10:20 +00:00
Chris Lattner
b81520727e
Speed up the tail duplication pass on the testcase below from 68.2s to 1.23s:
...
#define CL0(a) case a: f(); goto c;
#define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
#define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
#define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
#define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)
void f();
void a() {
int b;
c: switch (b) {
CL4(1)
}
}
This comes from GCC PR 15524
llvm-svn: 17390
2004-11-01 07:05:07 +00:00
Chris Lattner
3083f2a424
Do not compute the predecessor list for a block unless we need it.
...
This speeds up simplifycfg on this program, from 44.87s to 0.29s (with
a profiled build):
#define CL0(a) case a: goto c;
#define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
#define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
#define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
#define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)
void f();
void a() {
int b;
c: switch (b) {
CL4(1)
}
}
This testcase is contrived to expose N^2 behavior, but this patch should speedup
simplifycfg on any programs that use large switch statements. This testcase
comes from GCC PR17895.
llvm-svn: 17389
2004-11-01 06:53:58 +00:00
Chris Lattner
8572d582cf
Fix comment
...
llvm-svn: 17377
2004-10-31 21:54:51 +00:00
Chris Lattner
d72b6b1e77
Improve comment
...
llvm-svn: 17375
2004-10-31 19:57:43 +00:00
Chris Lattner
14d85c9b09
Add more paranoid assertions :)
...
llvm-svn: 17367
2004-10-31 17:45:40 +00:00
Reid Spencer
acb1305e99
Internalize variable names to prevent recursive assignment. Cleanup docs.
...
llvm-svn: 17359
2004-10-30 09:19:36 +00:00
Chris Lattner
29b6259de3
Fix some more problems where we called getOffset before getNode()
...
llvm-svn: 17358
2004-10-30 07:21:19 +00:00
Chris Lattner
4b741eab69
Fix three bugs:
...
1. Calls to external global VARIABLES should not be treated as a call to an
external function
2. Efficiently deleting an element from a vector by using std::swap with
the back, then pop_back is NOT a good way to keep the vector sorted.
3. Our hope of having stuff get deleted by making them redundant just won't
work. In particular, if we have three calls in sequence that should be
merged: A, B, C first we unify B into A. To be sure that they appeared
identical (so B would be erased) we set B = A. On the next step, we
unified C into A and set C = A. Unfortunately, this is no guarantee that
C = B, so we would fail to delete the dead call. Switch to a more
explicit scheme.
llvm-svn: 17357
2004-10-30 05:41:23 +00:00
Chris Lattner
14dfc01ad5
Fix more undefined behavior
...
llvm-svn: 17356
2004-10-30 04:22:45 +00:00
Chris Lattner
c17cd85776
* Add a method
...
* change some uses of NH.getNode() in a bool context to use !NH.isNull()
* Fix a bunch of places where we depended on the (undefined) order of
evaluation of arguments to function calls to ensure that getNode() was
called before getOffset(). In practice, this was NOT happening.
llvm-svn: 17354
2004-10-30 04:05:01 +00:00
Tanya Lattner
8b938744dc
Fixed bug with infinite epilogues.
...
Fixed issue with generating the partial order. It now adds the nodes not in recurrences in sets for each connected component.
llvm-svn: 17351
2004-10-30 00:39:07 +00:00
Misha Brukman
4e78536fa3
* Fix compilation on AIX: GCC's fixincludes eliminates isinf() declaration
...
* Move file comment to the top of the header where it belongs
llvm-svn: 17349
2004-10-29 23:17:45 +00:00
Brian Gaeke
c66a1d540b
Change name of target lib to conform to new naming scheme.
...
llvm-svn: 17347
2004-10-29 21:57:16 +00:00
Brian Gaeke
db07ac46f0
Remove dependency on MRegisterInfo::getRegClass
...
llvm-svn: 17346
2004-10-29 21:42:27 +00:00
Misha Brukman
dba13ac3cb
The Alpha (tm) intrinsics have never been used anywhere
...
llvm-svn: 17340
2004-10-29 18:43:17 +00:00
Brian Gaeke
a757bae04f
When emitting debug msgs for function stubs, don't truncate the
...
printed pointer value if sizeof(unsigned) != pointer size. Instead,
use uintptr_t.
llvm-svn: 17338
2004-10-29 18:22:45 +00:00
Alkis Evlogimenos
e88c2aaed7
Gep indices must be of int, uint, long or ulong type.
...
llvm-svn: 17313
2004-10-28 06:43:38 +00:00
Reid Spencer
1be896397a
Fix library name.
...
llvm-svn: 17307
2004-10-28 05:37:24 +00:00
Alkis Evlogimenos
1162280a0d
Fix library name.
...
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
36b5b2c07e
Fix library name.
...
llvm-svn: 17305
2004-10-28 05:32:01 +00:00
Reid Spencer
ccdfdd7346
Fix name of library
...
llvm-svn: 17304
2004-10-28 05:30:54 +00:00
Reid Spencer
a909f95ebd
Make sure that the yacc and lex output are specified as BUILT_SOURCES.
...
Correct the dependency of the Lexer.o file on the constructed
llvmAsmParser.h header file. It is not the Lexer.cpp file that depends on
the header, its the output of compiling Lexer.cpp, Lexer.o
llvm-svn: 17289
2004-10-28 00:43:24 +00:00
Reid Spencer
d3f7233495
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer
1a344dfd95
Changes to support rand48 tests
...
llvm-svn: 17284
2004-10-27 23:03:44 +00:00
Chris Lattner
dd0094e4ed
Convert 'struct' to 'class' in various places to adhere to the coding standards
...
and work better with VC++. Patch contributed by Morten Ofstad!
llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Nate Begeman
2a64d462d9
Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre.
...
llvm-svn: 17278
2004-10-27 06:00:53 +00:00
Chris Lattner
000424b69e
Hrm, this code was severely botched. As it turns out, this patch:
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041018/019708.html
exposed ANOTHER latent bug in this xform, which caused Prolangs-C/bison to fill
the zion nightly tester disk up and make the tester barf.
This is obviously not a good thing, so lets fix this bug shall we? :)
llvm-svn: 17276
2004-10-27 05:57:15 +00:00
Nate Begeman
a6fafb1f64
Fix the build by eliminating some more dead code. That'll learn me not to listen to Reid
...
llvm-svn: 17275
2004-10-27 05:44:23 +00:00
Chris Lattner
abfae1c72e
Initialize with the correct constant type
...
llvm-svn: 17270
2004-10-27 03:55:24 +00:00
Chris Lattner
d8ac6d4a25
Plug a memory leak in the asmparser. It turns out that we were leaking
...
the strings for basic block labels in some cases. This amounted to about
120K of memory for namd, a medium sized program.
llvm-svn: 17262
2004-10-26 18:26:14 +00:00
Chris Lattner
3a79669263
add support for UndefValue
...
llvm-svn: 17260
2004-10-26 16:23:03 +00:00
Chris Lattner
2c73917686
Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp
...
llvm-svn: 17253
2004-10-26 15:43:42 +00:00
Chris Lattner
a361504a90
Clean up the MachineBasicBlock.h file, percolating #includes into this file.
...
Patch contributed by Morten Ofstad
llvm-svn: 17251
2004-10-26 15:35:58 +00:00
Nate Begeman
64ddf151fa
Remove include of MRegisterInfo.h, since it is already included by
...
SkeletonGenRegisterInfo.h.inc
llvm-svn: 17245
2004-10-26 06:04:23 +00:00
Nate Begeman
46c3a8875f
Remove file that is no longer used, and move include of MRegisterInfo.h
...
from PowerPCFrameInfo.h to PowerPCAsmPrinter.cpp where it is actually
needed.
llvm-svn: 17244
2004-10-26 06:02:38 +00:00
Nate Begeman
7c3c97af10
Eliminate usage of MRegisterInfo::getRegClass(physreg)
...
llvm-svn: 17240
2004-10-26 05:40:45 +00:00
Chris Lattner
0dbd792854
Fix the interpreter crash that Michael McCracken found
...
llvm-svn: 17239
2004-10-26 05:35:14 +00:00
Chris Lattner
6e775d56cf
Reduce usage of MRegisterInfo::getRegClass
...
llvm-svn: 17238
2004-10-26 05:29:18 +00:00
Nate Begeman
ae98298003
Update to-do list
...
llvm-svn: 17235
2004-10-26 04:10:53 +00:00
Nate Begeman
113f516f6b
Fix treecc. Also fix a latent bug in emitBinaryConstOperation that would
...
allow and const, 0 to be incorrectly codegen'd into a rlwinm instruction.
llvm-svn: 17234
2004-10-26 03:48:25 +00:00
Reid Spencer
2f74ad1e36
Add EXTRA_DIST for additional files to be distributed.
...
llvm-svn: 17233
2004-10-26 03:12:11 +00:00
Chris Lattner
9c356da87d
Disable the JIT until it can sorta kinda work.
...
llvm-svn: 17230
2004-10-25 20:53:41 +00:00
Chris Lattner
c178fc879a
Remove dead assert
...
llvm-svn: 17221
2004-10-25 19:04:01 +00:00
Chris Lattner
e8d5408a45
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17220
2004-10-25 18:47:10 +00:00
Chris Lattner
e5ccecc27e
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17219
2004-10-25 18:46:05 +00:00
Chris Lattner
895f16ebfc
Fix compatibility with MSVC, patch by Morten Ofstad
...
llvm-svn: 17218
2004-10-25 18:45:16 +00:00
Chris Lattner
84b07af401
Do not use variable sized arrays in C++, they are non-portable. Patch
...
contributed by Morten Ofstad
llvm-svn: 17217
2004-10-25 18:44:14 +00:00
John Criswell
3c14d0815c
Removed dead method, printPHICopiesForSuccessors().
...
llvm-svn: 17216
2004-10-25 18:41:50 +00:00
Chris Lattner
ec942219ad
Patch to support MSVC better, contributed by Morten Ofstad
...
llvm-svn: 17215
2004-10-25 18:40:47 +00:00
Chris Lattner
1cef20bac1
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17214
2004-10-25 18:40:08 +00:00
John Criswell
259f362897
Modified switch generation so that only the phi values associated with the
...
destination basic block are copied.
llvm-svn: 17212
2004-10-25 18:30:09 +00:00
Nate Begeman
4b5ed899fd
Implement more complete and correct codegen for bitfield inserts, as tested
...
by the recently committed rlwimi.ll test file. Also commit initial code
for bitfield extract, although it is turned off until fully debugged.
llvm-svn: 17207
2004-10-24 10:33:30 +00:00
Chris Lattner
75772beb3b
Fix the previous bug the correct way. This fixes ptrdist/bc
...
llvm-svn: 17201
2004-10-24 04:27:59 +00:00
Alkis Evlogimenos
4c30220f3a
Make this actually work.
...
llvm-svn: 17199
2004-10-24 03:02:16 +00:00
Alkis Evlogimenos
a893aad8fb
Add ConstantExpr::getSizeOf(Type*).
...
llvm-svn: 17196
2004-10-24 01:41:10 +00:00
Misha Brukman
f8bd6fc901
* Correctly handle the MovePCtoLR pseudo-instr with a bl to next instr
...
* Stop the confusion of using rv and Addr for global addresses: just use rv
llvm-svn: 17195
2004-10-23 23:47:34 +00:00
Misha Brukman
58d9e43fa1
Add BA, BL, and BLA opcodes
...
llvm-svn: 17193
2004-10-23 20:29:24 +00:00
Misha Brukman
0342392149
* Do not emit IMPLICIT_DEF pseudo-instructions
...
* Convert register numbers from their opcode value to the real value, e.g.
PPC::R1 => 1 and PPC::F1 => 1
* Add correct handling of loading of global values which are PC-relative --
implement ha16() and lo16()
llvm-svn: 17190
2004-10-23 18:28:01 +00:00
Misha Brukman
bd6a01c3ef
DForm_1, particularly used by store instructions, needs the immediate operand to
...
be listed second as that is how the instructions are usually created (and is the
correct asm syntax) so that it's assembled correctly from its constituents
llvm-svn: 17183
2004-10-23 06:08:38 +00:00
Misha Brukman
e4ae05e099
Fix the SPR field for MTLR, MFLR, MTCTR, and MFCTR instructions.
...
The decimal value given in the manual (8 or 9) really needs to be multiplied by
a factor of 32 because of the group of 5 zero bits after the register code.
llvm-svn: 17182
2004-10-23 06:05:49 +00:00
Misha Brukman
5cea06807d
The value of the XO field for MFLR and MFCTR is 339, not 399
...
llvm-svn: 17181
2004-10-23 05:38:55 +00:00
Misha Brukman
39d23c81d4
Remove extraneous blank line
...
llvm-svn: 17180
2004-10-23 04:59:22 +00:00
Misha Brukman
c660c6c514
Align function arguments in function headers
...
llvm-svn: 17178
2004-10-23 04:58:32 +00:00
Chris Lattner
9595df9f4e
Fix a bug that Brian brought to my attention. This corrects:
...
Assembler/2004-10-22-BCWriterUndefBug.llx
llvm-svn: 17177
2004-10-23 03:10:23 +00:00
Nate Begeman
91ef127999
Kill casts from integer types to unsigned byte, when the cast was only used
...
as the shift amount operand to a shift instruction. This was causing us to
emit unnecessary clear operations for code such as:
int foo(int x) { return 1 << x; }
llvm-svn: 17175
2004-10-23 00:50:23 +00:00
Misha Brukman
cfd8a7eb53
Use cleaner quoting and eliminate blank space
...
llvm-svn: 17174
2004-10-22 23:35:57 +00:00
Reid Spencer
4e31ccbe2e
Clean up the output from this makefile so its not verbose.
...
llvm-svn: 17173
2004-10-22 23:24:39 +00:00
Misha Brukman
2493cb2a2a
Adjust rules for building .inc files due to Reid's changes of Makefile.rules
...
llvm-svn: 17169
2004-10-22 22:16:24 +00:00
Reid Spencer
019621a1ea
Adjust to changes in Makefile.rules
...
llvm-svn: 17167
2004-10-22 21:02:08 +00:00
Reid Spencer
9f6f128630
Eliminate compilation warning on uninitialized variable.
...
llvm-svn: 17163
2004-10-22 16:10:39 +00:00
Chris Lattner
f0e2ce2279
*** empty log message ***
...
llvm-svn: 17161
2004-10-22 06:43:28 +00:00
Chris Lattner
6321852143
Fix a bug Nate noticed, where we miscompiled a simple testcase
...
llvm-svn: 17157
2004-10-22 04:53:16 +00:00
Reid Spencer
e48ba34fd4
We won't use automake
...
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Misha Brukman
66a092f3df
Remove debug code emitter from the JIT
...
llvm-svn: 17151
2004-10-21 03:07:38 +00:00
Alkis Evlogimenos
67449982b8
Make this compile.
...
llvm-svn: 17150
2004-10-21 02:44:16 +00:00
Misha Brukman
9514a75e36
* Added basic support for JITing functions, basic blocks, instruction encoding,
...
including registers, constants, and partial support for global addresses
* The JIT is disabled by default to allow building llvm-gcc, which wants to test
running programs during configure
llvm-svn: 17149
2004-10-21 01:42:02 +00:00
Nate Begeman
d7cbf1d28e
Don't clear or sign extend bool->int. This fires a few dozen times on the test suite
...
llvm-svn: 17147
2004-10-20 21:55:41 +00:00
Brian Gaeke
71ff3efdd5
Explain what this pass does.
...
llvm-svn: 17146
2004-10-20 19:38:58 +00:00
John Criswell
0ba9295e3c
Small performance improvement in generated C code:
...
Instead of unconditionally copying all phi node values into temporaries for
all successor blocks, generate code that will determine what successor
block will be called and then copy only those phi node values needed by
the successor block.
This seems to cut down namd execution time from being 8% higher than GCC to
4% higher than GCC.
llvm-svn: 17144
2004-10-20 14:38:39 +00:00
Misha Brukman
9113553178
* Add baseline structural JIT code, but disable the JIT to allow llvm-gcc builds
...
- Support added for functions, basic blocks, constant pool, constants,
registers, and some basic support for globals, all untested
* Turn assert()s into abort()s so that unimplemented functions fail in release
llvm-svn: 17143
2004-10-19 19:49:42 +00:00
Chris Lattner
e555b5c5cb
Hrm, some people complain when the compiler cheerfully tells them what it's
...
doing... I guess they're right.
llvm-svn: 17142
2004-10-19 06:33:16 +00:00
Misha Brukman
4cd5cde095
Fix some grammar
...
llvm-svn: 17141
2004-10-19 05:55:54 +00:00
Brian Gaeke
62ecd75aeb
Simplify mapping info generation. In particular, the LLVM-to-MachineInstr map
...
is no longer emitted, and we do not reference any MachineCodeForInstruction
information.
llvm-svn: 17138
2004-10-19 05:15:21 +00:00
Reid Spencer
ce514b1c2c
Initial automake generated Makefile template
...
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Nate Begeman
49e38c2185
Initial implementation of the strength reduction for GEP instructions in
...
loops. This optimization is not turned on by default yet, but may be run
with the opt tool's -loop-reduce flag. There are many FIXMEs listed in the
code that will make it far more applicable to a wide range of code, but you
have to start somewhere :)
This limited version currently triggers on the following tests in the
MultiSource directory:
pcompress2: 7 times
cfrac: 5 times
anagram: 2 times
ks: 6 times
yacr2: 2 times
llvm-svn: 17134
2004-10-18 21:08:22 +00:00
Misha Brukman
ed985abc65
AIX does not have mkdtemp() so emulate its behavior using mktemp() and mkdir()
...
llvm-svn: 17131
2004-10-18 17:39:45 +00:00
Chris Lattner
cac643c78f
Improve compatibility with VC++, patch contributed by Morten Ofstad!
...
llvm-svn: 17126
2004-10-18 15:54:17 +00:00
Chris Lattner
9e2649a7be
Get this file compiling with VC++, patch contributed by Morten Ofstad. Thanks Morten!
...
llvm-svn: 17125
2004-10-18 15:43:46 +00:00
Reid Spencer
2b5cfe8be8
Correction to allow compilation with Visual C++.
...
Patch contributed by Morten Ofstad. Thanks Morten!
llvm-svn: 17123
2004-10-18 14:38:48 +00:00
Chris Lattner
b1827a765a
Simplify code by deleting instructions that preceed unreachable instructions.
...
Simplify code by simplifying terminators that branch to blocks that start
with an unreachable instruction.
llvm-svn: 17116
2004-10-18 04:07:22 +00:00
Chris Lattner
3c1be63b41
Turn store -> null/undef into the LLVM unreachable instruction! This simple
...
change hacks off 10K of bytecode from perlbmk (.5%) even though the front-end
is not generating them yet and we are not optimizing the resultant code.
This isn't too bad.
llvm-svn: 17111
2004-10-18 03:00:50 +00:00
Chris Lattner
18333c64de
Turn things with obviously undefined semantics into 'store -> null'
...
llvm-svn: 17110
2004-10-18 02:59:09 +00:00
Chris Lattner
dbfa9a5e9c
My friend the invoke instruction does not dominate all basic blocks if it
...
occurs in the entry node of a function
llvm-svn: 17109
2004-10-18 01:48:31 +00:00
Chris Lattner
f7bf129037
Fix a bug that occurs when the constant value is the result of an invoke. In
...
particular, invoke ret values are only live in the normal dest of the invoke
not in the unwind dest.
llvm-svn: 17108
2004-10-18 01:21:17 +00:00
Chris Lattner
5ae94ef614
Print a semicolon for the unreacahble instruction. This fixes problems
...
where C requires semicolons in some cases to indicate null statements.
llvm-svn: 17107
2004-10-17 23:49:11 +00:00
Chris Lattner
44a7cf480d
Getting ADCE to interact well with unreachable instructions seems like a nontrivial
...
exercise that I'm not interested in tackling right now. Just punt and treat them
like unwind's.
This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll
llvm-svn: 17106
2004-10-17 23:45:06 +00:00
Chris Lattner
9e7ddf8596
Fix Regression/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll
...
If a function had no return instruction in it, and the result of the inlined
call instruction was used, we would crash.
llvm-svn: 17104
2004-10-17 23:21:07 +00:00
Nate Begeman
927c4cc3dc
Pass -single_module option to gcc when linking dynamic libraries for use with bugpoint, so that we can bugpoint multiple .cp files
...
llvm-svn: 17102
2004-10-17 23:03:32 +00:00
Nate Begeman
1c408f7319
Generate correct stubs for weak-linked symbols
...
llvm-svn: 17101
2004-10-17 23:01:34 +00:00
Chris Lattner
c088680a5f
fold gep undef, ... -> undef
...
This comes up many times in perlbmk and probably others.
llvm-svn: 17100
2004-10-17 21:54:55 +00:00
Chris Lattner
795ae57cde
Remove printout, realize that instructions in the entry block dominate all
...
other blocks.
llvm-svn: 17099
2004-10-17 21:31:34 +00:00
Chris Lattner
ac92e5fcd0
When inserting PHI nodes, don't insert any phi nodes that are obviously
...
unneccesary. This allows us to delete several hundred phi nodes of the
form PHI(x,x,x,undef) from 253.perlbmk and probably other programs as well.
This implements Mem2Reg/UndefValuesMerge.ll
llvm-svn: 17098
2004-10-17 21:25:56 +00:00
Chris Lattner
306dd8a44a
Enhance hasConstantValue to ignore undef values in phi nodes. This allows it
...
to think that PHI[4, undef] == 4.
llvm-svn: 17096
2004-10-17 21:23:26 +00:00
Chris Lattner
ef0888e493
hasConstantValue will soon return instructions that don't dominate the PHI node,
...
so prepare for this.
llvm-svn: 17095
2004-10-17 21:22:38 +00:00
Chris Lattner
caf0d76a8a
The first hunk corrects a bug when printing undef null values. We would print
...
0->field, which is illegal. Now we print ((foo*)0)->field.
The second hunk is an optimization to not print undefined phi values.
llvm-svn: 17094
2004-10-17 17:48:59 +00:00
Chris Lattner
f96fb0c946
Don't print stuff out from the code generator. This broke the JIT horribly
...
last night. :) bork!
llvm-svn: 17093
2004-10-17 17:40:50 +00:00
Reid Spencer
210d95cffb
Make the library name SparcV9 specific
...
llvm-svn: 17089
2004-10-17 15:01:12 +00:00
Reid Spencer
7ece7ff509
Consolidate the definitions
...
llvm-svn: 17088
2004-10-17 15:00:26 +00:00
Reid Spencer
9a97056275
PPC32GenCodeEmitter instead of PowerPCGenCodeEmitter
...
llvm-svn: 17087
2004-10-17 14:59:38 +00:00
Chris Lattner
63e6bdd207
Rewrite support for cast uint -> FP. In particular, we used to compile this:
...
double %test(uint %X) {
%tmp.1 = cast uint %X to double ; <double> [#uses=1]
ret double %tmp.1
}
into:
test:
sub %ESP, 8
mov %EAX, DWORD PTR [%ESP + 12]
mov %ECX, 0
mov DWORD PTR [%ESP], %EAX
mov DWORD PTR [%ESP + 4], %ECX
fild QWORD PTR [%ESP]
add %ESP, 8
ret
... which basically zero extends to 8 bytes, then does an fild for an
8-byte signed int.
Now we generate this:
test:
sub %ESP, 4
mov %EAX, DWORD PTR [%ESP + 8]
mov DWORD PTR [%ESP], %EAX
fild DWORD PTR [%ESP]
shr %EAX, 31
fadd DWORD PTR [.CPItest_0 + 4*%EAX]
add %ESP, 4
ret
.section .rodata
.align 4
.CPItest_0:
.quad 5728578726015270912
This does a 32-bit signed integer load, then adds in an offset if the sign
bit of the integer was set.
It turns out that this is substantially faster than the preceeding sequence.
Consider this testcase:
unsigned a[2]={1,2};
volatile double G;
void main() {
int i;
for (i=0; i<100000000; ++i )
G += a[i&1];
}
On zion (a P4 Xeon, 3Ghz), this patch speeds up the testcase from 2.140s
to 0.94s.
On apoc, an athlon MP 2100+, this patch speeds up the testcase from 1.72s
to 1.34s.
Note that the program takes 2.5s/1.97s on zion/apoc with GCC 3.3 -O3
-fomit-frame-pointer.
llvm-svn: 17083
2004-10-17 08:01:28 +00:00
Chris Lattner
bf114f32c0
Unify handling of constant pool indexes with the other code paths, allowing
...
us to use index registers for CPI's
llvm-svn: 17082
2004-10-17 07:49:45 +00:00
Chris Lattner
892b15538d
Give the asmprinter the ability to print memrefs with a constant pool index,
...
index reg and scale
llvm-svn: 17081
2004-10-17 07:16:32 +00:00
Chris Lattner
2fdca0bc02
fold:
...
%X = and Y, constantint
%Z = setcc %X, 0
instead of emitting:
and %EAX, 3
test %EAX, %EAX
je .LBBfoo2_2 # UnifiedReturnBlock
We now emit:
test %EAX, 3
je .LBBfoo2_2 # UnifiedReturnBlock
This triggers 581 times on 176.gcc for example.
llvm-svn: 17080
2004-10-17 06:10:40 +00:00
Chris Lattner
3f095f3c33
All of these labels are off by one now that the unreachable instruction exists
...
llvm-svn: 17079
2004-10-17 05:37:47 +00:00
Nate Begeman
f9aac7846c
Implement bitfield insert by recognizing the following pattern:
...
1. optional shift left
2. and x, immX
3. and y, immY
4. or z, x, y
==> rlwimi z, x, y, shift, mask begin, mask end
where immX == ~immY and immX is a run of set bits. This transformation
fires 32 times on voronoi, once on espresso, and probably several
dozen times on external benchmarks such as gcc.
To put this in terms of actual code generated for
struct B { unsigned a : 3; unsigned b : 2; };
void storeA (struct B *b, int v) { b->a = v;}
void storeB (struct B *b, int v) { b->b = v;}
Old:
_storeA:
rlwinm r2, r4, 0, 29, 31
lwz r4, 0(r3)
rlwinm r4, r4, 0, 0, 28
or r2, r4, r2
stw r2, 0(r3)
blr
_storeB:
rlwinm r2, r4, 3, 0, 28
rlwinm r2, r2, 0, 27, 28
lwz r4, 0(r3)
rlwinm r4, r4, 0, 29, 26
or r2, r2, r4
stw r2, 0(r3)
blr
New:
_storeA:
lwz r2, 0(r3)
rlwimi r2, r4, 0, 29, 31
stw r2, 0(r3)
blr
_storeB:
lwz r2, 0(r3)
rlwimi r2, r4, 3, 27, 28
stw r2, 0(r3)
blr
llvm-svn: 17078
2004-10-17 05:19:20 +00:00
Chris Lattner
e5aa085c1d
Fix constant folding relational operators with undef operands.
...
llvm-svn: 17077
2004-10-17 04:01:51 +00:00
Chris Lattner
dc55caa720
I forgot that sparc no longer uses the shared asmwriter. Give it support
...
for undef.
llvm-svn: 17075
2004-10-17 02:44:45 +00:00
Chris Lattner
bb5b3f0b2f
Add support for unreachable and undef
...
llvm-svn: 17074
2004-10-17 02:42:42 +00:00
Chris Lattner
8c86882a99
Implement constant folding of undef values.
...
llvm-svn: 17070
2004-10-16 23:31:32 +00:00
Chris Lattner
68f14bc09c
Fix a type violation
...
llvm-svn: 17069
2004-10-16 23:28:04 +00:00
Nate Begeman
d4c970aa3d
Finally fix one of the oldest FIXMEs in the PowerPC backend: correctly
...
flag rotate left word immediate then mask insert (rlwimi) as a two-address
instruction, and update the ISel usage of the instruction accordingly.
This will allow us to properly schedule rlwimi, and use it to efficiently
codegen bitfield operations.
llvm-svn: 17068
2004-10-16 20:43:38 +00:00
Chris Lattner
d12442c206
Kill the bogon that slipped into my buffer before I committed.
...
llvm-svn: 17067
2004-10-16 19:46:33 +00:00
Chris Lattner
b55574181d
Implement InstCombine/getelementptr.ll:test9, which is the source of many
...
ugly and giant constnat exprs in some programs.
llvm-svn: 17066
2004-10-16 19:44:59 +00:00
Chris Lattner
a0019a2104
Do not erroneously accept revision 6 bytecode files when the format hasn't
...
been defined yet!
llvm-svn: 17063
2004-10-16 18:56:02 +00:00
Chris Lattner
3a1215ce83
Fix fix fix
...
llvm-svn: 17057
2004-10-16 18:21:50 +00:00
Chris Lattner
2fae8a1ef9
Add support for unreachable
...
llvm-svn: 17056
2004-10-16 18:21:33 +00:00
Chris Lattner
8d479b62ad
Add support for undef
...
llvm-svn: 17055
2004-10-16 18:19:26 +00:00
Chris Lattner
8336590b1f
Add support for undef, unreachable, and function flags
...
llvm-svn: 17054
2004-10-16 18:18:16 +00:00
Chris Lattner
eb973c8226
Parse undef and unreachable
...
llvm-svn: 17053
2004-10-16 18:17:13 +00:00
Chris Lattner
cbdf19fed2
Add support
...
llvm-svn: 17052
2004-10-16 18:16:19 +00:00
Chris Lattner
5fac2c8212
Add support for undef and unreachable
...
llvm-svn: 17051
2004-10-16 18:14:10 +00:00
Chris Lattner
3662abfd5a
ADd support for undef and unreachable
...
llvm-svn: 17050
2004-10-16 18:13:47 +00:00
Chris Lattner
ae2e5f4de1
Teach the X86 backend about unreachable and undef. Among other things, we
...
now compile:
'foo() {}' into "ret" instead of "mov EAX, 0; ret"
llvm-svn: 17049
2004-10-16 18:13:05 +00:00
Chris Lattner
08ad95ec1f
Add support for unreachable and undef
...
llvm-svn: 17048
2004-10-16 18:12:13 +00:00
Chris Lattner
3ebca6fb19
Optimize instructions involving undef values. For example X+undef == undef.
...
llvm-svn: 17047
2004-10-16 18:11:37 +00:00
Chris Lattner
4fca8caaee
Add support for UndefValue
...
llvm-svn: 17046
2004-10-16 18:10:31 +00:00
Chris Lattner
ca01f160ee
When promoting mem2reg, make uninitialized values become undef isntead of 0.
...
llvm-svn: 17045
2004-10-16 18:10:06 +00:00
Chris Lattner
80f963c30b
Handle undef values as undefined on the constant lattice
...
ignore unreachable instructions
llvm-svn: 17044
2004-10-16 18:09:41 +00:00
Chris Lattner
c630ba08cf
Add note
...
llvm-svn: 17043
2004-10-16 18:09:25 +00:00
Chris Lattner
4a37579191
Add support for the undef value. Implement a new optimization based on globals
...
that are initialized with undef. When promoting malloc to a global, start out
initialized to undef
llvm-svn: 17042
2004-10-16 18:09:00 +00:00
Chris Lattner
93bf5a8066
Add support for undef and unreachable
...
llvm-svn: 17041
2004-10-16 18:08:06 +00:00
Chris Lattner
8824a5ee1c
Implement UndefValue class
...
llvm-svn: 17040
2004-10-16 18:07:16 +00:00
Chris Lattner
72d8078a36
Add a missing dependency
...
llvm-svn: 17031
2004-10-16 17:12:55 +00:00
Chris Lattner
b1e427f563
Fix file header
...
llvm-svn: 17030
2004-10-16 16:37:42 +00:00
Chris Lattner
b3a86dc93f
Be more careful about looking for constants when we really want constantint's.
...
llvm-svn: 17029
2004-10-16 16:07:10 +00:00
Chris Lattner
d3844cc216
Move the implementation of the instructions clone methods to this file so
...
that the vtables for these classes are only instantiated in this translation
unit, not in every xlation unit they are used.
llvm-svn: 17026
2004-10-15 23:52:53 +00:00
Chris Lattner
33dd5f87b8
There is no reason not to build these in parallel
...
llvm-svn: 17023
2004-10-15 23:22:15 +00:00
Misha Brukman
209f5ea32b
Add a space between the type and name of value when printing error message
...
llvm-svn: 17022
2004-10-15 23:08:50 +00:00
Chris Lattner
b346be57a2
Don't print a bunch of metrics that are meaningless for external functions
...
llvm-svn: 17017
2004-10-15 19:40:31 +00:00
Chris Lattner
25b5777485
Instruction select globals with offsets better. For example, on this test
...
case:
int C[100];
int foo() {
return C[4];
}
We now codegen:
foo:
mov %EAX, DWORD PTR [C + 16]
ret
instead of:
foo:
mov %EAX, OFFSET C
mov %EAX, DWORD PTR [%EAX + 16]
ret
Other impressive features may be coming later.
This patch is contributed by Jeff Cohen!
llvm-svn: 17011
2004-10-15 05:05:29 +00:00
Chris Lattner
38de76365d
Give the X86 JIT the ability to encode global+disp constants. Patch
...
contributed by Jeff Cohen!
llvm-svn: 17010
2004-10-15 04:53:13 +00:00
Chris Lattner
812d56631a
Give the X86 asm printer the ability to print out addressing modes that have
...
constant displacements from global variables. Patch by Jeff Cohen!
llvm-svn: 17009
2004-10-15 04:44:53 +00:00
Chris Lattner
1b9a284e54
Allow X86 addressing modes to represent globals with offsets. Patch contributed
...
by Jeff Cohen!
llvm-svn: 17008
2004-10-15 04:43:20 +00:00
Chris Lattner
65976f4178
Allow machine operands to represent global variables with offsets. This is
...
useful when you have a reference like:
int A[100];
void foo() { A[10] = 1; }
In this case, &A[10] is a single constant and should be treated as such.
Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no
other operand type is.
This is another fine patch contributed by Jeff Cohen!!
llvm-svn: 17007
2004-10-15 04:38:41 +00:00
Chris Lattner
34acee9dbd
This patch fixes the nasty bug that caused 175.vpr to fail for X86 last night.
...
The problem occurred when trying to reload this instruction:
MOV32mr %reg2326, 8, %reg2297, 4, %reg2295
The value of reg2326 was available in EBX, so it was reused from there, instead
of reloading it into EDX.
The value of reg2297 was available in EDX, so it was reused from there, instead
of reloading it into EDI.
The value of reg2295 was not available, so we tried reloading it into EBX, its
assigned register. However, we checked and saw that we already reloaded
something into EBX, so we chose what reg2326 was assigned to (EDX) and reloaded
into that register instead.
Unfortunately EDX had already been used by reg2297, so reloading into EDX
clobbered the value used by the reg2326 operand, breaking the program.
The fix for this is to check that the newly picked register is ok. In this
case we now find that EDX is already used and try using EDI, which succeeds.
llvm-svn: 17006
2004-10-15 03:19:31 +00:00
Chris Lattner
2c87b68231
This patch adds and improves debugging output. No functionality changes.
...
llvm-svn: 17005
2004-10-15 03:16:29 +00:00
Nate Begeman
d8183bd297
Better codegen of binary integer ops with 32 bit immediate operands.
...
This transformation fires a few dozen times across the testsuite.
For example, int test2(int X) { return X ^ 0x0FF00FF0; }
Old:
_test2:
lis r2, 4080
ori r2, r2, 4080
xor r3, r3, r2
blr
New:
_test2:
xoris r3, r3, 4080
xori r3, r3, 4080
blr
llvm-svn: 17004
2004-10-15 00:50:19 +00:00
Misha Brukman
e05e5f0655
The field is called imm22', not simply
imm'
...
llvm-svn: 17003
2004-10-14 22:33:32 +00:00
Misha Brukman
4932cb0e94
Synthetic instructions RET and RETL need to have all 3 parameters specified
...
llvm-svn: 17002
2004-10-14 22:32:49 +00:00
Misha Brukman
7b29a7bc80
Class F2_1 already inherits the imm22 field from class F2
...
llvm-svn: 17001
2004-10-14 22:32:24 +00:00
Misha Brukman
4e691d2adb
Generate the SparcV8 code emitter from .td files
...
llvm-svn: 17000
2004-10-14 21:57:19 +00:00
Misha Brukman
5bc4009783
* In the F3_1 class, default asi to 0 because it's not currently used
...
* In the F3_3 class, remove mention of asi because it's not part of the format
llvm-svn: 16999
2004-10-14 21:53:39 +00:00
Chris Lattner
7319d9289f
Fix a bug John tracked down in libstdc++ where we were incorrectly deleting
...
weak functions. Thanks for finding this John!
llvm-svn: 16997
2004-10-14 19:53:50 +00:00
Brian Gaeke
ce6dcb0713
Add FSTOI, FDTOI (fp to integer cast) instructions.
...
llvm-svn: 16996
2004-10-14 19:39:35 +00:00
Brian Gaeke
ba65401a4d
Rewrite emitCastOperation, refactoring parts of it into emitIntegerCast, and
...
adding emitFPToIntegerCast.
llvm-svn: 16995
2004-10-14 19:39:34 +00:00
Brian Gaeke
31fa12ece7
Add list of libc procedures we'll use, at some point.
...
Update list of currently failing tests.
ADJCALLSTACK* support is done.
llvm-svn: 16994
2004-10-14 19:39:33 +00:00
Chris Lattner
44e34a155c
Make sure any client of Dominators.h links in Dominators.cpp
...
Patch by Morten Ofstad
llvm-svn: 16987
2004-10-14 15:47:16 +00:00
Chris Lattner
3fc5e3778f
Do not use the same variable name for two different variables in the
...
same scope. This confused VC++ (and probably people too!). Patch by
Morten Ofstad!
llvm-svn: 16985
2004-10-14 14:59:16 +00:00
Misha Brukman
66261f021d
* Claim to support machine code emission - return false from
...
addPassesToEmitMachineCode()
* Add support for registers and constants in getMachineOpValue()
This enables running "int main() { ret 0 }" via the PowerPC JIT.
llvm-svn: 16983
2004-10-14 06:39:56 +00:00
Misha Brukman
cb4130c28c
* Include the real (generated) version of getBinaryCodeForInstr()
...
* Add implementation of getMachineOpValue() for generated code emitter
* Convert assert()s in unimplemented functions to abort()s so that non-debug
builds fail predictably
* Add file header comments
llvm-svn: 16981
2004-10-14 06:07:25 +00:00
Misha Brukman
11d1764f74
* Make a PPC32-specific code emitter because we have separate classes for 32-
...
and 64-bit code emitters that cannot share code unless we use virtual
functions
* Identify components being built by tablegen with more detail by assigning them
to PowerPC, PPC32, or PPC64 more specifically; also avoids seeing 'building
PowerPC XYZ' messages twice, where one is for PPC32 and one for PPC64
llvm-svn: 16980
2004-10-14 06:04:56 +00:00
Tanya Lattner
8a4773acb3
Checking in code that works on my simple test case. However, there is still a bug with branches that I need to fix.
...
llvm-svn: 16979
2004-10-14 06:04:28 +00:00
Misha Brukman
5e8bfd0675
There is only one field in an instruction, and that is `Inst', the final view of
...
the instruction binary format, all others are simply operands and should not
have the `field' label
llvm-svn: 16978
2004-10-14 05:55:37 +00:00
Misha Brukman
47c2236ae9
PowerPC instruction definitions use LittleEndian-style encoding [0..31]
...
llvm-svn: 16977
2004-10-14 05:54:38 +00:00
Misha Brukman
628b2ba095
Add isLittleEndianEncoding to InstrInfo class, defaults to `off'
...
llvm-svn: 16976
2004-10-14 05:53:40 +00:00
Chris Lattner
88ad718c75
When converting phi nodes into select instructions, we shouldn't promote PHI
...
nodes unless we KNOW that we are able to promote all of them.
This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll
llvm-svn: 16973
2004-10-14 05:13:36 +00:00
Reid Spencer
7689de0e49
Allow this file to compile on Darwin.
...
llvm-svn: 16971
2004-10-14 03:33:25 +00:00
Reid Spencer
d3c912a7b0
Use __MINGW instead of __MING. Patch contributed by Henrik Bach.
...
llvm-svn: 16970
2004-10-14 03:09:02 +00:00
Reid Spencer
86b05297be
Get proper BSD #includes for MappedFile implementation.
...
llvm-svn: 16969
2004-10-14 03:06:59 +00:00
Reid Spencer
27ae06c1db
Implementation of MappedFile for Win32. Patch provided by Jeff Cohen.
...
llvm-svn: 16968
2004-10-14 03:05:59 +00:00
Chris Lattner
ad57c9f54c
Today is not my day. Fix broken #
...
llvm-svn: 16967
2004-10-14 02:31:35 +00:00
Chris Lattner
d2a5066c6a
unbreak previous checkin :(
...
llvm-svn: 16966
2004-10-14 02:06:48 +00:00
Chris Lattner
93bfff6da2
Add back a missing paren
...
llvm-svn: 16965
2004-10-14 01:57:28 +00:00
Chris Lattner
aef5a2d78d
Fit to 80 cols
...
llvm-svn: 16964
2004-10-14 01:49:34 +00:00
Chris Lattner
2ed4986e00
Wrap to 80 cols, delete some seriously old debugging printouts
...
llvm-svn: 16963
2004-10-14 01:46:07 +00:00
Chris Lattner
3f3d5aad47
Fit in 80 columns
...
llvm-svn: 16962
2004-10-14 01:39:18 +00:00
Chris Lattner
bdb8db1a40
Minor cleanups
...
llvm-svn: 16961
2004-10-14 01:35:17 +00:00
Reid Spencer
e6418ec30f
Update to reflect changes in Makefile rules.
...
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Chris Lattner
63f15158f4
Transform memmove -> memcpy when the source is obviously constant memory.
...
llvm-svn: 16932
2004-10-12 04:52:52 +00:00
Chris Lattner
58435df175
Minor tweaks
...
llvm-svn: 16929
2004-10-12 04:32:37 +00:00
Chris Lattner
8428411c46
Implement a new method
...
llvm-svn: 16927
2004-10-12 04:20:25 +00:00
Chris Lattner
6b6e5a5815
This nutty patch has been in my tree since before 1.3 went out, and it needs
...
to go in. This patch allows us to compute the trip count of loops controlled
by values loaded from constant arrays. The cannonnical example of this is
strlen when passed a constant argument:
for (int i = 0; "constantstring"[i]; ++i) ;
return i;
In this case, it will compute that the loop executes 14 times, which means
that the exit value of i is 14. Because of this, the loop gets DCE'd and
we are happy. This also applies to anything that does similar things, e.g.
loops like this:
const float Array[] = { 0.1, 2.1, 3.2, 23.21 };
for (int i = 0; Array[i] < 20; ++i)
and is actually fairly general.
The problem with this is that it almost never triggers. The reason is that
we run indvars and the loop optimizer only at compile time, which is before
things like strlen and strcpy have been inlined into the program from libc.
Because of this, it almost never is used (it triggers twice in specint2k).
I'm committing it because it DOES work, may be useful in the future, and
doesn't slow us down at all. If/when we start running the loop optimizer
at link-time (-O4?) this will be very nice indeed :)
llvm-svn: 16926
2004-10-12 01:49:27 +00:00
Chris Lattner
b605c860fc
Fix a REALLY obscure bug in my previous checkin, which was splicing the END
...
marker from one ilist into the middle of another basic block!
llvm-svn: 16925
2004-10-12 01:02:29 +00:00
Chris Lattner
a6d0e41b72
Handle a common case more carefully. In particular, instead of transforming
...
pointer recurrences into expressions from this:
%P_addr.0.i.0 = phi sbyte* [ getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), %entry ], [ %inc.0.i, %no_exit.i ]
%inc.0.i = getelementptr sbyte* %P_addr.0.i.0, int 1 ; <sbyte*> [#uses=2]
into this:
%inc.0.i = getelementptr sbyte* getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), int %inc.0.i.rec
Actually create something nice, like this:
%inc.0.i = getelementptr [8 x sbyte]* %.str_1, int 0, int %inc.0.i.rec
llvm-svn: 16924
2004-10-11 23:06:50 +00:00
Chris Lattner
63ba63bb56
Allow creation of GEP constantexprs with a vector of value* operands as
...
well as a vector of constant*'s. It turns out that this is more efficient
and all of the clients want to do that, so we should cater to them.
llvm-svn: 16923
2004-10-11 22:52:25 +00:00
Chris Lattner
6496308d18
Implement remove/eraseFromParent methods
...
llvm-svn: 16922
2004-10-11 22:21:39 +00:00
Chris Lattner
f9e79568c2
Reenable the transform, turning X/-10 < 1 into X > -10
...
llvm-svn: 16918
2004-10-11 19:40:04 +00:00
Chris Lattner
2bc979427d
Fix a warning that is emitted on the suns
...
llvm-svn: 16917
2004-10-11 15:50:40 +00:00
Chris Lattner
9d662982e0
This patch implements two things (sorry).
...
First, it allows SRA of globals that have embedded arrays, implementing
GlobalOpt/globalsra-partial.llx. This comes up infrequently, but does allow,
for example, deleting several stores to dead parts of globals in dhrystone.
Second, this implements GlobalOpt/malloc-promote-*.llx, which is the
following nifty transformation:
Basically if a global pointer is initialized with malloc, and we can tell
that the program won't notice, we transform this:
struct foo *FooPtr;
...
FooPtr = malloc(sizeof(struct foo));
...
FooPtr->A FooPtr->B
Into:
struct foo FooPtrBody;
...
FooPtrBody.A FooPtrBody.B
This comes up occasionally, for example, the 'disp' global in 183.equake (where
the xform speeds the CBE version of the program up from 56.16s to 52.40s (7%)
on apoc), and the 'desired_accept', 'fixLRBT', 'macroArray', & 'key_queue'
globals in 300.twolf (speeding it up from 22.29s to 21.55s (3.4%)).
The nice thing about this xform is that it exposes the resulting global to
global variable optimization and makes alias analysis easier in addition to
eliminating a few loads.
llvm-svn: 16916
2004-10-11 05:54:41 +00:00
Chris Lattner
f8dab00902
Fix SingleSource/Benchmarks/McGill/chomp
...
llvm-svn: 16912
2004-10-11 04:07:27 +00:00
Chris Lattner
f8380b953a
If we are trying to create a ConstantExpr cast that is really a GEP to the
...
first element of an array, return a GEP instead of a cast. This allows us
to transparently fold this:
int* getelementptr (int* cast ([100 x int]* %Gbody to int*), int 40)
into this:
int* getelementptr ([100 x int]* %Gbody, int 0, int 40)
llvm-svn: 16911
2004-10-11 03:57:30 +00:00
Misha Brukman
5e9e7cada2
ModuloScheduling has moved to lib/Target/SparcV9
...
llvm-svn: 16906
2004-10-10 23:37:40 +00:00
Misha Brukman
995af8d2b1
Add ModuloScheduling to the recursive build tree
...
llvm-svn: 16905
2004-10-10 23:36:09 +00:00
Misha Brukman
95cbabd1b5
Adjust header file inclusion due to move
...
llvm-svn: 16904
2004-10-10 23:34:50 +00:00
Misha Brukman
0f102f7fc9
Adjust comment header and paths to refect move
...
llvm-svn: 16903
2004-10-10 23:34:36 +00:00
Misha Brukman
020c3ab94c
ModuloScheduling moved to lib/Target/SparcV9 as it is SparcV9-specific
...
llvm-svn: 16902
2004-10-10 23:33:20 +00:00
Chris Lattner
21dcce4e33
Just because we cannot completely eliminate all uses of a global, we can
...
still optimize away all of the indirect calls and loads, etc from it.
This turns code like this:
if (G != 0)
G();
into
if (G != 0)
ActualCallee();
This triggers a couple of times in gcc and libstdc++.
llvm-svn: 16901
2004-10-10 23:14:11 +00:00
Reid Spencer
85d2758f11
Initial version of automake Makefile.am file.
...
llvm-svn: 16898
2004-10-10 22:52:14 +00:00
Reid Spencer
04cb07f3ce
Add the new InstrSched directory.
...
llvm-svn: 16897
2004-10-10 22:51:03 +00:00
Tanya Lattner
be65f6cd02
Added debug information. Fixed several bugs in the reconstruct loop function.
...
llvm-svn: 16895
2004-10-10 22:44:35 +00:00
Reid Spencer
1b7459b29d
Initial version of automake Makefile.am file.
...
llvm-svn: 16893
2004-10-10 22:20:40 +00:00
Reid Spencer
bc135b067a
Build both archive and relinked objects
...
llvm-svn: 16892
2004-10-10 22:17:39 +00:00
Reid Spencer
b317fd443c
Remove the InstrSched directory (moved to SparcV9)
...
llvm-svn: 16887
2004-10-10 21:19:41 +00:00
Reid Spencer
064bebfba3
Directory no long exists (moved to Targets/SparcV9).
...
llvm-svn: 16886
2004-10-10 21:18:31 +00:00
Reid Spencer
7d9cba7a0f
Initial version of automake Makefile.am file.
...
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Brian Gaeke
26b353ebd6
Fix assertion failure when calling or returning from a function which
...
returns 'bool' type.
llvm-svn: 16884
2004-10-10 20:34:17 +00:00
Brian Gaeke
3af0547680
Implement eliminateCallFramePseudoInstr().
...
Wrap a long comment line.
llvm-svn: 16883
2004-10-10 19:57:21 +00:00
Brian Gaeke
b6239cd5ed
Model calls as *both* using *and* killing O0..O5, because callees use the
...
argument values passed in (so they're not dead until *after* the call),
and callees are free to modify those registers.
llvm-svn: 16882
2004-10-10 19:57:20 +00:00
Brian Gaeke
245a073aa6
Fix whitespace and wrap some long lines.
...
Deal with allocating stack space for outgoing args and copying them into the
correct stack slots (at least, we can copy <=32-bit int args).
We now correctly generate ADJCALLSTACK* instructions.
llvm-svn: 16881
2004-10-10 19:57:18 +00:00
Chris Lattner
d10f9ed455
Fix 2004-10-10-CastStoreOnce.llx, by adjusting types back if we strip off a cast
...
llvm-svn: 16878
2004-10-10 17:07:12 +00:00
Chris Lattner
cd4a7a5293
Implement GlobalOpt/deadglobal-2.llx, deletion of globals that are only
...
stored to, but are stored at variable indexes. This occurs at least in
176.gcc, but probably others, and we should handle it for completeness.
llvm-svn: 16876
2004-10-10 16:47:33 +00:00
Chris Lattner
b0d3511aa6
Avoid calling use_size() which could (in theory) be expensive if the global
...
has a large number of users. Instead, just keep track of whether we're
making changes as we do so.
This patch has no functionlity changes.
llvm-svn: 16874
2004-10-10 16:43:46 +00:00
Chris Lattner
6ff0fd4837
bling bling!
...
llvm-svn: 16873
2004-10-10 16:26:13 +00:00
Chris Lattner
6b0cd15f9c
Eliminate global pointers that are only stored a single value and null if
...
we know that all uses of the global will trap if the pointer contained is
null. In this case, we forward substitute the stored value to any uses.
This has the effect of devirtualizing trivial globals in trivial cases. For
example, 164.gzip contains this:
gzip.h:extern int (*read_buf) OF((char *buf, unsigned size));
bits.c: read_buf = file_read;
deflate.c: lookahead = read_buf((char*)window,
deflate.c: n = read_buf((char*)window+strstart+lookahead, more);
Since read_buf has to point to file_read at every use, we just replace
the calls through read_buf with a direct call to file_read.
This occurs in several benchmarks, including 176.gcc and 164.gzip. Direct
calls are good and stuff.
llvm-svn: 16871
2004-10-09 21:48:45 +00:00
Chris Lattner
955a220ad2
Instead of silently breaking, print notification of why this doesn't work.
...
llvm-svn: 16870
2004-10-09 21:13:51 +00:00
Chris Lattner
f8a6e4402e
Use DEBUG instead of DebugFlag directly, as DebugFlag does not respect
...
-debug-only!
llvm-svn: 16868
2004-10-09 19:30:36 +00:00
Brian Gaeke
ba13791a01
update according to tonight's info
...
llvm-svn: 16866
2004-10-09 05:58:27 +00:00
Brian Gaeke
3abdd11420
Implement getModuleMatchQuality and getJITMatchQuality so that v8 will be the
...
default 32/BE target on sparc hosts, and ppc will continue to be the default
on other hosts.
llvm-svn: 16865
2004-10-09 05:57:01 +00:00
Chris Lattner
51a762c414
Fix infinite loop due to iteration
...
llvm-svn: 16864
2004-10-09 03:32:52 +00:00
Chris Lattner
c5085d212c
Implement sub.ll:test17, -X/C -> X/-C
...
llvm-svn: 16863
2004-10-09 02:50:40 +00:00