1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

4379 Commits

Author SHA1 Message Date
Joel Jones
9df037b59d Add Textmate bundle for Tablegen syntax-highlighting
llvm-svn: 171496
2013-01-04 18:55:24 +00:00
Michael J. Spencer
8e9968e6f2 [Support][Endian] Add support for specifying the alignment and native unaligned types.
* Add support for specifying the alignment to use.
* Add the concept of native endianness. Used for unaligned native types.

The native alignment and read/write simplification is based on a patch by Richard Smith.

llvm-svn: 171406
2013-01-02 20:14:11 +00:00
Chandler Carruth
03fda8f594 Sort a few more #include lines in tools/... unittests/... and utils/...
llvm-svn: 171363
2013-01-02 10:26:28 +00:00
Chandler Carruth
1879729aa9 Rename VMCore directory to IR.
Aside from moving the actual files, this patch only updates the build
system and the source file comments under lib/... that are relevant.

I'll be updating other docs and other files in smaller subsequnet
commits.

While I've tried to test this, but it is entirely possible that there
will still be some build system fallout.

Also, note that I've not changed the library name itself: libLLVMCore.a
is still the library name. I'd be interested in others' opinions about
whether we should rename this as well (I think we should, just not sure
what it might break)

llvm-svn: 171359
2013-01-02 09:10:48 +00:00
Eli Bendersky
38abc56548 Fix comment typo
llvm-svn: 171113
2012-12-26 18:15:42 +00:00
NAKAMURA Takumi
5b4a443c29 TableGen/FixedLenDecoderEmitter.cpp: Fix a potential mask overflow in fieldFromInstruction().
Reported by Yang Yongyong, thanks!

llvm-svn: 171101
2012-12-26 06:43:14 +00:00
Elena Demikhovsky
33e7b6276c Added 6 more value types: v32i1, v64i1, v32i16, v32i8, v64i8, v8f64
llvm-svn: 171026
2012-12-24 10:03:57 +00:00
Daniel Dunbar
ddefc57253 [utils] Tweak utils/clang-parse-diagnostics-file to ignore autoconf diagnostics.
- Also, don't print headers if we aren't going to print any diagnostics.

llvm-svn: 170973
2012-12-22 00:47:06 +00:00
Bill Wendling
a16e5519db Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of attribute instead of the value of the attribute.
llvm-svn: 170972
2012-12-22 00:37:52 +00:00
Benjamin Kramer
fee2de20ab Teach sort_includes.py to drop duplicated includes.
llvm-svn: 170911
2012-12-21 18:00:08 +00:00
Eli Bendersky
5420e6ae4a Add a largish auto-generated test for the aligned bundling feature, along with
the script generating it. The test should never be modified manually. If anyone
needs to change it, please change the script and re-run it.

The script is placed into utils/testgen - I couldn't think of a better place,
and after some discussion on IRC this looked like a logical location.

llvm-svn: 170720
2012-12-20 19:16:57 +00:00
NAKAMURA Takumi
72d12c87ec llvmbuild/main.py: Let LibraryDependencies.inc deterministic.
FYI, llvm and clang can be built deterministically between stage 2 and stage3, among iterative clean rebuilds, with GNU ar;

configure --disable-timestamps
make AR.Flags=crsD RANLIB=echo

llvm-svn: 170682
2012-12-20 10:35:18 +00:00
Richard Smith
bf1fd53e22 Fix an uninitialized member variable, found by -fsanitize=bool.
llvm-svn: 170627
2012-12-20 01:05:39 +00:00
Jim Grosbach
431f84fb2f MC: Add MCInstrDesc::mayAffectControlFlow() method.
MC disassembler clients (LLDB) are interested in querying if an
instruction may affect control flow other than by virtue of being
an explicit branch instruction. For example, instructions which
write directly to the PC on some architectures.

llvm-svn: 170610
2012-12-19 23:38:53 +00:00
Roman Divacky
7a967134bc Remove edis - the enhanced disassembler. Fixes PR14654.
llvm-svn: 170578
2012-12-19 19:55:47 +00:00
Bill Wendling
56d9c4b832 Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
llvm-svn: 170502
2012-12-19 07:18:57 +00:00
Bill Wendling
10c1be166f Fix grammar-o.
llvm-svn: 169798
2012-12-11 00:23:07 +00:00
Anshuman Dasgupta
38feea3c57 Fix PR14568: Avoid the DFA packetizer from making an invalid read
beyond array bounds.

No test case since I cannot reproduce an ICE with this bug. According
to Carlos -- the bug reporter -- a segfault occurs only when LLVM is
compiled with a specific version of GCC.

llvm-svn: 169783
2012-12-10 22:45:57 +00:00
Bill Wendling
3f153ce37b s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.
llvm-svn: 169651
2012-12-07 23:16:57 +00:00
NAKAMURA Takumi
10b6852107 unittest/googletest/Makefile: Unbreak out-of-tree build.
- Use SOURCES instead of Source. See Makefile.rules and MakefileGuide.html.
  - Don't assume the current directory. $(wildcard *.cc) doesn't match anything on corresponding build directory.

llvm-svn: 169568
2012-12-07 01:25:45 +00:00
Alexey Samsonov
8388a78977 Try to unbreak makefile build by excluding gtest-all.cc source
llvm-svn: 169564
2012-12-06 23:59:54 +00:00
Alexey Samsonov
f9bf4312f3 Modify the LLVM checkout of googletest:
1) don't delete gtest-all.cc (which is used to gather all gtest source
   files in a single file) 
2) make including LLVMSupport headers optional (on by default).
   Sanitizer tools may want to use their own versions of googletest
   compiled with specific flags, instead of the common googletest
   library used for all other LLVM/Clang unittests.

llvm-svn: 169559
2012-12-06 23:04:41 +00:00
Richard Smith
f3e386b4af PR10867: Analogue of r169441 for when using external 'sh'. And actually run the test!
llvm-svn: 169446
2012-12-05 23:15:33 +00:00
Richard Smith
27aef165bb PR10867. lit would interpret
RUN: a
  RUN: b || true

