Commit Graph

33434 Commits

Author SHA1 Message Date
Evan Cheng
b9591c667d No longer need to track last def / use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38534 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 08:47:44 +00:00
Evan Cheng
0c40d72b01 Fix for PR1545: Revamp code that update kill information due to register reuse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 05:28:39 +00:00
Reid Spencer
4dd0ae68cd Adjust this per the changes to the configuration script in the llvm-top module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38521 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 03:00:11 +00:00
Owen Anderson
b77c457cc8 Add FastDSE, a new algorithm for doing dead store elimination. This algorithm is not as accurate
as the current DSE, but it only a linear scan over each block, rather than quadratic.  Eventually
(once it has been improved somewhat), this will replace the current DSE.

NOTE: This has not yet been extensively tested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38517 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 00:46:18 +00:00
David Greene
67fcdf7f65 Make this work with GLIBCXX_DEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38516 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 22:00:30 +00:00
Evan Cheng
8202010364 Didn't mean the last commit. Revert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38515 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 22:00:16 +00:00
Dale Johannesen
afdc7fda65 Fix fp_constant_op failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38514 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 21:53:30 +00:00
Evan Cheng
c608ff22e7 Update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38513 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 21:49:47 +00:00
Dale Johannesen
bf6b8272b1 fix 80 columnn violations, increasing the world's
pedantic satisfaction level.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 20:53:41 +00:00
Owen Anderson
8e85048d7b Calculate the size of a array allocation correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38511 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 20:48:38 +00:00
Owen Anderson
202da14fe0 Fix a crasher when finding the dependency of a call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 20:39:07 +00:00
Owen Anderson
776ee1fb33 Make this pass registration static as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38509 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 20:21:08 +00:00
Owen Anderson
16a72bb47d Make the pass registration static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 20:20:19 +00:00
Chris Lattner
36c5155d0f add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38507 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 20:03:50 +00:00
Rafael Espindola
b91025b619 check for correct usage of the byval attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 19:28:12 +00:00
Anton Korobeynikov
a289511090 During module cloning copy aliases too. This fixes PR1544
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 19:07:35 +00:00
Owen Anderson
06b6e82f79 Handle vaarg instructions correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:43:15 +00:00
Dan Gohman
743d3a7548 Change the peep for EXTRACT_VECTOR_ELT of BUILD_PAIR to look for
the new CONCAT_VECTORS node type instead, as that's what legalize
uses now. And add a peep for EXTRACT_VECTOR_ELT of INSERT_VECTOR_ELT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:20:44 +00:00
Owen Anderson
e314eb3255 Volatile loads and stores depend on each other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38502 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:11:42 +00:00
Evan Cheng
13ab020ea0 Remove clobbersPred. Add an OptionalDefOperand to instructions which have the 's' bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38501 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:08:01 +00:00
Evan Cheng
2bf821c4bf Remove clobbersPred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38500 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:07:08 +00:00
Evan Cheng
ed80ef6089 Add OptionalDefOperand. Remove clobbersPred. Also add DefinesPredicate to be used by if-converter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:06:29 +00:00
Evan Cheng
88cc092ca5 Try committing again. Add OptionalDefOperand. Remove clobbersPred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:05:01 +00:00
Owen Anderson
5f32320797 Add support for finding the dependencies of call and invoke instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 17:59:22 +00:00
Evan Cheng
5e2456c959 If the operand is marked M_OPTIONAL_DEF_OPERAND, then it's a def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38496 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 17:52:20 +00:00
Evan Cheng
11ce02dbdd Somehow this wasn't committed last time. M_CLOBBERS_PRED is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38495 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 17:50:43 +00:00
Owen Anderson
7a616a1012 Fix the build, and fix the handling of pointer sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38494 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 17:25:03 +00:00
Owen Anderson
6b278fc786 Fix a bunch of things from Chris' feedback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38493 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 17:08:11 +00:00
Dan Gohman
02e25b70aa Add a regression test for folding spill code into scalar min and max.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38492 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 15:34:29 +00:00
Dan Gohman
70fb1aefd5 Fix a bug in the folding of binary operators to undef.
Thanks to Lauro for spotting this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38491 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 15:19:29 +00:00
Reid Spencer
eff155349a Make sure to keep symbols for profile build.
Patch by Benoit Boissinot. Thanks, Benoit!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38490 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 14:52:01 +00:00
Dan Gohman
d595b5f1f0 Fix the folding of undef in several binary operators to recognize
undef in either the left or right operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 14:20:37 +00:00
Reid Spencer
087d90e912 Simplify the handling of the --*flags options. The makefile already gets it
right so there is no need to duplicate logic, just use the values the makefile
provides. 

