Commit Graph

4147 Commits

Author SHA1 Message Date
Nate Begeman
f8f2c5a172 Get closer to handling globals correctly. We now generally get them in the
right section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29871 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 06:36:58 +00:00
Reid Spencer
0ff2d31766 For PR797:
Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 23:45:08 +00:00
Chris Lattner
f7da2c7b0c Take advantage of the recent improvements to the liveintervals set (tracking
instructions which define each value#) to simplify and improve the coallescer.
In particular, this patch:

1. Implements iterative coallescing.
2. Reverts an unsafe hack from handlePhysRegDef, superceeding it with a
   better solution.
3. Implements PR865, "coallescing" away the second copy in code like:

   A = B
   ...
   B = A

This also includes changes to symbolically print registers in intervals
when possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29862 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 22:43:55 +00:00
Reid Spencer
0569eee66b Remove a FIXME. Don't use strlcpy that isn't available on non-BSD platforms
and ensure that a memory overrun won't occur while still writing Length
bytes in the outstring function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29855 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 14:25:39 +00:00
Chris Lattner
3bca110dc3 update some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29853 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 00:21:32 +00:00
Nate Begeman
ea7b8cf132 Correctly attribute file author & remote tabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29852 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 21:33:27 +00:00
Nate Begeman
eb883af390 Initial checkin of the Mach-O emitter. There's plenty of fixmes, but it
does emit linkable .o files in very simple cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29850 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 21:08:52 +00:00
Reid Spencer
51c5a286ba For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:34:57 +00:00
Reid Spencer
cc2e0845c3 Fix constructor documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29845 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 17:43:20 +00:00
Reid Spencer
5a060775da For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 07:30:48 +00:00
Reid Spencer
142ca8e818 For PR797:
Remove exception throwing from Path::getDirectoryContents and its users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 06:56:27 +00:00
Reid Spencer
e5c9cb5eb6 For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29840 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 00:39:35 +00:00
Reid Spencer
e1647f4698 For PR797:
Change the Path::make*OnDisk methods exception free and adjust their usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29836 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 23:27:23 +00:00
Reid Spencer
487447626c Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
adjust users of it to compensate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 19:01:30 +00:00
Chris Lattner
be4f88a8b8 Improve the LiveInterval class to keep track of which machine instruction
defines each value# tracked by the interval.  This will be used to improve
coallescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29830 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 18:19:46 +00:00
Reid Spencer
9a2b7c91cb Fix some indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29825 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 17:38:05 +00:00
Chris Lattner
57b79795b3 add resize, move swap out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29823 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 17:28:57 +00:00
Reid Spencer
8627969597 For PR797:
Adjust users of MappedFile to its new non-throwing interface.  Note that in
most cases the lazy step of just throwing after a call to MappedFile was
installed. This was done in the name of incremental changes. Getting rid of
the new throw statements will take adjustment of interfaces and propagation
of errors to higher levels.  Those changes will come in subsequent patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29817 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 16:06:27 +00:00
Reid Spencer
6d045fcdcd For PR797:
Make MappedFile not throw any exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29816 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 16:04:22 +00:00
Chris Lattner
969e262656 Switch to using smallvector for liveintervals. This speeds up live interval
analysis 11% on kc++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 06:32:56 +00:00
Chris Lattner
d6007d6076 add a bunch more operations, including swap, insert, erase, front(), and
bugfixes for operator=.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29811 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 06:27:16 +00:00
Chris Lattner
0c2f83e756 move LiveInterval state all together
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29806 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 23:15:12 +00:00
Jim Laskey
6f397bf4c8 Adding new Dwarf constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 21:18:10 +00:00
Reid Spencer
d2a8e656c5 For PR797:
Change interface for error recovery without exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29789 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 06:00:58 +00:00
Reid Spencer
037ce981d8 Fix the documentation for this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 05:37:03 +00:00
Reid Spencer
62c5105adc For PR885:
Consolidate the LinkAllAnalyses.h and LinkAllPasses.h headers into one
so there is no dupliation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 05:34:03 +00:00
Reid Spencer
023fcf9776 For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 02:04:43 +00:00
Chris Lattner
b31950ddfa vpkuwus didn't work, due to this typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29776 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 19:25:35 +00:00
Reid Spencer
61c83e023f For PR797:
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 08:43:06 +00:00
Chris Lattner
5ea64fd9eb Constify some methods. Patch provided by Anton Vayvod, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 22:00:08 +00:00
Chris Lattner
228a18e0f2 switch the SUnit pred/succ sets from being std::sets to being smallvectors.
This reduces selectiondag time on kc++ from 5.43s to 4.98s (9%).  More
significantly, this speeds up the default ppc scheduler from ~1571ms to 1063ms,
a 33% speedup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 00:09:56 +00:00
Chris Lattner
67bb42aa59 add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29739 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 22:57:08 +00:00
Chris Lattner
9522ee3d93 Convert vector to smallvector: 4% speedup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29735 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 22:12:48 +00:00
Chris Lattner
67b7ff9ede silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 22:09:24 +00:00
Chris Lattner
5892d47a62 Change the use_list to be a smallvector instead of a vector. This reduces
isel time from 6.79s to 5.53s (22%) on kc++ with a release build on ppc.
Go smallvector! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 21:01:10 +00:00
Chris Lattner
2e40ae4de6 add a way to have multiple modules in a JIT :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 02:53:27 +00:00
Chris Lattner
fe85403467 initial changes to support JIT'ing from multiple module providers, implicitly
linking the program on the fly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 01:24:12 +00:00
Chris Lattner
2e6baf626d Bugfixes for smallvector when the element size is small and N is small.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 01:23:31 +00:00
Chris Lattner
0b3e525a3a Start using SDVTList more consistently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 19:11:05 +00:00
Chris Lattner
70046e920f add a new SDVTList type and new SelectionDAG::getVTList methods to streamline
the creation of canonical VTLists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 17:46:01 +00:00
Chris Lattner
3ca002bc17 Make getNodeValueTypes methods public.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 23:54:24 +00:00
Chris Lattner
2fa6d3b1fc Add a new getNode() method that takes a pointer to an already-intern'd list
of value-type nodes.  This avoids having to do mallocs for std::vectors of
valuetypes when a node returns more than one type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 23:31:51 +00:00
Devang Patel
64d128de9c Avoid extra string copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 23:27:36 +00:00
Devang Patel
30235dad4b Use mangler, instead of addUnderscore(), to get mangled name.
Now, LLVMSymbol keeps symbol original name and mangled name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29679 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:36:16 +00:00
Chris Lattner
e51ee04c3d remove SelectionDAG::InsertISelMapEntry, it is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:24:39 +00:00
Chris Lattner
213a16c637 Add code to resize the CSEMap hash table. This doesn't speedup codegen of
kimwitu, but seems like a good idea from a "avoid performance cliffs" standpoint :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29675 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:19:25 +00:00
Chris Lattner
b5677f933f avoid a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29674 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 21:47:50 +00:00
Nate Begeman
52a51e38dc Emit .set directives for jump table entries when possible, which reduces
the number of relocations in object files, shrinkifying them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-12 21:29:52 +00:00
Chris Lattner
8731c0d234 Track # nodes in a CSEMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29643 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-12 01:07:51 +00:00
Chris Lattner
7ed9ea81f8 Switch NodeID to track 32-bit chunks instead of 8-bit chunks, for a 2.5%
speedup in isel time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:55:53 +00:00