as "a && (b || true)" in Tcl mode, and as "(a && b) || true" in sh mode.
Everyone seems to (quite reasonably) write tests assuming the Tcl behavior,
so use that in sh mode too.

llvm-svn: 169441
2012-12-05 22:54:26 +00:00
Andrew Trick
67c084b14c RegisterPresssureTracker: Track live physical register by unit.
This is much simpler to reason about, more efficient, and
fixes some corner cases involving implicit super-register defs.
Fixed rdar://12797931.

llvm-svn: 169425
2012-12-05 21:37:42 +00:00
Andrew Trick
193523c593 RegisterPressure API. Add support for physical register units.
At build-time register pressure was always computed in terms of
register units. But the compile-time API was expressed in terms of
register classes because it was intended for virtual registers (and
physical register units weren't yet used anywhere in codegen).

Now that the codegen uses physreg units consistently, prepare for
tracking register pressure also in terms of live units, not live
registers.

llvm-svn: 169360
2012-12-05 06:47:12 +00:00
Michael J. Spencer
c0bd8f95ce Copy clang/Driver/<Option parsing stuff> to llvm.
llvm-svn: 169344
2012-12-05 00:29:32 +00:00
NAKAMURA Takumi
f5b5d0eac4 KillTheDoctor.cpp: Restore Win32 SDK headers before r169251.
llvm-svn: 169255
2012-12-04 11:34:27 +00:00
Chandler Carruth
3e8b3f66be Sort the #include lines for utils/...
I've tried to find main moudle headers where possible, but the TableGen
stuff may warrant someone else looking at it.

llvm-svn: 169251
2012-12-04 10:37:14 +00:00
Chandler Carruth
2fffa5c0d2 Teach the include sorter to quickly skip files with an extension that
doesn't look like it will have C++ code in it.

Suggestions on a better heuristic are welcome.

llvm-svn: 169248
2012-12-04 10:08:59 +00:00
Chandler Carruth
64bbcb3d1f Teach the include sorter to skip files under test trees and under INPUTS
trees. This allows running the input sorter on the entire clang
repository cleanly now.

llvm-svn: 169247
2012-12-04 09:59:54 +00:00
Chandler Carruth
f20915b38c Teach the include sorting script about the gtest headers; sort them with
the system headers.

llvm-svn: 169242
2012-12-04 09:44:38 +00:00
Chandler Carruth
ac00768d41 Address review comments from Matt on the sort_includes.py script.
1) Teach it to handle files with #include on the first line -- these do
   actually exist in LLVM.
2) Support llvm-c and clang-c include projects.
3) Nuke some stail imports.
4) Switch to using os.path to split the file extension off.
5) Remove debugging leftovers.
6) Add docstring (a really puny one) for the sort function.

I'm continuing te avoid stripping the whitespace on the RHS to preserve
whatever newline characters happen to be in the original file.

llvm-svn: 169222
2012-12-04 07:04:58 +00:00
Chandler Carruth
4fe3ec872c Teach the include sorter to not choke on include guards. ;]
Kind of important when prepping the include/... tree version of the sort
changes.

llvm-svn: 169132
2012-12-03 17:01:46 +00:00
Chandler Carruth
fb558fa381 Add a completely hack-ish tool to sort includes according to the coding
standards.

I am a terrible Python programmer. Patches more the welcome. Please tell
me how this should look if it should look differently. It's just a tiny
little script so it didn't make sense to go through pre-commit review,
especially as someone who actually knows python may want to just rip it
apart and do it The Right Way.

I will be preparing a commit shortly that uses this script to
canonicalize *all* of the #include lines in LLVM. Really, all of them.

llvm-svn: 169125
2012-12-03 14:23:44 +00:00
Bill Wendling
8664bd9153 Remove 'deplibs' keyword, since it's no longer used.
llvm-svn: 169116
2012-12-03 06:34:06 +00:00
Benjamin Kramer
4e6d511382 Bring vim keyword lists up to date.
llvm-svn: 169110
2012-12-02 16:40:38 +00:00
Eli Bendersky
99a08c0b07 Fix a bug in FileCheck that wouldn't let define variables as follows:
; CHECK: [[VAR:[a-z]]]

The problem was that to find the end of the regex var definition, it was
simplistically looking for the next ]] and finding the incorrect one. A
better approach is to count nesting of brackets (taking escaping into
account). This way the brackets that are part of the regex can be discovered
and skipped properly, and the ]] ending is detected in the right place.

llvm-svn: 169109
2012-12-02 16:02:41 +00:00
Eli Bendersky
7ccdc0d825 Support referencing variables defined on the same line.
See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157198.html
and related discussions.

llvm-svn: 169101
2012-12-01 21:54:48 +00:00
Michael Ilseman
5f2988f933 Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp
llvm-svn: 169064
2012-12-01 00:42:27 +00:00
Michael Ilseman
7b3d46a0b9 Vim mode updated to recognize fast-math flags
llvm-svn: 169055
2012-11-30 23:18:21 +00:00
Daniel Dunbar
4ca39306cc lit: Add a simple test suite for checking test runner parallelism.
llvm-svn: 169038
2012-11-30 21:34:04 +00:00
Eli Bendersky
6982657b67 Clean up whitespace and add comments
llvm-svn: 169002
2012-11-30 14:22:14 +00:00
Eli Bendersky
0c0c679bab Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)

llvm-svn: 169001
2012-11-30 13:51:33 +00:00
Jakob Stoklund Olesen
7cbcf348ea Add an MCPhysReg typedef to replace naked uint16_t.
Use this type for arrays of physical registers.

llvm-svn: 168850
2012-11-29 02:39:28 +00:00
Jakob Stoklund Olesen
79c1e7f5af Remove all references to TargetInstrInfoImpl.
This class has been merged into its super-class TargetInstrInfo.

