oota-llvm.git
14 years agoReapply Kevin's change 94440, now that Chris has fixed the limitation on
Bob Wilson [Thu, 25 Mar 2010 16:36:14 +0000 (16:36 +0000)]
Reapply Kevin's change 94440, now that Chris has fixed the limitation on
opcode values fitting in one byte (svn r99494).

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

14 years agoSketch a few Clang release notes.
Daniel Dunbar [Thu, 25 Mar 2010 16:09:18 +0000 (16:09 +0000)]
Sketch a few Clang release notes.

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

14 years agoAdd comment.
Devang Patel [Thu, 25 Mar 2010 15:09:44 +0000 (15:09 +0000)]
Add comment.

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

14 years agoFixed spurious warning problem noticed by Daniel Dunbar. The configure script
John Criswell [Thu, 25 Mar 2010 13:59:09 +0000 (13:59 +0000)]
Fixed spurious warning problem noticed by Daniel Dunbar.  The configure script
now configures prerequisite projects individually but also ignores them in the
big project switch statement to avoid the incorrect warning.

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

14 years agoMC/Mach-O: Switch to MCSectionData::getOrdinal.
Daniel Dunbar [Thu, 25 Mar 2010 08:08:54 +0000 (08:08 +0000)]
MC/Mach-O: Switch to MCSectionData::getOrdinal.

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

14 years agoScheduler assumes SDDbgValue nodes are in source order. That's true currently. But...
Evan Cheng [Thu, 25 Mar 2010 07:16:57 +0000 (07:16 +0000)]
Scheduler assumes SDDbgValue nodes are in source order. That's true currently. But add an assertion to verify it.

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

14 years agoMC: Explicity track section and fragment ordinals.
Daniel Dunbar [Thu, 25 Mar 2010 07:10:11 +0000 (07:10 +0000)]
MC: Explicity track section and fragment ordinals.

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

14 years agoFix -Asserts warning.
Daniel Dunbar [Thu, 25 Mar 2010 07:10:05 +0000 (07:10 +0000)]
Fix -Asserts warning.

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

14 years agolit: Add LitTestCase and lit.load_test_suite, for adapting lit based suites for
Daniel Dunbar [Thu, 25 Mar 2010 07:10:01 +0000 (07:10 +0000)]
lit: Add LitTestCase and lit.load_test_suite, for adapting lit based suites for
use with Python's unittest.

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

14 years agoChange tblgen to emit FOOISD opcode names as two
Chris Lattner [Thu, 25 Mar 2010 06:33:05 +0000 (06:33 +0000)]
Change tblgen to emit FOOISD opcode names as two
bytes instead of one byte.  This is important because
we're running up to too many opcodes to fit in a byte
and it is aggrevated by FIRST_TARGET_MEMORY_OPCODE
making the numbering sparse.  This just bites the
bullet and bloats out the table.  In practice, this
increases the size of the x86 isel table from 74.5K
to 76K.  I think we'll cope :)

This fixes rdar://7791648

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

14 years agoFix typo.
Devang Patel [Thu, 25 Mar 2010 06:26:14 +0000 (06:26 +0000)]
Fix typo.

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

14 years agoFix evil TableGen bug in template parameters with defaults.
Jakob Stoklund Olesen [Thu, 25 Mar 2010 06:23:34 +0000 (06:23 +0000)]
Fix evil TableGen bug in template parameters with defaults.

If a TableGen class has an initializer expression containing an X.Y subexpression,
AND X depends on template parameters,
AND those template parameters have defaults,
AND some parameters with defaults are beyond position 1,
THEN parts of the initializer expression are evaluated prematurely with the default values when the first explicit template parameter is substituted, before the remaining explicit template parameters have been substituted.

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

14 years agoInclude isFunctionLocal while calculating folding node set profile for a MDNode.
Devang Patel [Thu, 25 Mar 2010 06:04:47 +0000 (06:04 +0000)]
Include isFunctionLocal while calculating folding node set profile for a MDNode.

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

