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

175 Commits

Author SHA1 Message Date
Nate Begeman
766330952e BuiltinsARM.def emitter, still needs a substantial bit of tweaking to lighten the load on clang.
llvm-svn: 105456
2010-06-04 01:26:15 +00:00
Alexis Hunt
bdfc4b7cd0 Allow for creation of clang DeclNodes tables.
The StmtNodes generator has been generalized to allow for the
creation of DeclNodes tables as well, and another emitter was
added for DeclContexts.

llvm-svn: 105164
2010-05-30 07:21:42 +00:00
Eli Friedman
f73aa6f0dc Fix build breakage.
llvm-svn: 104912
2010-05-28 01:15:28 +00:00
Nate Begeman
afef35118d Add support to tablegen for auto-generating arm_neon.h from a tablegen description
of the intrinsics.  The goal is to auto-generate both support for GCC-style (vector)
and ARM-style (struct of vector) intrinsics.

This is work in progress, but will be completed soon.

llvm-svn: 104910
2010-05-28 01:08:32 +00:00
Dan Gohman
bf1e648394 Simplify raw_ostream usage.
llvm-svn: 104874
2010-05-27 19:48:08 +00:00
Alexis Hunt
55ae7d6b53 Add an emitter to handle the list of clang statement nodes.
llvm-svn: 103071
2010-05-05 04:13:08 +00:00
Johnny Chen
6d9cbe7270 Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgen
backend (ARMDecoderEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Reviewed by Chris Latter and Bob Wilson.

llvm-svn: 100233
2010-04-02 22:27:38 +00:00
Dan Gohman
f8a50c52df Remove an unnecessary #include.
llvm-svn: 99714
2010-03-27 16:33:36 +00:00
Bob Wilson
34aca030c5 --- Reverse-merging r98637 into '.':
U    test/CodeGen/ARM/tls2.ll
U    test/CodeGen/ARM/arm-negative-stride.ll
U    test/CodeGen/ARM/2009-10-30.ll
U    test/CodeGen/ARM/globals.ll
U    test/CodeGen/ARM/str_pre-2.ll
U    test/CodeGen/ARM/ldrd.ll
U    test/CodeGen/ARM/2009-10-27-double-align.ll
U    test/CodeGen/Thumb2/thumb2-strb.ll
U    test/CodeGen/Thumb2/ldr-str-imm12.ll
U    test/CodeGen/Thumb2/thumb2-strh.ll
U    test/CodeGen/Thumb2/thumb2-ldr.ll
U    test/CodeGen/Thumb2/thumb2-str_pre.ll
U    test/CodeGen/Thumb2/thumb2-str.ll
U    test/CodeGen/Thumb2/thumb2-ldrh.ll
U    utils/TableGen/TableGen.cpp
U    utils/TableGen/DisassemblerEmitter.cpp
D    utils/TableGen/RISCDisassemblerEmitter.h
D    utils/TableGen/RISCDisassemblerEmitter.cpp
U    Makefile.rules
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/Makefile
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
D    lib/Target/ARM/Disassembler
U    lib/Target/ARM/ARMInstrFormats.td
U    lib/Target/ARM/ARMAddressingModes.h
U    lib/Target/ARM/Thumb2ITBlockPass.cpp

llvm-svn: 98640
2010-03-16 16:59:47 +00:00
Johnny Chen
ff030064fb Initial ARM/Thumb disassembler check-in. It consists of a tablgen backend
(RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
instructions to help disassembly.

We also changed the output of the addressing modes to omit the '+' from the
assembler syntax #+/-<imm> or +/-<Rm>.  See, for example, A8.6.57/58/60.

And modified test cases to not expect '+' in +reg or #+num.  For example,

; CHECK:       ldr.w	r9, [r7, #28]

llvm-svn: 98637
2010-03-16 16:36:54 +00:00
Sean Callanan
59ba2433b0 Added a custom TableGen backend to support the
enhanced disassembler, and the necessary makefile
rules to build the table for X86.

llvm-svn: 94764
2010-01-29 00:21:04 +00:00
Daniel Dunbar
43465889de Sketch TableGen disassembler emitter, based on patch by Sean Callanan.
llvm-svn: 89833
2009-11-25 02:13:23 +00:00
Daniel Dunbar
51400811c2 TableGen: Add initial backend for clang Driver's option parsing.
llvm-svn: 89245
2009-11-18 21:29:51 +00:00
Dan Gohman
53f0d68f87 Make LLVM command-line tools overwrite their output files without -f.
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".

Add a -f option to llvm-extract and llvm-link, for consistency.

Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.

Update Makefiles and documentation accordingly.

llvm-svn: 79990
2009-08-25 15:34:52 +00:00
Chris Lattner
f16d8ade4f Change raw_fd_ostream to take flags as an optional bitmask
instead of as two bools.  Use this to add a F_Append flag
which has the obvious behavior.

Other unrelated changes conflated into this patch:

1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
   are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
   because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
   (Which is the thing that needed append in the first place).

llvm-svn: 79807
2009-08-23 02:51:22 +00:00
Dan Gohman
9ced780576 Add a Force option to raw_fd_ostream to specify whether opening
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.

llvm-svn: 75801
2009-07-15 17:29:42 +00:00
Daniel Dunbar
2c046813c6 Stub out assembly matcher (.s -> MCInst) tblgen backend.
llvm-svn: 75378
2009-07-11 19:39:44 +00:00
Chris Lattner
425ad95921 Add a new little "FileCheck" utility for regression testing.
llvm-svn: 75022
2009-07-08 18:44:05 +00:00
Daniel Dunbar
95f6034ab6 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
Daniel Dunbar
5bec168037 Normalize SourceMgr messages.
- Don't print "Parsing" in front of every message.

 - Take additional "type" argument which is prepended to the message (with ": ")
   if given.

 - Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...

llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Chris Lattner
dd95ab3ca9 rename SourceMgr::PrintError to PrintMessage.
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
c865ea76a6 move include searching logic from TGLexer to SourceMgr.
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner
5b9a2d79c0 Rename TGSourceMgr -> SourceMgr.
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner
4ff2620742 rename TGLoc -> SMLoc.
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner
049e984de6 rename -gen-clang-diags-options -> -gen-clang-diag-groups
llvm-svn: 69208
2009-04-15 20:02:32 +00:00
Ted Kremenek
4538eda544 Add another Clang TableGen-backend (-gen-clang-diags-options) for emitting
declarations for controlling groups of warnings. Currently this transforms:

  def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;
  
into:

  static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };

llvm-svn: 67239
2009-03-18 21:16:16 +00:00
Ted Kremenek
2b3f72d6d7 Add (hidden) TableGen command option '-clang-component' which specifies the
component's warnings to process for '-gen-clang-diags-defs'.

Also, when the component is specified, generate a '#if' prologue at the top of
the generated .def file (to match the current files).

llvm-svn: 66975
2009-03-13 22:53:41 +00:00
Ted Kremenek
bbde499c43 Add initial implementation of a TableGen backend for converting Clang-warnings
tablegen files to the original .def preprocessor include files. This is my first
TableGen backend; I don't claim that it is awesome.

llvm-svn: 66971
2009-03-13 22:21:17 +00:00
Chris Lattner
7af521bd0c add a new TGError class and use it to propagate location info with
errors when thrown.  This gets us nice errors like this from tblgen:

CMOVL32rr: 	(set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
/Users/sabre/llvm/Debug/bin/tblgen: error:
Included from X86.td:116:
Parsing X86InstrInfo.td:922: In CMOVL32rr: X86cmov node requires exactly 4 operands!
def CMOVL32rr : I<0x4C, MRMSrcReg,       // if <s, GR32 = GR32
^

instead of just:

CMOVL32rr: 	(set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
/Users/sabre/llvm/Debug/bin/tblgen: In CMOVL32rr: X86cmov node requires exactly 4 operands!

This is all I plan to do with this, but it should be easy enough to improve if anyone 
cares (e.g. keeping more loc info in "dag" expr records in tblgen.

llvm-svn: 66898
2009-03-13 16:25:21 +00:00
Chris Lattner
11707a5c89 give each Record a location.
llvm-svn: 66897
2009-03-13 16:09:24 +00:00
Chris Lattner
07709d8b69 make "locations" a class instead of a typedef.
llvm-svn: 66895
2009-03-13 16:01:53 +00:00
Chris Lattner
2f68f87510 split buffer management and diagnostic printing out of the tblgen
lexer into its own TGSourceMgr class.

llvm-svn: 66873
2009-03-13 07:05:43 +00:00
Chris Lattner
1b05680d5f Change various llvm utilities to use PrettyStackTraceProgram in
their main routines.  This makes the tools print their argc/argv
commands if they crash.

llvm-svn: 66248
2009-03-06 05:34:10 +00:00
Dale Johannesen
fa28929927 Reapply 63765. Patches for clang and llvm-gcc to follow.
llvm-svn: 63812
2009-02-05 01:49:45 +00:00
Dale Johannesen
f6e1822ccd Reverting 63765. This broke the build of both clang
and llvm-gcc.

llvm-svn: 63786
2009-02-04 22:47:25 +00:00
Nate Begeman
66f10b55ed New feature: add support for target intrinsics being defined in the
target directories themselves.  This also means that VMCore no longer
needs to know about every target's list of intrinsics.  Future work
will include converting the PowerPC target to this interface as an
example implementation.

llvm-svn: 63765
2009-02-04 19:47:21 +00:00
Dan Gohman
3a14e811be Make tablegen print out a nice error message for a const char*
exception, like it does for a std::string exception.

llvm-svn: 58865
2008-11-07 21:01:13 +00:00
Dan Gohman
4b1b033f89 Initial checkin of the new "fast" instruction selection support. See
the comments in FastISelEmitter.cpp for details on what this is.
This is currently experimental and unusable.

llvm-svn: 54751
2008-08-13 20:19:35 +00:00
Mikhail Glushenkov
89e32fbe59 Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
llvm-svn: 50754
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
c586c41085 Rename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitter
llvm-svn: 50748
2008-05-06 18:09:29 +00:00
Chris Lattner
d141d16ed7 Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length.  All clients can produce a
null terminated name, and the system api's require null terminated 
strings anyway.

llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Anton Korobeynikov
261bddcbeb Add first proof-of-concept universal compiler driver framework based
on ideas mentioned in PR686.
Written by Mikhail Glushenkov and contributed by Codedgers, Inc.

Old llvmc will be removed soon after new one will have all its properties.

llvm-svn: 48699
2008-03-23 08:57:20 +00:00
Chris Lattner
5675305d1a split enum emission out from InstrInfoEmitter into it's own tblgen backend.
llvm-svn: 45640
2008-01-06 00:49:05 +00:00
Chris Lattner
c4006845a6 remove attributions from utils.
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Chris Lattner
c447b7a449 Rewrite the tblgen parser in a recursive descent style, eliminating the bison parser.
This makes the parser much easier to understand, eliminates a ton of global variables,
and gives tblgen nice caret diagnostics.  It is also faster, but tblgen probably doesn't
care about performance.

There are a couple of FIXMEs which I will take care of next.

llvm-svn: 44274
2007-11-22 20:49:04 +00:00
Chris Lattner
35b160f990 reapply
llvm-svn: 34697
2007-02-27 22:08:27 +00:00
Evan Cheng
06b5bb9888 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
5e2b19c767 initial support for calling convention generation, still unfinished.
llvm-svn: 34682
2007-02-27 20:43:37 +00:00
Bill Wendling
f13d78d3b8 What should be the last unnecessary <iostream>s in the library.
llvm-svn: 32333
2006-12-07 22:21:48 +00:00
Chris Lattner
c8db4dd179 remove a bunch of long-dead testing code
llvm-svn: 26497
2006-03-03 02:34:28 +00:00
Chris Lattner
0b3c1c1fe2 initial implementation of intrinsic parsing
llvm-svn: 26495
2006-03-03 02:32:46 +00:00
Chris Lattner
29d28e02b0 Add support for "-Ifoo" in addition to "-I foo"
llvm-svn: 26487
2006-03-03 01:53:40 +00:00
Chris Lattner
10c2fb116d add support for multiple include directories
llvm-svn: 26485
2006-03-03 01:47:14 +00:00
Duraid Madina
b8be651393 more standards-compliance stuff
llvm-svn: 25014
2005-12-26 05:08:55 +00:00
Chris Lattner
fbab2de9dd Remove the obsolete instr selector emitter
llvm-svn: 23894
2005-10-23 05:47:52 +00:00
Jim Laskey
1fbdee408d Plugin new subtarget backend into the build.
llvm-svn: 23870
2005-10-21 19:05:19 +00:00
Chris Lattner
12c57505bf Add an option and stuff implementation of a dag isel emitter
llvm-svn: 23236
2005-09-03 01:14:03 +00:00
Jeff Cohen
4d31aeb9df Eliminate tabs and trailing spaces
llvm-svn: 21441
2005-04-22 04:13:13 +00:00
Misha Brukman
960a8d47d7 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Reid Spencer
bbdeb2181d Fix usage of changed function prototype
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Reid Spencer
7f1b5ae07e Make tblgen's exception handling a little more robust by printing the
program name and also catching ...

llvm-svn: 16160
2004-09-03 23:17:54 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
7ddb3950e4 RemoveFileOnErrorSignal is now in the llvm::sys namespace. Adjust
accordingly.

llvm-svn: 16093
2004-08-29 19:30:41 +00:00
Chris Lattner
a983ac4661 Initial cut at an asm writer emitter. So far, this only handles emission of
instructions, and only instructions that take no operands at that!

llvm-svn: 15386
2004-08-01 05:59:33 +00:00
Chris Lattner
2e8beb316b Finegrainify namespacification
llvm-svn: 15381
2004-08-01 03:55:39 +00:00
Chris Lattner
1e21b8c96f Remove some abandoned code that was never finished. If needed in the future
it can be ressurected from CVS.

llvm-svn: 15113
2004-07-22 21:32:38 +00:00
Chris Lattner
ae91cc3002 Passing integer 0 in for a pointer value doesn't work on IA64. Fix this
by using a new macro.

llvm-svn: 14863
2004-07-16 00:02:21 +00:00
Chris Lattner
817b562565 Make tblgen not try to be smart. This is better handled in makefiles if
at all.  Patch contributed by Vladimir Prus!

llvm-svn: 14784
2004-07-13 06:11:46 +00:00
Chris Lattner
6f0bab5b9d Header file moved
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Jakub Staszak
6cb338c254 add tablgen backend for really simple instruction selector
llvm-svn: 12712
2004-04-06 19:30:56 +00:00
Chris Lattner
bdd49e8f4d exit(1) instead of abort()'ing on error
llvm-svn: 11380
2004-02-13 16:37:43 +00:00
Chris Lattner
1ad572ef72 Print the record NAME not the record ADDRESS
llvm-svn: 11144
2004-02-06 03:19:17 +00:00
Brian Gaeke
d25f86d683 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
fc62e0f40d Added LLVM copyright header.
llvm-svn: 9305
2003-10-20 20:20:30 +00:00
Chris Lattner
1e1215d0d7 Move support/tools/* back into utils
llvm-svn: 8875
2003-10-05 19:27:59 +00:00