llvm-svn: 168760
2012-11-28 02:35:17 +00:00
Daniel Dunbar
86d6f27a6f lit: Bump the version to .3.
llvm-svn: 168750
2012-11-28 00:06:11 +00:00
Richard Smith
2eb09a43e4 Remove unused internal linkage variable.
llvm-svn: 168729
2012-11-27 21:51:36 +00:00
Ted Kremenek
6519f20118 Generalize matching of add_executable to add_XXX_executable.
llvm-svn: 168490
2012-11-22 07:48:52 +00:00
Bill Wendling
62a846033f Make the AttrListPtr object a part of the LLVMContext.
When code deletes the context, the AttributeImpls that the AttrListPtr points to
are now invalid. Therefore, instead of keeping a separate managed static for the
AttrListPtrs that's reference counted, move it into the LLVMContext and delete
it when deleting the AttributeImpls.

llvm-svn: 168354
2012-11-20 05:09:20 +00:00
Pawel Wodnicki
783831134f really fix permissions
llvm-svn: 168256
2012-11-17 06:38:44 +00:00
Pawel Wodnicki
e6169ef812 fix permissions
llvm-svn: 168255
2012-11-17 06:35:19 +00:00
Pawel Wodnicki
513df99461 adding whose code is it anywa tools
llvm-svn: 168254
2012-11-17 06:24:37 +00:00
Weiming Zhao
85dce59506 Remove hard coded registers in ARM ldrexd and strexd instructions
This patch replaces the hard coded GPR pair [R0, R1] of
Intrinsic:arm_ldrexd and [R2, R3] of Intrinsic:arm_strexd with
even/odd GPRPair reg class.
Similar to the lowering of atomic_64 operation.

llvm-svn: 168207
2012-11-16 21:55:34 +00:00
Dmitri Gribenko
84238ab4c9 FileCheck: remove useless 'continue' at the end of a 'while(){}' loop.
llvm-svn: 168048
2012-11-15 16:50:59 +00:00
Eric Christopher
caf5a23d81 Remove the CellSPU port.
Approved by Chris Lattner.

llvm-svn: 167984
2012-11-14 22:09:20 +00:00
Alexander Kornienko
8e387e3189 Support for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions in
FileCheck.

llvm-svn: 167978
2012-11-14 21:07:37 +00:00
Alexander Kornienko
61396a2725 Added %(line), %(line+<number>), %(line-<number>) substitutions to lit
llvm-svn: 167971
2012-11-14 20:26:19 +00:00
Benjamin Kramer
511004a2cd Simplify the SmallVector pretty printer for LLDB a bit and make it work with reference types.
llvm-svn: 167674
2012-11-10 09:45:32 +00:00
Evandro Menezes
3163eb097c Fix issue with invalid flat operand number
Avoid iterating over list of operands beyond the number of operands in it.

PS: this fixes issue with revision #167634.
llvm-svn: 167635
2012-11-09 21:27:03 +00:00
Evandro Menezes
065305e336 Fix issue with invalid flat operand number
Avoid iterating over list of operands beyond the number of operands in it.

llvm-svn: 167634
2012-11-09 20:29:37 +00:00
Michael Liao
59114df23b Add support of RTM from TSX extension
- Add RTM code generation support throught 3 X86 intrinsics:
  xbegin()/xend() to start/end a transaction region, and xabort() to abort a
  tranaction region

llvm-svn: 167573
2012-11-08 07:28:54 +00:00
Rafael Espindola
d404d4c18c Fix a build problem with xlc. The error message was
"../llvm-git/utils/TableGen/CodeGenSchedule.cpp", line 1594.12: 1540-0218 (S) The call does not match any parameter list for "operator+".
"../llvm-git/include/llvm/ADT/STLExtras.h", line 130.1: 1540-1283 (I) "template <class _Iterator, class Func> llvm::operator+(mapped_iterator<_Iterator,Func>::difference_type, const mapped_iterator<_Iterator,Func> &)" is not a viable candidate.

Patch by Kai.

llvm-svn: 167311
2012-11-02 20:57:36 +00:00
Jakob Stoklund Olesen
4498c89d5f Generate a table-driven version of TRI::composeSubRegIndices().
Explicitly allow composition of null sub-register indices, and handle
that common case in an inlinable stub.

Use a compressed table implementation instead of the previous nested
switches which generated pretty bad code.

llvm-svn: 167190
2012-11-01 00:32:10 +00:00
Kaelyn Uhrain
2a749e70d9 Don't return false when the function's return type is a pointer.
llvm-svn: 166719
2012-10-25 21:25:08 +00:00
Joerg Sonnenberger
839f6c1a88 Remove exception handling usage from tblgen.
Most places can use PrintFatalError as the unwinding mechanism was not
used for anything other than printing the error. The single exception
was CodeGenDAGPatterns.cpp, where intermediate errors during type
resolution were ignored to simplify incremental platform development.
This use is replaced by an error flag in TreePattern and bailout earlier
in various places if it is set. 

llvm-svn: 166712
2012-10-25 20:33:17 +00:00
David Blaikie
097e5ab972 Remove unused member & unnecessary semicolon.
llvm-svn: 166694
2012-10-25 17:04:55 +00:00
NAKAMURA Takumi
ed7a16786a llvm/utils/TableGen/CMakeLists.txt: Update corresponding to r166685.
llvm-svn: 166686
2012-10-25 15:57:56 +00:00
Sebastian Pop
af468d8d5a add TableGen support to create relationship maps between instructions
Relationship maps are represented as InstrMapping records which are parsed by
TableGen and the information is used to construct mapping tables to represent
appropriate relations between instructions. These tables are emitted into
XXXGenInstrInfo.inc file along with the functions to query them.

Patch by Jyotsna Verma <jverma@codeaurora.org>.

llvm-svn: 166685
2012-10-25 15:54:06 +00:00
Joerg Sonnenberger
8fa017919b Don't use stack unwinding to provide the location information for
SetTheory, but pass down the location explicitly.

llvm-svn: 166629
2012-10-24 22:03:59 +00:00
Lang Hames
784ac6493a Allow the commuted form of tied-operand constraints in tablegen ("$dst = $src",
rather than "$src = $dst").

