| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This is the first step towards splitting LLVM and Clang's tblgen executables.
llvm-svn: 140951
|
|
|
|
|
|
|
|
|
| |
Store a RecordVal's name as an Init to allow class-qualified Record
members to reference Records that have Init names. We'll use this to
provide more programmability in how we name defs and their associated
members.
llvm-svn: 139031
|
|
|
|
|
|
|
|
|
|
|
| |
Use an Init (ultimately a StringInit) to represent the Record name.
This allows the name to be composed by standard TableGen operators.
This will enable us to get rid of the ugly #NAME# hack processing and
naturally replace it with operators. It also increases flexibility
and power of the TableGen language by allowing record identifiers to
be computed dynamically.
llvm-svn: 137232
|
|
|
|
|
|
|
|
|
|
|
| |
Add a method to return an Init as an unquoted string. This primarily
affects StringInit where we return the value without surrounding it
with quotes.
This is in preparation for removing the ugly #NAME# hack and replacing
it with standard TabelGen operators.
llvm-svn: 137231
|
|
|
|
|
|
| |
Remove const qualifiers from Init references, per Chris' request.
llvm-svn: 136531
|
|
|
|
|
|
| |
Make sure DagInits are unique and created only once.
llvm-svn: 136501
|
|
|
|
|
|
|
|
|
| |
Ensure ListInits are unique and only created once. This will be
important for AVX as lists will be used extensively to pass generic
patterns, prefix information and other things to lower-level
pattern-generation classes.
llvm-svn: 136493
|
|
|
|
|
|
| |
Make BitsInit a FoldingSetNode so we can unique it.
llvm-svn: 136489
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Remove all non-const iterators from Init classes. This is another
step toward constifying Inits and ultimately turning them into
FoldingSetNodes.
llvm-svn: 136484
|
|
|
|
|
|
|
| |
Get rid of all Init members that modify internal state. This is in
preparation for making references to Inits const.
llvm-svn: 136483
|
|
|
|
|
|
|
| |
Add a getValues ListInit method to return the sequence of values in
the list.
llvm-svn: 136482
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Rename struct Init to class Init for consistency and in preparation
for making Init a FoldingSetNode.
llvm-svn: 135097
|
|
|
|
|
|
| |
in multiple buildbots.
llvm-svn: 134936
|
|
|
|
|
|
| |
Respond to some feedback asking for a name change.
llvm-svn: 134921
|
|
|
|
| |
llvm-svn: 134917
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
ago. This is both easier to learn and easier to read.
llvm-svn: 123001
|
|
|
|
| |
llvm-svn: 121837
|
|
|
|
|
|
|
|
|
|
|
| |
class A<bit a, bits<3> x, bits<3> y> {
bits<3> z;
let z = !if(a, x, y);
}
The variable z will get the value of x when 'a' is 1 and 'y' when a is '0'.
llvm-svn: 121666
|
|
|
|
| |
llvm-svn: 121659
|
|
|
|
| |
llvm-svn: 120304
|
|
|
|
|
|
| |
where !cast is just as short.
llvm-svn: 115722
|
|
|
|
| |
llvm-svn: 114847
|
|
|
|
| |
llvm-svn: 114435
|
|
|
|
|
|
|
|
| |
testcases from
Amaury Pouly.
llvm-svn: 113010
|
|
|
|
|
|
|
| |
This means that our Registers are now ordered R7, R8, R9, R10, R12, ...
Not R1, R10, R11, R12, R2, R3, ...
llvm-svn: 104745
|
|
|
|
|
|
|
|
|
|
| |
We are bound to fail! For proper disassembly, the well-known encoding bits
of the instruction must be fully specified.
This also removes pseudo instructions from considerations of disassembly,
which is a better design and less fragile than the name matchings.
llvm-svn: 100899
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a target instruction wants to set target-specific flags, it should simply
set bits in the TSFlags bit vector defined in the Instruction TableGen class.
This works well because TableGen resolves member references late:
class I : Instruction {
AddrMode AM = AddrModeNone;
let TSFlags{3-0} = AM.Value;
}
let AM = AddrMode4 in
def ADD : I;
TSFlags gets the expected bits from AddrMode4 in this example.
llvm-svn: 100384
|
|
|
|
|
|
|
| |
Remove much horribleness from X86InstrFormats as a result. Similar
simplifications are probably possible for other targets.
llvm-svn: 99539
|
|
|
|
|
|
|
|
|
|
| |
If a TableGen class has an initializer expression containing an X.Y subexpression,
AND X depends on template parameters,
AND those template parameters have defaults,
AND some parameters with defaults are beyond position 1,
THEN parts of the initializer expression are evaluated prematurely with the default values when the first explicit template parameter is substituted, before the remaining explicit template parameters have been substituted.
llvm-svn: 99492
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ordered correctly. Previously it would get in trouble when
two patterns were too similar and give them nondet ordering.
We force this by using the record ID order as a fallback.
The testsuite diff is due to alpha patterns being ordered
slightly differently, the change is a semantic noop afaict:
< lda $0,-100($16)
---
> subq $16,100,$0
llvm-svn: 97509
|
|
|
|
|
|
| |
Use !cast<string>() to compare other types of objects.
llvm-svn: 92754
|
|
|
|
| |
llvm-svn: 89729
|
|
|
|
| |
llvm-svn: 89582
|
|
|
|
| |
llvm-svn: 89566
|
|
|
|
| |
llvm-svn: 89565
|
|
|
|
|
|
| |
direct inclusion edge from System to Support.
llvm-svn: 85086
|
|
|
|
| |
llvm-svn: 82244
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- This manifested as non-determinism in the .inc output in rare cases (when two
distinct patterns ended up being equivalent, which is rather rare). That
meant the pattern matching was non-deterministic, which could eventually mean
the code generator selected different instructions based on the arch.
- It's probably worth making the DAGISel ensure a total ordering (or force the
user to), but the simple fix here is to totally order the Record* maps based
on a unique ID.
- PR4672, PR4711.
Yay:
--
ddunbar@giles:~$ cat ~/llvm.obj.64/lib/Target/*/*.inc | shasum
d1099ff34b21459a5a3e7021c225c080e6017ece -
ddunbar@giles:~$ cat ~/llvm.obj.ppc/lib/Target/*/*.inc | shasum
d1099ff34b21459a5a3e7021c225c080e6017ece -
--
llvm-svn: 79846
|
|
|
|
| |
llvm-svn: 78848
|
|
|
|
|
|
|
|
| |
- Sorry, I can't help myself.
- No intended functionality change.
llvm-svn: 74742
|
|
|
|
| |
llvm-svn: 74444
|
|
|
|
| |
llvm-svn: 73843
|
|
|
|
| |
llvm-svn: 73842
|