14 years agoRemove a fixme that doesn't make sense any more.
Evan Cheng [Thu, 25 Mar 2010 06:02:53 +0000 (06:02 +0000)]
Remove a fixme that doesn't make sense any more.

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

14 years agofix PR6642, GVN forwarding from memset to load of the base of the memset.
Chris Lattner [Thu, 25 Mar 2010 05:58:19 +0000 (05:58 +0000)]
fix PR6642, GVN forwarding from memset to load of the base of the memset.

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

14 years agoMake sure SDDbgValue.Invalid is initialized to false by all the constructors.
Evan Cheng [Thu, 25 Mar 2010 05:50:26 +0000 (05:50 +0000)]
Make sure SDDbgValue.Invalid is initialized to false by all the constructors.

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

14 years agoeliminate a bunch more parallels now that scheduling
Chris Lattner [Thu, 25 Mar 2010 05:44:01 +0000 (05:44 +0000)]
eliminate a bunch more parallels now that scheduling
handles dead implicit results more aggressively.  More
to come, I think this is now just a data entry problem.

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

14 years agoMake the NDEBUG assertion stronger and more clear what is
Chris Lattner [Thu, 25 Mar 2010 05:40:48 +0000 (05:40 +0000)]
Make the NDEBUG assertion stronger and more clear what is
happening.

Enhance scheduling to set the DEAD flag on implicit defs
more aggressively.  Before, we'd set an implicit def operand
to dead if it were present in the SDNode corresponding to
the machineinstr but had no use.  Now we do it in this case
AND if the implicit def does not exist in the SDNode at all.

This exposes a couple of problems: one is the FIXME, which
causes a live intervals crash on CodeGen/X86/sibcall.ll.
The second is that it makes machinecse and licm more
aggressive (which is a good thing) but also exposes a case
where licm hoists a set0 and then it doesn't get resunk.

Talking to codegen folks about both these issues, but I need
this patch in in the meantime.

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

14 years agoInclude isFunctionLocal while calculating folding node set provide for a MDNode.
Devang Patel [Thu, 25 Mar 2010 05:36:13 +0000 (05:36 +0000)]
Include isFunctionLocal while calculating folding node set provide for a MDNode.

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

14 years agoReapply r99451 with a fix to move the NoInline check to the cost functions
Eric Christopher [Thu, 25 Mar 2010 04:49:10 +0000 (04:49 +0000)]
Reapply r99451 with a fix to move the NoInline check to the cost functions
instead of InlineFunction.

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

14 years agoreapply 99444/99445, which I speculatively reverted in
Chris Lattner [Thu, 25 Mar 2010 04:41:16 +0000 (04:41 +0000)]
reapply 99444/99445, which I speculatively reverted in
r99453.

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

14 years agoMC: Route access to SectionData offset and file size through MCAsmLayout.
Daniel Dunbar [Thu, 25 Mar 2010 02:00:07 +0000 (02:00 +0000)]
MC: Route access to SectionData offset and file size through MCAsmLayout.

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

14 years agoMC: Route access to Fragment offset and effective size through MCAsmLayout.
Daniel Dunbar [Thu, 25 Mar 2010 02:00:02 +0000 (02:00 +0000)]
MC: Route access to Fragment offset and effective size through MCAsmLayout.

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

14 years agoMake sure this runs in 64-bit only, 32-bit won't produce the correct stores.
Eric Christopher [Thu, 25 Mar 2010 01:46:07 +0000 (01:46 +0000)]
Make sure this runs in 64-bit only, 32-bit won't produce the correct stores.

Fariborz please review and make sure this is what you meant.

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

14 years agoChange how dbg_value sdnodes are converted into machine instructions. Their placement...
Evan Cheng [Thu, 25 Mar 2010 01:38:16 +0000 (01:38 +0000)]
Change how dbg_value sdnodes are converted into machine instructions. Their placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers.

Here is a theoretical example that illustrates why the placement is important.

