oota-llvm.git
16 years agoRemove implicit_def instructions that become dead as result of coalescing.
Evan Cheng [Thu, 10 Apr 2008 23:48:35 +0000 (23:48 +0000)]
Remove implicit_def instructions that become dead as result of coalescing.

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

16 years agoAllow registers defined by implicit_def to be clobbered.
Evan Cheng [Thu, 10 Apr 2008 23:47:53 +0000 (23:47 +0000)]
Allow registers defined by implicit_def to be clobbered.

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

16 years agoFix a typo in a comment.
Dan Gohman [Thu, 10 Apr 2008 23:02:38 +0000 (23:02 +0000)]
Fix a typo in a comment.

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

16 years agoFix a typo in a comment.
Dan Gohman [Thu, 10 Apr 2008 22:27:06 +0000 (22:27 +0000)]
Fix a typo in a comment.

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

16 years agoFix for PR2190. Memdep's non-local caching was checking dirtied blocks in the
Owen Anderson [Thu, 10 Apr 2008 22:13:32 +0000 (22:13 +0000)]
Fix for PR2190.  Memdep's non-local caching was checking dirtied blocks in the
wrong order.

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

16 years agoMake several symbols static.
Dan Gohman [Thu, 10 Apr 2008 21:11:47 +0000 (21:11 +0000)]
Make several symbols static.

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

16 years agoTeach InstCombine's ComputeMaskedBits to handle pointer expressions
Dan Gohman [Thu, 10 Apr 2008 18:43:06 +0000 (18:43 +0000)]
Teach InstCombine's ComputeMaskedBits to handle pointer expressions
in addition to integer expressions. Rewrite GetOrEnforceKnownAlignment
as a ComputeMaskedBits problem, moving all of its special alignment
knowledge to ComputeMaskedBits as low-zero-bits knowledge.

Also, teach ComputeMaskedBits a few basic things about Mul and PHI
instructions.

This improves ComputeMaskedBits-based simplifications in a few cases,
but more noticeably it significantly improves instcombine's alignment
detection for loads, stores, and memory intrinsics.

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

16 years agoA copy instruction may use a register multiple times on some targets. Change them...
Evan Cheng [Thu, 10 Apr 2008 18:38:47 +0000 (18:38 +0000)]
A copy instruction may use a register multiple times on some targets. Change them all.

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

16 years agoAdd comment.
Evan Cheng [Thu, 10 Apr 2008 08:03:14 +0000 (08:03 +0000)]
Add comment.

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

16 years agoadd a note, this is actually not too bad to implement.
Chris Lattner [Thu, 10 Apr 2008 05:54:50 +0000 (05:54 +0000)]
add a note, this is actually not too bad to implement.

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

16 years agomove the x86-32 part of PR2108 here.
Chris Lattner [Thu, 10 Apr 2008 05:37:47 +0000 (05:37 +0000)]
move the x86-32 part of PR2108 here.

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

16 years agoFix the x86-64 side of PR2108 by adding a v2f64 version of
Chris Lattner [Thu, 10 Apr 2008 05:13:43 +0000 (05:13 +0000)]
Fix the x86-64 side of PR2108 by adding a v2f64 version of
MOVZQI2PQIrr.  This would be better handled as a dag combine
(with the goal of eliminating the bitconvert) but I don't know
how to do that safely.  Thoughts welcome.

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

16 years agoproduce an error on invalid input instead of asserting:
Chris Lattner [Thu, 10 Apr 2008 04:48:34 +0000 (04:48 +0000)]
produce an error on invalid input instead of asserting:

