oota-llvm.git
14 years agoimprove portability to minix, patch by
Chris Lattner [Fri, 26 Mar 2010 23:54:15 +0000 (23:54 +0000)]
improve portability to minix, patch by
Kees van Reeuwijk for PR6704

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

14 years agoRemove the duplicate multiclass N3VSh_QHSD and use N3VInt_QHSD which is modified
Johnny Chen [Fri, 26 Mar 2010 23:49:07 +0000 (23:49 +0000)]
Remove the duplicate multiclass N3VSh_QHSD and use N3VInt_QHSD which is modified
to now take a format argument.  N3VDInt<> and N3VQInt<> are modified to take a
format argument as well.

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

14 years agoIf we mark clean-ups as clean-ups, then it could break when inlining through an
Bill Wendling [Fri, 26 Mar 2010 23:41:30 +0000 (23:41 +0000)]
If we mark clean-ups as clean-ups, then it could break when inlining through an
'invoke' instruction. You will get a situation like this:

bb:
  %ehptr = eh.exception()
  %sel = eh.selector(%ehptr, @per, 0);

...

bb2:
  invoke _Unwind_Resume_or_Rethrow(%ehptr) %normal unwind to %lpad

lpad:
  ...

The unwinder will see the %sel call as a clean-up and, if it doesn't have a
catch further up the call stack, it will skip running it. But there *is* another
catch up the stack -- the catch for the %lpad. However, we can't see that. This
is fixed in code-gen, where we detect this situation, and convert the "clean-up"
selector call into a "catch-all" selector call. This gives us the correct
semantics.

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

14 years agoAdd NVExtFrm to represent NEON Vector Extract Instructions, that uses Inst{11-8}
Johnny Chen [Fri, 26 Mar 2010 22:28:56 +0000 (22:28 +0000)]
Add NVExtFrm to represent NEON Vector Extract Instructions, that uses Inst{11-8}
to encode the byte location of the extracted result in the concatenation of the
operands, from the least significant end.

Modify VEXTd and VEXTq classes to use the format.

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

14 years agoremove a constructor implementation that isn't declared
Chris Lattner [Fri, 26 Mar 2010 22:17:24 +0000 (22:17 +0000)]
remove a constructor implementation that isn't declared
in the header.  How can both clang and gcc accept this?

PR6703

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

14 years agoAdd few missed libcalls and correct names for others.
Anton Korobeynikov [Fri, 26 Mar 2010 21:32:14 +0000 (21:32 +0000)]
Add few missed libcalls and correct names for others.

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

14 years agoAdd N3RegVShFrm to represent 3-Register Vector Shift Instructions, which do not
Johnny Chen [Fri, 26 Mar 2010 21:26:28 +0000 (21:26 +0000)]
Add N3RegVShFrm to represent 3-Register Vector Shift Instructions, which do not
follow the N3RegFrm's operand order of D:Vd N:Vn M:Vm.  The operand order of
N3RegVShFrm is D:Vd M:Vm N:Vn (notice that M:Vm is the first src operand).

Add a parent class N3Vf which requires passing a Format argument and which the
N3V class is modified to inherit from.  N3V class represents the "normal"
3-Register NEON Instructions with N3RegFrm.

Also add a multiclass N3VSh_QHSD to represent clusters of NEON 3-Register Shift
Instructions and replace 8 invocations with it.

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

14 years agofix iterator name
Gabor Greif [Fri, 26 Mar 2010 19:59:25 +0000 (19:59 +0000)]
fix iterator name

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

14 years agoMinor grammar and html fixes.
Dan Gohman [Fri, 26 Mar 2010 19:51:14 +0000 (19:51 +0000)]
Minor grammar and html fixes.

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

14 years agosome more tweaks
Gabor Greif [Fri, 26 Mar 2010 19:40:38 +0000 (19:40 +0000)]
some more tweaks

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

14 years agoTell "the rest of the story" about LLVM's iterators' implicit conversions.
Dan Gohman [Fri, 26 Mar 2010 19:39:05 +0000 (19:39 +0000)]
Tell "the rest of the story" about LLVM's iterators' implicit conversions.

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