tmp1 =
store tmp1 -> x
...
tmp2 = add ...
...
call
...
store tmp2 -> x

Now mem2reg comes along:

tmp1 =
dbg_value (tmp1 -> x)
...
tmp2 = add ...
...
call
...
dbg_value (tmp2 -> x)

When the debugger examine the value of x after the add instruction but before the call, it should have the value of tmp1.

Furthermore, for dbg_value's that reference constants, they should not be emitted at the beginning of the block (since they do not have "producers").

This patch also cleans up how SDISel manages DbgValue nodes. It allow a SDNode to be referenced by multiple SDDbgValue nodes. When a SDNode is deleted, it uses the information to find the SDDbgValues and invalidate them. They are not deleted until the corresponding SelectionDAG is destroyed.

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

14 years agoMC: Eliminate MC{Fragment,{Section,Symbol}Data}::getAddress.
Daniel Dunbar [Thu, 25 Mar 2010 01:03:24 +0000 (01:03 +0000)]
MC: Eliminate MC{Fragment,{Section,Symbol}Data}::getAddress.

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

14 years agoMC: Fix refacto in MCExpr evaluation, I mistakenly replaced a fragment address with...
Daniel Dunbar [Thu, 25 Mar 2010 01:03:17 +0000 (01:03 +0000)]
MC: Fix refacto in MCExpr evaluation, I mistakenly replaced a fragment address with a symbol address.
 - This fixes the integrated-as nightly test regressions.

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

14 years agoAvoid being influenced by dbg_value instructions.
Evan Cheng [Thu, 25 Mar 2010 01:01:37 +0000 (01:01 +0000)]
Avoid being influenced by dbg_value instructions.

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

14 years agoFix unused parameter warning.
Eric Christopher [Thu, 25 Mar 2010 00:59:51 +0000 (00:59 +0000)]
Fix unused parameter warning.

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

14 years agoDisable folding loads into tail call in 32-bit PIC mode. It can introduce illegal...
Evan Cheng [Thu, 25 Mar 2010 00:10:31 +0000 (00:10 +0000)]
Disable folding loads into tail call in 32-bit PIC mode. It can introduce illegal code like this:

        addl    $12, %esp
        popl    %esi
        popl    %edi
        popl    %ebx
        popl    %ebp
        jmpl    *__Block_deallocator-L1$pb(%esi)  # TAILCALL

The problem is the global base register is assigned GR32 register class. TCRETURNmi needs the registers making up the address mode to have the GR32_TC register class.

The *proper* fix is for X86DAGToDAGISel::getGlobalBaseReg() to return a copy from the global base register of the machine function rather than returning the register itself. But that has the potential of causing it to be coalesced to a more restrictive register class: GR32_TC. It can introduce additional copies and spills. For something as important the PIC base, it's not worth it especially since this is not an issue on 64-bit.

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

14 years agoDocuemntation corrections from John Myers.
Dan Gohman [Thu, 25 Mar 2010 00:03:04 +0000 (00:03 +0000)]
Docuemntation corrections from John Myers.

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

14 years agorevert 99444/99445. This doesn't cause the failure of
Chris Lattner [Wed, 24 Mar 2010 23:41:19 +0000 (23:41 +0000)]
revert 99444/99445.  This doesn't cause the failure of
2006-07-19-stwbrx-crash.ll for me, but it's the only likely
patch in the blame list of several bots.  Lets see if this
fixes it.

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

14 years agoTemporarily revert this, it's causing an issue with an internal project.
Eric Christopher [Wed, 24 Mar 2010 23:35:21 +0000 (23:35 +0000)]
Temporarily revert this, it's causing an issue with an internal project.

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