def : Pat<((v2f64 (vector_shuffle immAllZerosV_bc,
           ^

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

16 years agoTeach branch folding pass about implicit_def instructions. Unfortunately we can't...
Evan Cheng [Thu, 10 Apr 2008 02:32:10 +0000 (02:32 +0000)]
Teach branch folding pass about implicit_def instructions. Unfortunately we can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses.  Carefully removing some implicit def's which enable more blocks to be optimized away.

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

16 years agoDisable an xform we've had for a long time, pow(x,0.5) -> sqrt.
Chris Lattner [Thu, 10 Apr 2008 02:07:51 +0000 (02:07 +0000)]
Disable an xform we've had for a long time, pow(x,0.5) -> sqrt.
This is not safe for all inputs.

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

16 years agoMove memcpy / memset optimization pass after GVN.
Evan Cheng [Thu, 10 Apr 2008 01:33:05 +0000 (01:33 +0000)]
Move memcpy / memset optimization pass after GVN.

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

16 years ago- More aggressively coalescing away copies whose source is defined by an implicit_def.
Evan Cheng [Wed, 9 Apr 2008 20:57:25 +0000 (20:57 +0000)]
- More aggressively coalescing away copies whose source is defined by an implicit_def.
- Added insert_subreg coalescing support.

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

16 years agoMake isVectorClearMaskLegal's operand list const.
Dan Gohman [Wed, 9 Apr 2008 20:09:42 +0000 (20:09 +0000)]
Make isVectorClearMaskLegal's operand list const.

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

16 years agoFix some minor errors in comments.
Dan Gohman [Wed, 9 Apr 2008 20:08:06 +0000 (20:08 +0000)]
Fix some minor errors in comments.

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

16 years agoAdd const qualifiers.
Dan Gohman [Wed, 9 Apr 2008 18:31:41 +0000 (18:31 +0000)]
Add const qualifiers.

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

16 years agoUpdate comments to use 2.0 syntax type names.
Dan Gohman [Wed, 9 Apr 2008 18:24:25 +0000 (18:24 +0000)]
Update comments to use 2.0 syntax type names.

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

16 years agoAdd XMM1 as a second return value register for f32 and f64 on x86-64. This
Dan Gohman [Wed, 9 Apr 2008 17:54:37 +0000 (17:54 +0000)]
Add XMM1 as a second return value register for f32 and f64 on x86-64. This
is needed for the x86-64-ABI handling of structs that contain floating-point
members that are returned by value.

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

16 years agoAdd DX as a second return value register for i16 on x86.
Dan Gohman [Wed, 9 Apr 2008 17:53:38 +0000 (17:53 +0000)]
Add DX as a second return value register for i16 on x86.

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

16 years agoGeneralize getUnaryFloatFunction to handle any FP unary function, automatically
Chris Lattner [Wed, 9 Apr 2008 17:48:11 +0000 (17:48 +0000)]
Generalize getUnaryFloatFunction to handle any FP unary function, automatically
figuring out the suffix to use.  implement pow(2,x) -> exp2(x).

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

16 years agoremove capital letter from test name.
Chris Lattner [Wed, 9 Apr 2008 17:46:36 +0000 (17:46 +0000)]
remove capital letter from test name.

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

16 years agouse the new ConstantFP::get method to make this work with
Chris Lattner [Wed, 9 Apr 2008 17:17:35 +0000 (17:17 +0000)]
use the new ConstantFP::get method to make this work with
long double and simplify the code.

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

16 years agoConstantFP::get should be static.
Chris Lattner [Wed, 9 Apr 2008 17:16:28 +0000 (17:16 +0000)]
ConstantFP::get should be static.

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

16 years agoFix a bug where an incorrect bit mask would be generated if a target's last asm
Nate Begeman [Wed, 9 Apr 2008 16:24:11 +0000 (16:24 +0000)]
Fix a bug where an incorrect bit mask would be generated if a target's last asm
string began at a power of 2 in the string index.  For example, if "ret" started
at position 16, the ret instruction would be assigned code 16, but the mask would be AsmChars[] + Code & 15, not Code & 31.

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

16 years agoBe conservative if getresult operand is neither call nor invoke.
Devang Patel [Wed, 9 Apr 2008 15:58:24 +0000 (15:58 +0000)]
Be conservative if getresult operand is neither call nor invoke.

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

16 years agoFactor a bunch of functionality related to memcpy and memset transforms out of
Owen Anderson [Wed, 9 Apr 2008 08:23:16 +0000 (08:23 +0000)]
Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.

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

16 years agoRemove accidentally duplicated code.
Owen Anderson [Wed, 9 Apr 2008 07:55:01 +0000 (07:55 +0000)]
Remove accidentally duplicated code.

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

16 years agoUnbreak teh build.
Evan Cheng [Wed, 9 Apr 2008 07:06:01 +0000 (07:06 +0000)]
Unbreak teh build.

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

16 years agoadd a simplified accessor for creating an fp constant of a
Chris Lattner [Wed, 9 Apr 2008 06:38:30 +0000 (06:38 +0000)]
add a simplified accessor for creating an fp constant of a
particular value but variable type.

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

16 years agoMissed a hasInterval check.
Evan Cheng [Wed, 9 Apr 2008 01:30:15 +0000 (01:30 +0000)]
Missed a hasInterval check.

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

16 years agoadd a version of ConstantFP::get that doesn't take a redundant Type* value,
Chris Lattner [Wed, 9 Apr 2008 00:45:01 +0000 (00:45 +0000)]
add a version of ConstantFP::get that doesn't take a redundant Type* value,
start migrating code over to use it.

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

16 years agomany cleanups to the pow optimizer. Allow it to handle powf,
Chris Lattner [Wed, 9 Apr 2008 00:07:45 +0000 (00:07 +0000)]
many cleanups to the pow optimizer.  Allow it to handle powf,
add support for  pow(x, 2.0) -> x*x.

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

16 years agomake ConstantFP::isExactlyValue work for long double as well.
Chris Lattner [Wed, 9 Apr 2008 00:03:58 +0000 (00:03 +0000)]
make ConstantFP::isExactlyValue work for long double as well.

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

16 years agoAdd CreateGetResult()
Devang Patel [Tue, 8 Apr 2008 20:41:22 +0000 (20:41 +0000)]
Add CreateGetResult()

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

16 years agoCheck that bodies and calls but not declarations
Duncan Sands [Tue, 8 Apr 2008 19:31:52 +0000 (19:31 +0000)]
Check that bodies and calls but not declarations
are marked nounwind when compiling without
-fexceptions.

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

16 years agoRename -disable-required-unwind-tables to -unwind-tables-optional.
Dale Johannesen [Tue, 8 Apr 2008 18:10:08 +0000 (18:10 +0000)]
Rename -disable-required-unwind-tables to -unwind-tables-optional.

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

16 years agoRename -disable-required-unwind-tables to unwind-tables-optional.
Dale Johannesen [Tue, 8 Apr 2008 18:07:49 +0000 (18:07 +0000)]
Rename -disable-required-unwind-tables to unwind-tables-optional.

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

16 years agomerge r48768 from branches/ggreif/parallelized-test
Gabor Greif [Tue, 8 Apr 2008 15:22:41 +0000 (15:22 +0000)]
merge r48768 from branches/ggreif/parallelized-test

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

16 years agoAdd multiple value return instruction constructor.
Devang Patel [Tue, 8 Apr 2008 07:30:13 +0000 (07:30 +0000)]
Add multiple value return instruction constructor.

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

16 years agoConvenience method for setting the nounwind
Duncan Sands [Tue, 8 Apr 2008 07:23:58 +0000 (07:23 +0000)]
Convenience method for setting the nounwind
attribute for a function.

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

16 years agosilence warning when assertions are disabled.
Chris Lattner [Tue, 8 Apr 2008 05:49:09 +0000 (05:49 +0000)]
silence warning when assertions are disabled.

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

16 years agoFix insert point handling for multiple return values.
Devang Patel [Tue, 8 Apr 2008 02:24:08 +0000 (02:24 +0000)]
Fix insert point handling for multiple return values.

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

16 years agoHandle the situation in 2008-01-25-EmptyFunction.ll
Dale Johannesen [Tue, 8 Apr 2008 00:37:56 +0000 (00:37 +0000)]
Handle the situation in 2008-01-25-EmptyFunction.ll
correctly when unwind info is being generated.

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

16 years agoMissed one.
Dale Johannesen [Tue, 8 Apr 2008 00:14:59 +0000 (00:14 +0000)]
Missed one.

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

16 years agoAdd -disable-required-unwind-tables to tests
Dale Johannesen [Tue, 8 Apr 2008 00:14:17 +0000 (00:14 +0000)]
Add -disable-required-unwind-tables to tests
that need it (usually, grepping for some string
found in unwind info)

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

16 years agoImplement new llc flag -disable-required-unwind-tables.
Dale Johannesen [Tue, 8 Apr 2008 00:10:24 +0000 (00:10 +0000)]
Implement new llc flag -disable-required-unwind-tables.
Corresponds to -fno-unwind-tables (usually default in gcc).

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

16 years agoMake getDirnameSep a static method (not part of Path's interface).
Ted Kremenek [Mon, 7 Apr 2008 22:01:32 +0000 (22:01 +0000)]
Make getDirnameSep a static method (not part of Path's interface).

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

16 years agoAdded method Path::getDirname().
Ted Kremenek [Mon, 7 Apr 2008 21:53:57 +0000 (21:53 +0000)]
Added method Path::getDirname().

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

16 years agoAdded support for Create() calls that take an argument besides the
Sam Bishop [Mon, 7 Apr 2008 21:36:46 +0000 (21:36 +0000)]
Added support for Create() calls that take an argument besides the
deserializer.

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

16 years agoRename MemOperand to MachineMemOperand. This was suggested by
Dan Gohman [Mon, 7 Apr 2008 19:35:22 +0000 (19:35 +0000)]
Rename MemOperand to MachineMemOperand. This was suggested by
review feedback from Chris quite a while ago. No functionality
change.

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

16 years agoRemove llvm-upgrade.
Tanya Lattner [Mon, 7 Apr 2008 18:32:47 +0000 (18:32 +0000)]
Remove llvm-upgrade.

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

16 years agoAdded note to getting started guide to use llvm-gcc4.2.
Tanya Lattner [Mon, 7 Apr 2008 18:32:25 +0000 (18:32 +0000)]
Added note to getting started guide to use llvm-gcc4.2.
Removed llvm-upgrade from documentations.

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

16 years agoAdd operator= implementations to SparseBitVector, allowing it to be used in GVN....
Owen Anderson [Mon, 7 Apr 2008 17:38:23 +0000 (17:38 +0000)]
Add operator= implementations to SparseBitVector, allowing it to be used in GVN.  This results
in both time and memory savings for GVN.  For example, one testcase went from 10.5s to 6s with
this patch.

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

16 years agoTestcase for pr2169.
Duncan Sands [Mon, 7 Apr 2008 17:03:16 +0000 (17:03 +0000)]
Testcase for pr2169.

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

16 years agoFix test.
Evan Cheng [Mon, 7 Apr 2008 17:02:18 +0000 (17:02 +0000)]
Fix test.

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

16 years agoFix PR 2169.
Daniel Berlin [Mon, 7 Apr 2008 14:20:50 +0000 (14:20 +0000)]
Fix PR 2169.

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

16 years agoUse Intrinsic::getDeclaration in more places.
Duncan Sands [Mon, 7 Apr 2008 13:45:04 +0000 (13:45 +0000)]
Use Intrinsic::getDeclaration in more places.

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

16 years agoThe "stacksave is not nounwind problem" no longer
Duncan Sands [Mon, 7 Apr 2008 13:43:58 +0000 (13:43 +0000)]
The "stacksave is not nounwind problem" no longer
needs to be fixed here - a previous commit made sure
that intrinsics always get the right attributes.
So remove no-longer needed code, and while there use
Intrinsic::getDeclaration rather than getOrInsertFunction.

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

16 years agoUse Intrinsic::getDeclaration to get hold of
Duncan Sands [Mon, 7 Apr 2008 13:41:19 +0000 (13:41 +0000)]
Use Intrinsic::getDeclaration to get hold of
intrinsics.  Fix up the argument type (should
be i8*, was an array*).

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

16 years agoMake sure that intrinsics automagically get the
Duncan Sands [Mon, 7 Apr 2008 13:39:11 +0000 (13:39 +0000)]
Make sure that intrinsics automagically get the
right parameter attributes no matter how they
are obtained.

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

16 years agoRe-commit of the r48822, where the infinite looping problem discovered
Roman Levenstein [Mon, 7 Apr 2008 10:06:32 +0000 (10:06 +0000)]
Re-commit of the r48822, where the infinite looping problem discovered
by Dan Gohman is fixed.

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

16 years agoMake GVN more memory efficient, particularly on code that contains a large number of
Owen Anderson [Mon, 7 Apr 2008 09:59:07 +0000 (09:59 +0000)]
Make GVN more memory efficient, particularly on code that contains a large number of
allocations, which GVN can't optimize anyways.

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

16 years agoRemove tabs. Patch by Mike Stump!
Bill Wendling [Mon, 7 Apr 2008 05:47:52 +0000 (05:47 +0000)]
Remove tabs. Patch by Mike Stump!

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

16 years agoMark calls to llvm.stacksave, llvm.stackrestore as
Dale Johannesen [Mon, 7 Apr 2008 00:08:48 +0000 (00:08 +0000)]
Mark calls to llvm.stacksave, llvm.stackrestore as
nounwind.  When such calls are inlined into something
else that is invoked, they were getting changed to invokes,
which is badness.

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

16 years agoregenerate
Gabor Greif [Sun, 6 Apr 2008 23:07:54 +0000 (23:07 +0000)]
regenerate

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

16 years agofix warnings with assertions disabled.
Chris Lattner [Sun, 6 Apr 2008 21:50:58 +0000 (21:50 +0000)]
fix warnings with assertions disabled.

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

16 years agoSilence warning when no assertions.
Chris Lattner [Sun, 6 Apr 2008 21:46:45 +0000 (21:46 +0000)]
Silence warning when no assertions.

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

16 years agosilence a warning when assertions are disabled.
Chris Lattner [Sun, 6 Apr 2008 21:44:08 +0000 (21:44 +0000)]
silence a warning when assertions are disabled.

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

16 years agofix a warning
Gabor Greif [Sun, 6 Apr 2008 21:42:13 +0000 (21:42 +0000)]
fix a warning

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

16 years agofix this testcase to pass and remove a duplicate instance of itself.
Chris Lattner [Sun, 6 Apr 2008 21:39:17 +0000 (21:39 +0000)]
fix this testcase to pass and remove a duplicate instance of itself.

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

16 years agoPrefer to expand mask for xor to -1, so we have a chance to turn it into a not.
Torok Edwin [Sun, 6 Apr 2008 21:23:02 +0000 (21:23 +0000)]
Prefer to expand mask for xor to -1, so we have a chance to turn it into a not.
If it cannot be expanded, it will keep the old behaviour and try to shrink the constant.
Part of enhancement for PR2191.

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

16 years agoAPI changes for class Use size reduction, wave 1.
Gabor Greif [Sun, 6 Apr 2008 20:25:17 +0000 (20:25 +0000)]
API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.

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

16 years agoFix generation of multi-stage instruction itineraries. Patch by
Chris Lattner [Sun, 6 Apr 2008 17:38:14 +0000 (17:38 +0000)]
Fix generation of multi-stage instruction itineraries.  Patch by
giuma.cordes@gmail.com

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

16 years ago-fPIC is required on x86-64 when building shared objects.
Torok Edwin [Sun, 6 Apr 2008 12:42:29 +0000 (12:42 +0000)]
-fPIC is required on x86-64 when building shared objects.

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

16 years agodisable this for now.
Chris Lattner [Sat, 5 Apr 2008 04:12:01 +0000 (04:12 +0000)]
disable this for now.

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

16 years agoForgot this.
Evan Cheng [Sat, 5 Apr 2008 02:17:58 +0000 (02:17 +0000)]
Forgot this.

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

16 years ago1. IMPLICIT_DEF can *re-define* any register.
Evan Cheng [Sat, 5 Apr 2008 01:27:09 +0000 (01:27 +0000)]
1. IMPLICIT_DEF can *re-define* any register.
2. Coalescer can now create an interesting situation where a register def can
   reaches itself without being killed.

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

16 years agoFavors pshufd over shufps when shuffling elements from one vector. pshufd is faster...
Evan Cheng [Sat, 5 Apr 2008 00:30:36 +0000 (00:30 +0000)]
Favors pshufd over shufps when shuffling elements from one vector. pshufd is faster than shufps.

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

16 years agoMake sure both PendingLoads and PendingExports are flushed
Dale Johannesen [Fri, 4 Apr 2008 23:48:31 +0000 (23:48 +0000)]
Make sure both PendingLoads and PendingExports are flushed
before an invoke.  Failure to do this causes references in
the landing pad to variables that were not set.  Fixes
g++.dg/eh/delayslot1.C
g++.dg/eh/fp-regs.C
g++.old-deja/g++.brendan/eh1.C

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

16 years agostrdup needs <cstring>. This fixes a build error with g++-4.3.
Torok Edwin [Fri, 4 Apr 2008 16:08:00 +0000 (16:08 +0000)]
strdup needs <cstring>. This fixes a build error with g++-4.3.

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

16 years agoIf a value is cast to its own type, then the cast
Duncan Sands [Fri, 4 Apr 2008 08:28:13 +0000 (08:28 +0000)]
If a value is cast to its own type, then the cast
is not needed.

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

16 years agoProvide an initial cut at exposing JIT compiled symbols to performance
Chris Lattner [Fri, 4 Apr 2008 05:51:42 +0000 (05:51 +0000)]
Provide an initial cut at exposing JIT compiled symbols to performance
tools.  This is currently only enabled on the mac, but could easily be
supported by other hosts that are interested.

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

16 years agoMake ExecutionEngine::updateGlobalMapping return the old mapping.
Chris Lattner [Fri, 4 Apr 2008 04:47:41 +0000 (04:47 +0000)]
Make ExecutionEngine::updateGlobalMapping return the old mapping.

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

16 years agoUndo PHI elimination copy placement patch. This causes coalescing (performace) issues.
Evan Cheng [Fri, 4 Apr 2008 01:20:05 +0000 (01:20 +0000)]
Undo PHI elimination copy placement patch. This causes coalescing (performace) issues.

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

16 years agoThis is done.
Evan Cheng [Fri, 4 Apr 2008 01:19:03 +0000 (01:19 +0000)]
This is done.

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

16 years agoReenable running StripSymbols when EH is on.
Devang Patel [Thu, 3 Apr 2008 21:30:06 +0000 (21:30 +0000)]
Reenable running StripSymbols when EH is on.
Dale fixed EH.

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

16 years agoNew test case.
Evan Cheng [Thu, 3 Apr 2008 21:25:03 +0000 (21:25 +0000)]
New test case.

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

16 years agoRemoved a deleted file from the VStudio System project. Also added custom build...
Chuck Rose III [Thu, 3 Apr 2008 20:28:40 +0000 (20:28 +0000)]
Removed a deleted file from the VStudio System project.  Also added custom build commands to engage 64 bit assembler for compilation callback on 64 bit configurations only.

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

16 years agoif some functions don't have debug info, we were outputing the same label at the...
Andrew Lenharth [Thu, 3 Apr 2008 17:37:43 +0000 (17:37 +0000)]
if some functions don't have debug info, we were outputing the same label at the start of each of those functions.  This makes assemblers unhappy

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

16 years agoAdd member template version of SerializeTrait<T>::Create that also accepts
Ted Kremenek [Thu, 3 Apr 2008 16:44:37 +0000 (16:44 +0000)]
Add member template version of SerializeTrait<T>::Create that also accepts
an optional argument for us by T's Create method.

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

16 years ago- Turn copies of implicit_def into implicit_def instructions.
Evan Cheng [Thu, 3 Apr 2008 16:41:54 +0000 (16:41 +0000)]
- Turn copies of implicit_def into implicit_def instructions.
- Be smarter about coalescing copies from implicit_def.

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

16 years agoSpecial handling of zero-sized live intervals.
Evan Cheng [Thu, 3 Apr 2008 16:40:27 +0000 (16:40 +0000)]
Special handling of zero-sized live intervals.

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

16 years ago- Treat a live range defined by an implicit_def as a zero-sized one.
Evan Cheng [Thu, 3 Apr 2008 16:39:43 +0000 (16:39 +0000)]
- Treat a live range defined by an implicit_def as a zero-sized one.
- Eliminate an implicit_def when it's being spilled.

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

16 years ago- PHI elimination also eliminates implicit_def that fits into a PHI node rather than...
Evan Cheng [Thu, 3 Apr 2008 16:38:20 +0000 (16:38 +0000)]
- PHI elimination also eliminates implicit_def that fits into a PHI node rather than copying it.
- Be (slightly) smarter about where to place the copies.

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

16 years agoStart of a series of patches related to implicit_def.
Evan Cheng [Thu, 3 Apr 2008 16:36:07 +0000 (16:36 +0000)]
Start of a series of patches related to implicit_def.
There is no point in creating a long live range defined by an implicit_def. Scheduler now duplicates implicit_def instruction for each of its uses. Therefore, if an implicit_def node has multiple uses, it will become a number of very short live ranges, rather than a long one. This will make coalescer's job easier.

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

16 years agoRe-implemented Path::createDirectoryOnDisk (for Unix).
Ted Kremenek [Thu, 3 Apr 2008 16:11:31 +0000 (16:11 +0000)]
Re-implemented Path::createDirectoryOnDisk (for Unix).

This method allows one to create a directory, and optionally create all parent
directories that do not exist.

The original implementation would require that *all* directories along a path
are writable by the user, including directories that already exist. For example,
suppose we wanted to create the directory "/tmp/foo/bar", and the directory
"/tmp" already exists, but not "/tmp/foo". Since "/tmp" is writable by all
users, the original implementation would work, and create "/tmp/foo", followed
by "/tmp/bar".

A problem occurred, however if one wanted to created the directory
"/Users/myuser/bar" (or equivalently "/home/myuser/bar"), and "/Users/myuser"
already existed and is writable by the current user. The directory
"/User/myuser" is writable by the user, but "/User" is not. The original
implementation of createDirectoryOnDisk would return with failure since "/User"
is not writable, even though "/User/mysuser" is writable.

The new implementation works by recursively creating parents as needed, and thus
doesn't need to check the permissions on every directory in a path.

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