Commit Graph

49954 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 1c7597693c Use existing function.
llvm-svn: 140615
2011-09-27 17:55:08 +00:00
Akira Hatanaka e41b1d59f0 Fix function MipsRegisterInfo::getRegisterNumbering.
Return numbers of 64-bit registers.

llvm-svn: 140609
2011-09-27 17:15:27 +00:00
Akira Hatanaka ff5d0965b0 Do not add the pass that restores $gp if target is Mips64.
llvm-svn: 140607
2011-09-27 16:58:43 +00:00
Duncan Sands 86de1a666d Have the verifier check that all landingpad operands are constants.
llvm-svn: 140606
2011-09-27 16:43:19 +00:00
Nadav Rotem 38b3b83362 Cleanup PromoteIntOp_EXTRACT_VECTOR_ELT and PromoteIntRes_SETCC.
Add a new method: getAnyExtOrTrunc and use it to replace the manual check.

llvm-svn: 140603
2011-09-27 11:16:47 +00:00
Nadav Rotem 1b857d2762 Revert r140463; The patch assumes that <4 x i1> is saved to memory as 4 x i8,
while the decision is to bit-pack small values.

llvm-svn: 140601
2011-09-27 10:48:29 +00:00
Akira Hatanaka bb050745e7 Mark MipsPseudo isPseudo.
llvm-svn: 140598
2011-09-27 04:57:54 +00:00
Justin Holewinski 9f01f89386 PTX: Add support for sitofp in backend
llvm-svn: 140593
2011-09-27 01:04:47 +00:00
Bill Wendling 90f90da156 Split the landing pad basic block with the correct function. Also merge the
split landingpad instructions into a PHI node.
PR11016

llvm-svn: 140592
2011-09-27 00:59:31 +00:00
Andrew Trick 581243919d Disable LSR retry by default.
Disabling aggressive LSR saves compilation time, and with the new
indvars behavior usually improves performance.

llvm-svn: 140590
2011-09-27 00:44:14 +00:00
Andrew Trick 8868faec63 LSR, one of the new Cost::isLoser() checks did not get merged in the previous checkin.
llvm-svn: 140583
2011-09-26 23:35:25 +00:00
Owen Anderson b1a9f65487 Remove extraneous commit garbage.
llvm-svn: 140581
2011-09-26 23:14:02 +00:00
Andrew Trick 784729d408 LSR cost metric minor fix and verification.
The minor bug heuristic was noticed by inspection. I added the
isLoser/isValid helpers because they will become more
important with subsequent checkins.

llvm-svn: 140580
2011-09-26 23:11:04 +00:00
Akira Hatanaka a6a9c20c23 Set register class of a register according to value of HasMips64.
llvm-svn: 140570
2011-09-26 21:55:17 +00:00
Akira Hatanaka 7b502920ef Define variable HasMips64 in MipsTargetLowering.
llvm-svn: 140569
2011-09-26 21:47:02 +00:00
Akira Hatanaka e5ce709022 In single float mode, double precision FP arguments are passed in integer
registers, so there is no need to check here.

llvm-svn: 140568
2011-09-26 21:37:50 +00:00
Owen Anderson f01e2de5e6 ASR #32 is not allowed on Thumb2 USAT and SSAT instructions.
llvm-svn: 140560
2011-09-26 21:06:22 +00:00
Eli Friedman 5c91891cf3 Enhance alias analysis for atomic instructions a bit. Upgrade a couple alias-analysis tests to the new atomic instructions.
llvm-svn: 140557
2011-09-26 20:15:28 +00:00
Justin Holewinski da2919dbd8 PTX: Fix memcpy intrinsic to handle 64-bit pointers
llvm-svn: 140556
2011-09-26 19:19:48 +00:00
Justin Holewinski b40da7f956 PTX: Implement PTXSelectionDAGInfo
llvm-svn: 140549
2011-09-26 18:57:27 +00:00
Justin Holewinski c3edaddfea PTX: Implement ISD::ANY_EXTEND
llvm-svn: 140548
2011-09-26 18:57:24 +00:00
Justin Holewinski 1395cf8423 PTX: Fix detection of stack load/store vs. global load/store, as well as fix the
printing of local offsets

llvm-svn: 140547
2011-09-26 18:57:22 +00:00
James Molloy 0ceb8cadd2 Fix emission of debug data for global variables. getContext() on DIGlobalVariables is not valid any more.
llvm-svn: 140539
2011-09-26 17:40:42 +00:00
Justin Holewinski f8dd701bf9 PTX: SM > 2.0 implies +double
llvm-svn: 140536
2011-09-26 16:20:36 +00:00
Justin Holewinski 14defde057 PTX: Fix some lingering issues with stack allocation
llvm-svn: 140535
2011-09-26 16:20:34 +00:00
Justin Holewinski 37fd87675f PTX: Split up the TableGen instruction definitions into logical units
llvm-svn: 140534
2011-09-26 16:20:31 +00:00
Justin Holewinski d40f5ababf PTX: Unify handling of loads/stores
llvm-svn: 140533
2011-09-26 16:20:28 +00:00
Justin Holewinski 8c80019352 PTX: Handle FrameIndex nodes
llvm-svn: 140532
2011-09-26 16:20:25 +00:00
David Meyer b1fbf9ff26 PR11004: Inline memcpy to avoid generating nested call sequence. Un-XFAIL 2011-06-09-TailCallByVal and 2010-11-04-BigByval
llvm-svn: 140516
2011-09-26 06:13:20 +00:00
Craig Topper 45faba98b4 Fix VEX decoding in i386 mode. Fixes PR11008.
llvm-svn: 140515
2011-09-26 05:12:43 +00:00
Jakob Stoklund Olesen df977fedb6 Add target hook for pseudo instruction expansion.
Many targets use pseudo instructions to help register allocation.  Like
the COPY instruction, these pseudos can be expanded after register
allocation.  The early expansion can make life easier for PEI and the
post-ra scheduler.

