oota-llvm.git
14 years agoPreserve debug info for only extracted symbols.
Devang Patel [Thu, 1 Jul 2010 19:58:05 +0000 (19:58 +0000)]
Preserve debug info for only extracted symbols.

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

14 years agoDebugging infomration is encoded in llvm IR using metadata. This is designed
Devang Patel [Thu, 1 Jul 2010 19:49:20 +0000 (19:49 +0000)]
Debugging infomration is encoded in llvm IR using metadata. This is designed
such a way that debug info for symbols preserved even if symbols are
optimized away by the optimizer.

Add new special pass to remove debug info for such symbols.

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

14 years agoIf a named mdnode is removed then mark module as changed.
Devang Patel [Thu, 1 Jul 2010 18:27:46 +0000 (18:27 +0000)]
If a named mdnode is removed then mark module as changed.

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

14 years agoMove SSE3 Move patterns to a more appropriate section
Bruno Cardoso Lopes [Thu, 1 Jul 2010 17:35:02 +0000 (17:35 +0000)]
Move SSE3 Move patterns to a more appropriate section
Add AVX SSE3 packed horizontal and & sub instructions

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

14 years agoAdd AVX SSE3 packed addsub instructions
Bruno Cardoso Lopes [Thu, 1 Jul 2010 17:08:18 +0000 (17:08 +0000)]
Add AVX SSE3 packed addsub instructions

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

14 years agoback out r107396 for now, it needs another minor change to function as advertised
Gabor Greif [Thu, 1 Jul 2010 15:42:00 +0000 (15:42 +0000)]
back out r107396 for now, it needs another minor change to function as advertised

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

14 years agoevil hack to coerce external users (projects)
Gabor Greif [Thu, 1 Jul 2010 15:16:35 +0000 (15:16 +0000)]
evil hack to coerce external users (projects)
to update their code to high-level interfaces

If you get compile errors in your project
please update your code according to the
comments.

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

14 years agoTemporarily disable on-demand fast-isel.
Dan Gohman [Thu, 1 Jul 2010 12:15:30 +0000 (12:15 +0000)]
Temporarily disable on-demand fast-isel.

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

14 years agoreformulate CallSiteBase::getCallee to adapt to CallInst::ArgOffset, and make it...
Gabor Greif [Thu, 1 Jul 2010 11:26:05 +0000 (11:26 +0000)]
reformulate CallSiteBase::getCallee to adapt to CallInst::ArgOffset, and make it work even if CallInst::op_* are private

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

14 years agoreformulate CallSite::getCallee to adapt to CallInst::ArgOffset, and make it work...
Gabor Greif [Thu, 1 Jul 2010 10:41:37 +0000 (10:41 +0000)]
reformulate CallSite::getCallee to adapt to CallInst::ArgOffset, and make it work even if CallInst::op_* are private

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

14 years agoUse FuncInfo's isExportedInst accessor method instead of
Dan Gohman [Thu, 1 Jul 2010 03:57:05 +0000 (03:57 +0000)]
Use FuncInfo's isExportedInst accessor method instead of
doing the work manually.

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

14 years agoRename CreateRegForValue to CreateReg, and change its argument
Dan Gohman [Thu, 1 Jul 2010 03:55:39 +0000 (03:55 +0000)]
Rename CreateRegForValue to CreateReg, and change its argument
from a Value to a Type, because it doesn't actually care about
the Value.

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

14 years agoFast isel no longer needs DeadMachineInstrElim to clean up after it.
Dan Gohman [Thu, 1 Jul 2010 03:49:59 +0000 (03:49 +0000)]
Fast isel no longer needs DeadMachineInstrElim to clean up after it.

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

14 years agoTeach fast-isel to avoid loading a value from memory when it's already
Dan Gohman [Thu, 1 Jul 2010 03:49:38 +0000 (03:49 +0000)]
Teach fast-isel to avoid loading a value from memory when it's already
available in a register. This is pretty primitive, but it reduces the
number of instructions in common testcases by 4%.

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

14 years agoEnable on-demand fast-isel.
Dan Gohman [Thu, 1 Jul 2010 02:58:57 +0000 (02:58 +0000)]
Enable on-demand fast-isel.

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

14 years agoFix X86FastISel's add folding to actually work, and not fall back
Dan Gohman [Thu, 1 Jul 2010 02:58:21 +0000 (02:58 +0000)]
Fix X86FastISel's add folding to actually work, and not fall back
to SelectionDAG.

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

