Commit Graph

39716 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes 792e906bef Start the support for AVX instructions with 256-bit %ymm registers. A couple of
notes:
- The instructions are being added with dummy placeholder patterns using some 256
  specifiers, this is not meant to work now, but since there are some multiclasses
  generic enough to accept them,  when we go for codegen, the stuff will be already
  there.
- Add VEX encoding bits to support YMM
- Add MOVUPS and MOVAPS in the first round
- Use "Y" as suffix for those Instructions: MOVUPSYrr, ...
- All AVX instructions in X86InstrSSE.td will move soon to a new X86InstrAVX
  file.

llvm-svn: 107996
2010-07-09 18:27:43 +00:00
Jakob Stoklund Olesen bd953d1805 Change TII::foldMemoryOperand API to require the machine instruction to be
inserted in a MBB, and return an already inserted MI.

This target API change is necessary to allow foldMemoryOperand to call
storeToStackSlot and loadFromStackSlot when folding a COPY to a stack slot
reference in a target independent way.

The foldMemoryOperandImpl hook is going to change in the same way, but I'll wait
until COPY folding is actually implemented. Most targets only fold copies and
won't need to specialize this hook at all.

llvm-svn: 107991
2010-07-09 17:29:08 +00:00
Gabor Greif 9d5ae03404 cache result of operator*
llvm-svn: 107990
2010-07-09 16:51:20 +00:00
Gabor Greif 8e66a42784 remove useless cast and fix typos in comment
llvm-svn: 107989
2010-07-09 16:42:04 +00:00
Gabor Greif 3b740e9085 cache result of operator*
llvm-svn: 107988
2010-07-09 16:39:02 +00:00
Bob Wilson 6586e9b203 --- Reverse-merging r107947 into '.':
U    utils/TableGen/FastISelEmitter.cpp
--- Reverse-merging r107943 into '.':
U    test/CodeGen/X86/fast-isel.ll
U    test/CodeGen/X86/fast-isel-loads.ll
U    include/llvm/Target/TargetLowering.h
U    include/llvm/Support/PassNameParser.h
U    include/llvm/CodeGen/FunctionLoweringInfo.h
U    include/llvm/CodeGen/CallingConvLower.h
U    include/llvm/CodeGen/FastISel.h
U    include/llvm/CodeGen/SelectionDAGISel.h
U    lib/CodeGen/LLVMTargetMachine.cpp
U    lib/CodeGen/CallingConvLower.cpp
U    lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
U    lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
U    lib/CodeGen/SelectionDAG/FastISel.cpp
U    lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
U    lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
U    lib/CodeGen/SelectionDAG/InstrEmitter.cpp
U    lib/CodeGen/SelectionDAG/TargetLowering.cpp
U    lib/Target/XCore/XCoreISelLowering.cpp
U    lib/Target/XCore/XCoreISelLowering.h
U    lib/Target/X86/X86ISelLowering.cpp
U    lib/Target/X86/X86FastISel.cpp
U    lib/Target/X86/X86ISelLowering.h

llvm-svn: 107987
2010-07-09 16:37:18 +00:00
Gabor Greif fd8e7d4a0f cache result of operator*
llvm-svn: 107984
2010-07-09 16:31:08 +00:00
Gabor Greif e7650c7c29 cache result of operator*
llvm-svn: 107983
2010-07-09 16:26:41 +00:00
Gabor Greif aa389f5085 cache result of operator*
llvm-svn: 107982
2010-07-09 16:22:36 +00:00
Gabor Greif 04af1e4f65 cache result of operator*
llvm-svn: 107981
2010-07-09 16:17:52 +00:00
Gabor Greif 52617fc462 cache result of operator*
llvm-svn: 107980
2010-07-09 16:08:33 +00:00
Gabor Greif 2c0ab48ac2 cache result of operator*
llvm-svn: 107979
2010-07-09 16:01:21 +00:00
Gabor Greif 070b9a2cc4 cache result of operator*
llvm-svn: 107978
2010-07-09 15:53:42 +00:00
Gabor Greif d9a0e80213 cache result of operator*
llvm-svn: 107977
2010-07-09 15:52:36 +00:00
Gabor Greif e82532a1c5 cache result of operator*
llvm-svn: 107976
2010-07-09 15:40:10 +00:00
Gabor Greif 6d8870fc35 cache result of operator*
llvm-svn: 107975
2010-07-09 15:25:42 +00:00
Gabor Greif 329c4d8ed9 cache result of operator*
llvm-svn: 107974
2010-07-09 15:25:09 +00:00
Gabor Greif 0028cc6730 cache result of operator*
llvm-svn: 107972
2010-07-09 15:01:36 +00:00
Gabor Greif d323f5e161 cache result of operator* (found by inspection)
llvm-svn: 107971
2010-07-09 14:48:08 +00:00
Gabor Greif b0d56ffc85 cache result of operator*
llvm-svn: 107969
2010-07-09 14:36:49 +00:00
Gabor Greif 4247949ce9 cache result of operator*
llvm-svn: 107968
2010-07-09 14:29:14 +00:00
Gabor Greif 2732561be9 cache result of operator*
llvm-svn: 107967
2010-07-09 14:28:41 +00:00
Gabor Greif a02f232c1b cache result of operator*
llvm-svn: 107966
2010-07-09 14:18:23 +00:00
Gabor Greif f0821f39ee cache operator*'s result (in multiple functions)
llvm-svn: 107965
2010-07-09 14:02:13 +00:00
Gabor Greif 1d20021d82 do not repeatedly dereference use_iterator
llvm-svn: 107963
2010-07-09 13:17:13 +00:00
Gabor Greif 60a346d0f1 do not repeatedly dereference use_iterator
llvm-svn: 107962
2010-07-09 12:23:50 +00:00
Jakob Stoklund Olesen d4d9e53b20 Avoid creating %physreg:subidx operands in SimpleRegisterCoalescing::RemoveCopyByCommutingDef.
This fixes PR7602.