14 years agofix formatting and a validation fail
Gabor Greif [Fri, 26 Mar 2010 19:35:48 +0000 (19:35 +0000)]
fix formatting and a validation fail

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

14 years agoadd a blurb on const versions of chain traversals and a word of caution
Gabor Greif [Fri, 26 Mar 2010 19:30:47 +0000 (19:30 +0000)]
add a blurb on const versions of chain traversals and a word of caution

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

14 years agoDebug info shouldn't affect kills.
Dale Johannesen [Fri, 26 Mar 2010 19:21:26 +0000 (19:21 +0000)]
Debug info shouldn't affect kills.

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

14 years agoAdd a paragram describing how to extract line number information.
Devang Patel [Fri, 26 Mar 2010 19:08:36 +0000 (19:08 +0000)]
Add a paragram describing how to extract line number information.

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

14 years agohttp://englishplus.com/grammar/00000296.htm
Gabor Greif [Fri, 26 Mar 2010 19:04:42 +0000 (19:04 +0000)]
http://englishplus.com/grammar/00000296.htm

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

14 years agoFix SmallVector's insert to handle non-random-access iterators.
Dan Gohman [Fri, 26 Mar 2010 18:53:37 +0000 (18:53 +0000)]
Fix SmallVector's insert to handle non-random-access iterators.

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

14 years agovldm/vstm can only do up to 16 double-word registers at a time.
Jim Grosbach [Fri, 26 Mar 2010 18:41:09 +0000 (18:41 +0000)]
vldm/vstm can only do up to 16 double-word registers at a time.
Radar 7797856

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

14 years agoAdd N3RegFrm to represent "NEON 3 vector register format" instructions.
Johnny Chen [Fri, 26 Mar 2010 18:32:20 +0000 (18:32 +0000)]
Add N3RegFrm to represent "NEON 3 vector register format" instructions.
Examples are VABA (Vector Absolute Difference and Accumulate), VABAL (Vector
Absolute Difference and Accumulate Long), and VABD (Vector Absolute Difference).

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

14 years agoDo not sibcall if stack needs to be dynamically aligned.
Evan Cheng [Fri, 26 Mar 2010 16:26:03 +0000 (16:26 +0000)]
Do not sibcall if stack needs to be dynamically aligned.

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

14 years agoAllow trivial sibcall of vararg callee when no arguments are being passed.
Evan Cheng [Fri, 26 Mar 2010 02:13:13 +0000 (02:13 +0000)]
Allow trivial sibcall of vararg callee when no arguments are being passed.

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

14 years agoLiveVariables should clear kill / dead markers first. This allows us to remove a...
Evan Cheng [Fri, 26 Mar 2010 02:12:24 +0000 (02:12 +0000)]
LiveVariables should clear kill / dead markers first. This allows us to remove a hack in the scheduler.

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

14 years agoAdd N2RegVShLFrm and N2RegVShRFrm formats so that the disassembler can easily
Johnny Chen [Fri, 26 Mar 2010 01:07:59 +0000 (01:07 +0000)]
Add N2RegVShLFrm and N2RegVShRFrm formats so that the disassembler can easily
dispatch to the appropriate routines to handle the different interpretations of
the shift amount encoded in the imm6 field.  The Vd, Vm fields are interpreted
the same between the two, though.

See, for example, A8.6.367 VQSHL, VQSHLU (immediate) for N2RegVShLFrm format and
A8.6.368 VQSHRN, VQSHRUN for N2RegVShRFrm format.

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

14 years agoAvoid leaking argv and env arrays from lli.
Jeffrey Yasskin [Fri, 26 Mar 2010 00:59:12 +0000 (00:59 +0000)]
Avoid leaking argv and env arrays from lli.

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

14 years agoIgnore debug intrinsics in yet more places.
Dan Gohman [Fri, 26 Mar 2010 00:33:27 +0000 (00:33 +0000)]
Ignore debug intrinsics in yet more places.

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