14 years agoAdd AVX SSE3 replicate and convert instructions
Bruno Cardoso Lopes [Thu, 1 Jul 2010 02:33:39 +0000 (02:33 +0000)]
Add AVX SSE3 replicate and convert instructions

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

14 years agoTeach X86FastISel to fold constant offsets and scaled indices in
Dan Gohman [Thu, 1 Jul 2010 02:27:15 +0000 (02:27 +0000)]
Teach X86FastISel to fold constant offsets and scaled indices in
the same address.

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

14 years agoReapply r106422, splitting the code for materializing a value out of
Dan Gohman [Thu, 1 Jul 2010 01:59:43 +0000 (01:59 +0000)]
Reapply r106422, splitting the code for materializing a value out of
SelectionDAGBuilder::getValue into a helper function, with fixes to
use DenseMaps safely.

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

14 years agoDon't use operator[] here, because it's not desirable to insert a default
Dan Gohman [Thu, 1 Jul 2010 01:33:21 +0000 (01:33 +0000)]
Don't use operator[] here, because it's not desirable to insert a default
value if the search fails.

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

14 years ago- Add AVX SSE2 Move doubleword and quadword instructions.
Bruno Cardoso Lopes [Thu, 1 Jul 2010 01:20:06 +0000 (01:20 +0000)]
- Add AVX SSE2 Move doubleword and quadword instructions.
- Add encode bits for VEX_W
- All 128-bit SSE 1 & SSE2 instructions that are described
  in the .td file now have a AVX encoded form already working.

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

14 years agoTest for the -filelist fix.
Mikhail Glushenkov [Thu, 1 Jul 2010 01:00:37 +0000 (01:00 +0000)]
Test for the -filelist fix.

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

14 years agoMake -filelist work with -linker=c++.
Mikhail Glushenkov [Thu, 1 Jul 2010 01:00:32 +0000 (01:00 +0000)]
Make -filelist work with -linker=c++.

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

14 years ago80-col violation.
Mikhail Glushenkov [Thu, 1 Jul 2010 01:00:27 +0000 (01:00 +0000)]
80-col violation.

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

14 years agoTrailing whitespace.
Mikhail Glushenkov [Thu, 1 Jul 2010 01:00:22 +0000 (01:00 +0000)]
Trailing whitespace.

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

14 years agoAdd memory operand folding support to InlineSpiller.
Jakob Stoklund Olesen [Thu, 1 Jul 2010 00:13:04 +0000 (00:13 +0000)]
Add memory operand folding support to InlineSpiller.

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

14 years agoAdd support for rematerialization to InlineSpiller.
Jakob Stoklund Olesen [Wed, 30 Jun 2010 23:03:52 +0000 (23:03 +0000)]
Add support for rematerialization to InlineSpiller.

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

14 years agoUse the catch-all selectors we already found when converting them to use the
Bill Wendling [Wed, 30 Jun 2010 22:49:53 +0000 (22:49 +0000)]
Use the catch-all selectors we already found when converting them to use the
correct catch-all value. This saves having to iterate through all of the
selectors in the program again.

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

14 years agolowerinvoke needs to handle aggregate function args like sjlj eh does.
Jim Grosbach [Wed, 30 Jun 2010 22:22:59 +0000 (22:22 +0000)]
lowerinvoke needs to handle aggregate function args like sjlj eh does.

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

14 years agobuild: Update install-clang target.
Daniel Dunbar [Wed, 30 Jun 2010 22:22:46 +0000 (22:22 +0000)]
build: Update install-clang target.

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

14 years agoHandle array and vector typed parameters in sjljehprepare like we do
Jim Grosbach [Wed, 30 Jun 2010 22:20:38 +0000 (22:20 +0000)]
Handle array and vector typed parameters in sjljehprepare like we do
structs. rdar://8145832

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

14 years agoRemove all debug info related named mdnodes.
Devang Patel [Wed, 30 Jun 2010 21:29:00 +0000 (21:29 +0000)]
Remove all debug info related named mdnodes.

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

14 years agogrammar tweak in comment.
Jim Grosbach [Wed, 30 Jun 2010 21:27:56 +0000 (21:27 +0000)]
grammar tweak in comment.

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

14 years agoIn ScalarEvolution::forgetValue, eliminate any SCEVUnknown
Dan Gohman [Wed, 30 Jun 2010 20:21:12 +0000 (20:21 +0000)]
In ScalarEvolution::forgetValue, eliminate any SCEVUnknown
entries associated with the value being erased in the
folding set map.  These entries used to be harmless, because
a SCEVUnknown doesn't store any information about its Value*,
so having a new Value allocated at the old Value's address
wasn't a problem. But now that ScalarEvolution is storing more
information about values, this is no longer safe.

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