llvm-svn: 166382
2012-10-20 22:44:13 +00:00
Daniel Dunbar
7abcd13b24 lit: Rename the valgrind leaks feature to match what is currently used
(vg_leak).

llvm-svn: 166306
2012-10-19 20:29:30 +00:00
Daniel Dunbar
48d2376b89 lit: Remove support for XTARGET.
- The XTARGET feature (inherited from old DG tests) was just confusing (and
   barely ever used). The same effect can now be achieved with a combination of
   the more useful REQUIRES and XFAIL.

llvm-svn: 166305
2012-10-19 20:29:27 +00:00
Daniel Dunbar
4747331126 lit: Add 'valgrind' and 'valgrind-leaks' features when valgrind is used.
- These can be used with the XFAIL options.

llvm-svn: 166303
2012-10-19 20:12:00 +00:00
Daniel Dunbar
b86f0140e9 lit: Propagate TERM variable in environment, some tools can do really obscure
odd things if this is missing.

llvm-svn: 166289
2012-10-19 17:23:34 +00:00
Daniel Dunbar
edc1b1982d lit: Allow XFAIL: lines to also refer to "features".
llvm-svn: 166224
2012-10-18 20:43:04 +00:00
Bill Wendling
f2fff93263 Add an enum for the return and function indexes into the AttrListPtr object. This gets rid of some magic numbers.
llvm-svn: 165924
2012-10-15 07:29:08 +00:00
Bill Wendling
a77399599d Attributes Rewrite
Convert the internal representation of the Attributes class into a pointer to an
opaque object that's uniqued by and stored in the LLVMContext object. The
Attributes class then becomes a thin wrapper around this opaque
object. Eventually, the internal representation will be expanded to include
attributes that represent code generation options, etc.

llvm-svn: 165917
2012-10-15 04:46:55 +00:00
Chad Rosier
c8a0d67b5d [ms-inline asm] Use the new API introduced in r165830 in lieu of the
MapAndConstraints vector.  Also remove the unused Kind argument.

llvm-svn: 165833
2012-10-12 22:53:36 +00:00
Richard Trieu
60455a67f5 Change (!list.size() == 0) to (!list.empty()). No functional change.
llvm-svn: 165812
2012-10-12 17:57:35 +00:00
Sean Silva
2174f713f4 Remove unnecessary classof()'s
isa<> et al. automatically infer when the cast is an upcast (including a
self-cast), so these are no longer necessary.

llvm-svn: 165767
2012-10-11 23:30:49 +00:00
Chad Rosier
60c4d7d5a4 Remove extra semicolons.
llvm-svn: 165757
2012-10-11 22:25:56 +00:00
Sean Silva
61b37b272d tblgen: Compile TableGen without RTTI.
TableGen no longer needs RTTI!

llvm-svn: 165651
2012-10-10 20:27:18 +00:00
Sean Silva
f01bff0182 tblgen: Move mini Type hierarchy to LLVM-style RTTI.
llvm-svn: 165648
2012-10-10 20:24:49 +00:00
Sean Silva
cbe79850e7 tblgen: Use semantically correct RTTI functions.
Also, some minor cleanup.

llvm-svn: 165647
2012-10-10 20:24:47 +00:00
Sean Silva
a6a1c05042 tblgen: Mechanically move dynamic_cast<> to dyn_cast<>.
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
2012-10-10 20:24:43 +00:00
Bill Wendling
a55d5af923 Pass into the AttributeWithIndex::get method an ArrayRef of attribute
enums. These are then created via the correct Attributes creation method.

llvm-svn: 165607
2012-10-10 06:13:42 +00:00
Andrew Trick
782f561e6a TableGen subtarget emitter cleanup.
Consistently evaluate Aliases and Sequences recursively.

llvm-svn: 165604
2012-10-10 05:43:13 +00:00
Andrew Trick
13b4f59560 misched: Generate IsBuffered flag for machine resources.
llvm-svn: 165602
2012-10-10 05:43:04 +00:00
Micah Villmow
fe3338a7eb Move TargetData to DataLayout.
llvm-svn: 165403
2012-10-08 16:39:34 +00:00
Chad Rosier
179f50da7a [ms-inline asm] Add a few typedefs to simplify future changes.
llvm-svn: 165324
2012-10-05 18:41:14 +00:00
Sean Silva
f8b271827e tblgen: Replace uses of dynamic_cast<XXXRecTy> with dyn_cast<>.
This is a mechanical change of dynamic_cast<> to dyn_cast<>. A number of
these uses are actually more like isa<> or cast<>, and will be changed
to the semanticaly appropriate one in a future patch.

llvm-svn: 165291
2012-10-05 03:31:58 +00:00
Andrew Trick
d6d5b63b3b Added instregex support to TableGen subtarget emitter.
This allows the processor-specific machine model to override selected
base opcodes without any fanciness.
e.g. InstRW<[CoreXWriteVANDP], (instregex "VANDP")>.

llvm-svn: 165180
2012-10-03 23:06:32 +00:00
Andrew Trick
00263532fa TableGen subtarget emitter, nearly first class support for SchedAlias.
A processor can now arbitrarily alias one SchedWrite onto
another. Only the SchedAlias definition need be within the processor
model. The aliased SchedWrite may be a SchedVariant, WriteSequence, or
transitively refer to another alias.

llvm-svn: 165179
2012-10-03 23:06:28 +00:00
Andrew Trick
35fd7cbe58 Cleanup TableGen subtarget emitter.
llvm-svn: 165178
2012-10-03 23:06:25 +00:00
Chad Rosier
9c4444321b [ms-inline asm] Default to the 'm' constraint. This matches the behavior of the
MSVC compiler.

