Commit Graph

33367 Commits

Author SHA1 Message Date
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
Devang Patel
b42295df4d Fix memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38469 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 20:52:39 +00:00
Dan Gohman
93f81e2822 Initialize the IndexedModeActions array with memset before
updating it with calls to setIndexedLoadAction/setIndexedStoreAction,
which only update a few bits at a time. This avoids ostensible
undefined behavior of operationg on values which may be
trap-representations, and as a practical matter fixes errors from
valgrind, which doesn't track uninitialized memory with bit
granularity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38468 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 20:49:44 +00:00
Owen Anderson
da8ebc6b43 Fix an error in the assignment operator that was causing an infinite loop in GVNPRE.cpp.
Patch by Chis Lattner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38467 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 18:51:15 +00:00
Chris Lattner
ba7721633c force a cpu without SSE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38466 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 17:35:18 +00:00
Chris Lattner
349d4c8d66 allow this to work on ppc-darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 17:32:28 +00:00
Chris Lattner
4857b1b320 remove this bogus t-t
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38464 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 17:31:07 +00:00
Chris Lattner
87bdba6d6a The various "getModuleMatchQuality" implementations should return
zero if they see a target triple they don't understand.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38463 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 17:25:29 +00:00
Chris Lattner
0f9d599dc9 add target triple to fix PR1546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38462 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 17:14:58 +00:00
Chris Lattner
95fd3189f8 work around an aparent gcc name resolution bug by
detemplatizing this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38461 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 17:11:53 +00:00
Chris Lattner
91f0158d4d implement operator= for smallptrset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38460 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 16:54:03 +00:00
Owen Anderson
ab3fd054ea Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38459 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 16:43:55 +00:00
Chris Lattner
e094f54f4c Fix this warning:
DAGCombiner.cpp: In member function 'llvm::SDOperand<unnamed>::DAGCombiner::visitOR(llvm::SDNode*)':
DAGCombiner.cpp:1608: warning: passing negative value '-0x00000000000000001' for argument 1 to 'llvm::SDOperand llvm::SelectionDAG::getConstant(uint64_t, llvm::MVT::ValueType, bool)'

oiy.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38458 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 16:16:34 +00:00
Dan Gohman
9a6ae965d6 Move the APInt form of SCEVUnknown::getIntegerSCEV to SCEVConstant::get, and
use SCEVConstant::get instead of SCEVUnknown::get when constructing a SCEV
for a ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 15:25:17 +00:00
Dan Gohman
2c8c3e2e31 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 15:15:24 +00:00
Dan Gohman
2a69a04afa Add explicit triples to these tests so that llc behaves as expected on
non-Apple hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 13:42:32 +00:00
Gabor Greif
b0954b1580 missed this one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38454 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 12:20:30 +00:00
Gabor Greif
e510b3af3a fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38453 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 12:00:59 +00:00