14 years agoMove MOVD/MODQ code around, creating sections for each of them
Bruno Cardoso Lopes [Wed, 30 Jun 2010 18:49:10 +0000 (18:49 +0000)]
Move MOVD/MODQ code around, creating sections for each of them

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

14 years agoSome fool committed without testing (or even building) first.
Jakob Stoklund Olesen [Wed, 30 Jun 2010 18:41:20 +0000 (18:41 +0000)]
Some fool committed without testing (or even building) first.

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

14 years agoAdd AVX SSE2 mask creation and conditional store instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 18:38:10 +0000 (18:38 +0000)]
Add AVX SSE2 mask creation and conditional store instructions

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

14 years agoRemember to track spill slot uses in VirtRegMap when inserting loads and stores.
Jakob Stoklund Olesen [Wed, 30 Jun 2010 18:19:08 +0000 (18:19 +0000)]
Remember to track spill slot uses in VirtRegMap when inserting loads and stores.
LocalRewriter::runOnMachineFunction uses this information to mark dead spill
slots.

This means that InlineSpiller now also works for functions that spill.

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

14 years agoFix a bug introduced in r107211 where instructions with memory operands are declared...
Bruno Cardoso Lopes [Wed, 30 Jun 2010 18:06:01 +0000 (18:06 +0000)]
Fix a bug introduced in r107211 where instructions with memory operands are declared as commutable

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

14 years agoRevert the part of r107257 which introduced new logic for using
Dan Gohman [Wed, 30 Jun 2010 17:27:11 +0000 (17:27 +0000)]
Revert the part of r107257 which introduced new logic for using
nsw and nuw flags from IR Instructions. On further consideration,
this isn't valid.

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

14 years agoRename NextPowerOfTwo to RoundUpToPowerOfTwo.
Duncan Sands [Wed, 30 Jun 2010 17:24:28 +0000 (17:24 +0000)]
Rename NextPowerOfTwo to RoundUpToPowerOfTwo.

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

14 years agoRemove an unused variable. The call to getRoot has side-effects, so
Duncan Sands [Wed, 30 Jun 2010 17:22:28 +0000 (17:22 +0000)]
Remove an unused variable.  The call to getRoot has side-effects, so
this could break something (but doesn't seem to).

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

14 years agoAdd AVX SSE2 packed integer extract/insert instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 17:03:03 +0000 (17:03 +0000)]
Add AVX SSE2 packed integer extract/insert instructions

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

14 years agoClarify that the NextPowerOfTwo template is idempotent.
Duncan Sands [Wed, 30 Jun 2010 15:29:46 +0000 (15:29 +0000)]
Clarify that the NextPowerOfTwo template is idempotent.

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

14 years agoRather than giving SmallPtrSetImpl a member field SmallArray which is magically
Duncan Sands [Wed, 30 Jun 2010 15:02:37 +0000 (15:02 +0000)]
Rather than giving SmallPtrSetImpl a member field SmallArray which is magically
replaced by a bigger array in SmallPtrSet (by overridding it), instead just use a
pointer to the start of the storage, and have SmallPtrSet pass in the value to use.
This has the disadvantage that SmallPtrSet becomes bigger by one pointer.  It has
the advantage that it no longer uses tricky C++ rules, and is clearly correct while
I'm not sure the previous version was.  This was inspired by g++-4.6 pointing out
that SmallPtrSetImpl was writing off the end of SmallArray, which it was.  Since
SmallArray is replaced with a bigger array in SmallPtrSet, the write was still to
valid memory.  But it was writing off the end of the declared array type - sounds
kind of dubious to me, like it sounded dubious to g++-4.6.  Maybe g++-4.6 is wrong
and this construct is perfectly valid and correctly compiled by all compilers, but
I think it is better to avoid the whole can of worms by avoiding this construct.

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

14 years agouse ArgOperand API
Gabor Greif [Wed, 30 Jun 2010 13:45:50 +0000 (13:45 +0000)]
use ArgOperand API

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

14 years agouse ArgOperand API
Gabor Greif [Wed, 30 Jun 2010 13:03:37 +0000 (13:03 +0000)]
use ArgOperand API

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

14 years agouse ArgOperand API
Gabor Greif [Wed, 30 Jun 2010 12:55:46 +0000 (12:55 +0000)]
use ArgOperand API

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