14 years agoSpeculatively revert this to see if it fixes buildbot failures.
Bob Wilson [Wed, 24 Mar 2010 23:26:29 +0000 (23:26 +0000)]
Speculatively revert this to see if it fixes buildbot failures.
--- Reverse-merging r99440 into '.':
U    test/MC/AsmParser/X86/x86_32-bit_cat.s
U    test/MC/AsmParser/X86/x86_32-encoding.s
U    include/llvm/IntrinsicsX86.td
U    include/llvm/CodeGen/SelectionDAGNodes.h
U    lib/Target/X86/X86InstrSSE.td
U    lib/Target/X86/X86ISelLowering.h

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

14 years agoadd a convenient TargetInstrDesc::getNumImplicitUses/Defs method.
Chris Lattner [Wed, 24 Mar 2010 23:07:47 +0000 (23:07 +0000)]
add a convenient TargetInstrDesc::getNumImplicitUses/Defs method.

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

14 years agoremove dead argument.
Chris Lattner [Wed, 24 Mar 2010 22:47:12 +0000 (22:47 +0000)]
remove dead argument.

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

14 years agosplit EmitNode in half to reduce indentation.
Chris Lattner [Wed, 24 Mar 2010 22:45:47 +0000 (22:45 +0000)]
split EmitNode in half to reduce indentation.

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

14 years agoAdded the Advanced Encryption Standard (AES) Instructions.
Kevin Enderby [Wed, 24 Mar 2010 22:33:33 +0000 (22:33 +0000)]
Added the Advanced Encryption Standard (AES) Instructions.

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

14 years agoMake the use of the vmla and vmls VFP instructions controllable via cmd line.
Jim Grosbach [Wed, 24 Mar 2010 22:31:46 +0000 (22:31 +0000)]
Make the use of the vmla and vmls VFP instructions controllable via cmd line.
Preliminary testing shows significant performance wins by not using these
instructions.

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

14 years agoFixed the SS42AI template for the SSE 4.2 instructions with TA prefix so it does
Kevin Enderby [Wed, 24 Mar 2010 22:28:42 +0000 (22:28 +0000)]
Fixed the SS42AI template for the SSE 4.2 instructions with TA prefix so it does
not get an "Unknown immediate size" assert failure when used.  All instructions
of this form have an 8-bit immediate.  Also added a test case of an example
instruction that is of this form.

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

14 years agoPer chris's request, add some comments.
Nate Begeman [Wed, 24 Mar 2010 22:19:06 +0000 (22:19 +0000)]
Per chris's request, add some comments.

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

14 years agoUse SP filename directly instead of SP's context's filename.
Devang Patel [Wed, 24 Mar 2010 21:30:35 +0000 (21:30 +0000)]
Use SP filename directly instead of SP's context's filename.

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

14 years agoTrivial formating change.
Johnny Chen [Wed, 24 Mar 2010 21:25:07 +0000 (21:25 +0000)]
Trivial formating change.

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

14 years agoBUILD_VECTOR was missing out on some prime opportunities to use SSE 4.1 inserts.
Nate Begeman [Wed, 24 Mar 2010 20:49:50 +0000 (20:49 +0000)]
BUILD_VECTOR was missing out on some prime opportunities to use SSE 4.1 inserts.

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

14 years agoRevert Edwin's change that is breaking MultiSource/Applications/ClamAV/clamscan.
Bob Wilson [Wed, 24 Mar 2010 20:25:25 +0000 (20:25 +0000)]
Revert Edwin's change that is breaking MultiSource/Applications/ClamAV/clamscan.
--- Reverse-merging r99400 into '.':
D    test/CodeGen/Generic/2010-03-24-liveintervalleak.ll
U    lib/CodeGen/LiveIntervalAnalysis.cpp

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

14 years agoMove OptChkCall off LibCallOptimization into StrCpyOpt.
Evan Cheng [Wed, 24 Mar 2010 20:19:04 +0000 (20:19 +0000)]
Move OptChkCall off LibCallOptimization into StrCpyOpt.

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

14 years agoTrim #includes.
Dan Gohman [Wed, 24 Mar 2010 19:56:17 +0000 (19:56 +0000)]
Trim #includes.

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

