Commit Graph

79765 Commits

Author SHA1 Message Date
Chris Lattner
46ada15d42 Introduce a new MutableArrayRef class, which refers to a series of mutable
T's that are consequtively in memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148463 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 06:34:52 +00:00
Evan Cheng
a2e435cd23 Enhance finalizeBundle to return end of bundle iterator because it makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148462 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 06:13:10 +00:00
Jim Grosbach
ae69f703d5 ARM assembly diagnostic caret in better position for FPImm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148459 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 02:47:30 +00:00
Jim Grosbach
9363c58dc2 Thumb2 relaxation for tADR to t2ADR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148456 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 02:09:38 +00:00
Jim Grosbach
d26bad079d Add comment and fix range check in condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148455 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 01:50:30 +00:00
Jim Grosbach
904b7be27e Add testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148454 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 01:36:59 +00:00
Lang Hames
c2220057c0 Added methods to get the live range immediately before a given slot. Intended to parallel the getVNInfoBefore method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148453 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 01:36:06 +00:00
Nick Lewycky
2faa5d2328 Space after punctuation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148451 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 01:13:47 +00:00
Evan Cheng
bca15f9c80 - Slight change to finalizeBundle() interface. LastMI is not exclusive (pointing
to instruction right after the last instruction in the bundle.
- Add a finalizeBundle() variant that doesn't specify LastMI. Instead, the code
  will find the last instruction in the bundle by following the 'InsideBundle'
  marker. This is useful in case bundles are formed early (i.e. during MI
  scheduling) but finalized later (i.e. after register allocator has finished
  rewriting virtual registers with physical registers).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 00:46:06 +00:00
Nick Lewycky
22de16dc75 Add a TargetOption for disabling tail calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148442 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 00:34:10 +00:00
Evan Cheng
9b159710eb Rename Finalizebundle to finalizeBundle to conform to coding guideline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148440 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19 00:06:10 +00:00
Jakob Stoklund Olesen
c38c4561cd Add experimental -x86-use-regmask command line option.
It adds register mask operands to x86 call instructions.  Once all the
backend passes support register mask operands, this will be permanently
enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148438 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 23:52:22 +00:00
Jakob Stoklund Olesen
71f0fc1ca8 Ignore register mask operands when lowering instructions to MC.
This is similar to implicit register operands.  MC doesn't understand
register liveness and call clobbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148437 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 23:52:19 +00:00
Jakob Stoklund Olesen
9cf37e8b48 Add a RegisterMaskSDNode class.
This SelectionDAG node will be attached to call nodes by LowerCall(),
and eventually becomes a MO_RegisterMask MachineOperand on the
MachineInstr representing the call instruction.

LowerCall() will attach a register mask that depends on the calling
convention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148436 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 23:52:12 +00:00
Rafael Espindola
8887a0f341 Add support for the gnueabihf environment. Patch by Sylvestre Ledru.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148434 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 23:35:29 +00:00
Jim Grosbach
0b4c673886 Thumb2 alternate syntax for LDR(literal) and friends.
Explicit pc-relative syntax. For example, "ldrb r2, [pc, #-22]".

rdar://10250964

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148432 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 22:46:46 +00:00
Devang Patel
b8ba13f009 Process instructions after match to select alternative encoding which may be more desirable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 22:42:29 +00:00
Jim Grosbach
5aa5368ccd Replace FIXME with explanatory comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148427 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 22:04:42 +00:00
Jim Grosbach
256ba4f42a Thumb2 relaxation for LDR(literal).
If the fixup is out of range for the Thumb1 instruction, relax it
to the Thumb2 encoding instead.

rdar://10711829

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148424 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 21:54:16 +00:00
Jim Grosbach
ec4ceb797a MCAssembler tweak for determining when a symbol difference is resolved.
If the two fragments are in the same Atom, then the difference
expression is resolvable at compile time. Previously we were checking
that they were in the same fragment, but that breaks down in the
presence of instruction relaxation which has multiple fragments in the
same atom.

rdar://10711829

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148423 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 21:54:12 +00:00
Jim Grosbach
a2ee0fa3ee Rename pattern for clarity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148422 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 21:54:09 +00:00
Dan Gohman
2f77bbd1bf Add a depth limit to avoid runaway recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148419 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 21:24:45 +00:00
Dan Gohman
1dae3e965c Use llvm.global_ctors to locate global constructors instead
of recognizing them by name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148416 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 21:19:38 +00:00
Jakub Staszak
785a7a97da Remove trailing spaces and unneeded includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148415 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 21:16:33 +00:00
Nadav Rotem
a402271351 Document the fact that the selection dag changes the vselect condition type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148411 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 20:50:30 +00:00
Lang Hames
bfab85e9b1 Fixed macro condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148408 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 19:48:31 +00:00
Jim Grosbach
bc3af9b618 Tidy up. 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148401 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 18:52:20 +00:00
Jim Grosbach
ec3433852d Tidy up. MCAsmBackend naming conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148400 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 18:52:16 +00:00
Bill Wendling
160fee7349 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148384 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 10:10:28 +00:00
Nadav Rotem
819026f2f8 Fix a bug in the type-legalization of vector integers. When we bitcast one vector type to another, we must not bitcast the result if one type is widened while the other is promoted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148383 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 08:33:18 +00:00
Pete Cooper
cd7f02bb43 Fix ISD::REG_SEQUENCE to accept physical registers and change TwoAddressInstructionPass to insert copies for any physical reg operands of the REG_SEQUENCE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148377 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 04:16:16 +00:00
Jim Grosbach
5a7efa7f13 Thumb2 load/store fixups don't set the thumb bit.
Load/store instructions w/ a fixup to be relative a function marked as thumb
don't use the low bit to specify thumb vs. non-thumb like interworking
branches do, so don't set it when dealing with those fixups.

rdar://10348687.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148366 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 00:40:25 +00:00
Jim Grosbach
9b5b125c34 Move some ARM specific MCAssmebler bits into the ARMAsmBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148364 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 00:23:57 +00:00
Jakob Stoklund Olesen
31867660cb Add a CoveredBySubRegs property to Register descriptions.
When set, this bit indicates that a register is completely defined by
the value of its sub-registers.

Use the CoveredBySubRegs property to infer which super-registers are
call-preserved given a list of callee-saved registers.  For example, the
ARM registers D8-D15 are callee-saved.  This now automatically implies
that Q4-Q7 are call-preserved.

Conversely, Win64 callees save XMM6-XMM15, but the corresponding
YMM6-YMM15 registers are not call-preserved because they are not fully
defined by their sub-registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148363 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 00:16:39 +00:00
Daniel Dunbar
7434c9a053 [lit] Add a --filter option which is useful when dealing with virtual test
paths.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148362 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-18 00:03:12 +00:00
Jakub Staszak
0271dadee4 Remove unneeded include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148360 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 23:53:08 +00:00
Jakob Stoklund Olesen
3ee7d15284 Implement ARMBaseRegisterInfo::getCallPreservedMask().
Move ARM callee-saved lists into ARMCallingConv.td.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148357 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 23:09:00 +00:00
Jim Grosbach
893f4864b3 Fix MCJIT memory leak of owned TargetMachine.
The JIT is expected to take ownership of the TM that's passed in. The MCJIT
wasn't freeing it, resulting in leaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148356 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 23:08:46 +00:00
Jakob Stoklund Olesen
0bd2ae92b0 Move X86 callee saved register lists to the X86CallConv .td file.
Add a trivial implementation of the getCallPreservedMask() hook.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148347 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 22:47:01 +00:00
Jakob Stoklund Olesen
ec572539dd Add TableGen support for callee saved registers.
Targets can now add CalleeSavedRegs defs to their *CallingConv.td file.
TableGen will use this to create a *_SaveList array suitable for
returning from getCalleeSavedRegs() as well as a *_RegMask bit mask
suitable for returning from getCallPreservedMask().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148346 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 22:46:58 +00:00
Andrew Trick
97af768ccc Test case rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148344 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 22:27:45 +00:00
Jakub Staszak
bda43e95a0 Move includes to the .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148342 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 22:16:31 +00:00
Jim Grosbach
8b9300b972 MC tweak symbol difference resolution for non-local symbols.
When the non-local symbol in the expression is in the same fragment
as the second symbol, the assembler can still evaluate the expression
without needing a relocation.

For example, on ARM:
_foo:
	ldr lr, (_foo - 4)

rdar://10348687



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148341 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 22:14:39 +00:00
Jim Grosbach
283f1fff47 Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148339 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 22:03:42 +00:00
Devang Patel
2f8af1d643 Intel syntax: Fix parser match class to check memory operand size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148338 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 21:48:03 +00:00
Nadav Rotem
ba05c91ed2 Transform: (EXTRACT_VECTOR_ELT( VECTOR_SHUFFLE )) -> EXTRACT_VECTOR_ELT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148337 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 21:44:01 +00:00
Devang Patel
6220fea2a8 Intel syntax: Parse "BYTE PTR [RDX + RCX]"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148334 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 21:25:10 +00:00
Jakub Staszak
fced294599 Trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148332 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 20:58:08 +00:00
Dan Gohman
2f6263c96a Add a new ObjC ARC optimization pass to eliminate unneeded
autorelease push+pop pairs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148330 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 20:52:24 +00:00
Dan Gohman
7d4c87ef6e Add a new PassManagerBuilder customization point,
EP_ModuleOptimizerEarly, to allow passes to be added before the
main ModulePass optimizers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148329 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17 20:51:32 +00:00