14 years agouse ArgOperand API
Gabor Greif [Wed, 30 Jun 2010 12:42:43 +0000 (12:42 +0000)]
use ArgOperand API

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

14 years agouse ArgOperand API
Gabor Greif [Wed, 30 Jun 2010 12:40:35 +0000 (12:40 +0000)]
use ArgOperand API

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

14 years agouse CallSite::arg_end instead of CallInst::op_end
Gabor Greif [Wed, 30 Jun 2010 12:39:23 +0000 (12:39 +0000)]
use CallSite::arg_end instead of CallInst::op_end

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

14 years agouse getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
Gabor Greif [Wed, 30 Jun 2010 12:38:26 +0000 (12:38 +0000)]
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand

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

14 years agouse getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
Gabor Greif [Wed, 30 Jun 2010 09:19:23 +0000 (09:19 +0000)]
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand

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

14 years agouse getNumArgOperands instead of getNumOperands
Gabor Greif [Wed, 30 Jun 2010 09:17:53 +0000 (09:17 +0000)]
use getNumArgOperands instead of getNumOperands

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

14 years agouse getArgOperand instead of getOperand
Gabor Greif [Wed, 30 Jun 2010 09:16:16 +0000 (09:16 +0000)]
use getArgOperand instead of getOperand

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

14 years agouse getArgOperand instead of getOperand
Gabor Greif [Wed, 30 Jun 2010 09:15:28 +0000 (09:15 +0000)]
use getArgOperand instead of getOperand

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

14 years agouse getArgOperand instead of getOperand
Gabor Greif [Wed, 30 Jun 2010 09:14:26 +0000 (09:14 +0000)]
use getArgOperand instead of getOperand

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

14 years agoAdd a testcase for scev-aa's new capability.
Dan Gohman [Wed, 30 Jun 2010 07:17:47 +0000 (07:17 +0000)]
Add a testcase for scev-aa's new capability.

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

14 years agoImprove ScalarEvolution's nsw and nuw preservation.
Dan Gohman [Wed, 30 Jun 2010 07:16:37 +0000 (07:16 +0000)]
Improve ScalarEvolution's nsw and nuw preservation.

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

14 years agoWhen computing a new ConservativeResult, intersect it with
Dan Gohman [Wed, 30 Jun 2010 06:58:35 +0000 (06:58 +0000)]
When computing a new ConservativeResult, intersect it with
the old one instead of replacing it, to be more precise.

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

14 years agoRework scev-aa's basic computation so that it doesn't depend
Dan Gohman [Wed, 30 Jun 2010 06:12:16 +0000 (06:12 +0000)]
Rework scev-aa's basic computation so that it doesn't depend
on ScalarEvolution successfully folding and preserving
range information for both A-B and B-A. Now, if it gets
either one, it's sufficient.

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

14 years agoSimplify.
Dan Gohman [Wed, 30 Jun 2010 06:09:46 +0000 (06:09 +0000)]
Simplify.

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

14 years agoAdd AVX SSE2 integer unpack instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 04:06:39 +0000 (04:06 +0000)]
Add AVX SSE2 integer unpack instructions

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

14 years agoAdd AVX SSE2 packed integer shuffle instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 03:47:56 +0000 (03:47 +0000)]
Add AVX SSE2 packed integer shuffle instructions

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

14 years agoRemove trailing whitespace, no functionality changes.
John Mosby [Wed, 30 Jun 2010 03:40:54 +0000 (03:40 +0000)]
Remove trailing whitespace, no functionality changes.

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

14 years agoSmall refactoring of SSE2 packed integer shuffle instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 03:29:36 +0000 (03:29 +0000)]
Small refactoring of SSE2 packed integer shuffle instructions

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

14 years agoAdd AVX SSE2 pack with saturation integer instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 02:30:25 +0000 (02:30 +0000)]
Add AVX SSE2 pack with saturation integer instructions

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

14 years agoAdd AVX SSE2 integer packed compare instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 02:21:09 +0000 (02:21 +0000)]
Add AVX SSE2 integer packed compare instructions

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

14 years ago- Add AVX form of all SSE2 logical instructions
Bruno Cardoso Lopes [Wed, 30 Jun 2010 01:58:37 +0000 (01:58 +0000)]
- Add AVX form of all SSE2 logical instructions
- Add VEX encoding bits to x86 MRM0r-MRM7r

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

