summaryrefslogtreecommitdiff
path: root/utils/TableGen/TableGen.cpp
Commit message (Collapse)AuthorAge
...
* BuiltinsARM.def emitter, still needs a substantial bit of tweaking to ↵Nate Begeman2010-06-04
| | | | | | lighten the load on clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105456 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow for creation of clang DeclNodes tables.Sean Hunt2010-05-30
| | | | | | | | The StmtNodes generator has been generalized to allow for the creation of DeclNodes tables as well, and another emitter was added for DeclContexts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105164 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build breakage.Eli Friedman2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104912 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to tablegen for auto-generating arm_neon.h from a tablegen ↵Nate Begeman2010-05-28
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104910 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify raw_ostream usage.Dan Gohman2010-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104874 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an emitter to handle the list of clang statement nodes.Sean Hunt2010-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103071 91177308-0d34-0410-b5e6-96231b3b80d8
* Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgenJohnny Chen2010-04-02
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100233 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unnecessary #include.Dan Gohman2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99714 91177308-0d34-0410-b5e6-96231b3b80d8
* --- Reverse-merging r98637 into '.':Bob Wilson2010-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98640 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial ARM/Thumb disassembler check-in. It consists of a tablgen backendJohnny Chen2010-03-16
| | | | | | | | | | | | | | | | | | | (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] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98637 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a custom TableGen backend to support theSean Callanan2010-01-29
| | | | | | | | enhanced disassembler, and the necessary makefile rules to build the table for X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94764 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch TableGen disassembler emitter, based on patch by Sean Callanan.Daniel Dunbar2009-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89833 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen: Add initial backend for clang Driver's option parsing.Daniel Dunbar2009-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89245 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVM command-line tools overwrite their output files without -f.Dan Gohman2009-08-25
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Force option to raw_fd_ostream to specify whether openingDan Gohman2009-07-15
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
* Stub out assembly matcher (.s -> MCInst) tblgen backend.Daniel Dunbar2009-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75378 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new little "FileCheck" utility for regression testing.Chris Lattner2009-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75022 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace std::iostreams with raw_ostream in TableGen.Daniel Dunbar2009-07-03
| | | | | | | | | - Sorry, I can't help myself. - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74742 91177308-0d34-0410-b5e6-96231b3b80d8
* Normalize SourceMgr messages.Daniel Dunbar2009-06-30
| | | | | | | | | | | | | - 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): ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74489 91177308-0d34-0410-b5e6-96231b3b80d8
* rename SourceMgr::PrintError to PrintMessage.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
* move include searching logic from TGLexer to SourceMgr.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73845 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TGSourceMgr -> SourceMgr.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73844 91177308-0d34-0410-b5e6-96231b3b80d8
* rename TGLoc -> SMLoc.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73843 91177308-0d34-0410-b5e6-96231b3b80d8
* rename -gen-clang-diags-options -> -gen-clang-diag-groupsChris Lattner2009-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69208 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another Clang TableGen-backend (-gen-clang-diags-options) for emittingTed Kremenek2009-03-18
| | | | | | | | | | | | | | 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 }; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67239 91177308-0d34-0410-b5e6-96231b3b80d8
* Add (hidden) TableGen command option '-clang-component' which specifies theTed Kremenek2009-03-13
| | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66975 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial implementation of a TableGen backend for converting Clang-warningsTed Kremenek2009-03-13
| | | | | | | | tablegen files to the original .def preprocessor include files. This is my first TableGen backend; I don't claim that it is awesome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66971 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new TGError class and use it to propagate location info withChris Lattner2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66898 91177308-0d34-0410-b5e6-96231b3b80d8
* give each Record a location.Chris Lattner2009-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66897 91177308-0d34-0410-b5e6-96231b3b80d8
* make "locations" a class instead of a typedef.Chris Lattner2009-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66895 91177308-0d34-0410-b5e6-96231b3b80d8
* split buffer management and diagnostic printing out of the tblgenChris Lattner2009-03-13
| | | | | | | lexer into its own TGSourceMgr class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66873 91177308-0d34-0410-b5e6-96231b3b80d8
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-06
| | | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63812 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-04
| | | | | | | | and llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63786 91177308-0d34-0410-b5e6-96231b3b80d8
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-04
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63765 91177308-0d34-0410-b5e6-96231b3b80d8
* Make tablegen print out a nice error message for a const char*Dan Gohman2008-11-07
| | | | | | | exception, like it does for a std::string exception. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58865 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of the new "fast" instruction selection support. SeeDan Gohman2008-08-13
| | | | | | | | the comments in FastISelEmitter.cpp for details on what this is. This is currently experimental and unusable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54751 91177308-0d34-0410-b5e6-96231b3b80d8
* Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.Mikhail Glushenkov2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50754 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitterMikhail Glushenkov2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50748 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the MemoryBuffer::getFile* methods to take just a pointer to theChris Lattner2008-04-01
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041 91177308-0d34-0410-b5e6-96231b3b80d8
* Add first proof-of-concept universal compiler driver framework basedAnton Korobeynikov2008-03-23
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48699 91177308-0d34-0410-b5e6-96231b3b80d8
* split enum emission out from InstrInfoEmitter into it's own tblgen backend.Chris Lattner2008-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45640 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from utils.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45419 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the tblgen parser in a recursive descent style, eliminating the ↵Chris Lattner2007-11-22
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44274 91177308-0d34-0410-b5e6-96231b3b80d8
* reapplyChris Lattner2007-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34697 91177308-0d34-0410-b5e6-96231b3b80d8
* Backing outEvan Cheng2007-02-27
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34693 91177308-0d34-0410-b5e6-96231b3b80d8
* initial support for calling convention generation, still unfinished.Chris Lattner2007-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34682 91177308-0d34-0410-b5e6-96231b3b80d8
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32333 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a bunch of long-dead testing codeChris Lattner2006-03-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26497 91177308-0d34-0410-b5e6-96231b3b80d8