14 years agoReverted r99326 which added NVdVmVCVTFrm, and later renamed to NVCVTFrm.
Johnny Chen [Wed, 24 Mar 2010 19:47:14 +0000 (19:47 +0000)]
Reverted r99326 which added NVdVmVCVTFrm, and later renamed to NVCVTFrm.
NVCVTFrm will later be used to describe "vcvt with fractional bits".

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

14 years agoFix minor style issues.
Dan Gohman [Wed, 24 Mar 2010 19:38:02 +0000 (19:38 +0000)]
Fix minor style issues.

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

14 years agoIt's not necessary to call raw_ostream::close explicitly on automatic
Dan Gohman [Wed, 24 Mar 2010 19:00:02 +0000 (19:00 +0000)]
It's not necessary to call raw_ostream::close explicitly on automatic
raw_ostream variables immediately before they go out of scope.

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

14 years agoDo not rely on getCompileUnit() to find source file information for a subprogram.
Devang Patel [Wed, 24 Mar 2010 18:48:00 +0000 (18:48 +0000)]
Do not rely on getCompileUnit() to find source file information for a subprogram.

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

14 years agoReverted r99376. The disassembler will deal with the 2-reg format of these two
Johnny Chen [Wed, 24 Mar 2010 18:46:34 +0000 (18:46 +0000)]
Reverted r99376.  The disassembler will deal with the 2-reg format of these two
N3VX instructions using special case code.

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

14 years agotweak the arm if conversion heuristic
Jim Grosbach [Wed, 24 Mar 2010 16:15:14 +0000 (16:15 +0000)]
tweak the arm if conversion heuristic

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

14 years agoFix memory leak in liveintervals: the destructor for VNInfos must be called,
Torok Edwin [Wed, 24 Mar 2010 13:50:36 +0000 (13:50 +0000)]
Fix memory leak in liveintervals: the destructor for VNInfos must be called,
otherwise the SmallVector it contains doesn't free its memory.
In most cases LiveIntervalAnalysis could get away by not calling the destructor,
because VNInfos are bumpptr-allocated, and smallvectors usually don't grow.
However when the SmallVector does grow it always leaks.

This is the valgrind shown leak from the original testcase:
==8206== 18,304 bytes in 151 blocks are definitely lost in loss record 164 of 164
==8206==    at 0x4A079C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==8206==    by 0x4DB7A7E: llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) (in /home/edwin/clam/git/builds/defaul
t/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4F90382: llvm::VNInfo::addKill(llvm::SlotIndex) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libcl
amav.so.6.1.0)
==8206==    by 0x5126B5C: llvm::LiveIntervals::handleVirtualRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::M
achineInstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int, llvm::LiveInterval&) (in /home/edwin/clam/git/builds/defau
lt/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x512725E: llvm::LiveIntervals::handleRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::MachineI
nstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav
.so.6.1.0)
==8206==    by 0x51278A8: llvm::LiveIntervals::computeIntervals() (in /home/edwin/clam/git/builds/default/libclamav/.libs/libc
lamav.so.6.1.0)
==8206==    by 0x5127CB4: llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&) (in /home/edwin/clam/git/builds/de
fault/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAE935: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAEB10: llvm::FunctionPassManagerImpl::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAED3D: llvm::FunctionPassManager::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclamav/.l
ibs/libclamav.so.6.1.0)
==8206==    by 0x4D8BE8E: llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4D8CA72: llvm::JIT::getPointerToFunction(llvm::Function*) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)

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

14 years agoFinally land the InvokeInst operand reordering.
Gabor Greif [Wed, 24 Mar 2010 13:21:49 +0000 (13:21 +0000)]
Finally land the InvokeInst operand reordering.
I have audited all getOperandNo calls now, fixing
hidden assumptions. CallSite related uglyness will
be eliminated successively.

Note this patch has a long and griveous history,
for all the back-and-forths have a look at
CallSite.h's log.

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