14 years agoTry trivial remat before the coalescer gives up on a vr / physreg coalescing for...
Evan Cheng [Fri, 26 Mar 2010 00:07:25 +0000 (00:07 +0000)]
Try trivial remat before the coalescer gives up on a vr / physreg coalescing for fear of tying up a physical register.

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

14 years agoHandle DEBUG_VALUE in this pass.
Dale Johannesen [Fri, 26 Mar 2010 00:02:44 +0000 (00:02 +0000)]
Handle DEBUG_VALUE in this pass.

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

14 years agoswitch the flag for using NEON for SP floating point to a subtarget 'feature'.
Jim Grosbach [Thu, 25 Mar 2010 23:47:34 +0000 (23:47 +0000)]
switch the flag for using NEON for SP floating point to a subtarget 'feature'.

Re-commit. This time complete with testsuite updates.

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

14 years agoneed to fix 'make check' tests first. revert for a moment.
Jim Grosbach [Thu, 25 Mar 2010 23:34:05 +0000 (23:34 +0000)]
need to fix 'make check' tests first. revert for a moment.

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

14 years agoswitch the flag for using NEON for SP floating point to a subtarget 'feature'
Jim Grosbach [Thu, 25 Mar 2010 23:32:19 +0000 (23:32 +0000)]
switch the flag for using NEON for SP floating point to a subtarget 'feature'

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

14 years agorename pred_const_iterator to const_pred_iterator for consistency's sake
Gabor Greif [Thu, 25 Mar 2010 23:25:28 +0000 (23:25 +0000)]
rename pred_const_iterator to const_pred_iterator for consistency's sake

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

14 years agoRemoved instruction class NI from ARMInstrFormats.td.
Johnny Chen [Thu, 25 Mar 2010 23:11:56 +0000 (23:11 +0000)]
Removed instruction class NI from ARMInstrFormats.td.
It doesn't seem to be used anywhere.

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

14 years agoswitch the use-vml[as] instructions flag to a subtarget 'feature'
Jim Grosbach [Thu, 25 Mar 2010 23:11:16 +0000 (23:11 +0000)]
switch the use-vml[as] instructions flag to a subtarget 'feature'

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

14 years agorename use_const_iterator to const_use_iterator for consistency's sake
Gabor Greif [Thu, 25 Mar 2010 23:06:16 +0000 (23:06 +0000)]
rename use_const_iterator to const_use_iterator for consistency's sake

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

14 years agollvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
Daniel Dunbar [Thu, 25 Mar 2010 22:49:09 +0000 (22:49 +0000)]
llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
exactly two passes in that case, and don't ever need to recompute any layout,
so this is a nice baseline for relaxation performance.

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

14 years agoAdd NVDupLnFrm and change NVDupLane class to use that format.
Johnny Chen [Thu, 25 Mar 2010 21:49:12 +0000 (21:49 +0000)]
Add NVDupLnFrm and change NVDupLane class to use that format.

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

14 years agoARM cortex-a8 doesn't do vmla/vmls well. disable them by default for that cpu
Jim Grosbach [Thu, 25 Mar 2010 20:48:50 +0000 (20:48 +0000)]
ARM cortex-a8 doesn't do vmla/vmls well. disable them by default for that cpu

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

14 years agoAdd NVCVTFrm (NEON Convert with fractional bits immediate) and modify N2VImm to
Johnny Chen [Thu, 25 Mar 2010 20:39:04 +0000 (20:39 +0000)]
Add NVCVTFrm (NEON Convert with fractional bits immediate) and modify N2VImm to
expect a Format arg.  N2VCvtD/N2VCvtQ are modified to use the NVCVTFrm format.

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

14 years agoAdd nounwind.
Evan Cheng [Thu, 25 Mar 2010 20:01:07 +0000 (20:01 +0000)]
Add nounwind.

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

14 years agoCode clean up.
Evan Cheng [Thu, 25 Mar 2010 19:46:11 +0000 (19:46 +0000)]
Code clean up.

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

14 years agoMC: Stop restarting layout on every relaxation.
Daniel Dunbar [Thu, 25 Mar 2010 19:35:56 +0000 (19:35 +0000)]
MC: Stop restarting layout on every relaxation.
 - Still O(N^2), just a faster form, and now its the MCAsmLayout's fault.

