Commit Graph

145 Commits

Author SHA1 Message Date
Kostya Serebryany
3846ce9490 replace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but this time hide it under __has_feature(address_sanitizer); also include <sanitizer/lsan_interface.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199303 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 07:59:37 +00:00
Kostya Serebryany
ab39685c77 reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time LeakSanitizerIsTurnedOffForTheCurrentProcess is used instead of __lsan_is_turned_off
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198922 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-10 08:05:42 +00:00
Alp Toker
d92ff21d6f Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"
To declare or define reserved identifers is undefined behaviour in standard
C++. This needs to be addressed in compiler-rt before it can be used in LLVM.

See the list discussion for details.

This reverts commit r198858.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198884 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-09 19:40:55 +00:00
Kostya Serebryany
c50299bab6 Disable LeakSanitizer in TableGen binaries, see PR18325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198858 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-09 09:26:26 +00:00
Sean Silva
426db657da Add TableGen ctags(1) emitter and helper script.
To use this in conjunction with exuberant ctags to generate a single
combined tags file, run tblgen first and then
  $ ctags --append [...]

Since some identifiers have corresponding definitions in C++ code,
it can be useful (if using vim) to also use cscope, and
  :set cscopetagorder=1
so that
  :tag X
will preferentially select the tablegen symbol, while
  :cscope find g X
will always find the C++ symbol.

Patch by Kevin Schoedel!

(a couple small formatting changes courtesy of clang-format)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177682 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-21 23:40:38 +00:00
Roman Divacky
759e3fa641 Remove edis - the enhanced disassembler. Fixes PR14654.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170578 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19 19:55:47 +00:00
Michael J. Spencer
96a564f2be Copy clang/Driver/<Option parsing stuff> to llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169344 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-05 00:29:32 +00:00
Chandler Carruth
4ffd89fa4d 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169251 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 10:37:14 +00:00
Sean Silva
9e21138ab7 tblgen: Migrate llvm-tblgen to new TableGenMain API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165166 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 21:29:19 +00:00
Jakob Stoklund Olesen
6f36fa981a Write llvm-tblgen backends as functions instead of sub-classes.
The TableGenBackend base class doesn't do much, and will be removed
completely soon.