This patch adds a hook that is called for all remaining pseudo
instructions from the ExpandPostRAPseudos pass.

llvm-svn: 140472
2011-09-25 19:21:35 +00:00
Nadav Rotem 2279949129 [vector-select] Address one of the issues in pr10902. EXTRACT_VECTOR_ELEMENT
SDNodes may return values which are wider than the incoming element types. In
this patch we fix the integer promotion of these nodes.

Fixes spill-q.ll when running -promote-elements.

llvm-svn: 140471
2011-09-25 18:59:42 +00:00
Jakob Stoklund Olesen fd719d184e Clean up code after renaming LowerSubregs -> ExpandPostRAPseudos.
No functional change intended.

llvm-svn: 140470
2011-09-25 16:46:08 +00:00
Jakob Stoklund Olesen f152df1e6b Rename LowerSubregs to ExpandPostRAPseudos.
I'll fix the file contents in the next commit.

This pass is currently expanding the COPY and SUBREG_TO_REG pseudos. I
am going to add a hook so targets can expand more pseudo-instructions
after register allocation.

Many targets have pseudo-instructions that assist the register
allocator.  They can be expanded after register allocation, before PEI
and PostRA scheduling.

llvm-svn: 140469
2011-09-25 16:46:00 +00:00
Benjamin Kramer f550fa9173 Sort CMakeLists.txt.
llvm-svn: 140465
2011-09-24 22:06:35 +00:00
Nadav Rotem c2deabd202 Implement Duncan's suggestion to use the result of getSetCCResultType if it is legal
(this is always the case for scalars), otherwise use the promoted result type.

Fix test/CodeGen/X86/vsplit-and.ll when promote-elements is enabled.

llvm-svn: 140464
2011-09-24 19:48:19 +00:00
Nadav Rotem 77426a754b [Vector-Select] Address one of the problems in 10902.
When generating the trunc-store of i1's, we need to use the vector type and not
the scalar type.

This patch fixes the assertion in CodeGen/Generic/bool-vector.ll when
running with -promote-elements.

llvm-svn: 140463
2011-09-24 18:32:19 +00:00
Akira Hatanaka 7d7ee0c3ac Add .td file.
llvm-svn: 140446
2011-09-24 01:40:18 +00:00
Akira Hatanaka e96273e75d Preparation for adding simple Mips64 instructions.
llvm-svn: 140443
2011-09-24 01:34:44 +00:00
Jakob Stoklund Olesen 55cf2ed148 Only run MF.verify() with EXPENSIVE_CHECKS=1.
llvm-svn: 140441
2011-09-24 01:11:19 +00:00
Daniel Dunbar 9b92e2be30 sys::Process: Add a SetWorkingDirectory method.
llvm-svn: 140433
2011-09-23 23:23:36 +00:00
Andrew Trick 8b2fe2f744 LSR minor bug fix in RateRegister.
No test case. Noticed by inspection and I doubt it ever affects the
outcome of the overall heuristic, let alone final codegen.

llvm-svn: 140431
2011-09-23 23:05:19 +00:00
Jakob Stoklund Olesen 3bb99bc957 Verify that terminators follow non-terminators.
This exposes a -segmented-stacks bug.

llvm-svn: 140429
2011-09-23 22:45:39 +00:00
Eli Friedman 8a15a5aa93 PR10998: It is not legal to sink an instruction past the terminator of a block; make sure we don't do that.
llvm-svn: 140428
2011-09-23 22:41:57 +00:00
Owen Anderson 4916840eb8 Teach the Thumb2 AsmParser to accept pre-indexed loads/stores with an offset of #-0.
llvm-svn: 140426
2011-09-23 22:25:02 +00:00
Jakob Stoklund Olesen 2056d15bd9 Also match negative offsets for addrmode3 and addrmode5.
Math is hard, and isScaledConstantInRange() always returned false for
negative constants.  It was doing unsigned division of negative numbers
before casting back to signed.

llvm-svn: 140425
2011-09-23 22:10:33 +00:00
Owen Anderson b0b865d658 Add more fixed bits to USAT16 encoding to filter out incorrect decodings.
llvm-svn: 140422
2011-09-23 21:57:50 +00:00
Owen Anderson 737beaf86d Post-index loads/stores in still need to print the post-indexed immediate, even if it's zero, to distinguish them from non-post-indexed instructions.
llvm-svn: 140420
2011-09-23 21:26:40 +00:00
Owen Anderson 987a878946 Reapply r140412 (Thumb2 reg-reg loads cannot target SP or PC), with invalid testcases updated.
llvm-svn: 140415
2011-09-23 21:07:25 +00:00
Owen Anderson ffa8428acf Revert r140412. This affects more instructions than intended.
llvm-svn: 140413
2011-09-23 21:02:01 +00:00