Commit Graph

9388 Commits

Author SHA1 Message Date
Chris Lattner
9b527704f7 Add an option to enable the SSA based peephole optimizer.
Eventually this pass will provide substantially better code in the interim between when we
have a crappy isel and nice isel.  Unfortunately doing so requires fixing the backend to
actually SUPPORT all of the fancy addressing modes that we now generate, and writing a DCE
pass for machine code.  Each of these is a fairly substantial job, so this will remain disabled
for the immediate future.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10276 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 05:18:30 +00:00
Chris Lattner
4537076ee8 Add a new SSA-based peephole optimizer which includes copy propagation and
folding of instructions into addressing modes.  This creates lots of dead
instructions, which are currently not deleted.  It also creates a lot of
instructions that the X86 backend currently cannot handle.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10275 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 05:15:28 +00:00
Chris Lattner
f2d2925452 generalize the instruction types permitted a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10274 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 05:13:56 +00:00
Chris Lattner
832e2503e5 fix broken link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 05:12:09 +00:00
Alkis Evlogimenos
585870759b Print instructions before register allocation is performed. Also fix
bug where spill instructions were added to the next basic block
instead of the end of the current one if the instruction that required
the spill was the last in the block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 23:40:39 +00:00
Chris Lattner
9ca419e577 add missing dependency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10271 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 09:22:42 +00:00
Chris Lattner
e1cc79f1cf Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10270 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 06:13:25 +00:00
Chris Lattner
8522e38c1b A line was missing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10269 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 05:46:14 +00:00
Alkis Evlogimenos
99d1a8f048 Remove "numReloaded" statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10268 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 05:15:36 +00:00
Chris Lattner
2c0a6a19ef Emit constants to one contiguous block, but this time, respect alignment constraints.
If this doesn't work Misha, feel free to revert it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10267 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 04:23:21 +00:00
Misha Brukman
91de352796 Go back to allocating memory for each constant separately. Since SPARCs do not
allow unaligned loads, that is probably the problem I've been seeing in numerous
SPARC test cases failing. X86, on the other hand, just slows down unaligned
accesses, since it must make 2 aligned accesses for each unaligned one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10266 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 00:50:53 +00:00
Chris Lattner
043b9722f5 be 3.4 happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 20:04:13 +00:00
Chris Lattner
f17072b79c be GCC 3.4 clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10264 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:55:12 +00:00
Chris Lattner
d2aa7b8ee7 Hrm, how could this compile?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10263 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:55:02 +00:00
Chris Lattner
9e6f686559 Fix compatibility with gcc 3.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:45:47 +00:00
Chris Lattner
f168b7551c Build _lib_crtend.a, not crtend.a
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10260 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 10:24:57 +00:00
Chris Lattner
53005b00be Don't print out tons of crap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10259 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 10:14:17 +00:00
Chris Lattner
ef1835df7b Rewrite makefile logic to build an archive instead of a .o file. This is
intended to address PR142


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10257 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 10:05:30 +00:00
Chris Lattner
eefa3d3cfb Simplify some rules
Move LGCCLDPROG from test/Makefile.tests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10256 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 09:50:15 +00:00
Chris Lattner
f6968f3886 Move rule to top-level makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10255 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 09:49:14 +00:00
Chris Lattner
e893d649fa Add readme and spiff up makefile header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10254 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 09:22:53 +00:00
Chris Lattner
b895fb06ec Testcase for duplicated cleanup work (PR11). Note that this testcase is not actually
tested automatically, so it is practically useless.  However, it seemed silly to throw
away my testcase, so here it is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10253 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 09:10:50 +00:00
Chris Lattner
3607f4d217 Fix test: Transforms/LevelRaise/2003-11-28-IllegalTypeConversion.ll
Some gep generalization changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10252 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 05:31:25 +00:00
Chris Lattner
7219a21138 new testcase for problem causing 2003-10-12-GlobalVarInitializers failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10251 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 05:19:15 +00:00
Chris Lattner
548e813fa7 The function resolving pass must be run, even if -disable-opt is specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 09:44:03 +00:00
Chris Lattner
6cc8ca9229 * The return value of LinkLibraries is ignored, so remove it.
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
  CONTINUE ANYWAY!  Instead, just output the warning, and keep going. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10249 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 07:44:09 +00:00
Chris Lattner
d423fb5cbf fix gcc 3.4 compatibility problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10248 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 01:46:06 +00:00
Chris Lattner
f095db1237 Testcase for PR160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 01:32:03 +00:00
Chris Lattner
2bc9988b1a New testcase for PR158
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10246 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-27 21:25:07 +00:00
Chris Lattner
d8db4eb5d7 Fix grammaro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10245 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-27 21:17:48 +00:00
Chris Lattner
1f80115a81 testcase for PR159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10244 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-27 20:47:16 +00:00
Chris Lattner
f5e25aada0 PR11 is now fixed for 1.1!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10243 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-27 09:52:03 +00:00
Chris Lattner
3074b34ad0 PR11 is now fixed for 1.1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10242 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-27 09:51:54 +00:00
Chris Lattner
35976d91af * Squelch warning on Sun
* stdlib and friends are system headers
* 'long long' is the type that consistently turns into the LLVM 'long' type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10241 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-27 07:48:45 +00:00
John Criswell
f2ec35be40 Makefiles are now copies over to the object root directory dynamically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10240 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 20:09:49 +00:00
John Criswell
1b4fb5a32c Renamed intermediate values that used the same type and name as previous
values.  All of these files should assemble now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10239 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 14:45:37 +00:00
Chris Lattner
f733073f96 Bugz die!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10238 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 08:20:34 +00:00
Chris Lattner
7dd9334270 Testcase for PR157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10237 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 07:35:52 +00:00
Chris Lattner
4257098c36 To not barf when an error occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10236 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 07:24:58 +00:00
Chris Lattner
5b266581fb Boogs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10235 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 02:48:00 +00:00
Chris Lattner
676c255e2e More dead boogers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10233 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 01:18:49 +00:00
Chris Lattner
4f7e173cbd output foo(void) as appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10232 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-26 00:09:17 +00:00
Chris Lattner
bc771c5608 Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10231 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 23:44:40 +00:00
John Criswell
009900b512 Fixed a small grammatical error.
Explained that function return types cannot be aggregate types.
Explained that functions with the same name but different type signatures
are considered to be different functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10230 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:45:46 +00:00
Chris Lattner
d85cbe8f69 Fix const correctness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10229 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:28:00 +00:00
Chris Lattner
b9da9c137d Relax constrains on GEP type indexes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10228 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:21:46 +00:00
Chris Lattner
6c7901bd11 It is legal to index into sequential types with any integer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10227 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:20:19 +00:00
Chris Lattner
be883a23ed Do not use index type to determine what it is indexing into!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10226 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:09:18 +00:00
Chris Lattner
23e907082a Do not depend on the gep index types to determine what flavor of index it is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10225 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 20:49:55 +00:00
Chris Lattner
4af6de8f0a Do not depend on structure elements being of type UByteTy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10224 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 20:44:56 +00:00