llvm-svn: 165174
2012-10-03 22:18:38 +00:00
Sean Silva
c8c1f73145 tblgen: Migrate llvm-tblgen to new TableGenMain API.
llvm-svn: 165166
2012-10-03 21:29:19 +00:00
Chad Rosier
37e4157d8c Fix 80-column violations. Cleanup whitespace in generated code.
llvm-svn: 164983
2012-10-02 00:25:57 +00:00
Chad Rosier
5e80eb4c86 [ms-inline asm] Add the convertToMapAndConstraints() function that is used to
map constraints and MCInst operands to inline asm operands.  This replaces the
getMCInstOperandNum() function.

The logic to determine the constraints are not in place, so we still default to
a register constraint (i.e., "r"). Also, we no longer build the MCInst but
rather return just the opcode to get the MCInstrDesc.

llvm-svn: 164979
2012-10-01 23:45:51 +00:00
Sylvestre Ledru
b77340e506 Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
llvm-svn: 164768
2012-09-27 10:14:43 +00:00
Sylvestre Ledru
1c5e7904de Fix a typo 'iff' => 'if'
llvm-svn: 164767
2012-09-27 09:59:43 +00:00
Chad Rosier
4c89e0343a Rather then have a wrapper function, have tblgen instantiate the implementation.
Also remove an unused argument.

llvm-svn: 164567
2012-09-24 22:57:55 +00:00
Chad Rosier
599b467187 Rather then have a wrapper function, have tblgen instantiate the implementation.
llvm-svn: 164548
2012-09-24 19:32:29 +00:00
Andrew Trick
7a73f9d7f4 Machine Model (-schedmodel only). Added SchedAliases.
Allow subtargets to tie SchedReadWrite types to processor specific
sequences or variants.