On the .s I am tuning against (combine.s from 403.gcc):
--
ddunbar@lordcrumb:MC$ diff stats-before.txt stats-after.txt
5,10c5,10
<    1728 assembler - Number of assembler layout and relaxation steps
<    7707 assembler - Number of emitted assembler fragments
<  120588 assembler - Number of emitted object file bytes
2233448 assembler - Number of evaluated fixups
<    1727 assembler - Number of relaxed instructions
6723845 mcexpr    - Number of MCExpr evaluations
---
>      3 assembler - Number of assembler layout and relaxation steps
>   7707 assembler - Number of emitted assembler fragments
> 120588 assembler - Number of emitted object file bytes
>  14796 assembler - Number of evaluated fixups
>   1727 assembler - Number of relaxed instructions
>  67889 mcexpr    - Number of MCExpr evaluations
--
Feel free to LOL at the -before numbers, if you like.

I am a little surprised we make more than 2 relaxation passes. It's pretty
trivial for us to do relaxation out-of-order if that would give a speedup.

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

14 years agoFix -Asserts warning, again.
Daniel Dunbar [Thu, 25 Mar 2010 19:35:53 +0000 (19:35 +0000)]
Fix -Asserts warning, again.

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

14 years agoTag SSE2 integer instructions as SSEPackedInt.
Jakob Stoklund Olesen [Thu, 25 Mar 2010 18:52:04 +0000 (18:52 +0000)]
Tag SSE2 integer instructions as SSEPackedInt.

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

14 years agoTeach TableGen to understand X.Y notation in the TSFlagsFields strings.
Jakob Stoklund Olesen [Thu, 25 Mar 2010 18:52:01 +0000 (18:52 +0000)]
Teach TableGen to understand X.Y notation in the TSFlagsFields strings.

Remove much horribleness from X86InstrFormats as a result. Similar
simplifications are probably possible for other targets.

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

14 years agofix a valgrind error on copy-constructor-synthesis.cpp, which is caused when
Chris Lattner [Thu, 25 Mar 2010 18:49:10 +0000 (18:49 +0000)]
fix a valgrind error on copy-constructor-synthesis.cpp, which is caused when
the custom insertion hook deletes the instruction, then we try to set dead
flags on it.  Neither the code that I added nor the code that was there
before was safe.

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

14 years agoRemove an unused option.
Evan Cheng [Thu, 25 Mar 2010 18:37:23 +0000 (18:37 +0000)]
Remove an unused option.

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

14 years agoMC: Simplify main section layout process by moving alignment into LayoutSection.
Daniel Dunbar [Thu, 25 Mar 2010 18:16:42 +0000 (18:16 +0000)]
MC: Simplify main section layout process by moving alignment into LayoutSection.

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

14 years agoMC: Sink Section address assignment into LayoutSection.
Daniel Dunbar [Thu, 25 Mar 2010 18:16:38 +0000 (18:16 +0000)]
MC: Sink Section address assignment into LayoutSection.

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

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

On Nehalem and newer CPUs there is a 2 cycle latency penalty on using a register
in a different domain than where it was defined. Some instructions have
equvivalents for different domains, like por/orps/orpd.

The SSEDomainFix pass tries to minimize the number of domain crossings by
changing between equvivalent opcodes where possible.

This is a work in progress, in particular the pass doesn't do anything yet. SSE
instructions are tagged with their execution domain in TableGen using the last
two bits of TSFlags. Note that not all instructions are tagged correctly. Life
just isn't that simple.

The SSE execution domain issue is very similar to the ARM NEON/VFP pipeline
issue handled by NEONMoveFixPass. This pass may become target independent to
handle both.

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

14 years agoAdded a new instruction class NVDupLane to be inherited by VDUPLND and VDUPLNQ,
Johnny Chen [Thu, 25 Mar 2010 17:01:27 +0000 (17:01 +0000)]
Added a new instruction class NVDupLane to be inherited by VDUPLND and VDUPLNQ,
instead of the current N2V.  Format of NVDupLane instances are set to NEONFrm
currently.

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

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