oota-llvm.git
16 years agothis line was commented out.
Chris Lattner [Sun, 17 Feb 2008 00:09:08 +0000 (00:09 +0000)]
this line was commented out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47228 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove llvm-upgrade and update tests.
Tanya Lattner [Sat, 16 Feb 2008 23:55:46 +0000 (23:55 +0000)]
Remove llvm-upgrade and update tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47227 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemoving llvm upgrade, so remove tests specific to llvm-upgrade and update the tests...
Tanya Lattner [Sat, 16 Feb 2008 23:27:24 +0000 (23:27 +0000)]
Removing llvm upgrade, so remove tests specific to llvm-upgrade and update the tests that used it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47225 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove any 'nest' parameter attributes if the function
Duncan Sands [Sat, 16 Feb 2008 20:56:04 +0000 (20:56 +0000)]
Remove any 'nest' parameter attributes if the function
is not passed as an argument to a trampoline intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47220 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSome micro-optimizations.
Duncan Sands [Sat, 16 Feb 2008 20:53:06 +0000 (20:53 +0000)]
Some micro-optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47219 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoI cannot find a libgcc function for this builtin. Therefor expanding it to a noop...
Andrew Lenharth [Sat, 16 Feb 2008 14:46:26 +0000 (14:46 +0000)]
I cannot find a libgcc function for this builtin.  Therefor expanding it to a noop (which is how it use to be treated).  If someone who knows the x86 backend better than me could tell me how to get a lock prefix on an instruction, that would be nice to complete x86 support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47213 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTeach LegalizeTypes how to expand the operands of
Duncan Sands [Sat, 16 Feb 2008 10:29:26 +0000 (10:29 +0000)]
Teach LegalizeTypes how to expand the operands of
br_cc.  This fixes 5 "make check" failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47212 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTry to clarify which compilers can be used for the
Duncan Sands [Sat, 16 Feb 2008 09:47:41 +0000 (09:47 +0000)]
Try to clarify which compilers can be used for the
build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47211 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRefactor some code; check if commuteInstruction is able to commute the instruction.
Evan Cheng [Sat, 16 Feb 2008 02:32:17 +0000 (02:32 +0000)]
Refactor some code; check if commuteInstruction is able to commute the instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47208 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agollvm.memory.barrier, and impl for x86 and alpha
Andrew Lenharth [Sat, 16 Feb 2008 01:24:58 +0000 (01:24 +0000)]
llvm.memory.barrier, and impl for x86 and alpha

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47204 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix typos.
Bill Wendling [Sat, 16 Feb 2008 01:09:25 +0000 (01:09 +0000)]
Fix typos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47200 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename CountMemOperands to ComputeMemOperandsEnd to reflect what
Dan Gohman [Sat, 16 Feb 2008 00:36:48 +0000 (00:36 +0000)]
Rename CountMemOperands to ComputeMemOperandsEnd to reflect what
it actually does. Simplify CountOperands a little by reusing
ComputeMemOperandsEnd. And reword some comments for both.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47198 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert 47177, which was incorrect.
Dan Gohman [Sat, 16 Feb 2008 00:25:40 +0000 (00:25 +0000)]
Revert 47177, which was incorrect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47196 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoupgrade this test, which wasn't testing the right thing since llvm-upgrade came around.
Chris Lattner [Fri, 15 Feb 2008 23:58:25 +0000 (23:58 +0000)]
upgrade this test, which wasn't testing the right thing since llvm-upgrade came around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47194 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename llx -> ll
Chris Lattner [Fri, 15 Feb 2008 23:51:48 +0000 (23:51 +0000)]
rename llx -> ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47192 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis test is not interesting.
Evan Cheng [Fri, 15 Feb 2008 23:06:21 +0000 (23:06 +0000)]
This test is not interesting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47189 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake tblgen a little smarter about constants smaller than i32. Currently,
Scott Michel [Fri, 15 Feb 2008 23:05:48 +0000 (23:05 +0000)]
Make tblgen a little smarter about constants smaller than i32. Currently,
tblgen will complain if a sign-extended constant does not fit into a
data type smaller than i32, e.g., i16. This causes a problem when certain
hex constants are used, such as 0xff for byte masks or immediate xor
values.

tblgen will try the sign-extended value first and, if the sign extended
value would overflow, it tries to see if the unsigned value will fit.
Consequently, a software developer can now safely incant:

