| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Also, some minor cleanup.
llvm-svn: 165647
|
|
|
|
|
|
|
|
|
|
| |
Some of these dyn_cast<>'s would be better phrased as isa<> or cast<>.
That will happen in a future patch.
There are also two dyn_cast_or_null<>'s slipped in instead of
dyn_cast<>'s, since they were causing crashes with just dyn_cast<>.
llvm-svn: 165646
|
|
|
|
|
|
| |
unknown def inherits. Make tblgen check for that class, rather than checking for the def itself.
llvm-svn: 163664
|
|
|
|
|
|
|
|
|
|
|
|
| |
Emit TableGen errors if guessInstructionProperties is 0 and
instruction properties can't be inferred from patterns.
Allow explicit instruction properties even when they can be inferred.
This patch doesn't change the TableGen output. Redundant properties
are not yet verified because the tree has errors.
llvm-svn: 162516
|
|
|
|
|
|
|
| |
Keep track of the set/unset state of these bits along with their
true/false values, but treat '?' as '0' for now.
llvm-svn: 162461
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When reporting an error for a defm, we would previously only report the
location of the outer defm, which is not always where the error is.
Now we also print the location of the expanded multiclass defs:
lib/Target/X86/X86InstrSSE.td:2902:12: error: foo
defm ADD : basic_sse12_fp_binop_s<0x58, "add", fadd, SSE_ALU_ITINS_S>,
^
lib/Target/X86/X86InstrSSE.td:2801:11: note: instantiated from multiclass
defm PD : sse12_fp_packed<opc, !strconcat(OpcodeStr, "pd"), OpNode, VR128,
^
lib/Target/X86/X86InstrSSE.td:194:5: note: instantiated from multiclass
def rm : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, x86memop:$src2),
^
llvm-svn: 162409
|
|
|
|
|
|
|
|
|
|
|
|
| |
Select instructions pick one of two virtual registers based on a
condition, like x86 cmov. On targets like ARM that support predication,
selects can sometimes be eliminated by predicating the instruction
defining one of the operands.
Teach PeepholeOptimizer to recognize select instructions, and ask the
target to optimize them.
llvm-svn: 162059
|
|
|
|
|
|
| |
complex operand are called out explicitly in the asm string.
llvm-svn: 158183
|
|
|
|
|
|
| |
rdar://10435076
llvm-svn: 144606
|
|
|
|
| |
llvm-svn: 144598
|
|
|
|
|
|
|
|
|
| |
For example,
On ARM, "mov r3, #-3" is an alias for "mvn r3, #2", so we want to use a
matcher pattern that handles the bitwise negation when mapping to t2MVNi.
llvm-svn: 143233
|
|
|
|
|
|
|
|
| |
If the register class in the source alias is a subclass of the register class
of the actual instruction, the alias can still match OK since the constraints
are strictly a subset of what the instruction can actually handle.
llvm-svn: 143200
|
|
|
|
|
|
| |
This is the first step towards splitting LLVM and Clang's tblgen executables.
llvm-svn: 140951
|
|
|
|
|
|
|
|
|
|
| |
No functionality change. The hook makes it explicit which patterns
require "special" handling. i.e. it self-documents tblgen
deficiencies. I plan to add verification in ExpandISelPseudos and
Thumb2SizeReduce to catch any missing hasPostISelHooks. Otherwise it's
too fragile.
llvm-svn: 140160
|
|
|
|
|
|
|
|
|
|
|
| |
Modified ARMISelLowering::AdjustInstrPostInstrSelection to handle the
full gamut of CPSR defs/uses including instructins whose "optional"
cc_out operand is not really optional. This allowed removal of the
hasPostISelHook to simplify the .td files and make the implementation
more robust.
Fixes rdar://10137436: sqlite3 miscompile
llvm-svn: 140134
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a instruction flag: hasPostISelHook which tells the pre-RA scheduler to
call a target hook to adjust the instruction. For ARM, this is used to
adjust instructions which may be setting the 's' flag. ADC, SBC, RSB, and RSC
instructions have implicit def of CPSR (required since it now uses CPSR physical
register dependency rather than "glue"). If the carry flag is used, then the
target hook will *fill in* the optional operand with CPSR. Otherwise, the hook
will remove the CPSR implicit def from the MachineInstr.
llvm-svn: 138810
|
|
|
|
| |
llvm-svn: 138073
|
|
|
|
| |
llvm-svn: 138067
|
|
|
|
|
|
| |
Remove const qualifiers from Init references, per Chris' request.
llvm-svn: 136531
|
|
|
|
|
|
|
| |
Make references to Inits const everywhere. This is the final step
before making them unique.
llvm-svn: 136485
|
|
|
|
|
|
|
|
| |
to for it to be an an anon namespace and be in a header.
Eliminate some extraenous uses of tie.
llvm-svn: 135669
|
|
|
|
|
|
|
|
|
|
| |
the Operand.
- The actual values are from the MCOI::OperandType enum.
- Teach tblgen to read it from the instruction definition.
- This is a better implementation of the hacks in edis.
llvm-svn: 135197
|
|
|
|
|
|
| |
in multiple buildbots.
llvm-svn: 134936
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Manage Inits in a FoldingSet. This provides several benefits:
- Memory for Inits is properly managed
- Duplicate Inits are folded into Flyweights, saving memory
- It enforces const-correctness, protecting against certain classes
of bugs
The above benefits allow Inits to be used in more contexts, which in
turn provides more dynamism to TableGen. This enhanced capability
will be used by the AVX code generator to a fold common patterns
together.
llvm-svn: 134907
|
|
|
|
|
|
|
| |
So users of a CGI don't have to look up the value directly from the original
Record; just like the rest of the convenience values in the class.
llvm-svn: 134576
|
|
|
|
|
|
|
|
|
|
| |
For now this is distinct from isCodeGenOnly, as code-gen-only
instructions can (and often do) still have encoding information
associated with them. Once we've migrated all of them over to true
pseudo-instructions that are lowered to real instructions prior to
the printer/emitter, we can remove isCodeGenOnly and just use isPseudo.
llvm-svn: 134539
|
|
|
|
|
|
|
|
| |
operands are logically equivalent to existing registers, but happen to be printed specially. For example, an instruciton that prints d0[0] instead of s0.
Patch by Jim Grosbach.
llvm-svn: 133940
|
|
|
|
|
|
|
| |
TableGen had diagnostic printers sprinkled about in a few places. Pull them
together into a single location in Error.cpp.
llvm-svn: 133568
|
|
|
|
|
|
|
|
|
|
|
| |
Make the Elements vector private and expose an ArrayRef through
getOrder() instead. getOrder will eventually provide multiple
user-specified allocation orders.
Use the sorted member set for member and subclass tests. Clean up a lot
of ad hoc searches.
llvm-svn: 133040
|
|
|
|
|
|
|
| |
nothing more than a bitcast.
- Teach tablegen to automatically infer "Bitcast" property.
llvm-svn: 127667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an operand class is defined with MIOperandInfo set to a list of
suboperands, the AsmMatcher has so far required that operand to also define
a custom ParserMatchClass, and InstAlias patterns have not been able to
set the individual suboperands separately. This patch removes both of those
restrictions. If a "compound" operand does not override the default
ParserMatchClass, then the AsmMatcher will now parse its suboperands
separately. If an InstAlias operand has the same class as the corresponding
compound operand, then it will be handled as before; but if that check fails,
TableGen will now try to match up a sequence of InstAlias operands with the
corresponding suboperands.
llvm-svn: 124314
|
|
|
|
| |
llvm-svn: 124271
|
|
|
|
| |
llvm-svn: 124270
|
|
|
|
| |
llvm-svn: 123934
|
|
|
|
| |
llvm-svn: 123932
|
|
|
|
|
|
|
| |
There should be no functional change from this, but I think it's simpler this
way.
llvm-svn: 123931
|
|
|
|
|
|
|
|
| |
This is needed to allow an InstAlias for an instruction with an "OptionalDef"
result register (like ARM's cc_out) where you want to set the optional register
to reg0.
llvm-svn: 123490
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and xor. The 32-bit move immediates can be hoisted out of loops by machine
LICM but the isel hacks were preventing them.
Instead, let peephole optimization pass recognize registers that are defined by
immediates and the ARM target hook will fold the immediates in.
Other changes include 1) do not fold and / xor into cmp to isel TST / TEQ
instructions if there are multiple uses. This happens when the 'and' is live
out, machine sink would have sinked the computation and that ends up pessimizing
code. The peephole pass would recognize situations where the 'and' can be
toggled to define CPSR and eliminate the comparison anyway.
2) Move peephole pass to after machine LICM, sink, and CSE to avoid blocking
important optimizations.
rdar://8663787, rdar://8241368
llvm-svn: 119548
|
|
|
|
|
|
| |
Switch the ARM backend to use 'let' instead of 'set' with this change.
llvm-svn: 119120
|
|
|
|
|
|
|
|
| |
fixed physical registers. Start moving fp comparison
aliases to the .td file (which default to using %st1 if
nothing is specified).
llvm-svn: 118352
|
|
|
|
|
|
|
| |
add fixed immediate values. Move the aad and aam aliases to
use this, and document it.
llvm-svn: 118350
|
|
|
|
|
|
|
|
| |
result instruction operand numbering matched the result pattern.
Fixing this allows us to move the xchg/test aliases to the .td file.
llvm-svn: 118334
|
|
|
|
|
|
| |
from c++ hacks to proper .td InstAlias definitions. Change them!
llvm-svn: 118330
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operand list instead of the operand list redundantly declared on the alias
or instruction.
With this change, we finally remove the ins/outs list on the alias. Before:
def : InstAlias<(outs GR16:$dst), (ins GR8 :$src),
"movsx $src, $dst",
(MOVSX16rr8W GR16:$dst, GR8:$src)>;
After:
def : InstAlias<"movsx $src, $dst",
(MOVSX16rr8W GR16:$dst, GR8:$src)>;
This also makes the alias mechanism more general and powerful, which will
be exploited in subsequent patches.
llvm-svn: 118329
|
|
|
|
|
|
|
|
|
|
| |
(someinst GR16:$foo, GR32:$foo)
Reimplement BuildAliasOperandReference to be correctly
based on the names of operands in the result pattern,
instead of on the instruction operand definitions.
llvm-svn: 118328
|
|
|
|
| |
llvm-svn: 118327
|
|
|
|
|
|
| |
file instead of the asmmatcher.
llvm-svn: 118324
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aliases installed and working. They now work when the
matched pattern and the result instruction have exactly
the same operand list.
This is now enough for us to define proper aliases for
movzx and movsx, implementing rdar://8017633 and PR7459.
Note that we do not accept instructions like:
movzx 0(%rsp), %rsi
GAS accepts this instruction, but it doesn't make any
sense because we don't know the size of the memory
operand. It could be 8/16/32 bits.
llvm-svn: 117901
|
|
|
|
|
|
| |
todo: the result field.
llvm-svn: 117894
|
|
|
|
|
|
| |
CodeGenInstruction into its own helper class. No functionality change.
llvm-svn: 117893
|