llvm-svn: 164451
2012-09-22 02:24:21 +00:00
Chad Rosier
fd5e542cea [ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.
llvm-svn: 164420
2012-09-21 22:21:26 +00:00
Chad Rosier
64fd35f379 Whitespace.
llvm-svn: 164406
2012-09-21 19:25:59 +00:00
Dmitri Gribenko
aeecde380d Clarify comment.
llvm-svn: 164371
2012-09-21 15:26:34 +00:00
Micah Villmow
cb0e426061 Add in new data types that are used by AMDIL/ANL among others.
llvm-svn: 164261
2012-09-19 22:47:07 +00:00
Owen Anderson
76c554cf2a Soften the pattern-can-never-match error in TableGen into a warning. This 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
2012-09-19 22:15:06 +00:00
Craig Topper
abbf768c15 Remove code for setting the VEX L-bit as a function of operand size from the code emitters and the disassembler table builder. Fix a couple instructions that were still missing VEX_L.
llvm-svn: 164204
2012-09-19 06:37:45 +00:00
Andrew Trick
3ed8eed2ed SchedMachineModel: compress the CPU's WriteLatencyTable.
llvm-svn: 164199
2012-09-19 04:43:19 +00:00
Sean Silva
a07c612e3e Iterate deterministicaly over ClassInfo*'s
Fixes an observed instance of nondeterministic TableGen output.

Review by Jakob.

llvm-svn: 164191
2012-09-19 01:47:03 +00:00
Sean Silva
c291496fe7 Iterate deterministically over register classes
Fixes an observed instance of nondeterministic TableGen output.

Review by Jakob.

llvm-svn: 164190
2012-09-19 01:47:01 +00:00
Sean Silva
eedf4ffbcb Refactor Record* by-ID comparator to Record.h
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
2012-09-19 01:47:00 +00:00
Benjamin Kramer
9958678403 FileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character after the colon.
llvm-svn: 164165
2012-09-18 20:51:39 +00:00
Craig Topper
2c492a1861 Make custom operand parsing mnemonic indices use the same mnemonic table as the match table. Reorder fields in OperandMatchEntry to provide the least amount of padding for in tree targets.
llvm-svn: 164109
2012-09-18 07:02:21 +00:00
Craig Topper
c4107aa8c2 Use variable type for index into mnemonic table. Shrinks size of index field on in tree targets. Saving static data space.
llvm-svn: 164108
2012-09-18 06:10:45 +00:00
Andrew Trick
6cba50cbb4 Replaced ReInitMCSubtargetInfo with InitMCProcessor.
Now where we used to call ReInitMCSubtargetInfo, we actually recompute
the same information as InitMCSubtargetInfo instead of only setting
the feature bits.

llvm-svn: 164105
2012-09-18 05:33:15 +00:00
Andrew Trick
73e100e6f5 comment typo
llvm-svn: 164097
2012-09-18 04:03:30 +00:00
Andrew Trick
418db6184f TableGen subtarget emitter. Use getSchedClassIdx.
llvm-svn: 164096
2012-09-18 03:55:55 +00:00
Andrew Trick
b7b658d440 TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.
llvm-svn: 164095
2012-09-18 03:41:43 +00:00
Andrew Trick
c2ee4420fd TableGen subtarget emitter. Remove unnecessary header dependence.
llvm-svn: 164094
2012-09-18 03:32:57 +00:00
Andrew Trick
65c7aae93f TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
llvm-svn: 164092
2012-09-18 03:18:56 +00:00
Craig Topper
24762462b0 Mark asm matcher conversion table as const.
llvm-svn: 164088
2012-09-18 01:41:49 +00:00
Craig Topper
5f44668251 Fix typo in comment. No functional change.
llvm-svn: 164086
2012-09-18 01:13:36 +00:00
Andrew Trick
2b04a12c0c Backout the wrong subtarget emitter fix
llvm-svn: 164078
2012-09-17 23:14:15 +00:00
Andrew Trick
1956ad7efe Fix release build after reverting
llvm-svn: 164075
2012-09-17 23:05:04 +00:00
Andrew Trick
150c97940b Revert r164061-r164067. Most of the new subtarget emitter.
I have to work out the Target/CodeGen header dependencies
before putting this back.

llvm-svn: 164072
2012-09-17 23:00:42 +00:00
Andrew Trick
9400ee3c79 InitMCProcessor
llvm-svn: 164066
2012-09-17 22:19:12 +00:00
Andrew Trick
81e5a058f2 comment typo
llvm-svn: 164064
2012-09-17 22:19:04 +00:00
Andrew Trick
22072f5bf2 TableGen subtarget emitter. Use getSchedClassIdx.
llvm-svn: 164063
2012-09-17 22:19:01 +00:00
Andrew Trick
7403ff5282 TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.
llvm-svn: 164062
2012-09-17 22:18:58 +00:00
Andrew Trick
8a499d1f62 TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
llvm-svn: 164061
2012-09-17 22:18:55 +00:00
Andrew Trick
f5182127b1 TableGen subtarget emitter. Format and emit data tables for the new machine model.
llvm-svn: 164060
2012-09-17 22:18:50 +00:00
Andrew Trick
ef09f46517 TableGen subtarget emitter. Generate data tables for the new machine model.
Map the CodeGenSchedule object model onto data tables. The structure
of the data tables is defined in MC, so for convenience we include
MCSchedule.h. The alternative is maintaining a redundant copy of the
table structure definitions. Mapping the object model onto data tables
is sufficiently complicated that it should not be interleaved with
emitting source code. This avoids major problem with the backend for
itinerary generation.

llvm-svn: 164059
2012-09-17 22:18:48 +00:00
Andrew Trick
cf41195b6a TableGen subtarget emitter. Emit processor resources for the new machine model.
llvm-svn: 164058
2012-09-17 22:18:45 +00:00
Andrew Trick
d15e58e200 TableGen subtarget parser: Add getProcResourcesIdx().
llvm-svn: 164057
2012-09-17 22:18:43 +00:00
Jim Grosbach
68def8a302 TableGen: Add initializer.
Keep GCC's warnings happy. It can't reason out that the state machine won't
ever hit the potentially uninitialized use in OPC_FilterValue.

llvm-svn: 164041
2012-09-17 18:00:53 +00:00
Axel Naumann
bcdf671ac4 Fix a few vars that can end up being used without initialization.
The cases where no initialization happens should still be checked for logic flaws.

llvm-svn: 164032
2012-09-17 14:20:57 +00:00
Michael Liao
00438be1a0 Fix typo
llvm-svn: 164012
2012-09-17 04:43:39 +00:00
Craig Topper
5e50ef6b15 Add 'virtual' keywoards to output file for overridden functions.
llvm-svn: 164002
2012-09-16 18:25:36 +00:00
Craig Topper
f3580aa31e Add 'virtual' keywoards to output file for overridden functions.
llvm-svn: 163999
2012-09-16 16:35:22 +00:00
Dmitri Gribenko
dd5d6c0da7 Fix Doxygen issues: wrap code examples in \code and use \p to refer to
parameters.

llvm-svn: 163984
2012-09-15 20:22:05 +00:00
Craig Topper
7989d0ccdc Revert r163878 as it breaks on targets with alternate register names. Such targets do not exist in the main tree so this was not noticed.
llvm-svn: 163959
2012-09-15 01:22:42 +00:00
Andrew Trick
25c8faee30 TableGen subtarget parser. Handle new machine model.
Collect processor resources from the subtarget defs.

llvm-svn: 163953
2012-09-15 00:20:02 +00:00
Andrew Trick
0587f1d794 TableGen subtarget parser. Handle new machine model.
Infer SchedClasses from variants defined by the target or subtarget.

llvm-svn: 163952
2012-09-15 00:19:59 +00:00
Andrew Trick
b324ff57ad TableGen subtarget parser. Handle new machine model.
Collect SchedClasses and SchedRW types from the subtarget defs.

llvm-svn: 163951
2012-09-15 00:19:57 +00:00
Craig Topper
0320f5eded Allow the second opcode info table to be 8, 16, or 32-bits as needed to represent additional fragments. This recovers some space on ATT X86 syntax and PowerPC which only need 40-bits instead of 48-bits. This also increases ARM to 64-bits to fully encode all of its operands.
llvm-svn: 163880
2012-09-14 08:33:11 +00:00
Craig Topper
5cd6b912e7 Reduce size of register name index tables by using uint16_t for all in tree targets. If more than 16-bits are needed for any out of tree targets, code will detect and use uint32_t instead.
llvm-svn: 163878
2012-09-14 06:37:49 +00:00
Manman Ren
782be257ee AsmWriterEmitter: OpInfo2 should be unsigned 16-bit.
Fix an issue in r163814.

llvm-svn: 163837
2012-09-13 20:47:48 +00:00
Manman Ren
4b62c95592 AsmWriterEmitter: increase the number of bits for OpcodeInfo from 32-bit to
48-bit if necessary, in order to reduce the generated code size.

We have 900 cases not covered by OpcodeInfo in ATT AsmWriter and more in Intel
AsmWriter and ARM AsmWriter.

This patch reduced the clang Release build size by 50k, running on a Mac Pro.

llvm-svn: 163814
2012-09-13 17:43:46 +00:00
Dmitri Gribenko
aee81e7cae Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph).

llvm-svn: 163790
2012-09-13 12:34:29 +00:00
Craig Topper
e2e98bb26b Add a new compression type to ModRM table that detects when the memory modRM byte represent 8 instructions and the reg modRM byte represents up to 64 instructions. Reduces modRM table from 43k entreis to 25k entries. Based on a patch from Manman Ren.
llvm-svn: 163774
2012-09-13 05:45:42 +00:00
Jim Grosbach
adfdb46f2c TableGen: Convert an assert() to a proper diagnostic.
llvm-svn: 163726
2012-09-12 17:40:25 +00:00
Dmitri Gribenko
8982c8a34d Fix a couple of Doxygen comment issues pointed out by -Wdocumentation.
llvm-svn: 163721
2012-09-12 16:59:47 +00:00
Owen Anderson
e42d2ba20d Improve tblgen code cleanliness: create an unknown_class, from which the unknown def inherits. Make tblgen check for that class, rather than checking for the def itself.
llvm-svn: 163664
2012-09-11 23:47:08 +00:00
Owen Anderson
8aa2a6cbb7 Compute a map from register names to registers, rather than scanning the list of registers every time we want to look up a register by name.
llvm-svn: 163659
2012-09-11 23:32:17 +00:00
Jakob Stoklund Olesen
8a149baa44 Add TRI::getSubRegIndexLaneMask().
Sub-register lane masks are bitmasks that can be used to determine if
two sub-registers of a virtual register will overlap. For example, ARM's
ssub0 and ssub1 sub-register indices don't overlap each other, but both
overlap dsub0 and qsub0.