(XORHIr16 R16C:$rA, 0xffff)

which is somewhat clearer and more informative than incanting:

(XORHIr16 R16C:$rA, (i16 -1))

even if the two are bitwise equivalent.

Tblgen also outputs the 64-bit unsigned constant in the generated ISel code
when getTargetConstant() is invoked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47188 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify this.
Chris Lattner [Fri, 15 Feb 2008 22:57:17 +0000 (22:57 +0000)]
simplify this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47187 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoModify test to expect improved code.
Dale Johannesen [Fri, 15 Feb 2008 22:05:15 +0000 (22:05 +0000)]
Modify test to expect improved code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47182 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThe copy instruction being coalesced will be removed, it is not a kill.
Evan Cheng [Fri, 15 Feb 2008 21:36:51 +0000 (21:36 +0000)]
The copy instruction being coalesced will be removed, it is not a kill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47179 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed bug in FoldingSetIteratorImpl where we did not correctly check if
Ted Kremenek [Fri, 15 Feb 2008 21:12:46 +0000 (21:12 +0000)]
Fixed bug in FoldingSetIteratorImpl where we did not correctly check if
we had reached the "fake bucket" after the last bucket, allowing the iterator
in some cases to run off the end of the hashtable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47178 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSkip over the defs and start at the uses when looking for operands
Dan Gohman [Fri, 15 Feb 2008 20:59:17 +0000 (20:59 +0000)]
Skip over the defs and start at the uses when looking for operands
with the TIED_TO attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47177 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse the TargetInstrDescr to determine the number of operands
Dan Gohman [Fri, 15 Feb 2008 20:50:13 +0000 (20:50 +0000)]
Use the TargetInstrDescr to determine the number of operands
that should be checked for the TIED_TO attribute instead of
using CountOperands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47176 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix this test on linux, which returns S242
Duncan Sands [Fri, 15 Feb 2008 19:42:13 +0000 (19:42 +0000)]
Fix this test on linux, which returns S242
using sret.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47173 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTeach LegalizeTypes how to promote the flags
Duncan Sands [Fri, 15 Feb 2008 19:34:17 +0000 (19:34 +0000)]
Teach LegalizeTypes how to promote the flags
in a ret node.  These are created as i32 constants
but on some platforms i32 is not legal.  This
fixes 26 "make check" failures, for example
Alpha/2005-07-12-TwoMallocCalls.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47172 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle \n's in value names for more targets. The asm printers
Chris Lattner [Fri, 15 Feb 2008 19:04:54 +0000 (19:04 +0000)]
Handle \n's in value names for more targets.  The asm printers
really really really need refactoring :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47171 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIf the llvm name contains an unprintable character, don't print it in
Chris Lattner [Fri, 15 Feb 2008 18:56:05 +0000 (18:56 +0000)]
If the llvm name contains an unprintable character, don't print it in
the global comment.  This prevents printing things like:

...  # foo
bar