Patch by Sean Silva!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158311 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-11 15:37:55 +00:00
David Blaikie
2dd674fdce Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly.
(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148262 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-16 23:24:27 +00:00
David Blaikie
2d24e2a396 Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146960 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-20 02:50:00 +00:00
Anshuman Dasgupta
dc81e5da27 Add a deterministic finite automaton based packetizer for VLIW architectures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145629 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01 21:10:21 +00:00
Owen Anderson
a25e292d5f Remove the old-style ARM disassembler, which is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144243 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 23:56:06 +00:00
Peter Collingbourne
6d1409dcc5 Remove the Clang tblgen backends from LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141293 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 13:21:42 +00:00
Peter Collingbourne
7c78888887 Move TableGen's parser and entry point into a library
This is the first step towards splitting LLVM and Clang's tblgen executables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140951 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-01 16:41:13 +00:00
Eric Christopher
eae5a13078 Remove more of llvmc and dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140121 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20 00:34:27 +00:00
Caitlin Sadowski
5d97ee31bb Added LateParsed property to TableGen attributes.
This patch was written by DeLesley Hutchins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139300 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 17:40:49 +00:00
Joerg Sonnenberger
08708c8ef3 Dependency should be on the output file name, not the dependency file
name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139220 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-07 02:12:03 +00:00
Eric Christopher
d568b3f552 Revert r134921, 134917, 134908 and 134907. They're causing failures
in multiple buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134936 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-11 23:06:52 +00:00
David Greene
d4a9066c93 [AVX] Make Inits Foldable
Manage Inits in a FoldingSet.  This provides several benefits:

- Memory for Inits is properly managed

- Duplicate Inits are folded into Flyweights, saving memory

- It enforces const-correctness, protecting against certain classes
  of bugs

The above benefits allow Inits to be used in more contexts, which in
turn provides more dynamism to TableGen.  This enhanced capability
will be used by the AVX code generator to a fold common patterns
together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134907 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-11 18:25:51 +00:00
Jim Grosbach
86f9adb8be TableGen'erated MC lowering for simple pseudo-instructions.
This allows the (many) pseudo-instructions we have that map onto a single
real instruction to have their expansion during MC lowering handled
automatically instead of the current cumbersome manual expansion required.
These sorts of pseudos are common when an instruction is used in situations
that require different MachineInstr flags (isTerminator, isBranch, et. al.)
than the generic instruction description has. For example, using a move
to the PC to implement a branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134704 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 17:36:35 +00:00
Evan Cheng
22fee2dff4 Merge XXXGenRegisterNames.inc into XXXGenRegisterInfo.inc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134024 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-28 20:07:07 +00:00
Evan Cheng
73f50d9bc3 Merge XXXGenRegisterDesc.inc XXXGenRegisterNames.inc XXXGenRegisterInfo.h.inc
into XXXGenRegisterInfo.inc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133922 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-27 18:32:37 +00:00
Evan Cheng
a347f85dbe Starting to refactor Target to separate out code that's needed to fully describe
target machine from those that are only needed by codegen. The goal is to
sink the essential target description into MC layer so we can start building
MC based tools without needing to link in the entire codegen.

First step is to refactor TargetRegisterInfo. This patch added a base class
MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to
separate register description from the rest of the stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133782 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-24 01:44:41 +00:00
Jim Grosbach
0b6a44afb9 Consolidate some TableGen diagnostic helper functions.
TableGen had diagnostic printers sprinkled about in a few places. Pull them
together into a single location in Error.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133568 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-21 22:55:50 +00:00
Jakob Stoklund Olesen
c017bc1c1e Drop a RecordKeeper reference that wasn't necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132636 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 07:49:55 +00:00
Jakob Stoklund Olesen
1de99829b6 Teach TableGen to evaluate DAG expressions as set operations.
A TableGen backend can define how certain classes can be expanded into
ordered sets of defs, typically by evaluating a specific field in the
record. The SetTheory class can then evaluate DAG expressions that refer
to these named sets.

A number of standard set and list operations are predefined, and the
backend can add more specialized operators if needed. The -print-sets
backend is used by SetTheory.td to provide examples.

This is intended to simplify how register classes are defined:

  def GR32_NOSP : RegisterClass<"X86", [i32], 32, (sub GR32, ESP)>;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132621 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 04:11:37 +00:00
Joerg Sonnenberger
dd137903e4 Add new -d option to tblgen. It writes a make(1)-style dependency file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132395 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-01 13:10:15 +00:00
Jim Grosbach
96883ec700 ParseFile() may throw, so extend the try/catch to handle that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131004 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-06 18:39:28 +00:00
Douglas Gregor
4954e9f2d9 Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129613 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 22:04:07 +00:00
Argyrios Kyrtzidis
50a47e93ce Add the ClangSACheckersEmitter tablegen backend which will be used for the clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125493 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 17:58:52 +00:00
Douglas Gregor
348c975cb8 Fix comment for gen-clang-decl-nodes tblgen backend, from Michael Han
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123833 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-19 15:57:47 +00:00
Michael J. Spencer
3ff9563c3e MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 03:29:14 +00:00
Bob Wilson
333f5194cb Add a Neon intrinsic test generator.
This is still a WIP.  It's already good enough to expose a few bugs, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121868 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-15 16:58:45 +00:00
Chris Lattner
9c6b60eb28 various cleanups to tblgen, patch by Garrison Venn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121837 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-15 04:48:22 +00:00
Chris Lattner
67db883487 eliminate the Records global variable, patch by Garrison Venn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-13 00:23:57 +00:00
Michael J. Spencer
333fb04506 Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-09 17:36:48 +00:00
Michael J. Spencer
1f6efa3996 Merge System into Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 18:16:10 +00:00
Anders Carlsson
238777eb58 Add a way to emit StringSwitch of clang attribute spellings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116899 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20 01:21:53 +00:00
Dan Gohman
e4f1a9b8a2 Move tool_output_file into its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 20:32:40 +00:00
Benjamin Kramer
d1e1703c39 Push twines deeper into SourceMgr's error handling methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114847 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 17:42:11 +00:00
Dan Gohman
d4c454317a Make tool_output_file's raw_ostream instance a member variable instead
of a base class.

This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 14:20:41 +00:00
Dan Gohman
cec358ae16 Convert tablegen to use tool_output_file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111644 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:45:58 +00:00
Sean Hunt
726a3d284e Finish full attribute class emission for clang.
For more information, see the accompanying clang patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:23:09 +00:00
Mikhail Glushenkov
cb5d3ef882 Revert r111007.
Apparently, this is now fixed in Clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-13 20:08:53 +00:00
Mikhail Glushenkov
aa1a373a66 Add a workaround for building with Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111007 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-13 06:02:45 +00:00
Chris Lattner
444e2f530e remove option from tablegen for building static header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108893 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:45:21 +00:00
Nate Begeman
f8c4c27d84 Modify tablegen to support generating all NEON code used by clang at once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 04:15:13 +00:00
Sean Hunt
16171446c6 Add preliminary clang attribute generation support.
The attribute class generation support is still somewhat limited.
See the accompanying clang commit for more details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 23:45:50 +00:00