14 years agoDo not construct DIE for already processed MDNode.
Devang Patel [Wed, 30 Jun 2010 01:40:11 +0000 (01:40 +0000)]
Do not construct DIE for already processed MDNode.

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

14 years agoUse skipInstruction() as a simpler way of iterating over instructions using SrcReg
Jakob Stoklund Olesen [Wed, 30 Jun 2010 00:30:36 +0000 (00:30 +0000)]
Use skipInstruction() as a simpler way of iterating over instructions using SrcReg

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

14 years agoUse clEnumValN macro to work around keyword clash
Jakob Stoklund Olesen [Wed, 30 Jun 2010 00:24:51 +0000 (00:24 +0000)]
Use clEnumValN macro to work around keyword clash

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

14 years agoAdd variables into a scope before constructing scope DIE otherwise variables won...
Devang Patel [Wed, 30 Jun 2010 00:11:08 +0000 (00:11 +0000)]
Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.

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

14 years agoBegin implementation of an inline spiller.
Jakob Stoklund Olesen [Tue, 29 Jun 2010 23:58:39 +0000 (23:58 +0000)]
Begin implementation of an inline spiller.

InlineSpiller inserts loads and spills immediately instead of deferring to
VirtRegMap. This is possible now because SlotIndexes allows instructions to be
inserted and renumbered.

This is work in progress, and is mostly a copy of TrivialSpiller so far. It
works very well for functions that don't require spilling.

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

14 years agoAdd *several* AVX integer packed binop instructions
Bruno Cardoso Lopes [Tue, 29 Jun 2010 23:47:49 +0000 (23:47 +0000)]
Add *several* AVX integer packed binop instructions

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

14 years agoFix ScalarEvolution's tripcount computation for chains of loops
Dan Gohman [Tue, 29 Jun 2010 23:43:06 +0000 (23:43 +0000)]
Fix ScalarEvolution's tripcount computation for chains of loops
where each loop's induction variable's start value is the exit
value of a preceding loop.

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

14 years agoRevert r107205 and r107207.
Bill Wendling [Tue, 29 Jun 2010 22:34:52 +0000 (22:34 +0000)]
Revert r107205 and r107207.

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

14 years agoPrint InlinedAt location.
Devang Patel [Tue, 29 Jun 2010 22:29:15 +0000 (22:29 +0000)]
Print InlinedAt location.

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

14 years agoAdd another bswap idiom that isn't matched.
Eric Christopher [Tue, 29 Jun 2010 22:22:22 +0000 (22:22 +0000)]
Add another bswap idiom that isn't matched.

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

14 years agoUse -l option to remove symbols from i386.
Bill Wendling [Tue, 29 Jun 2010 22:17:37 +0000 (22:17 +0000)]
Use -l option to remove symbols from i386.

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

14 years agoMove SSE2 Packed Integer instructions around, and create specific sections for each...
Bruno Cardoso Lopes [Tue, 29 Jun 2010 22:12:16 +0000 (22:12 +0000)]
Move SSE2 Packed Integer instructions around, and create specific sections for each of them

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

14 years agoPrint InlinedAt location.
Devang Patel [Tue, 29 Jun 2010 21:51:32 +0000 (21:51 +0000)]
Print InlinedAt location.

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

14 years agoImprove explanation.
Bill Wendling [Tue, 29 Jun 2010 21:41:58 +0000 (21:41 +0000)]
Improve explanation.

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

14 years agoAdd AVX Move Aligned/Unaligned packed integers
Bruno Cardoso Lopes [Tue, 29 Jun 2010 21:25:12 +0000 (21:25 +0000)]
Add AVX Move Aligned/Unaligned packed integers

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

14 years agoIntroducing the "linker_weak" linkage type. This will be used for Objective-C
Bill Wendling [Tue, 29 Jun 2010 21:24:00 +0000 (21:24 +0000)]
Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

       .globl l_objc_msgSend_fixup_alloc
       .weak_definition l_objc_msgSend_fixup_alloc
       .section __DATA, __objc_msgrefs, coalesced
       .align 3
l_objc_msgSend_fixup_alloc:
        .quad   _objc_msgSend_fixup
        .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

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

14 years agoAdd AVX ld/st XCSR register.
Bruno Cardoso Lopes [Tue, 29 Jun 2010 20:35:48 +0000 (20:35 +0000)]
Add AVX ld/st XCSR register.
Add VEX encoding bits for MRMXm x86 form

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

14 years agoDo not hardcode DW_AT_stmt_list value.
Devang Patel [Tue, 29 Jun 2010 20:17:53 +0000 (20:17 +0000)]
Do not hardcode DW_AT_stmt_list value.
Inspired by Artur Pietrek.

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