14 years agotighten a type and remove trailing whitespace, no functional changes
Gabor Greif [Wed, 24 Mar 2010 11:58:07 +0000 (11:58 +0000)]
tighten a type and remove trailing whitespace, no functional changes

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

14 years agoincrease const goodness and remove pointless getUser() calls
Gabor Greif [Wed, 24 Mar 2010 10:29:52 +0000 (10:29 +0000)]
increase const goodness and remove pointless getUser() calls

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

14 years agocache result of UI.getOperandNo() instead of calling it twice, it is cheaper this way
Gabor Greif [Wed, 24 Mar 2010 10:12:54 +0000 (10:12 +0000)]
cache result of UI.getOperandNo() instead of calling it twice, it is cheaper this way

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

14 years agoFix comment typo.
Duncan Sands [Wed, 24 Mar 2010 09:05:14 +0000 (09:05 +0000)]
Fix comment typo.

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

14 years agoMC: Direct all {fragment,section,symbol} address access through the MCAsmLayout object.
Daniel Dunbar [Wed, 24 Mar 2010 03:43:40 +0000 (03:43 +0000)]
MC: Direct all {fragment,section,symbol} address access through the MCAsmLayout object.

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

14 years agodbg_value may end a block.
Evan Cheng [Wed, 24 Mar 2010 01:50:28 +0000 (01:50 +0000)]
dbg_value may end a block.

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

14 years agoMark VMOVDneon and VMOVQ as having the N2RegFrm form to help the disassembler.
Johnny Chen [Wed, 24 Mar 2010 01:29:25 +0000 (01:29 +0000)]
Mark VMOVDneon and VMOVQ as having the N2RegFrm form to help the disassembler.

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

14 years agoSwitch INC8r to defining its pattern in terms of X86inc_flag
Chris Lattner [Wed, 24 Mar 2010 01:02:12 +0000 (01:02 +0000)]
Switch INC8r to defining its pattern in terms of X86inc_flag
and defining the add pattern with Pat<>, eliminating a use of
parallel.

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

14 years agoRenamed NVdVmImmFrm and NVdVmVCVTFrm to the more proper N2RegFrm and NVCVTFrm,
Johnny Chen [Wed, 24 Mar 2010 00:57:50 +0000 (00:57 +0000)]
Renamed NVdVmImmFrm and NVdVmVCVTFrm to the more proper N2RegFrm and NVCVTFrm,
respectively, and add some more comment.

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

14 years agoRemove the ConvertActions table and associated code, which is unused.
Dan Gohman [Wed, 24 Mar 2010 00:53:38 +0000 (00:53 +0000)]
Remove the ConvertActions table and associated code, which is unused.

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

14 years agoAdd a method to get a StringMapEntry from a pointer to the string
Chris Lattner [Wed, 24 Mar 2010 00:53:27 +0000 (00:53 +0000)]
Add a method to get a StringMapEntry from a pointer to the string
data it contains (similar to GetStringMapEntryFromValue).
Patch by Greg Clayton!

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

14 years agoswitch SDTBinaryArithWithFlags to be a multiple-result node as well.
Chris Lattner [Wed, 24 Mar 2010 00:49:29 +0000 (00:49 +0000)]
switch SDTBinaryArithWithFlags to be a multiple-result node as well.

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

14 years agoSwitch SDTUnaryArithWithFlags to being modeled as a two-result
Chris Lattner [Wed, 24 Mar 2010 00:47:47 +0000 (00:47 +0000)]
Switch SDTUnaryArithWithFlags to being modeled as a two-result
ISD node.  The only change in the generated isel code are comments
like:

<                 // Src: (X86dec_flag:i16 GR16:i16:$src)
---
>                 // Src: (X86dec_flag:i16:i32 GR16:i16:$src)

because now it knows that X86dec_flag returns both an i16 (for the result)
and an i32 (for EFLAGS) in this case.  Wewt.

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

14 years agoadd plumbing for handling multiple result nodes
Chris Lattner [Wed, 24 Mar 2010 00:41:19 +0000 (00:41 +0000)]
add plumbing for handling multiple result nodes
in some more places.

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

