| 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
|
|
|
|
|
|
|
|
| |
r154362 was supposed to delete this bit, but obviously didn't.
rdar://11305594
llvm-svn: 155465
|
|
|
|
|
|
| |
since they are equivalent.
llvm-svn: 155188
|
|
|
|
|
|
| |
Generalized logic of r154141.
llvm-svn: 154362
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The load/store optimizer splits LDRD/STRD into two instructions when the
register pairing doesn't work out. For negative offsets in Thumb2, it uses
t2STRi8 to do that. That's fine, except for the case when the offset is in
the range [-4,-1]. In that case, we'll also form a second t2STRi8 with
the original offset plus 4, resulting in a t2STRi8 with a non-negative
offset, which ends up as if it were an STRT, which is completely bogus.
Similarly for loads.
No testcase, unfortunately, as any I've been able to construct is both large
and extremely fragile.
rdar://11193937
llvm-svn: 154141
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an strd instruction doesn't get the registers it wants, it can be
expanded into two str instructions. Make sure the first str doesn't kill
the base register in the case where the base and data registers are
identical:
t2STRi12 %R0<kill>, %R0, 4, pred:14, pred:%noreg
t2STRi12 %R2<kill>, %R0, 8, pred:14, pred:%noreg
<rdar://problem/11101911>
llvm-svn: 153611
|
|
|
|
|
|
|
|
|
|
|
| |
When a number of sub-register VLRDS instructions are combined into a
VLDM, preserve any super-register implicit defs. This is required to
keep the register scavenger and machine code verifier happy.
Enable machine code verification after ARMLoadStoreOptimizer.
ARM/2012-01-26-CopyPropKills.ll was failing because of this.
llvm-svn: 153610
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert r153519: "ARMLoadStoreOptimizer invalidates register liveness."
These patches caused miscompilations in povray by turning off branch
folding's updating of live-in lists.
It turns out the the late scheduler depends on the live-in lists, even
if it doesn't need correct kill flags.
<rdar://problem/11139228>
llvm-svn: 153593
|
|
|
|
|
|
|
|
|
|
| |
This pass tries to update kill flags, but there are still many bugs.
Passes after the load/store optimizer don't need accurate liveness, so
don't even try.
<rdar://problem/11101911>
llvm-svn: 153519
|
|
|
|
| |
llvm-svn: 153500
|
|
|
|
| |
llvm-svn: 153422
|
|
|
|
|
|
| |
MSP430, PPC, PTX, Sparc, X86, XCore.
llvm-svn: 150878
|
|
|
|
|
|
|
|
| |
load / store) if the ADD / SUB has a live definition of CPSR.
Bug reported by David Meyer. Alas, no test case.
llvm-svn: 149970
|
|
|
|
| |
llvm-svn: 148578
|
|
|
|
|
|
|
|
| |
Allow LDRD to be formed from pairs with different LDR encodings. This was the original intention of the pass. Somewhere along the way, the LDR opcodes were refined which broke the optimization. We really don't care what the original opcodes are as long as they both map to the same LDRD and the immediate still fits.
Fixes rdar://10435045 ARMLoadStoreOptimization cannot handle mixed LDRi8/LDRi12
llvm-svn: 147922
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 145129
|
|
|
|
|
|
| |
Fixes PR8113.
llvm-svn: 144409
|
|
|
|
| |
llvm-svn: 144154
|
|
|
|
|
|
| |
ldm or ldr pairs.
llvm-svn: 144123
|
|
|
|
|
|
| |
encodings to the load-store optimizer that I applied to the instruction selector in r138758. Fixes ary3 from the nightly test suite.
llvm-svn: 138766
|
|
|
|
|
|
| |
and LDRB_PRE_IMM in r138653.
llvm-svn: 138746
|
|
|
|
|
|
| |
were failing to specify enough fixed bits of LDR_PRE/LDRB_PRE, resulting in decoding conflicts. Separate them into immediate vs. register versions, allowing us to specify the necessary fixed bits. This in turn results in the test being decoded properly, and being rejected as UNPREDICTABLE rather than a hard failure.
llvm-svn: 138653
|
|
|
|
|
|
|
|
|
| |
Tidy up the code a bit and push the definition of the value next to the uses
to try to minimize this sort of issue from arising again while I'm at it.
rdar://9945172
llvm-svn: 137525
|
|
|
|
|
|
|
|
|
|
| |
Refactor STR[B] pre and post indexed instructions to use addressing modes for
memory operands, which is necessary for assembly parsing and is more consistent
with the rest of the memory instruction definitions. Make some incremental
progress on refactoring away the mega-operand addrmode2 along the way, which
is nice.
llvm-svn: 136978
|
|
|
|
|
|
| |
for allowing the fixed-length disassembler to distinguish between SBFX and STR_PRE.
llvm-svn: 136141
|
|
|
|
|
|
| |
ARM MC code from target.
llvm-svn: 135636
|
|
|
|
|
|
|
|
|
|
| |
Unlike Thumb1, Thumb2 does not have dedicated encodings for adjusting the
stack pointer. It can just use the normal add-register-immediate encoding
since it can use all registers as a source, not just R0-R7. The extra
instruction definitions are just duplicates of the normal instructions with
the (not well enforced) constraint that the source register was SP.
llvm-svn: 134114
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 133944
|
|
|
|
| |
llvm-svn: 132083
|
|
|
|
|
|
| |
turned on.
llvm-svn: 131578
|
|
|
|
|
|
| |
There are probably more instances of this floating around.
llvm-svn: 130474
|
|
|
|
|
|
| |
Luis Felipe Strano Moraes!
llvm-svn: 129558
|
|
|
|
| |
llvm-svn: 128953
|
|
|
|
|
|
| |
needlessly instantiating the base register in some cases.
llvm-svn: 128481
|
|
|
|
| |
llvm-svn: 128467
|
|
|
|
|
|
| |
actually exist.
llvm-svn: 128461
|
|
|
|
| |
llvm-svn: 127683
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
well.
This is necessary to avoid a crash in certain tangled situations where a kill
flag is first correctly moved to a merged instruction, and then needs to be
moved again:
STR %R0, a...
STR %R0<kill>, b...
First becomes:
STR %R0, b...
STM a, %R0<kill>, ...
and then:
STM a, %R0, ...
STM b, %R0<kill>, ...
We can now remove the kill flag from the merged STM when needed. 8960050.
llvm-svn: 125591
|
|
|
|
| |
llvm-svn: 125009
|
|
|
|
| |
llvm-svn: 123408
|
|
|
|
|
|
|
|
|
|
| |
Instead encode llvm IR level property "HasSideEffects" in an operand (shared
with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check
the operand when the instruction is an INLINEASM.
This allows memory instructions to be moved around INLINEASM instructions.
llvm-svn: 123044
|
|
|
|
| |
llvm-svn: 122970
|
|
|
|
| |
llvm-svn: 119726
|
|
|
|
| |
llvm-svn: 119539
|
|
|
|
| |
llvm-svn: 119492
|
|
|
|
|
|
| |
should get the submode from the load/store multiple instruction's opcode.
llvm-svn: 119461
|
|
|
|
|
|
|
|
|
| |
'db', 'ib', 'da') instead of having that mode as a separate field in the
instruction. It's more convenient for the asm parser and much more readable for
humans.
<rdar://problem/8654088>
llvm-svn: 119310
|
|
|
|
|
|
| |
strd. pr8113.
llvm-svn: 119109
|