14 years agoAdd support for encoding VDUP (ARM core register) instructions.
Bob Wilson [Tue, 29 Jun 2010 20:13:29 +0000 (20:13 +0000)]
Add support for encoding VDUP (ARM core register) instructions.

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

14 years agoFix a buffer overflow noticed by gcc-4.6: zero is written into
Duncan Sands [Tue, 29 Jun 2010 20:12:02 +0000 (20:12 +0000)]
Fix a buffer overflow noticed by gcc-4.6: zero is written into
SmallArray[SmallSize] in the SmallPtrSetIteratorImpl, and this is
one off the end of the array.  For those who care, right now gcc
warns about writing off the end because it is confused about the
declaration of SmallArray as having length 1 in the parent class
SmallPtrSetIteratorImpl.  However if you tweak code to unconfuse
it, then it still warns about writing off the end of the array,
because of this buffer overflow.  In short, even with this fix
gcc-4.6 will warn about writing off the end of the array, but now
that is only because it is confused.

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

14 years agoNextPowerOfTwo was already used to ensure that SmallSizePowTwo is a power
Duncan Sands [Tue, 29 Jun 2010 20:05:34 +0000 (20:05 +0000)]
NextPowerOfTwo was already used to ensure that SmallSizePowTwo is a power
of two, no need to do it a second time (NextPowerOfTwo is idempotent).

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

14 years agogive PATypeHolder an explicit copy ctor which initializes the type pointer,
Chris Lattner [Tue, 29 Jun 2010 19:20:38 +0000 (19:20 +0000)]
give PATypeHolder an explicit copy ctor which initializes the type pointer,
and make PATypeHolder work with null pointers.

The implicitly generated one didn't work on numerous levels, but was still
accepted, allowing all sorts of bugs with default constructed pa type holders.

Previously, they "sort of" worked if they were default constructed and then
destructed.  Now they really work, and you can even default construct one,
then assign to it, amazing.

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

14 years agoFix the handling of partial redefines in the fast register allocator.
Jakob Stoklund Olesen [Tue, 29 Jun 2010 19:15:30 +0000 (19:15 +0000)]
Fix the handling of partial redefines in the fast register allocator.

A partial redefine needs to be treated like a tied operand, and the register
must be reloaded while processing use operands.

This fixes a bug where partially redefined registers were processed as normal
defs with a reload added. The reload could clobber another use operand if it was
a kill that allowed register reuse.

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

14 years agoFix a register scavenger crash when dealing with undefined subregs.
Bob Wilson [Tue, 29 Jun 2010 18:42:49 +0000 (18:42 +0000)]
Fix a register scavenger crash when dealing with undefined subregs.
The LowerSubregs pass needs to preserve implicit def operands attached to
EXTRACT_SUBREG instructions when it replaces those instructions with copies.

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

14 years agoAdd AVX non-temporal stores
Bruno Cardoso Lopes [Tue, 29 Jun 2010 18:22:01 +0000 (18:22 +0000)]
Add AVX non-temporal stores

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

14 years agoAdd a few more interesting testcases.
Dan Gohman [Tue, 29 Jun 2010 18:17:11 +0000 (18:17 +0000)]
Add a few more interesting testcases.

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

14 years agoFix whitespace style.
Dan Gohman [Tue, 29 Jun 2010 18:12:34 +0000 (18:12 +0000)]
Fix whitespace style.

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

14 years agoMove non-temporal movs to their own section
Bruno Cardoso Lopes [Tue, 29 Jun 2010 17:42:37 +0000 (17:42 +0000)]
Move non-temporal movs to their own section

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

14 years agoAdd support for encoding NEON VMOV (from core register to scalar) instructions.
Bob Wilson [Tue, 29 Jun 2010 17:34:07 +0000 (17:34 +0000)]
Add support for encoding NEON VMOV (from core register to scalar) instructions.
The encoding is the same as VMOV (from scalar to core register) except that
the operands are in different places.

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

14 years agoAdd sqrt, rsqrt and rcp AVX instructions
Bruno Cardoso Lopes [Tue, 29 Jun 2010 17:26:30 +0000 (17:26 +0000)]
Add sqrt, rsqrt and rcp AVX instructions

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

14 years agoskip dbg_value instructions
Jim Grosbach [Tue, 29 Jun 2010 16:55:24 +0000 (16:55 +0000)]
skip dbg_value instructions

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