| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
pattern can be very useful in cases where you want to define a multiclass that covers both commutative and non-commutative operators (say, add and sub).
llvm-svn: 164256
|
|
|
|
|
|
|
|
|
|
|
| |
This is a generally useful utility; there's no reason to have it hidden
in CodeGenDAGPatterns.cpp.
Also, rename it to fit the other comparators in Record.h
Review by Jakob.
llvm-svn: 164189
|
|
|
|
|
|
| |
unknown def inherits. Make tblgen check for that class, rather than checking for the def itself.
llvm-svn: 163664
|
|
|
|
|
|
|
| |
This Operand type takes a default argument, and is initialized to
this value if it does not appear in a patter.
llvm-svn: 163315
|
|
|
|
|
|
|
| |
Both single-instruction and multi-instruction patterns can be checked
for missing mayLoad / mayStore, and hasSideEffects flags.
llvm-svn: 162734
|
|
|
|
|
|
| |
Reviewed offline by chandlerc.
llvm-svn: 162623
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, instructions without a primary patterns wouldn't get their
properties inferred. Now, we use all single-instruction patterns for
inference, including 'def : Pat<>' instances.
This causes a lot of instruction flags to change.
- Many instructions no longer have the UnmodeledSideEffects flag because
their flags are now inferred from a pattern.
- Instructions with intrinsics will get a mayStore flag if they already
have UnmodeledSideEffects and a mayLoad flag if they already have
mayStore. This is because intrinsics properties are linear.
- Instructions with atomic_load patterns get a mayStore flag because
atomic loads can't be reordered. The correct workaround is to create
pseudo-instructions instead of using normal loads. PR13693.
llvm-svn: 162614
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instructions are now only marked as variadic if they use variable_ops in
their ins list.
A variadic SDNode is typically used for call nodes that have the call
arguments as operands.
A variadic MachineInstr can actually encode a variable number of
operands, for example ARM's stm/ldm instructions. A call instruction
does not have to be variadic. The call argument registers are added as
implicit operands.
This change remove the MCID::Variadic flags from most call and return
instructions, allowing us to better verify their operands.
llvm-svn: 162599
|
|
|
|
|
|
|
|
|
| |
It is now allowed to explicitly set hasSideEffects, mayStore, and
mayLoad on instructions with patterns.
Verify that the patterns are consistent with the explicit flags.
llvm-svn: 162569
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
A standalone pattern defined in a multiclass expansion should handle
null_frag references just like patterns on instructions. Follow-up to
r160333.
llvm-svn: 160384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a 'null_frag' SDPatternOperator node, which if referenced in an
instruction Pattern, results in the pattern being collapsed to be as-if
'[]' had been specified instead. This allows supporting a multiclass
definition where some instaniations have ISel patterns associated and
others do not.
For example,
multiclass myMulti<RegisterClass rc, SDPatternOperator OpNode = null_frag> {
def _x : myI<(outs rc:), (ins rc:), []>;
def _r : myI<(outs rc:), (ins rc:), [(set rc:, (OpNode rc:))]>;
}
defm foo : myMulti<GRa, not>;
defm bar : myMulti<GRb>;
llvm-svn: 160333
|
|
|
|
| |
llvm-svn: 155038
|
|
|
|
| |
llvm-svn: 155026
|
|
|
|
| |
llvm-svn: 155015
|
|
|
|
|
|
| |
That way we get source line number information from the diagnostics.
llvm-svn: 155014
|
|
|
|
|
|
| |
through StringExtras.h
llvm-svn: 153328
|
|
|
|
| |
llvm-svn: 149814
|
|
|
|
| |
llvm-svn: 148293
|
|
|
|
|
|
| |
necessary)
llvm-svn: 148284
|
|
|
|
|
|
|
| |
The code type was always identical to a string anyway. Now it is simply
a synonym. The code literal syntax [{...}] is still valid.
llvm-svn: 148092
|
|
|
|
| |
llvm-svn: 147855
|
|
|
|
|
|
|
|
|
|
| |
TableGen infers unmodeled side effects on instructions without a
pattern. Fix some instruction definitions where that was overlooked.
Also raise an error if a rematerializable instruction has unmodeled side
effects. That doen't make any sense.
llvm-svn: 141929
|
|
|
|
|
|
| |
This is the first step towards splitting LLVM and Clang's tblgen executables.
llvm-svn: 140951
|
|
|
|
|
|
| |
Remove const qualifiers from Init references, per Chris' request.
llvm-svn: 136531
|
|
|
|
|
|
|
| |
Replace uses of new *Init with *Init::get. This hides the allocation
implementation so that we can unique Inits in various ways.
llvm-svn: 136486
|
|
|
|
|
|
|
| |
Make references to Inits const everywhere. This is the final step
before making them unique.
llvm-svn: 136485
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make all of the RecTy constructors private, and use get() factory
methods instead. Return singleton instances when it makes sense.
ListTy instance pointers are stored in the element RecTy instance.
BitsRecTy instance pointers, one per length, are stored in a static vector.
Also unique DefInit instances. A Record has a unique DefInit which
has a unique RecordRecTy instance.
This saves some 200k-300k RecTy allocations when parsing ARM.td. It
reduces TableGen's heap usage by almost 50%.
llvm-svn: 135399
|
|
|
|
|
|
| |
in multiple buildbots.
llvm-svn: 134936
|
|
|
|
|
|
| |
Respond to some feedback asking for a name change.
llvm-svn: 134921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 134563
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
matching code.
llvm-svn: 129677
|
|
|
|
|
|
|
|
|
| |
kind of predicate: one that is specific to imm nodes. The predicate function
specified here just checks an int64_t directly instead of messing around with
SDNode's. The virtue of this is that it means that fastisel and other things
can reason about these predicates.
llvm-svn: 129675
|
|
|
|
|
|
|
|
| |
structure and fix some fixmes. We now have a TreePredicateFn class
that handles all of the decoding of these things. This is an internal
cleanup that has no impact on the code generated by tblgen.
llvm-svn: 129670
|
|
|
|
|
|
|
| |
nothing more than a bitcast.
- Teach tablegen to automatically infer "Bitcast" property.
llvm-svn: 127667
|
|
|
|
| |
llvm-svn: 124869
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
makes type checking for extract_subvector and insert_subvector more
robust and will allow stricter typechecking of more patterns in the
future.
This change handles int and fp as disjoint sets so that it will
enforce integer types to be smaller than the largest integer type and
fp types to be smaller than the largest fp type. There is no attempt
to check type sizes across the int/fp sets.
llvm-svn: 124672
|
|
|
|
|
|
|
|
|
| |
This will be used to check patterns referencing a forthcoming
INSERT_SUBVECTOR SDNode. INSERT_SUBVECTOR in turn is very useful for
matching to VINSERTF128 instructions and complements the already
existing EXTRACT_SUBVECTOR SDNode.
llvm-svn: 124145
|
|
|
|
| |
llvm-svn: 122513
|
|
|
|
| |
llvm-svn: 122337
|
|
|
|
| |
llvm-svn: 121659
|
|
|
|
| |
llvm-svn: 121196
|
|
|
|
|
|
| |
CodeGenInstruction into its own helper class. No functionality change.
llvm-svn: 117893
|
|
|
|
| |
llvm-svn: 116069
|
|
|
|
| |
llvm-svn: 116030
|
|
|
|
|
|
| |
to IntrReadWriteArgMem, as it's for reading as well as writing.
llvm-svn: 110395
|