llvm-svn: 107957
2010-07-09 05:56:21 +00:00
Jakob Stoklund Olesen cac54d6435 Deal with a few remaining spots that assume physical registers have live intervals.
This fixes PR7601.

llvm-svn: 107955
2010-07-09 04:35:38 +00:00
Bruno Cardoso Lopes 992d25da71 Merge VEX enums with other x86 enum forms. Also fix all checks of which VEX
fields to use. 

llvm-svn: 107952
2010-07-09 01:56:45 +00:00
Jakob Stoklund Olesen 66b3649030 Fix broken isCopy handling in TrimLiveIntervalToLastUse.
llvm-svn: 107950
2010-07-09 01:27:21 +00:00
Jakob Stoklund Olesen 5165fa1c39 Handle COPY in VirtRegRewriter.
llvm-svn: 107949
2010-07-09 01:27:19 +00:00
Dan Gohman 0a7d155d67 Fix the memoperand offsets in code generated for va_start.
llvm-svn: 107948
2010-07-09 01:06:48 +00:00
Chris Lattner 88c185617c have the mc lowering process handle a few tail call forms, lowering them to
jumps where possible and turning the TAILCALL marker in the instruction
asm string into a proper comment.

This eliminates a FIXME and is on the path to finishing:
rdar://7639610 - eliminate encoding and asm info for TAILJMPd TAILJMPr TAILJMPn, etc.

However, I can't eliminate the encodings for these instructions because the JIT
still exists and has its own copy of the encoder, sigh.

llvm-svn: 107946
2010-07-09 00:49:41 +00:00
Bob Wilson 88a4e6dc0e Print "dregpair" NEON operands with a space between them, for readability and
consistency with other instructions that have lists of register operands.

llvm-svn: 107944
2010-07-09 00:47:20 +00:00
Dan Gohman 0b5aa1cdd3 Re-apply bottom-up fast-isel, with fixes. Be very careful to avoid emitting
a DBG_VALUE after a terminator, or emitting any instructions before an EH_LABEL.

llvm-svn: 107943
2010-07-09 00:39:23 +00:00
Bruno Cardoso Lopes e6cc0d33bb Factor out x86 segment override prefix encoding, and also use it for VEX
llvm-svn: 107942
2010-07-09 00:38:14 +00:00
Bob Wilson 21eed476e8 Reenable DAG combining for vector shuffles. It looks like it was temporarily
disabled and then never turned back on again.  Adjust some tests, one because
this change avoids an unnecessary instruction, and the other to make it
continue testing what it was intended to test.

llvm-svn: 107941
2010-07-09 00:38:12 +00:00
Chris Lattner 061d70ad2c reject pseudo instructions early in the encoder.
llvm-svn: 107939
2010-07-09 00:17:50 +00:00
Bruno Cardoso Lopes b652c1a145 Remove trailing whitespaces from file
llvm-svn: 107937
2010-07-09 00:07:19 +00:00
Chris Lattner f469307c77 Change LEA to have 5 operands for its memory operand, just
like all other instructions, even though a segment is not
allowed.  This resolves a bunch of gross hacks in the 
encoder and makes LEA more consistent with the rest of the
instruction set.

No functionality change.

llvm-svn: 107934
2010-07-08 23:46:44 +00:00
Stuart Hastings d08fb75aaa Reverting r107918 and r107919. Radar 8063111.
llvm-svn: 107930
2010-07-08 23:25:39 +00:00
Jakob Stoklund Olesen 823e90e12a Revert "Fix broken isCopy handling in TrimLiveIntervalToLastUse"
This reverts commit 107921. It broke the clang self host.

llvm-svn: 107926
2010-07-08 22:52:47 +00:00
Chris Lattner ec536276f0 add some long-overdue enums to refer to the parts of the 5-operand
X86 memory operand.

llvm-svn: 107925
2010-07-08 22:41:28 +00:00
Devang Patel 4c6bd6612f Relax assertion. In optimized code, it is possible that first instruction is coming from a inlined function.
This fixes PR7596 .

llvm-svn: 107923
2010-07-08 22:39:20 +00:00
Bill Wendling a992445ff2 Extension of r107506. Make sure that we don't mark a function as having a call
if the inline ASM doesn't need a stack frame.

llvm-svn: 107922
2010-07-08 22:38:02 +00:00
Jakob Stoklund Olesen 75c465585a Fix broken isCopy handling in TrimLiveIntervalToLastUse
llvm-svn: 107921
2010-07-08 22:30:38 +00:00
Jakob Stoklund Olesen ec58a43d81 Remember the VR64 register class
llvm-svn: 107920
2010-07-08 22:30:35 +00:00
Stuart Hastings 43d226deea Fix decl/def debug info for template functions. Radar 8063111.
llvm-svn: 107919
2010-07-08 22:28:59 +00:00
Chris Lattner 9f034c1e5d Rework segment prefix emission code to handle segments
in memory operands at the same type as hard coded segments.
This fixes problems where we'd emit the segment override after
the REX prefix on instructions like:
mov %gs:(%rdi), %rax

This fixes rdar://8127102.  I have several cleanup patches coming
next.

llvm-svn: 107917
2010-07-08 22:28:12 +00:00
Chris Lattner 1dd82c7dc2 introduce a new X86II::getMemoryOperandNo method, which
returns the start of the memory operand for an instruction.

Introduce a new "X86AddrSegment" enum to reduce # magic numbers
referring to X86 memory operand layout.

llvm-svn: 107916
2010-07-08 22:27:06 +00:00