oota-llvm.git
14 years agoDo not rely on DenseMap slot which can be easily invalidated when DenseMap grows.
Devang Patel [Tue, 22 Jun 2010 05:16:56 +0000 (05:16 +0000)]
Do not rely on DenseMap slot which can be easily invalidated when DenseMap grows.

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

14 years agoRevert my change to clone named metadata. Buildbots are complaining.
Bob Wilson [Tue, 22 Jun 2010 02:08:51 +0000 (02:08 +0000)]
Revert my change to clone named metadata.  Buildbots are complaining.

--- Reverse-merging r106508 into '.':
U    lib/Transforms/Utils/CloneModule.cpp

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

14 years agoWhen unfolding a load, avoid assuming which instruction that
Dan Gohman [Tue, 22 Jun 2010 02:07:21 +0000 (02:07 +0000)]
When unfolding a load, avoid assuming which instruction that
kill and dead flags will end up on.

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

14 years agoUse single interface, using twine, to get named metadata.
Devang Patel [Tue, 22 Jun 2010 01:19:38 +0000 (01:19 +0000)]
Use single interface, using twine, to get named metadata.
getNamedMetadata().

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

14 years agoTail merging pass shall not break up IT blocks. rdar://8115404
Evan Cheng [Tue, 22 Jun 2010 01:18:16 +0000 (01:18 +0000)]
Tail merging pass shall not break up IT blocks. rdar://8115404

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

14 years agoDiscard special LLVM prefix from linkage name.
Devang Patel [Tue, 22 Jun 2010 01:06:05 +0000 (01:06 +0000)]
Discard special LLVM prefix from linkage name.

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

14 years agoDo not rely on Twine temporaries to survive.
Devang Patel [Tue, 22 Jun 2010 01:01:58 +0000 (01:01 +0000)]
Do not rely on Twine temporaries to survive.

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

14 years agomake sure to initialize indent_level
Chris Lattner [Tue, 22 Jun 2010 00:40:26 +0000 (00:40 +0000)]
make sure to initialize indent_level

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

14 years agoFix the new load-unfolding code to update LiveVariable's dead flags,
Dan Gohman [Tue, 22 Jun 2010 00:32:04 +0000 (00:32 +0000)]
Fix the new load-unfolding code to update LiveVariable's dead flags,
in addition to the kill flags.

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

14 years agoInclude named metadata when cloning a module.
Bob Wilson [Tue, 22 Jun 2010 00:11:03 +0000 (00:11 +0000)]
Include named metadata when cloning a module.

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

14 years agoFix typo.
Eric Christopher [Mon, 21 Jun 2010 23:49:08 +0000 (23:49 +0000)]
Fix typo.

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

14 years agoadd some support for blockaddress. This isn't really enough to be useful,
Chris Lattner [Mon, 21 Jun 2010 23:19:36 +0000 (23:19 +0000)]
add some support for blockaddress.  This isn't really enough to be useful,
but it will cover uses of blockaddress that are actually in a function.

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

14 years agoeliminate a mutable global variable, use raw_ostream::indent instead of
Chris Lattner [Mon, 21 Jun 2010 23:14:47 +0000 (23:14 +0000)]
eliminate a mutable global variable, use raw_ostream::indent instead of
rolling our own.

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

14 years agoun-indent a huge amount of code out of an anonymous namespace.
Chris Lattner [Mon, 21 Jun 2010 23:12:56 +0000 (23:12 +0000)]
un-indent a huge amount of code out of an anonymous namespace.

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

14 years agorevert r106482
Bruno Cardoso Lopes [Mon, 21 Jun 2010 22:59:03 +0000 (22:59 +0000)]
revert r106482

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

14 years agofix several bugs in the tutorial, patch by Kevin Kelley!
Chris Lattner [Mon, 21 Jun 2010 22:51:14 +0000 (22:51 +0000)]
fix several bugs in the tutorial, patch by Kevin Kelley!

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

14 years agoTeach two-address lowering how to unfold a load to open up commuting
Dan Gohman [Mon, 21 Jun 2010 22:17:20 +0000 (22:17 +0000)]
Teach two-address lowering how to unfold a load to open up commuting
opportunities. For example, this lets it emit this:

   movq (%rax), %rcx
   addq %rdx, %rcx

instead of this:

   movq %rdx, %rcx
   addq (%rax), %rcx

