Commit Graph

41 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 9e50bff478 Unbreak LLVM on the MSVC compiler:
-Bring in int64_t for TableGen/Record.h and TableGen/TGLexer.h
-Define strtoull

llvm-svn: 57970
2008-10-22 09:54:13 +00:00
Dan Gohman ca0546facc Fun x86 encoding tricks: when adding an immediate value of 128,
use a SUB instruction instead of an ADD, because -128 can be
encoded in an 8-bit signed immediate field, while +128 can't be.
This avoids the need for a 32-bit immediate field in this case.

A similar optimization applies to 64-bit adds with 0x80000000,
with the 32-bit signed immediate field.

To support this, teach tablegen how to handle 64-bit constants.

llvm-svn: 57663
2008-10-17 01:33:43 +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
Dan Gohman 56e3f63ec5 Add explicit keywords.
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Dan Gohman c60c67fc37 Add explicit keywords.
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Anton Korobeynikov 010bd77372 Add interator interface to DAGInit also
llvm-svn: 46250
2008-01-22 11:00:07 +00:00
Anton Korobeynikov e49cc26380 Provide iterator access to ListInit contents
llvm-svn: 46223
2008-01-21 22:30:26 +00:00
Chris Lattner 8adcd9f32e remove attributions from utils.
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Chris Lattner 695506c046 change the Init print methods to return strings, and implement
print in terms of that.

llvm-svn: 44276
2007-11-22 21:05:25 +00:00
Chris Lattner 1b1e96b8d7 eliminate a bunch of print methods that are duplicate with the getAsString() method.
llvm-svn: 44275
2007-11-22 20:51:34 +00:00
Chris Lattner 8b9ecdad0c Add the ability to convert a tblgen type to a string.
llvm-svn: 44257
2007-11-20 22:25:16 +00:00
Anton Korobeynikov a468a11d80 Add convenient helper to obtain list of ints
llvm-svn: 43993
2007-11-11 11:19:37 +00:00
Evan Cheng a32dee205f Added \!con(a,b) syntax to concatnate two dag fragments.
llvm-svn: 37063
2007-05-15 01:23:24 +00:00
Chris Lattner cbebe4600f reapply
llvm-svn: 34697
2007-02-27 22:08:27 +00:00
Evan Cheng 116ec30e4f Backing out
CodeGenTarget.cpp updated: 1.82 -> 1.83
Record.cpp updated: 1.55 -> 1.56
Record.h updated: 1.59 -> 1.60
TableGen.cpp updated: 1.47 -> 1.48
It's missing CallingConvEmitter.h

llvm-svn: 34693
2007-02-27 21:44:08 +00:00
Chris Lattner fa024e1ad1 initial support for calling convention generation, still unfinished.
llvm-svn: 34682
2007-02-27 20:43:37 +00:00
Bill Wendling 9bfb1e1f29 What should be the last unnecessary <iostream>s in the library.
llvm-svn: 32333
2006-12-07 22:21:48 +00:00
Reid Spencer 97c598083e Add virtual methods to all subclasses so they are not overloaded.
llvm-svn: 29930
2006-08-28 00:12:25 +00:00
Chris Lattner 51ffbf18f0 Generalize the previous binary operator support and add a string concatenation
operation.  This implements Regression/TableGen/strconcat.td.

llvm-svn: 27312
2006-03-31 21:53:49 +00:00
Chris Lattner b59cf3cff4 Implement Regression/TableGen/DagDefSubst.ll
llvm-svn: 27263
2006-03-30 22:50:40 +00:00
Chris Lattner 0d3ef40656 implement test/Regression/TableGen/DagIntSubst.ll
llvm-svn: 25836
2006-01-31 06:02:35 +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 b04feb633f Added method to return a vector of records for a ListInit of Def field. This
simplifies using list of records.

llvm-svn: 24069
2005-10-28 21:46:31 +00:00
Chris Lattner ae939eb6bb Add a new Record::getValueAsCode method to mirror the other getValueAs*
methods.  Use it to simplify some code.

llvm-svn: 23336
2005-09-13 21:44:28 +00:00
Chris Lattner f9b2edb91f add a setName method to record
llvm-svn: 22912
2005-08-19 17:58:49 +00:00
Chris Lattner ac284259ac Add a setName method to Record.
llvm-svn: 22911
2005-08-19 17:58:11 +00:00
Jeff Cohen 88e7b7288a Eliminate tabs and trailing spaces
llvm-svn: 21441
2005-04-22 04:13:13 +00:00
Misha Brukman 650ba8eb56 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Chris Lattner ef94374a1c Major change to tblgen: instead of resolving values every time a class is
finished up, only resolve fully when the def is defined.  This allows things
to be changed and all uses to be propagated through.  This implements
TableGen/LazyChange.td and fixes TemplateArgRename.td in the process.

None of the .td files used in LLVM backends are changed at all by this
patch.

llvm-svn: 21344
2005-04-19 03:36:21 +00:00
Chris Lattner 3ff0e11294 implementing shifting of literal integers
llvm-svn: 21336
2005-04-19 01:17:35 +00:00
Chris Lattner 101fc501d0 Add initial lexer and parser support for shifting values. Every use of this
will lead to it being rejected though.

llvm-svn: 21335
2005-04-19 01:11:03 +00:00
Reid Spencer 1c48c2deee For PR387:
Make this compile without warning when -Woverloaded-virtual is used.

llvm-svn: 18588
2004-12-06 23:42:37 +00:00
Chris Lattner 7dfc2d29ac Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!

llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Chris Lattner 87a1061559 Make VC happier, patch contributed by Morten Ofstad
llvm-svn: 17179
2004-10-23 04:58:50 +00:00
Chris Lattner 577fc3f576 Implement test/Regression/TableGen/ListSlices.td
llvm-svn: 15249
2004-07-27 01:01:21 +00:00
Chris Lattner 8bf9e06ddd Add initial support for list slices. This currently allows you to do stuff
like this:

def B {
  list<int> X = [10, 20, 30, 4, 1, 1231, 20] [2-4,2,2,0-6];
}

... which isn't particularly useful, but more is to come.

llvm-svn: 15247
2004-07-26 23:21:34 +00:00
Misha Brukman b4f20ea496 The "best" of both worlds: readable C++ comments and valid HTML For doxygen.
llvm-svn: 12964
2004-04-15 15:30:15 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell d3032037f1 Added LLVM copyright header.
llvm-svn: 9305
2003-10-20 20:20:30 +00:00
Chris Lattner f5bd1b7a8e Move support/tools/* back into utils
llvm-svn: 8875
2003-10-05 19:27:59 +00:00