NAKAMURA Takumi
cb1a888fde
Eliminate "const" from extern const to fix breakeage since r135184 on msvc.
...
MSVC decorates (and distinguishes) "const" in mangler. It brought linkage error between "extern const" declarations and definitions.
llvm-svn: 135269
2011-07-15 12:50:21 +00:00
Evan Cheng
bc153d49b7
Next round of MC refactoring. This patch factor MC table instantiations, MC
...
registeration and creation code into XXXMCDesc libraries.
llvm-svn: 135184
2011-07-14 20:59:42 +00:00
Evan Cheng
c5e6d2f519
- Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfo
...
and MCSubtargetInfo.
- Added methods to update subtarget features (used when targets automatically
detect subtarget features or switch modes).
- Teach X86Subtarget to update MCSubtargetInfo features bits since the
MCSubtargetInfo layer can be shared with other modules.
- These fixes .code 16 / .code 32 support since mode switch is updated in
MCSubtargetInfo so MC code emitter can do the right thing.
llvm-svn: 134884
2011-07-11 03:57:24 +00:00
Evan Cheng
4d1ca96bfc
Eliminate asm parser's dependency on TargetMachine:
...
- Each target asm parser now creates its own MCSubtatgetInfo (if needed).
- Changed AssemblerPredicate to take subtarget features which tablegen uses
to generate asm matcher subtarget feature queries. e.g.
"ModeThumb,FeatureThumb2" is translated to
"(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0".
llvm-svn: 134678
2011-07-08 01:53:10 +00:00
Evan Cheng
1a72add615
Compute feature bits at time of MCSubtargetInfo initialization.
...
llvm-svn: 134606
2011-07-07 07:07:08 +00:00
Evan Cheng
0d639a28aa
Rename TargetSubtarget to TargetSubtargetInfo for consistency.
...
llvm-svn: 134259
2011-07-01 21:01:15 +00:00
Evan Cheng
54b68e3432
- Added MCSubtargetInfo to capture subtarget features and scheduling
...
itineraries.
- Refactor TargetSubtarget to be based on MCSubtargetInfo.
- Change tablegen generated subtarget info to initialize MCSubtargetInfo
and hide more details from targets.
llvm-svn: 134257
2011-07-01 20:45:01 +00:00
Evan Cheng
fe6e405e8c
Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name to
...
be the first encoded as the first feature. It then uses the CPU name to look up
features / scheduling itineray even though clients know full well the CPU name
being used to query these properties.
The fix is to just have the clients explictly pass the CPU name!
llvm-svn: 134127
2011-06-30 01:53:36 +00:00
Evan Cheng
8264e272a9
Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
...
llvm-svn: 134049
2011-06-29 01:14:12 +00:00
Evan Cheng
a2e61292f0
Increase SubtargetFeatureKV Value and Implies fields to 64 bits since some targets are getting very close to 32 subtarget features. Also teach tablegen to error when there are more than 64 features to guard against undefined behavior. rdar://9282332
...
llvm-svn: 129590
2011-04-15 19:35:46 +00:00
Andrew Trick
8a05f66139
Add annotations to tablegen-generated processor itineraries, or replace them with something meaningful. I want to be able to read and debug the generated tables.
...
llvm-svn: 128703
2011-04-01 02:22:47 +00:00
Andrew Trick
db6ed64529
whitespace
...
llvm-svn: 128701
2011-04-01 01:56:55 +00:00
Chris Lattner
77d369c8eb
eliminate the Records global variable, patch by Garrison Venn!
...
llvm-svn: 121659
2010-12-13 00:23:57 +00:00
Evan Cheng
4a010fd1ea
Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMP
...
pipeline forwarding path.
llvm-svn: 115098
2010-09-29 22:42:35 +00:00
Evan Cheng
0097dd0d5a
Add support to model pipeline bypass / forwarding.
...
llvm-svn: 115005
2010-09-28 23:50:49 +00:00
Evan Cheng
367a5df8cf
For each instruction itinerary class, specify the number of micro-ops each
...
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.
This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.
llvm-svn: 113513
2010-09-09 18:18:55 +00:00
Anton Korobeynikov
7d62e33291
Make processor FUs unique for given itinerary. This extends the limit of 32
...
FU per CPU arch to 32 per intinerary allowing precise modelling of quite
complex pipelines in the future.
llvm-svn: 101754
2010-04-18 20:31:01 +00:00
Anton Korobeynikov
0bdc6345e8
Initial support for different kinds of FU reservation.
...
llvm-svn: 100645
2010-04-07 18:19:32 +00:00
David Greene
fb652a7a5c
Have TableGen emit code that uses dbgs() rather than errs().
...
llvm-svn: 92738
2010-01-05 17:47:41 +00:00
Sandeep Patel
598825e832
Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
...
llvm-svn: 86797
2009-11-11 03:23:46 +00:00
David Goodwin
bf97147a7e
Make the end-of-itinerary mark explicit. Some cleanup.
...
llvm-svn: 82709
2009-09-24 20:22:50 +00:00
David Goodwin
d813cbfe72
Extend the instruction itinerary model to include the ability to indicate the def and use cycle for each operand. This additional information is optional, so existing itineraries do not need to be changed.
...
llvm-svn: 79247
2009-08-17 16:02:57 +00:00
David Goodwin
b369ee4c48
Enhance the InstrStage object to enable the specification of an Itinerary with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one.
...
llvm-svn: 78827
2009-08-12 18:31:53 +00:00
Daniel Dunbar
38a22bffdc
Replace std::iostreams with raw_ostream in TableGen.
...
- Sorry, I can't help myself.
- No intended functionality change.
llvm-svn: 74742
2009-07-03 00:10:29 +00:00
Anton Korobeynikov
08bf4c0f5a
Propagate CPU string out of SubtargetFeatures
...
llvm-svn: 72335
2009-05-23 19:50:50 +00:00
Jim Grosbach
975c1cb41a
fix a few spelling errors and typos
...
llvm-svn: 67758
2009-03-26 16:17:51 +00:00
Jim Grosbach
56938af9e2
lib/Target/SubtargetFeature.cpp asserts that the FeatureKV[] table be sorted
...
by its first field, but TableGen doesn't actually enforce creating it that
way. TableGen sorts the records that will be used to create it by the names
of the records, not the Name field of those records.
This patch corrects the sort to use the "Name" field of the record as the
sort key.
llvm-svn: 56106
2008-09-11 17:05:32 +00:00
Chris Lattner
bd7ccd0162
Stabilize 'getDwarfRegNumFull' output to not depend on random memory
...
orders, part of PR2590
llvm-svn: 55359
2008-08-26 06:43:25 +00:00
Chris Lattner
5ed17b67d2
Fix generation of multi-stage instruction itineraries. Patch by
...
giuma.cordes@gmail.com
llvm-svn: 49276
2008-04-06 17:38:14 +00:00
Dan Gohman
bdc24adaaf
A quick nm audit turned up several fixed tables and objects that were
...
marked read-write. Use const so that they can be allocated in a
read-only segment.
llvm-svn: 48800
2008-03-25 21:45:14 +00:00
Dale Johannesen
6ca3ccf519
Rewrite tblgen handling of subtarget features so
...
it follows the order of the enum, not alphabetical.
The motivation is to make -mattr=+ssse3,+sse41
select SSE41 as it ought to. Added "ignored"
enum values of 0 to PPC and SPU to avoid compiler
warnings.
llvm-svn: 47143
2008-02-14 23:35:16 +00:00
Chris Lattner
8adcd9f32e
remove attributions from utils.
...
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Bill Wendling
e6182267d7
Add an "implies" field to features. This indicates that, if the current
...
feature is set, then the features in the implied list should be set also.
The opposite is also enforced: if a feature in the implied list isn't set,
then the feature that owns that implies list shouldn't be set either.
llvm-svn: 36756
2007-05-04 20:38:40 +00:00
Christopher Lamb
8996dce6ec
Fix generation of certain scheduler itineraries.
...
llvm-svn: 36338
2007-04-22 09:04:24 +00:00
Jim Laskey
3f7d047a14
Ignore entries with blank names.
...
llvm-svn: 32491
2006-12-12 20:55:58 +00:00
Jim Laskey
8171e58bd9
Rollback changes to take a different tack.
...
llvm-svn: 32488
2006-12-12 19:26:50 +00:00
Jim Laskey
7c3cab9ddc
Honor the command line specification for machine type.
...
llvm-svn: 32483
2006-12-12 16:07:33 +00:00
Reid Spencer
5314f04de5
Don't write out variables that are never used.
...
llvm-svn: 31396
2006-11-03 01:28:12 +00:00
Reid Spencer
2a82686563
For PR786:
...
Remove unused variables.
llvm-svn: 31381
2006-11-02 20:46:16 +00:00
Chris Lattner
e7549961cf
Don't make zero-sized static arrays
...
llvm-svn: 28448
2006-05-24 17:31:02 +00:00
Chris Lattner
73fbe145fd
remove out of date comment
...
llvm-svn: 26492
2006-03-03 02:04:07 +00:00
Evan Cheng
d98701c639
Subtarget feature can now set any variable to any value
...
llvm-svn: 25678
2006-01-27 08:09:42 +00:00
Chris Lattner
ac8b13b32b
There is at least a 'noitinerary' itinerary now
...
llvm-svn: 25671
2006-01-27 01:41:55 +00:00
Duraid Madina
018da4f5ef
almost got the HP-UX tester up.. :)
...
llvm-svn: 25051
2005-12-30 14:56:37 +00:00
Jim Laskey
d6d3afb05e
1. Remove ranges from itinerary data.
...
2. Tidy up the subtarget emittined code.
llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Jim Laskey
802748cd61
Allow itineraries to be passed through the Target Machine.
...
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Jim Laskey
3763a50d82
Generate cpu to itinerary map.
...
llvm-svn: 24121
2005-10-31 17:16:01 +00:00
Chris Lattner
7ad0bed89f
Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accurately
...
reflect what it is.
Convert some more code over to use it.
llvm-svn: 24072
2005-10-28 22:49:02 +00:00
Jim Laskey
dffe5978a3
Removed Mr. Smith from the code.
...
llvm-svn: 24070
2005-10-28 21:47:29 +00:00
Jim Laskey
1959575208
Add some commentary.
...
llvm-svn: 24055
2005-10-28 15:20:43 +00:00