in the case where %rdx has subsequent uses. It's the same number
of instructions, and usually the same encoding size on x86, but
it appears faster, and in general, it may allow better scheduling
for the load.

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

14 years agochange parameter name to avoid confusion with global definition
Bruno Cardoso Lopes [Mon, 21 Jun 2010 21:28:07 +0000 (21:28 +0000)]
change parameter name to avoid confusion with global definition

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

14 years agosign_extend_inreg needs to be expanded for pre-v6 Thumb as well as ARM.
Bob Wilson [Mon, 21 Jun 2010 21:27:34 +0000 (21:27 +0000)]
sign_extend_inreg needs to be expanded for pre-v6 Thumb as well as ARM.
Radar 8104310.

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

14 years agoLEApcrelJT shouldn't be marked as neverHasSideEffects, as we don't want it
Jim Grosbach [Mon, 21 Jun 2010 21:27:27 +0000 (21:27 +0000)]
LEApcrelJT shouldn't be marked as neverHasSideEffects, as we don't want it
being moved around away from the jump table it references. rdar://8104340

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

14 years agoAdd unpack and interleave AVX instructions, encoding tests cooming soon
Bruno Cardoso Lopes [Mon, 21 Jun 2010 21:21:48 +0000 (21:21 +0000)]
Add unpack and interleave AVX instructions, encoding tests cooming soon

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

14 years agoFix PR7421: bug in kill transferring logic. It was ignoring loads / stores which...
Evan Cheng [Mon, 21 Jun 2010 21:21:14 +0000 (21:21 +0000)]
Fix PR7421: bug in kill transferring logic. It was ignoring loads / stores which have already been processed.

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