14 years agoFix coding style.
Dan Gohman [Wed, 24 Mar 2010 00:27:49 +0000 (00:27 +0000)]
Fix coding style.

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

14 years agoGeneralize findNearestCommonDominator to work on post-dominators,
Dan Gohman [Wed, 24 Mar 2010 00:22:24 +0000 (00:22 +0000)]
Generalize findNearestCommonDominator to work on post-dominators,
based on a suggestion by Jochen Wilhelmy.

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

14 years agoremove 64-bit or_is_add parallels.
Chris Lattner [Wed, 24 Mar 2010 00:16:52 +0000 (00:16 +0000)]
remove 64-bit or_is_add parallels.

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

14 years agoremove useless or_is_add parallel's.
Chris Lattner [Wed, 24 Mar 2010 00:15:23 +0000 (00:15 +0000)]
remove useless or_is_add parallel's.

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

14 years agoreduce nesting.
Chris Lattner [Wed, 24 Mar 2010 00:12:57 +0000 (00:12 +0000)]
reduce nesting.

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

14 years agoimplement SDTCisVTSmallerThanOp with EnforceSmallerThan
Chris Lattner [Wed, 24 Mar 2010 00:06:46 +0000 (00:06 +0000)]
implement SDTCisVTSmallerThanOp with EnforceSmallerThan
instead of reimplementing it wrong and poorly.

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

14 years agotry being more permissive for if-conversion on ARM V7. see what the nightly
Jim Grosbach [Wed, 24 Mar 2010 00:03:13 +0000 (00:03 +0000)]
try being more permissive for if-conversion on ARM V7. see what the nightly
test run permformance numbers say as to whether it helps.

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

14 years agobring sanity to EnforceVectorEltType
Chris Lattner [Wed, 24 Mar 2010 00:01:16 +0000 (00:01 +0000)]
bring sanity to EnforceVectorEltType

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

14 years agoCleanup getImplicitType
Chris Lattner [Tue, 23 Mar 2010 23:50:31 +0000 (23:50 +0000)]
Cleanup getImplicitType

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

14 years agoRevert "Add a late SSEDomainFix pass that twiddles SSE instructions to avoid domain...
Jakob Stoklund Olesen [Tue, 23 Mar 2010 23:48:51 +0000 (23:48 +0000)]
Revert "Add a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings."

This reverts commit 99345. It was breaking buildbots.

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

14 years agoMC: Sprinkle in some more interesting statistics.
Daniel Dunbar [Tue, 23 Mar 2010 23:47:14 +0000 (23:47 +0000)]
MC: Sprinkle in some more interesting statistics.

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

14 years agollvm-mc: Support -filetype=null, for timing purposes.
Daniel Dunbar [Tue, 23 Mar 2010 23:47:12 +0000 (23:47 +0000)]
llvm-mc: Support -filetype=null, for timing purposes.

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

14 years agollvm-mc: Fast path EvaluateAbsolute of constants.
Daniel Dunbar [Tue, 23 Mar 2010 23:47:07 +0000 (23:47 +0000)]
llvm-mc: Fast path EvaluateAbsolute of constants.

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

14 years agoreject void in intrinsic type lists.
Chris Lattner [Tue, 23 Mar 2010 23:46:27 +0000 (23:46 +0000)]
reject void in intrinsic type lists.

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

14 years ago[llvm_void_ty] is no longer needed for result types,
Chris Lattner [Tue, 23 Mar 2010 23:46:07 +0000 (23:46 +0000)]
[llvm_void_ty] is no longer needed for result types,
just use an empty result list.

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

14 years agoAdd a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings.
Jakob Stoklund Olesen [Tue, 23 Mar 2010 23:14:44 +0000 (23:14 +0000)]
Add a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings.

This is work in progress. So far, SSE execution domain tables are added to
X86InstrInfo, and a skeleton pass is enabled with -sse-domain-fix.

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