The lane masks will be accurate on most targets, but on targets that use
sub-register indexes in an irregular way, the masks may conservatively
report that two sub-register indices overlap when the eventually
allocated physregs don't.

Irregular register banks also mean that the bits in a lane mask can't be
mapped onto register units, but the concept is similar.

llvm-svn: 163630
2012-09-11 16:34:08 +00:00
Jakob Stoklund Olesen
d2bb5cf28e Clean the sub-reg index composition maps at emission.
Preserve the Composites map in the CodeGenSubRegIndex class so it can be
used to determine which sub-register indices can actually be composed.

llvm-svn: 163629
2012-09-11 16:34:05 +00:00
Jakob Stoklund Olesen
1e7f74aaa8 Add MCRI::getNumSubRegIndices() and start checking SubRegIndex ranges.
Apparently, NumSubRegIndices was completely unused before. Adjust it by
one to include the null subreg index, just like getNumRegs() includes
the null register.

llvm-svn: 163628
2012-09-11 16:34:02 +00:00
Craig Topper
c9fd7a1602 Change unsigned to a uint16_t in static disassembler tables to reduce the table size.
llvm-svn: 163594
2012-09-11 04:19:21 +00:00
Evgeniy Stepanov
24b5faa541 GTest on Android needs a custom tmpdir path.
llvm-svn: 163501
2012-09-10 10:32:29 +00:00
NAKAMURA Takumi
57a661f79f lit: Util.which(): Use os.path.isfile() instead of os.path.exists(), or it hits to the directory.
For example, which('loop-convert') returns 'loop-convert' when the directory 'loop-convert' exists.

llvm-svn: 163469
2012-09-08 12:07:24 +00:00
Ted Kremenek
4440f8539f Revert "Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions."
Turns out I did not need it after all.  If we find a use for it in the future, we
can resurrect it.

llvm-svn: 163457
2012-09-08 04:32:13 +00:00
Anshuman Dasgupta
5b2793f0a5 Refactored DFA generator. Merged transition class into state class.
Patch by Ivan Llopard!

llvm-svn: 163424
2012-09-07 21:35:43 +00:00
Ted Kremenek
29ac4e350e Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions.
llvm-svn: 163371
2012-09-07 06:47:16 +00:00
Michael Liao
086020d2e5 Re-work bit/bits value resolving in tblgen
- This patch is inspired by the failure of the following code snippet
  which is used to convert enumerable values into encoding bits to
  improve the readability of td files.

  class S<int s> {
    bits<2> V = !if(!eq(s, 8),  {0, 0},
                !if(!eq(s, 16), {0, 1},
                !if(!eq(s, 32), {1, 0},
                !if(!eq(s, 64), {1, 1}, {?, ?}))));
  }

  Later, PR8330 is found to report not exactly the same bug relevant
  issue to bit/bits values.

- Instead of resolving bit/bits values separately through
  resolveBitReference(), this patch adds getBit() for all Inits and
  resolves bit value by resolving plus getting the specified bit. This
  unifies the resolving of bit with other values and removes redundant
  logic for resolving bit only. In addition,
  BitsInit::resolveReferences() is optimized to take advantage of this
  origanization by resolving VarBitInit's variable reference first and
  then getting bits from it.

- The type interference in '!if' operator is revised to support possible
  combinations of int and bits/bit in MHS and RHS.

- As there may be illegal assignments from integer value to bit, says
  assign 2 to a bit, but we only check this during instantiation in some
  cases, e.g.

  bit V = !if(!eq(x, 17), 0, 2);

  Verbose diagnostic message is generated when invalid value is
  resolveed to help locating the error.

- PR8330 is fixed as well.

llvm-svn: 163360
2012-09-06 23:32:48 +00:00
Tom Stellard
cdb571a782 Tablegen: Add OperandWithDefaultOps Operand type
This Operand type takes a default argument, and is initialized to
this value if it does not appear in a patter.

llvm-svn: 163315
2012-09-06 14:15:52 +00:00
Nadav Rotem
f25e382cd2 Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be
disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics).

llvm-svn: 163299
2012-09-06 09:17:37 +00:00
Roman Divacky
865ac925b9 Constify subtarget info properly so that we dont cast away the const in
the SubtargetInfoKV tables. Found by gcc48 -Wcast-qual.