14 years agoThis makes example Makefile a lot more like actual
Chris Lattner [Mon, 21 Jun 2010 20:36:09 +0000 (20:36 +0000)]
This makes example Makefile a lot more like actual
lib/Transforms/Hello/Makefile, and prevents a lot of errors like "Assertion
`Inserted && "Pass registered multiple times!"' failed"

Patch by Gregory Petrosyan!

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

14 years agoRemove isTwoAddress from llvm.
Eric Christopher [Mon, 21 Jun 2010 20:35:09 +0000 (20:35 +0000)]
Remove isTwoAddress from llvm.

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

14 years ago"This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attribu...
Chris Lattner [Mon, 21 Jun 2010 20:35:01 +0000 (20:35 +0000)]
"This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attributes have now a \t before and after, as done for '.type'.

This makes the output look consistent, as well as help some third party assemblers expecting the attributes to be in the second column."

Patch by Arnaud de Grandmaison!

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

14 years agofix typos reported by Adam Warner!
Chris Lattner [Mon, 21 Jun 2010 20:31:30 +0000 (20:31 +0000)]
fix typos reported by Adam Warner!

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

14 years agoRemove isTwoAddress from SystemZ.
Eric Christopher [Mon, 21 Jun 2010 20:25:57 +0000 (20:25 +0000)]
Remove isTwoAddress from SystemZ.

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

14 years agoRemove isTwoAddress from Sparc.
Eric Christopher [Mon, 21 Jun 2010 20:22:35 +0000 (20:22 +0000)]
Remove isTwoAddress from Sparc.

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

14 years agoRemove isTwoAddress from Mips.
Eric Christopher [Mon, 21 Jun 2010 20:19:21 +0000 (20:19 +0000)]
Remove isTwoAddress from Mips.

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

14 years agoRemove isTwoAddress from Blackfin.
Eric Christopher [Mon, 21 Jun 2010 20:13:37 +0000 (20:13 +0000)]
Remove isTwoAddress from Blackfin.

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

14 years agoRemove isTwoAddress from MSP430.
Eric Christopher [Mon, 21 Jun 2010 20:07:30 +0000 (20:07 +0000)]
Remove isTwoAddress from MSP430.

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

14 years agoMake this test more robust in case LLVM ever decides to align the global
Dan Gohman [Mon, 21 Jun 2010 19:56:27 +0000 (19:56 +0000)]
Make this test more robust in case LLVM ever decides to align the global
variable differently.

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

14 years agoUse A.append(...) instead of A.insert(A.end(), ...) when A is a
Dan Gohman [Mon, 21 Jun 2010 19:47:52 +0000 (19:47 +0000)]
Use A.append(...) instead of A.insert(A.end(), ...) when A is a
SmallVector, and other SmallVector simplifications.

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

14 years agoMake 80-column.
Eric Christopher [Mon, 21 Jun 2010 18:56:55 +0000 (18:56 +0000)]
Make 80-column.

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

14 years agoRemove isTwoAddress from PIC16.
Eric Christopher [Mon, 21 Jun 2010 18:55:01 +0000 (18:55 +0000)]
Remove isTwoAddress from PIC16.

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

14 years agoRemove isTwoAddress from XCore.
Eric Christopher [Mon, 21 Jun 2010 18:51:38 +0000 (18:51 +0000)]
Remove isTwoAddress from XCore.

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

14 years agoRemove isTwoAddress from Alpha.
Eric Christopher [Mon, 21 Jun 2010 18:48:55 +0000 (18:48 +0000)]
Remove isTwoAddress from Alpha.

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

14 years agoMove several non-performance-critical member functinos out of line.
Dan Gohman [Mon, 21 Jun 2010 18:46:45 +0000 (18:46 +0000)]
Move several non-performance-critical member functinos out of line.

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

14 years agoAdd missing FileCheck call.
Dale Johannesen [Mon, 21 Jun 2010 18:46:08 +0000 (18:46 +0000)]
Add missing FileCheck call.

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

14 years agotest case for r106438.
Devang Patel [Mon, 21 Jun 2010 18:37:23 +0000 (18:37 +0000)]
test case for r106438.

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

14 years agoDo not directly use function names to construct new name for named metadata.
Devang Patel [Mon, 21 Jun 2010 18:36:58 +0000 (18:36 +0000)]
Do not directly use function names to construct new name for named metadata.
"llvm.dbg.lv.~A" is not a valid name.

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

14 years agoMove part of SSE 1 & 2 compare, shuffle and unpack instructions closely. Preparing...
Bruno Cardoso Lopes [Mon, 21 Jun 2010 18:36:04 +0000 (18:36 +0000)]
Move part of SSE 1 & 2 compare, shuffle and unpack instructions closely. Preparing them for refactoring and to the addition of their AVX forms

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

14 years agoAdd AVX regular (non-aliased ones) and,or,xor,andn packed instructions. They are...
Bruno Cardoso Lopes [Mon, 21 Jun 2010 18:22:54 +0000 (18:22 +0000)]
Add AVX regular (non-aliased ones) and,or,xor,andn packed instructions. They are already tested in the MC framework, no test needed

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

14 years agoFix PR 7433. Silly typo in non-Darwin ARM tail call
Dale Johannesen [Mon, 21 Jun 2010 18:21:49 +0000 (18:21 +0000)]
Fix PR 7433.  Silly typo in non-Darwin ARM tail call
handling, plus correct R9 handling in that mode.

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

14 years agoAdd some codegen patterns for x86_64-linux-gnu tls codegen matching.
Eric Christopher [Mon, 21 Jun 2010 18:21:27 +0000 (18:21 +0000)]
Add some codegen patterns for x86_64-linux-gnu tls codegen matching.

Based on a patch by Patrick Marlier!

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

14 years agoearly exit for dbg_value instructions
Jim Grosbach [Mon, 21 Jun 2010 17:49:23 +0000 (17:49 +0000)]
early exit for dbg_value instructions

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

14 years agoremove some dead variables reported by clang++
Chris Lattner [Mon, 21 Jun 2010 17:20:18 +0000 (17:20 +0000)]
remove some dead variables reported by clang++

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

14 years agomake the Value constructor protected.
Chris Lattner [Mon, 21 Jun 2010 16:46:37 +0000 (16:46 +0000)]
make the Value constructor protected.

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

14 years agoRevert r106422, which is breaking the non-fast-isel path.
Dan Gohman [Mon, 21 Jun 2010 16:02:28 +0000 (16:02 +0000)]
Revert r106422, which is breaking the non-fast-isel path.

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

14 years agoMore changes for non-top-down fast-isel.
Dan Gohman [Mon, 21 Jun 2010 15:13:54 +0000 (15:13 +0000)]
More changes for non-top-down fast-isel.

Split the code for materializing a value out of
SelectionDAGBuilder::getValue into a helper function, so that it can
be used in other ways. Add a new getNonRegisterValue function which
uses it, for use in code which doesn't want a CopyFromReg even
when FuncMap.ValueMap already has an entry for it.

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

14 years agoAdd the check to the testcase of r106419.
Kalle Raiskila [Mon, 21 Jun 2010 15:11:51 +0000 (15:11 +0000)]
Add the check to the testcase of r106419.

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

14 years agoMark the SPU 'lr' instruction to never have side effects.
Kalle Raiskila [Mon, 21 Jun 2010 15:08:16 +0000 (15:08 +0000)]
Mark the SPU 'lr' instruction to never have side effects.
This allows the fast regiser allocator to remove redundant
register moves.
Update a set of tests that depend on the register allocator
to be linear scan.

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

14 years agoFix the lowering of VECTOR_SHUFFLE on SPU to handle splats.
Kalle Raiskila [Mon, 21 Jun 2010 14:42:19 +0000 (14:42 +0000)]
Fix the lowering of VECTOR_SHUFFLE on SPU to handle splats.

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

14 years agoDo one lookup instead of two.
Dan Gohman [Mon, 21 Jun 2010 14:21:47 +0000 (14:21 +0000)]
Do one lookup instead of two.

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

14 years agoGeneralize this to look in the regular ValueMap in addition to
Dan Gohman [Mon, 21 Jun 2010 14:17:46 +0000 (14:17 +0000)]
Generalize this to look in the regular ValueMap in addition to
the LocalValueMap, to make it more flexible when fast-isel isn't
proceding straight top-down.

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

14 years agoFix an unintentional commit. I think I typed "git svn dcommit" in the wrong branch.
Rafael Espindola [Mon, 21 Jun 2010 13:31:32 +0000 (13:31 +0000)]
Fix an unintentional commit. I think I typed "git svn dcommit" in the wrong branch.

I was trying to do some refactoring on the copyRegToReg, but this is realyl a work in progress and not generally useful yet.

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

14 years agoFix lowering of VECTOR_SHUFFLE on SPU. Old algorithm
Kalle Raiskila [Mon, 21 Jun 2010 10:17:36 +0000 (10:17 +0000)]
Fix lowering of VECTOR_SHUFFLE on SPU. Old algorithm
used to choke llc with the attached test.

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

14 years agoadd_input_file and add_input_library now take const arguments, remove the
Rafael Espindola [Mon, 21 Jun 2010 02:23:12 +0000 (02:23 +0000)]
add_input_file and add_input_library now take const arguments, remove the
const_cast.

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

14 years agoSave more temps with -save-temps.
Rafael Espindola [Mon, 21 Jun 2010 02:17:36 +0000 (02:17 +0000)]
Save more temps with -save-temps.

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

14 years agowip
Rafael Espindola [Mon, 21 Jun 2010 02:17:34 +0000 (02:17 +0000)]
wip

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

14 years agoAdd support for returning multiple vectors via sret, which is how the ARM target...
Nate Begeman [Sun, 20 Jun 2010 21:09:52 +0000 (21:09 +0000)]
Add support for returning multiple vectors via sret, which is how the ARM target expects the intrinsics to work.

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

14 years agoFix warning in no-asserts build.
Nick Lewycky [Sun, 20 Jun 2010 20:27:42 +0000 (20:27 +0000)]
Fix warning in no-asserts build.

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

14 years agoFix a crash caused by dereference of MBB.end(). rdar://8110842
Evan Cheng [Sun, 20 Jun 2010 00:54:38 +0000 (00:54 +0000)]
Fix a crash caused by dereference of MBB.end(). rdar://8110842

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

14 years agoRestore a call to rememberInstruction which was accidentally dropped
Dan Gohman [Sat, 19 Jun 2010 22:50:35 +0000 (22:50 +0000)]
Restore a call to rememberInstruction which was accidentally dropped
in refactoring.

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

14 years agoAdd a TODO comment.
Dan Gohman [Sat, 19 Jun 2010 21:30:18 +0000 (21:30 +0000)]
Add a TODO comment.

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

14 years agoInclude the use kind along with the expression in the key of the
Dan Gohman [Sat, 19 Jun 2010 21:29:59 +0000 (21:29 +0000)]
Include the use kind along with the expression in the key of the
use sharing map. The reconcileNewOffset logic already forces a
separate use if the kinds differ, so incorporating the kind in the
key means we can track more sharing opportunities.

More sharing means fewer total uses to track, which means smaller
problem sizes, which means the conservative throttles don't kick
in as often.

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

14 years agoDon't include things in anonymous namespaces that don't need it.
Dan Gohman [Sat, 19 Jun 2010 21:21:39 +0000 (21:21 +0000)]
Don't include things in anonymous namespaces that don't need it.

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

14 years agoUse calloc instead of new/memset, it is more efficient when the set is very large.
Benjamin Kramer [Sat, 19 Jun 2010 17:00:31 +0000 (17:00 +0000)]
Use calloc instead of new/memset, it is more efficient when the set is very large.

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

14 years agoFix ScalarEvolution's "exhaustive" trip count evaluation code to avoid
Dan Gohman [Sat, 19 Jun 2010 14:17:24 +0000 (14:17 +0000)]
Fix ScalarEvolution's "exhaustive" trip count evaluation code to avoid
assuming that loops are in canonical form, as ScalarEvolution doesn't
depend on LoopSimplify itself. Also, with indirectbr not all loops can
be simplified. This fixes PR7416.

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

14 years agoFactor out duplicated code for reusing and inserting casts into
Dan Gohman [Sat, 19 Jun 2010 13:25:23 +0000 (13:25 +0000)]
Factor out duplicated code for reusing and inserting casts into
a helper function.

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

14 years agoTidy.
Bob Wilson [Sat, 19 Jun 2010 05:33:57 +0000 (05:33 +0000)]
Tidy.

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

14 years agoRemove a fixme comment that is no longer relevant.
Bob Wilson [Sat, 19 Jun 2010 05:32:41 +0000 (05:32 +0000)]
Remove a fixme comment that is no longer relevant.

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

14 years agoFix error message to match function name.
Bob Wilson [Sat, 19 Jun 2010 05:32:09 +0000 (05:32 +0000)]
Fix error message to match function name.

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

14 years agoRefactoring of regular logical packed instructions to prepare for AVX ones.
Bruno Cardoso Lopes [Sat, 19 Jun 2010 04:09:22 +0000 (04:09 +0000)]
Refactoring of regular logical packed instructions to prepare for AVX ones.

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

14 years agoRefactor aliased packed logical instructions, also add
Bruno Cardoso Lopes [Sat, 19 Jun 2010 02:44:01 +0000 (02:44 +0000)]
Refactor aliased packed logical instructions, also add
AVX AND,OR,XOR,NAND{P}{S,D}{rr,rm} instructions.

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

14 years agoIgnore dbg_value's.
Evan Cheng [Sat, 19 Jun 2010 02:36:21 +0000 (02:36 +0000)]
Ignore dbg_value's.

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

14 years agoMove new sse 1 & 2 generic classes to a more appropriate place
Bruno Cardoso Lopes [Sat, 19 Jun 2010 01:32:46 +0000 (01:32 +0000)]
Move new sse 1 & 2 generic classes to a more appropriate place

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

14 years agoRemove unnecessary arguments
Bruno Cardoso Lopes [Sat, 19 Jun 2010 01:22:34 +0000 (01:22 +0000)]
Remove unnecessary arguments

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

14 years agoAdd AVX packed intrinsics for MIN, MAX
Bruno Cardoso Lopes [Sat, 19 Jun 2010 01:17:05 +0000 (01:17 +0000)]
Add AVX packed intrinsics for MIN, MAX

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

14 years agoDisable sibcall optimization for Thumb1 for now since Thumb1RegisterInfo::emitEpilogu...
Evan Cheng [Sat, 19 Jun 2010 01:01:32 +0000 (01:01 +0000)]
Disable sibcall optimization for Thumb1 for now since Thumb1RegisterInfo::emitEpilogue is not expecting them.

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

14 years agoFinish ripping isTwoAddress out of X86. Some mindless formatting
Eric Christopher [Sat, 19 Jun 2010 00:37:40 +0000 (00:37 +0000)]
Finish ripping isTwoAddress out of X86.  Some mindless formatting
and operand renaming to help.

The giant turn the constraints on and selectively turn it off
should probably be inverted at some point since it's just largely
50/50.

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

14 years agoShrink down code and add for free AVX {MIN,MAX}P{S,D}{rm,rr} instructions
Bruno Cardoso Lopes [Sat, 19 Jun 2010 00:37:31 +0000 (00:37 +0000)]
Shrink down code and add for free AVX {MIN,MAX}P{S,D}{rm,rr} instructions

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

14 years agorip out dead code.
Chris Lattner [Sat, 19 Jun 2010 00:34:14 +0000 (00:34 +0000)]
rip out dead code.

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

14 years agofix rdar://7873482 by teaching the instruction encoder to emit
Chris Lattner [Sat, 19 Jun 2010 00:34:00 +0000 (00:34 +0000)]
fix rdar://7873482 by teaching the instruction encoder to emit
segment prefixes.  Daniel wrote most of this patch.

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

14 years agoIndentation and remove dead code.
Evan Cheng [Sat, 19 Jun 2010 00:11:54 +0000 (00:11 +0000)]
Indentation and remove dead code.

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

14 years agoClean up: remove now unnecessary Constraints
Bruno Cardoso Lopes [Sat, 19 Jun 2010 00:09:27 +0000 (00:09 +0000)]
Clean up: remove now unnecessary Constraints

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

14 years agoSilence compiler warnings.
Dan Gohman [Sat, 19 Jun 2010 00:02:06 +0000 (00:02 +0000)]
Silence compiler warnings.

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

14 years agomore refactoring! yay! big win over the intrinsics
Bruno Cardoso Lopes [Sat, 19 Jun 2010 00:00:22 +0000 (00:00 +0000)]
more refactoring! yay! big win over the intrinsics

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

14 years agoRemove isTwoAddress from here too.
Eric Christopher [Fri, 18 Jun 2010 23:56:07 +0000 (23:56 +0000)]
Remove isTwoAddress from here too.

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

14 years agoFix typo, SSE1 should be used by XS, not SSE2
Bruno Cardoso Lopes [Fri, 18 Jun 2010 23:53:27 +0000 (23:53 +0000)]
Fix typo, SSE1 should be used by XS, not SSE2

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

14 years agoRemove isTwoAddress from 64-bit files.
Eric Christopher [Fri, 18 Jun 2010 23:51:21 +0000 (23:51 +0000)]
Remove isTwoAddress from 64-bit files.

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

14 years agoMove ARM if-conversion before post-ra scheduling.
Evan Cheng [Fri, 18 Jun 2010 23:32:07 +0000 (23:32 +0000)]
Move ARM if-conversion before post-ra scheduling.

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

14 years agoTeach regular and fast isel to set dead flags on unused implicit defs
Dan Gohman [Fri, 18 Jun 2010 23:28:01 +0000 (23:28 +0000)]
Teach regular and fast isel to set dead flags on unused implicit defs
on calls and similar instructions.

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

14 years agoApply some refactor to packed instructions
Bruno Cardoso Lopes [Fri, 18 Jun 2010 23:13:35 +0000 (23:13 +0000)]
Apply some refactor to packed instructions

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

14 years agoUpdate cmake list.
Evan Cheng [Fri, 18 Jun 2010 23:12:10 +0000 (23:12 +0000)]
Update cmake list.

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

14 years agoThumb2 hazard recognizer.
Evan Cheng [Fri, 18 Jun 2010 23:11:35 +0000 (23:11 +0000)]
Thumb2 hazard recognizer.

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

14 years agoOnly run CoalesceExtSubRegs when we can expect LiveIntervalAnalysis to clean up
Jakob Stoklund Olesen [Fri, 18 Jun 2010 23:10:20 +0000 (23:10 +0000)]
Only run CoalesceExtSubRegs when we can expect LiveIntervalAnalysis to clean up
the inserted INSERT_SUBREGs after us.

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

14 years agoAllow ARM if-converter to be run after post allocation scheduling.
Evan Cheng [Fri, 18 Jun 2010 23:09:54 +0000 (23:09 +0000)]
Allow ARM if-converter to be run after post allocation scheduling.
- This fixed a number of bugs in if-converter, tail merging, and post-allocation
  scheduler. If-converter now runs branch folding / tail merging first to
  maximize if-conversion opportunities.
- Also changed the t2IT instruction slightly. It now defines the ITSTATE
  register which is read by instructions in the IT block.
- Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
  change the instruction ordering in the IT block (since IT mask has been
  finalized). It also ensures no other instructions can be scheduled between
  instructions in the IT block.

This is not yet enabled.

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

14 years agoback-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)
Jim Grosbach [Fri, 18 Jun 2010 23:03:10 +0000 (23:03 +0000)]
back-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)

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

14 years agoAnother typo.
Eric Christopher [Fri, 18 Jun 2010 22:51:25 +0000 (22:51 +0000)]
Another typo.

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