Eliminate some redundnt -D options from the output.

Fix the help output so it fits on 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 07:48:09 +00:00
Reid Spencer
4a2c083bdd Makesure the -cppflags also uses the CPP.BaseFlags as the CPP.Defines only
contains some of the defines but not all CPP flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38487 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 07:21:34 +00:00
Reid Spencer
0a522b19e8 Make sure that preprocessor symbols like _DEBUG, NDEBUG, and _GLIBC_DEBUG are
put into the CPP.Defines variable. Seems the convention was corrupted with
various changes made. It is important to get command line parameters into the
right variable because things like llvm-config and sub-makefiles depend on it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38486 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 07:19:53 +00:00
Evan Cheng
af825c840e When a node value is only used by a CopyToReg, use the user's dest. This should not be restricted to nodes that produce only a single value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38485 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 07:08:32 +00:00
Evan Cheng
c63d391c9a Move DenseMapKeyInfo<SDOperand> from LegalizeDAG.cpp to SelectionDAGNodes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38484 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 06:59:55 +00:00
Nick Lewycky
6e8eb7f075 Update the ValueRanges interface to use value numbers instead of Value*s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 03:28:21 +00:00
Owen Anderson
c5c7f755c8 Evidently my earlier fix did not go far enough. When resizing a zero-sized
BitVector, make sure to set or clear ALL of the bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38481 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 02:01:16 +00:00
Owen Anderson
81c2a6ecbb Move some key maps from std::map to DenseMap. This improves the time to optimize Anton's testcase from 17.5s
to 15.7s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38480 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 00:27:22 +00:00
Owen Anderson
a05a81b10a Use a cheaper test, delaying calling find_leader() until we know that it's necessary. This improves
the time to optimize Anton's testcase from 21.1s to 17.6s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 00:09:25 +00:00
Dan Gohman
2038252c6a Define non-intrinsic instructions for vector min, max, sqrt, rsqrt, and rcp,
in addition to the intrinsic forms. Add spill-folding entries for these new
instructions, and for the scalar min and max instrinsic instructions which
were missing. And add some preliminary ISelLowering code for using the new
non-intrinsic vector sqrt instruction, and fneg and fabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 00:05:58 +00:00
Owen Anderson
5fd507d431 Add an assertion if find_leader fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 23:57:18 +00:00
Owen Anderson
0c81450a0c When resizing a BitVector with size 0, be sure to clear the low word before using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 23:39:39 +00:00
Owen Anderson
dfa2435784 Take advantage of the new fast SmallPtrSet assignment operator when propagating AVAIL_OUT sets.
This reduces the time to optimize Anton's testcase from 31.2s to 21.s!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 22:29:50 +00:00
Owen Anderson
69b5d12676 Make the assignment operator for SmallPtrSet much faster for normal cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38474 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 22:27:20 +00:00
Dan Gohman
d6fd1bc122 Preserve volatililty and alignment information when lowering or
simplifying loads and stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 22:18:38 +00:00
Devang Patel
ff366850aa Expose struct size threhold to allow users to tweak their own setting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38472 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 21:19:23 +00:00
Dan Gohman
532dc2e1f2 Change getCopyToParts and getCopyFromParts to always use target-endian
register ordering, for both physical and virtual registers. Update the PPC
target lowering for calls to expect registers for the call result to
already be in target order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38471 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 20:59:04 +00:00
Owen Anderson
4d6f96d699 Make the assignment operator for SmallPtrSet return a reference, and fix a long-standing bug in the copy
ctor while I'm at it.

Thanks to Chris Lattner for help with this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38470 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 20:59:01 +00:00