when the name is "foo\nbar".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47170 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotargets that support quotes for mangled names still need to escape newlines
Chris Lattner [Fri, 15 Feb 2008 18:54:56 +0000 (18:54 +0000)]
targets that support quotes for mangled names still need to escape newlines
when they occur in the name, just like " is escaped.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47169 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCosmetics.
Dale Johannesen [Fri, 15 Feb 2008 18:40:53 +0000 (18:40 +0000)]
Cosmetics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47168 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago- Removing the infamous r2rMap_ and rep() method. Now the coalescer will update
Evan Cheng [Fri, 15 Feb 2008 18:24:29 +0000 (18:24 +0000)]
- Removing the infamous r2rMap_ and rep() method. Now the coalescer will update
register defs and uses after each successful coalescing.
- Also removed a number of hacks and fixed some subtle kill information bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47167 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded CommuteChangesDestination(). This returns true if commuting the specified
Evan Cheng [Fri, 15 Feb 2008 18:21:33 +0000 (18:21 +0000)]
Added CommuteChangesDestination(). This returns true if commuting the specified
machine instr will change its definition register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47166 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove unnecessary #include.
Evan Cheng [Fri, 15 Feb 2008 18:12:09 +0000 (18:12 +0000)]
Remove unnecessary #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47164 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse StoreSDNode::getValue instead of calling getOperand directly
Dan Gohman [Fri, 15 Feb 2008 18:11:59 +0000 (18:11 +0000)]
Use StoreSDNode::getValue instead of calling getOperand directly
with a hard-coded operand number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47163 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove warning about 64-bit code on processor
Dale Johannesen [Fri, 15 Feb 2008 18:09:51 +0000 (18:09 +0000)]
Remove warning about 64-bit code on processor
that doesn't support it.  Per Chris.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47162 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIt is not safe to call fork in PrintStackTrace. Sometimes it freezes the program.
Lauro Ramos Venancio [Fri, 15 Feb 2008 18:05:54 +0000 (18:05 +0000)]
It is not safe to call fork in PrintStackTrace. Sometimes it freezes the program.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47161 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange MemOperand's size and offset to be 64-bit.
Dan Gohman [Fri, 15 Feb 2008 01:29:57 +0000 (01:29 +0000)]
Change MemOperand's size and offset to be 64-bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47151 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2028
Devang Patel [Fri, 15 Feb 2008 01:24:49 +0000 (01:24 +0000)]
Fix PR2028

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47150 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agonocona, core2 and penryn support 64 bit.
Dale Johannesen [Fri, 15 Feb 2008 01:22:41 +0000 (01:22 +0000)]
nocona, core2 and penryn support 64 bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47149 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSupport vector constant zeros, thanks to Zack Rusin for the testcase.
Chris Lattner [Fri, 15 Feb 2008 00:57:28 +0000 (00:57 +0000)]
Support vector constant zeros, thanks to Zack Rusin for the testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47148 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRewrite tblgen handling of subtarget features so
Dale Johannesen [Thu, 14 Feb 2008 23:35:16 +0000 (23:35 +0000)]
Rewrite tblgen handling of subtarget features so
it follows the order of the enum, not alphabetical.
The motivation is to make -mattr=+ssse3,+sse41
select SSE41 as it ought to.  Added "ignored"
enum values of 0 to PPC and SPU to avoid compiler
warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47143 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIf loop header is also loop exiting block then OrigPN is incoming value for B loop...
Devang Patel [Thu, 14 Feb 2008 23:18:47 +0000 (23:18 +0000)]
If loop header is also loop exiting block then OrigPN is incoming value for B loop header.
Fixes PR 2030.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47141 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a warning about comparison between signed and unsigned,
Dan Gohman [Thu, 14 Feb 2008 22:38:45 +0000 (22:38 +0000)]
Fix a warning about comparison between signed and unsigned,
being consistent with the rest of the APInt implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47138 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2029
Chris Lattner [Thu, 14 Feb 2008 19:18:13 +0000 (19:18 +0000)]
Fix PR2029

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47129 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a miscompilation from Dan's recent apintification.
Chris Lattner [Thu, 14 Feb 2008 18:48:56 +0000 (18:48 +0000)]
Fix a miscompilation from Dan's recent apintification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47128 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix single precision FP constants on SPU. They are actually legal,
Nate Begeman [Thu, 14 Feb 2008 18:43:04 +0000 (18:43 +0000)]
Fix single precision FP constants on SPU.  They are actually legal,
which allows us to kill a target-specific node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47127 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename CFEBuildInstrs.html to GCCFEBuildInstrs.html.
Duncan Sands [Thu, 14 Feb 2008 17:53:22 +0000 (17:53 +0000)]
Rename CFEBuildInstrs.html to GCCFEBuildInstrs.html.
Update all references to it and place a redirection
page at the old address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47124 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIn TargetLowering::LowerCallTo, don't assert that
Duncan Sands [Thu, 14 Feb 2008 17:28:50 +0000 (17:28 +0000)]
In TargetLowering::LowerCallTo, don't assert that
the return value is zero-extended if it isn't
sign-extended.  It may also be any-extended.
Also, if a floating point value was returned
in a larger floating point type, pass 1 as the
second operand to FP_ROUND, which tells it
that all the precision is in the original type.
I think this is right but I could be wrong.
Finally, when doing libcalls, set isZExt on
a parameter if it is "unsigned".  Currently
isSExt is set when signed, and nothing is
set otherwise.  This should be right for all
calls to standard library routines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47122 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange how FP immediates are handled.
Nate Begeman [Thu, 14 Feb 2008 08:57:00 +0000 (08:57 +0000)]
Change how FP immediates are handled.
1) ConstantFP is now expand by default
2) ConstantFP is not turned into TargetConstantFP during Legalize
   if it is legal.