14 years agoRenamed NVdImmFrm to N1RegModImmFrm.
Johnny Chen [Tue, 23 Mar 2010 23:09:14 +0000 (23:09 +0000)]
Renamed NVdImmFrm to N1RegModImmFrm.

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

14 years agoRemove if DISABLED not if not DISABLED...
Bill Wendling [Tue, 23 Mar 2010 23:09:03 +0000 (23:09 +0000)]
Remove if DISABLED not if not DISABLED...

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

14 years agoadd some accessors to callsite/callinst/invokeinst to check
Chris Lattner [Tue, 23 Mar 2010 22:59:07 +0000 (22:59 +0000)]
add some accessors to callsite/callinst/invokeinst to check
for the noinline attribute, and make the inliner refuse to
inline a call site when the call site is marked noinline even
if the callee isn't.  This fixes PR6682.

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

14 years agoRevert 99335. getTypeToExpandTo's iterative behavior is actually
Dan Gohman [Tue, 23 Mar 2010 22:44:42 +0000 (22:44 +0000)]
Revert 99335. getTypeToExpandTo's iterative behavior is actually
needed here.

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

14 years agoUse "DISABLE_EDIS" to disable building "edis" explicitly. Don't build it for
Bill Wendling [Tue, 23 Mar 2010 22:15:33 +0000 (22:15 +0000)]
Use "DISABLE_EDIS" to disable building "edis" explicitly. Don't build it for
Apple-style builds.

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

14 years agoRemove getTypeToExpandTo, since it isn't adding much value
Dan Gohman [Tue, 23 Mar 2010 22:15:31 +0000 (22:15 +0000)]
Remove getTypeToExpandTo, since it isn't adding much value
beyond just calling getTypeToTransformTo.

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

14 years agomake sure to delete the llvm module before calling llvm_shutdown,
Chris Lattner [Tue, 23 Mar 2010 21:59:43 +0000 (21:59 +0000)]
make sure to delete the llvm module before calling llvm_shutdown,
this fixes crashes in error cases, PR6683

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

14 years agoDon't back past debug info intrinsics; SCEVExpander's strategy
Dan Gohman [Tue, 23 Mar 2010 21:53:22 +0000 (21:53 +0000)]
Don't back past debug info intrinsics; SCEVExpander's strategy
for ignoring debug info intrinsics everywhere else is to advance
past them, and it needs to be consistent.

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

14 years agofix an infinite loop in Module::getEndianness, PR6684
Chris Lattner [Tue, 23 Mar 2010 21:48:41 +0000 (21:48 +0000)]
fix an infinite loop in Module::getEndianness, PR6684
patch by Alex Mac!

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

14 years agoFix typo in the comment for N3VX class.
Johnny Chen [Tue, 23 Mar 2010 21:35:03 +0000 (21:35 +0000)]
Fix typo in the comment for N3VX class.

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

14 years agoAdd comment.
Johnny Chen [Tue, 23 Mar 2010 21:30:12 +0000 (21:30 +0000)]
Add comment.

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

14 years agoAdd New NEON Format NVdVmVCVTFrm.
Johnny Chen [Tue, 23 Mar 2010 21:25:38 +0000 (21:25 +0000)]
Add New NEON Format NVdVmVCVTFrm.
Converted some of the NEON vcvt instructions to this format.

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

14 years agoSkip debugging intrinsics when sinking unused invariants.
Bill Wendling [Tue, 23 Mar 2010 21:15:59 +0000 (21:15 +0000)]
Skip debugging intrinsics when sinking unused invariants.

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

14 years agoAdd New NEON Format NVdVmImmFrm.
Johnny Chen [Tue, 23 Mar 2010 20:40:44 +0000 (20:40 +0000)]
Add New NEON Format NVdVmImmFrm.

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

14 years agoIgnore dbg_value's.
Evan Cheng [Tue, 23 Mar 2010 20:36:12 +0000 (20:36 +0000)]
Ignore dbg_value's.

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