| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The getPointerRegClass() hook can return register classes that depend on
the calling convention of the current function (ptr_rc_tailcall).
So far, we have been able to infer the calling convention from the
subtarget alone, but as we add support for multiple calling conventions
per target, that no longer works.
Patch by Yiannis Tsiouris!
llvm-svn: 156328
|
| |
|
|
|
|
| |
since they are equivalent.
llvm-svn: 155188
|
| |
|
|
| |
llvm-svn: 152978
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function could have r12 live across a function call when compiling
thumb1 code.
The test case for this is not included because it is very long. It must
provoke emergency spilling near a function call. The behavior is
provoked by MultiSource/Applications/JM/lencod, and it triggers an
assertion in the scavenger.
<rdar://problem/10963642>
llvm-svn: 151855
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an outgoing call takes more than 2k of arguments on the stack, we
don't allocate that call frame in the prolog, but adjust the stack
pointer immediately before the call instead.
This causes problems with the emergency spill slot because PEI can't
track stack pointer adjustments on the second pass, and if the outgoing
arguments are too big, SP can't be used to reach the emergency spill
slot at all.
Work around these problems by ensuring there is a base or frame pointer
that can be used to access the emergency spill slot.
<rdar://problem/10917166>
llvm-svn: 151604
|
| |
|
|
|
|
| |
MSP430, PPC, PTX, Sparc, X86, XCore.
llvm-svn: 150878
|
| |
|
|
| |
llvm-svn: 149961
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
generator to it. For non-bundle instructions, these behave exactly the same
as the MC layer API.
For properties like mayLoad / mayStore, look into the bundle and if any of the
bundled instructions has the property it would return true.
For properties like isPredicable, only return true if *all* of the bundled
instructions have the property.
For properties like canFoldAsLoad, isCompare, conservatively return false for
bundles.
llvm-svn: 146026
|
| |
|
|
|
|
|
|
| |
the tADDrSPi instruction can't be used. Make sure we're updating the opcode
to tADDi3 in all cases.
rdar://10254707
llvm-svn: 141523
|
| |
|
|
|
|
|
|
|
| |
Add the predicate operand to the instructions. Update the back end
accordingly where the instructions are used. Restrict the SP operands
to actually only be SP, as otherwise these break assembly parsing for the
normal instruction variants.
llvm-svn: 138445
|
| |
|
|
| |
llvm-svn: 137857
|
| |
|
|
| |
llvm-svn: 137856
|
| |
|
|
|
|
| |
when building with assertions disabled.
llvm-svn: 137460
|
| |
|
|
|
|
| |
ARM MC code from target.
llvm-svn: 135636
|
| |
|
|
|
|
| |
better location welcome).
llvm-svn: 135438
|
| |
|
|
|
|
|
|
|
|
| |
Merge the tMOVr, tMOVgpr2tgpr, tMOVtgpr2gpr, and tMOVgpr2gpr instructions
into tMOVr. There's no need to keep them separate. Giving the tMOVr
instruction the proper GPR register class for its operands is sufficient
to give the register allocator enough information to do the right thing
directly.
llvm-svn: 134204
|
| |
|
|
|
|
|
|
|
| |
Fix a FIXME and allow predication (in Thumb2) for the T1 register to
register MOV instructions. This allows some better codegen with
if-conversion (as seen in the test updates), plus it lays the groundwork
for pseudo-izing the tMOVCC instructions.
llvm-svn: 134197
|
| |
|
|
|
|
|
| |
The tSpill and tRestore instructions are just copies of the tSTRspi and
tLDRspi instructions, respectively. Just use those directly instead.
llvm-svn: 134092
|
| |
|
|
|
|
|
|
| |
sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.
llvm-svn: 134021
|
| |
|
|
|
|
| |
No functional change.
llvm-svn: 132455
|
| |
|
|
|
|
|
|
|
|
|
|
| |
register class inflation.
The hook will be used by the register allocator when recomputing register
classes after removing constraints.
Thumb1 code doesn't allow anything larger than tGPR, and x86 needs to ensure
that the spill size doesn't change.
llvm-svn: 130228
|
| |
|
|
| |
llvm-svn: 129723
|
| |
|
|
|
|
| |
The LocalStackSlotAllocation pass was creating illegal registers.
llvm-svn: 128687
|
| |
|
|
|
|
| |
constpool. Emit unwinding information in case when this load from constpool is used to change the stack pointer in the prologue.
llvm-svn: 127105
|
| |
|
|
|
|
| |
because there is no way given the constpool index to examine the actual entry: the reason is clones inserted by constant island pass, which are not tracked at all! The only connection is done during asmprinting time via magic label names which is really gross and needs to be eventually fixed.
llvm-svn: 127104
|
| |
|
|
|
|
|
| |
This is just very first approximation how the stuff should be done
(e.g. ARM-only for now). More to follow.
llvm-svn: 127101
|
| |
|
|
|
|
|
|
|
| |
set up the source operands. The original instr has an immediate operand that
should be replaced with the frame reg operand rather than just adding the
reg operand. Previously, the instruction ended up with too many operands
causing an assert() when adding the default predicate. rdar://8825456
llvm-svn: 123387
|
| |
|
|
|
|
| |
and fixes here and there.
llvm-svn: 123170
|
| |
|
|
|
|
|
|
|
| |
to be the one we want to use. bugpoint reduced testcase is a little large,
I'll see if I can simplify it down more.
Fixes part of rdar://8782207
llvm-svn: 122307
|
| |
|
|
|
|
|
|
|
| |
respectively.
It may be a bug that these opcodes are getting this far into machine code
generation.
llvm-svn: 121931
|
| |
|
|
|
|
| |
Canonicalize on tLDRpci and remove tLDRcp.
llvm-svn: 121920
|
| |
|
|
|
|
| |
need to use tLDRi and tSTRi instead of tLDRspi and tSTRspi respectively.
llvm-svn: 121915
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instruction based on the t_addrmode_s# mode and what it returned. There is some
obvious badness to this. In particular, it's hard to do MC-encoding when the
instruction may change out from underneath you after the t_addrmode_s# variable
is finally resolved.
The solution is to revert a long-ago change that merged the reg/reg and reg/imm
versions. There is the addition of several new addressing modes. They no longer
have extraneous operands associated with them. I.e., if it's reg/reg we don't
have to have a dummy zero immediate tacked on to the SDNode.
There are some obvious cleanups here, which will happen shortly.
llvm-svn: 121747
|
| |
|
|
| |
llvm-svn: 119804
|
| |
|
|
| |
llvm-svn: 119740
|
| |
|
|
|
|
| |
out of TargetRegisterInfo to TargetFrameInfo, which is definitely much better suitable place
llvm-svn: 119097
|
| |
|
|
|
|
| |
assumptions about stack layout. Specifically, LR must be saved next to FP.
llvm-svn: 118026
|
| |
|
|
|
|
|
| |
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268
llvm-svn: 116879
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
between the high and low registers for prologue/epilogue code. This was
a Darwin-only thing that wasn't providing a realistic benefit anymore.
Combining the save areas simplifies the compiler code and results in better
ARM/Thumb2 codegen.
For example, previously we would generate code like:
push {r4, r5, r6, r7, lr}
add r7, sp, #12
stmdb sp!, {r8, r10, r11}
With this change, we combine the register saves and generate:
push {r4, r5, r6, r7, r8, r10, r11, lr}
add r7, sp, #12
rdar://8445635
llvm-svn: 114340
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
"For ARM stack frames that utilize variable sized objects and have either
large local stack areas or require dynamic stack realignment, allocate a
base register via which to access the local frame. This allows efficient
access to frame indices not accessible via the FP (either due to being out
of range or due to dynamic realignment) or the SP (due to variable sized
object allocation). In particular, this greatly improves efficiency of access
to spill slots in Thumb functions which contain VLAs."
r112986 fixed a latent bug exposed by the above.
llvm-svn: 112989
|
| |
|
|
|
|
|
|
| |
either", it is breaking oggenc with Clang for ARMv6.
This reverts commit 8d6e29cfda270be483abf638850311670829ee65.
llvm-svn: 112962
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
large local stack areas or require dynamic stack realignment, allocate a
base register via which to access the local frame. This allows efficient
access to frame indices not accessible via the FP (either due to being out
of range or due to dynamic realignment) or the SP (due to variable sized
object allocation). In particular, this greatly improves efficiency of access
to spill slots in Thumb functions which contain VLAs.
rdar://7352504
rdar://8374540
rdar://8355680
llvm-svn: 112883
|
| |
|
|
|
|
| |
to try to re-use scavenged frame index reference registers. rdar://8277890
llvm-svn: 112241
|
| |
|
|
|
|
| |
rdar://8277890
llvm-svn: 111533
|
| |
|
|
|
|
|
|
| |
function stack frame has a var-sized object.
Also added a test case to check for the added benefit of this patch: it's optimizing away the unnecessary restore of sp from fp for some non-leaf functions.
llvm-svn: 110707
|
| |
|
|
|
|
| |
register is", it breaks a couple test-suite tests.
llvm-svn: 110701
|
| |
|
|
|
|
|
|
|
|
| |
reserved, not available for general allocation. This eliminates all the
extra checks for Darwin.
This change also fixes the use of FP to access frame indices in leaf
functions and cleaned up some confusing code in epilogue emission.
llvm-svn: 110655
|
| |
|
|
| |
llvm-svn: 108812
|
| |
|
|
| |
llvm-svn: 108094
|
| |
|
|
| |
llvm-svn: 107154
|