llvm-svn: 163251
2012-09-05 21:43:57 +00:00
Chad Rosier
b75afa43e4 Fix function name per coding standard.
llvm-svn: 163187
2012-09-05 01:15:43 +00:00
Chad Rosier
63608419b5 Fix function name per coding standard.
llvm-svn: 163186
2012-09-05 01:02:38 +00:00
Chad Rosier
b049a3421f [ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute. This
implementation does not co-exist well with how the sideeffect and alignstack
attributes are handled.  The reverts r161641.

llvm-svn: 163174
2012-09-04 22:29:45 +00:00
David Blaikie
258495d9ac [LIT] Add a clang_tools_extra_site_cfg to match the various other site_cfg.
This doesn't seem ideal, perhaps we could just keep the llvm_site_cfg and have
other config (clang and clang-tools-extra) derive their site_cfg from that.

Suggestions/complaints/ideas welcome.

llvm-svn: 163171
2012-09-04 22:09:04 +00:00
Evgeniy Stepanov
d74d632931 Fix Android build of gtest and lib/Support.
llvm-svn: 163131
2012-09-04 09:14:45 +00:00
Chad Rosier
f24d0a24c7 [ms-inline asm] Make comment more verbose and add an assert.
llvm-svn: 163125
2012-09-03 20:37:01 +00:00
Chad Rosier
294688cf56 [ms-inline asm] Asm operands can map to one or more MCOperands. Therefore, add
the NumMCOperands argument to the GetMCInstOperandNum() function that is set
to the number of MCOperands this asm operand mapped to.

llvm-svn: 163124
2012-09-03 20:31:23 +00:00
Chad Rosier
bd31fcd8a9 [ms-inline asm] Add an interface to the GetMCInstOperandNum() function in the
MCTargetAsmParser class.

llvm-svn: 163122
2012-09-03 18:47:45 +00:00
Chad Rosier
2a0cfdfaf2 Remove extraneous return.
llvm-svn: 163119
2012-09-03 17:39:57 +00:00
Chad Rosier
7ed8b33ece [ms-inline asm] Return the MCOperandNum instead of passing a reference.
llvm-svn: 163118
2012-09-03 17:33:50 +00:00
Chad Rosier
fac2e7b419 Removed unused argument.
llvm-svn: 163104
2012-09-03 03:16:09 +00:00
Chad Rosier
6fbf85d859 [ms-inline asm] Expose the Kind and Opcode variables from the
MatchInstructionImpl() function.

These values are used by the ConvertToMCInst() function to index into the
ConversionTable.  The values are also needed to call the GetMCInstOperandNum()
function.

llvm-svn: 163101
2012-09-03 02:06:46 +00:00
Chad Rosier
1335fb4cf0 Remove an unused argument. The MCInst opcode is set in the ConvertToMCInst()
function nowadays.

llvm-svn: 163030
2012-08-31 22:12:31 +00:00
Craig Topper
6bb3145d0d Add support for converting llvm.fma to fma4 instructions.
llvm-svn: 162999
2012-08-31 15:40:30 +00:00
Chad Rosier
802539bb46 With the fix in r162954/162955 every cvt function returns true. Thus, have
the ConvertToMCInst() return void, rather then a bool.  Update all the cvt
functions as well.

llvm-svn: 162961
2012-08-31 00:03:31 +00:00
Chad Rosier
8c3aa99c95 Whitespace.
llvm-svn: 162946
2012-08-30 21:47:00 +00:00
Chad Rosier
4813beac7a Whitespace.
llvm-svn: 162945
2012-08-30 21:46:00 +00:00
Chad Rosier
2ba709e09b Hoist a check to eliminate obvious mismatches as early as possible. Also, fix
an 80-column violation in the generated code.  No functional change intended.

llvm-svn: 162944
2012-08-30 21:43:05 +00:00
Chad Rosier
17c35f6f3b [ms-inline asm] Add a new function, GetMCInstOperandNum, to the
AsmMatcherEmitter.  This function maps inline assembly operands to MCInst
operands.

For example, '__asm mov j, eax' is represented by the follow MCInst:

<MCInst 1460 <MCOperand Reg:0> <MCOperand Imm:1> <MCOperand Reg:0> 
             <MCOperand Expr:(j)> <MCOperand Reg:0> <MCOperand Reg:43>>

The first 5 MCInst operands are a result of j matching as a memory operand
consisting of a BaseReg (Reg:0), MemScale (Imm:1), MemIndexReg(Reg:0), 
Expr (Expr:(j), and a MemSegReg (Reg:0).  The 6th MCInst operand represents
the eax register (Reg:43).

This translation is necessary to determine the Input and Output Exprs.  If a
single asm operand maps to multiple MCInst operands, the index of the first
MCInst operand is returned.  Ideally, it would return the operand we really
care out (i.e., the Expr:(j) in this case), but I haven't found an easy way
of doing this yet.

llvm-svn: 162920
2012-08-30 17:59:25 +00:00
Andrew Trick
eeffae8b4e Fix a nondeterminism in the ARM assembler.
Adding arbitrary records to ARM.td would break
basic-arm-instructions.s because selection of nop vs mov r0,r0 was
ambiguous (this will be tested by a subsequent addition to ARM.td).
An imperfect but sensible fix is to give precedence to match rules
that have more constraints.

llvm-svn: 162824
2012-08-29 03:52:57 +00:00
Jakob Stoklund Olesen
24cfc3f83b Check all patterns for missing instruction flags.
Both single-instruction and multi-instruction patterns can be checked
for missing mayLoad / mayStore, and hasSideEffects flags.

llvm-svn: 162734
2012-08-28 03:26:49 +00:00
Richard Smith
865f47cbb6 Fix integer undefined behavior due to signed left shift overflow in LLVM.
Reviewed offline by chandlerc.

llvm-svn: 162623
2012-08-24 23:29:28 +00:00
Jakob Stoklund Olesen
43f9c539ae Infer instruction properties from single-instruction patterns.
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
2012-08-24 22:46:53 +00:00
Jakob Stoklund Olesen
b371220285 Stop inferring isVariadic from instruction patterns.
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
2012-08-24 21:08:09 +00:00
Jakob Stoklund Olesen
746c77c658 Verify explicit instruction properties when they can be inferred.
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
2012-08-24 17:08:41 +00:00
Jakob Stoklund Olesen
65bc015c14 Heed guessInstructionProperties, and stop warning on redundant flags.
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
2012-08-24 00:31:16 +00:00
Jakob Stoklund Olesen
925ae76e4b Tristate mayLoad, mayStore, and hasSideEffects.
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
2012-08-23 19:34:46 +00:00
Jakob Stoklund Olesen
94b286501c Add CodeGenTarget::guessInstructionProperties.
Currently, TableGen just guesses instruction properties when it can't
infer them form patterns.

This adds a guessInstructionProperties flag to the instruction set
definition that will be used to disable guessing. The flag is intended
as a migration aid. It will be removed again when no more targets need
their properties guessed.

llvm-svn: 162460
2012-08-23 19:34:41 +00:00
Dmitri Gribenko
98218ea1ef Fix a bunch of -Wdocumentation warnings.
llvm-svn: 162446
2012-08-23 16:54:08 +00:00
Jakob Stoklund Olesen
4c8373f54e Print out the location of expanded multiclass defs in TableGen errors.
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
2012-08-22 23:33:58 +00:00