This allows ConstantFP to be handled like Constant, allowing for
targets that can encode FP immediates as MachineOperands.

As a bonus, fix up Itanium FP constants, which now correctly match,
and match more constants!  Hooray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47121 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove llvm-upgrade
Tanya Lattner [Thu, 14 Feb 2008 07:57:12 +0000 (07:57 +0000)]
Remove llvm-upgrade

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47119 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSupport a new type of MachineOperand, MO_FPImmediate, used for holding
Nate Begeman [Thu, 14 Feb 2008 07:39:30 +0000 (07:39 +0000)]
Support a new type of MachineOperand, MO_FPImmediate, used for holding
FP Immediates, crazily enough

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47117 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify code, no functionality change.
Chris Lattner [Thu, 14 Feb 2008 07:39:01 +0000 (07:39 +0000)]
simplify code, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47116 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove some useful operands up into the all-targets .td
Nate Begeman [Thu, 14 Feb 2008 07:25:46 +0000 (07:25 +0000)]
Move some useful operands up into the all-targets .td

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47115 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNuke dead comment
Nate Begeman [Thu, 14 Feb 2008 07:23:11 +0000 (07:23 +0000)]
Nuke dead comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47114 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTestcase for PR2032.
Nick Lewycky [Thu, 14 Feb 2008 07:15:11 +0000 (07:15 +0000)]
Testcase for PR2032.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47113 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2032. Inform the alias analysis of changes to the underlying program.
Nick Lewycky [Thu, 14 Feb 2008 07:11:24 +0000 (07:11 +0000)]
Fix PR2032. Inform the alias analysis of changes to the underlying program.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47111 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove llvm-upgrade.
Tanya Lattner [Thu, 14 Feb 2008 06:56:27 +0000 (06:56 +0000)]
Remove llvm-upgrade.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47110 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoupgrade some entries, remove stuff that is done.
Chris Lattner [Thu, 14 Feb 2008 06:19:02 +0000 (06:19 +0000)]
upgrade some entries, remove stuff that is done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47109 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agothe mid-level optimizer removes this stuff.
Chris Lattner [Thu, 14 Feb 2008 05:43:18 +0000 (05:43 +0000)]
the mid-level optimizer removes this stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47108 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agothis one is easy.
Chris Lattner [Thu, 14 Feb 2008 05:41:38 +0000 (05:41 +0000)]
this one is easy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47107 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis readme entry is done, testcase here: CodeGen/X86/zero-remat.ll
Chris Lattner [Thu, 14 Feb 2008 05:39:46 +0000 (05:39 +0000)]
This readme entry is done, testcase here: CodeGen/X86/zero-remat.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47106 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPR2027, Fix bugpoint's -find-bugs option, clean up the code.
Nick Lewycky [Thu, 14 Feb 2008 05:01:46 +0000 (05:01 +0000)]
PR2027, Fix bugpoint's -find-bugs option, clean up the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47105 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix test.
Evan Cheng [Thu, 14 Feb 2008 01:32:53 +0000 (01:32 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47102 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow the APInt form of ComputeMaskedBits to operate on i128 types.
Dan Gohman [Wed, 13 Feb 2008 23:13:32 +0000 (23:13 +0000)]
Allow the APInt form of ComputeMaskedBits to operate on i128 types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47101 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAssigning an APInt to 0 with plain assignment gives it a one-bit
Dan Gohman [Wed, 13 Feb 2008 23:07:24 +0000 (23:07 +0000)]
Assigning an APInt to 0 with plain assignment gives it a one-bit
size. Initialize these APInts to properly-sized zero values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47099 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAvoid setting bits that aren't demanded.
Dan Gohman [Wed, 13 Feb 2008 22:43:25 +0000 (22:43 +0000)]
Avoid setting bits that aren't demanded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47098 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a typo in a comment.
Dan Gohman [Wed, 13 Feb 2008 22:32:12 +0000 (22:32 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47097 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify some logic in ComputeMaskedBits. And change ComputeMaskedBits
Dan Gohman [Wed, 13 Feb 2008 22:28:48 +0000 (22:28 +0000)]
Simplify some logic in ComputeMaskedBits. And change ComputeMaskedBits
to pass the mask APInt by value, not by reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47096 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoA loop latch phi node may have uses inside loop, not just in loop header.
Devang Patel [Wed, 13 Feb 2008 22:23:07 +0000 (22:23 +0000)]
A loop latch phi node may have uses inside loop, not just in loop header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47093 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename APInt's isPositive to isNonNegative, to reflect what it
Dan Gohman [Wed, 13 Feb 2008 22:09:18 +0000 (22:09 +0000)]
Rename APInt's isPositive to isNonNegative, to reflect what it
actually does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47090 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhile moving exit condition, do not drop loop latch on the floor.
Devang Patel [Wed, 13 Feb 2008 22:06:36 +0000 (22:06 +0000)]
While moving exit condition, do not drop loop latch on the floor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47089 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd countTrailingOnes member functions to APInt.
Dan Gohman [Wed, 13 Feb 2008 21:11:05 +0000 (21:11 +0000)]
Add countTrailingOnes member functions to APInt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47086 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a typo in a comment.
Dan Gohman [Wed, 13 Feb 2008 20:56:53 +0000 (20:56 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47085 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd count{Leading,Trailing}Ones_{32,64} functions with simple implementations.
Dan Gohman [Wed, 13 Feb 2008 20:54:54 +0000 (20:54 +0000)]
Add count{Leading,Trailing}Ones_{32,64} functions with simple implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47084 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoKeep track of exit value operand number when operands are swapped.
Devang Patel [Wed, 13 Feb 2008 19:48:48 +0000 (19:48 +0000)]
Keep track of exit value operand number when operands are swapped.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47082 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnable exception handling int JIT
Nicolas Geoffray [Wed, 13 Feb 2008 18:39:37 +0000 (18:39 +0000)]
Enable exception handling int JIT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47079 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNew test, see comments.
Dale Johannesen [Wed, 13 Feb 2008 18:36:48 +0000 (18:36 +0000)]
New test, see comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47078 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTeach LegalizeTypes how to expand and promote CTLZ,
Duncan Sands [Wed, 13 Feb 2008 18:01:53 +0000 (18:01 +0000)]
Teach LegalizeTypes how to expand and promote CTLZ,
CTTZ and CTPOP.  The expansion code differs from
that in LegalizeDAG in that it chooses to take the
CTLZ/CTTZ count from the Hi/Lo part depending on
whether the Hi/Lo value is zero, not on whether
CTLZ/CTTZ of Hi/Lo returned 32 (or whatever the
width of the type is) for it.  I made this change
because the optimizers may well know that Hi/Lo
is zero and exploit it.  The promotion code for
CTTZ also differs from that in LegalizeDAG: it
uses an "or" to get the right result when the
original value is zero, rather than using a compare
and select.  This also means the value doesn't
need to be zero extended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47075 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agogcc 3.2.3 is also bad.
Chris Lattner [Wed, 13 Feb 2008 17:50:24 +0000 (17:50 +0000)]
gcc 3.2.3 is also bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47073 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the PPC JIT regressions by encoding zeroreg as 0 for BLR.
Chris Lattner [Wed, 13 Feb 2008 17:24:14 +0000 (17:24 +0000)]
Fix the PPC JIT regressions by encoding zeroreg as 0 for BLR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47067 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove some dead code.
Chris Lattner [Wed, 13 Feb 2008 17:18:26 +0000 (17:18 +0000)]
remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47066 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove use of ltdl
Devang Patel [Wed, 13 Feb 2008 17:11:39 +0000 (17:11 +0000)]
Remove use of ltdl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47065 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd notes on Ada compilers that can be used for
Duncan Sands [Wed, 13 Feb 2008 16:46:10 +0000 (16:46 +0000)]
Add notes on Ada compilers that can be used for
the build.  Put all items that the user should
specify in bold.  Make it a debug build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47063 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix typo. Thanks to Duncan for noticing.
Wojciech Matyjewicz [Wed, 13 Feb 2008 12:21:32 +0000 (12:21 +0000)]
Fix typo. Thanks to Duncan for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47062 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd comments as per review feedback.
Wojciech Matyjewicz [Wed, 13 Feb 2008 11:51:34 +0000 (11:51 +0000)]
Add comments as per review feedback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47061 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSome code clean up.
Evan Cheng [Wed, 13 Feb 2008 09:56:03 +0000 (09:56 +0000)]
Some code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47060 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify.
Evan Cheng [Wed, 13 Feb 2008 09:18:16 +0000 (09:18 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47059 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify.
Evan Cheng [Wed, 13 Feb 2008 09:13:21 +0000 (09:13 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47058 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a potential serious problem where kills belonging to the val# defined by a two...
Evan Cheng [Wed, 13 Feb 2008 09:06:18 +0000 (09:06 +0000)]
Fix a potential serious problem where kills belonging to the val# defined by a two-address instruction is also on the val# that defines the input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47057 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago* Cannot safely commute an instruction there are other defs which can reach its uses.
Evan Cheng [Wed, 13 Feb 2008 08:41:08 +0000 (08:41 +0000)]
* Cannot safely commute an instruction there are other defs which can reach its uses.
* Ignore copy instructions which have already been coalesced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47056 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a note pointing to PR1996.
Eli Friedman [Wed, 13 Feb 2008 07:56:04 +0000 (07:56 +0000)]
Add a note pointing to PR1996.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47055 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIn SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower this
Chris Lattner [Wed, 13 Feb 2008 07:39:09 +0000 (07:39 +0000)]
In SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower this
node as soon as we create it in SDISel.  Previously we would lower it in
legalize.  The problem with this is that it only exposes the argument
loads implied by FORMAL_ARGUMENTs after legalize, so that only dag combine 2
can hack on them.  This causes us to miss some optimizations because
datatype expansion also happens here.

Exposing the loads early allows us to do optimizations on them.  For example
we now compile arg-cast.ll to:

_foo:
movl $2147483647, %eax
andl 8(%esp), %eax
ret

where we previously produced:

_foo:
subl $12, %esp
movsd 16(%esp), %xmm0
movsd %xmm0, (%esp)
movl $2147483647, %eax
andl 4(%esp), %eax
addl $12, %esp
ret

It might also make sense to do this for ISD::CALL nodes, which have implicit
stores on many targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47054 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodon't try to avoid inserting loads when lowering FORMAL_ARGUMENTS.
Chris Lattner [Wed, 13 Feb 2008 07:35:30 +0000 (07:35 +0000)]
don't try to avoid inserting loads when lowering FORMAL_ARGUMENTS.
DAGCombine is now quite good at zapifying them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47053 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoteach dag combiner how to eliminate MERGE_VALUES nodes.
Chris Lattner [Wed, 13 Feb 2008 07:25:05 +0000 (07:25 +0000)]
teach dag combiner how to eliminate MERGE_VALUES nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47052 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoreadme updates
Nate Begeman [Wed, 13 Feb 2008 07:06:12 +0000 (07:06 +0000)]
readme updates

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47051 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd test for PR1996. (This is my first time adding a test for a
Eli Friedman [Wed, 13 Feb 2008 06:55:57 +0000 (06:55 +0000)]
Add test for PR1996.  (This is my first time adding a test for a
transform, so please review.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47050 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd testcase for recent legalizer change
Nate Begeman [Wed, 13 Feb 2008 06:48:40 +0000 (06:48 +0000)]
Add testcase for recent legalizer change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47049 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSupport legalizing insert_vector_elt on targets where the element
Nate Begeman [Wed, 13 Feb 2008 06:43:04 +0000 (06:43 +0000)]
Support legalizing insert_vector_elt on targets where the element
type is not legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47048 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNew tests.
Evan Cheng [Wed, 13 Feb 2008 03:23:53 +0000 (03:23 +0000)]
New tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47047 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitial support for copy elimination by commuting its definition MI.
Evan Cheng [Wed, 13 Feb 2008 03:01:43 +0000 (03:01 +0000)]
Initial support for copy elimination by commuting its definition MI.
PR1877.
A3 = op A2 B0<kill>
...
B1 = A3      <- this copy
...
   = op A3   <- more uses

==>

B2 = op B0 A2<kill>
...
B1 = B2      <- now an identify copy
...
   = op B2   <- more uses

This speeds up FreeBench/neural by 29%, Olden/bh by 12%, oopack_v1p8 by 53%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47046 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake register scavenging happy by not using a reg (CR0) that isn't defined
Nate Begeman [Wed, 13 Feb 2008 02:58:33 +0000 (02:58 +0000)]
Make register scavenging happy by not using a reg (CR0) that isn't defined

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47045 91177308-0d34-0410-b5e6-96231b3b80d8