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

1668 Commits

Author SHA1 Message Date
Nate Begeman
0eed59a7df Add support to tablegen for naming the nodes themselves, not just the operands,
in selectiondag patterns.  This is required for the upcoming shuffle_vector rewrite,
and as it turns out, cleans up a hack in the Alpha instruction info.

llvm-svn: 67286
2009-03-19 05:21:56 +00:00
Ted Kremenek
37102cf84e tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
order.

llvm-svn: 67244
2009-03-18 21:36:46 +00:00
Ted Kremenek
60be2b0ef5 'tblgen -gen-clang-diags-options' now outputs the OptionTable:
static const WarningOption OptionTable[] = {
    {"unused-macros", DIAGS(UnusedMacrosDiags)}
    ...
  };

This table is not yet properly sorted.

llvm-svn: 67242
2009-03-18 21:28:47 +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
Chris Lattner
c9d1aa488c include the null at the end of a memorybuffer as part of the buffer.
This allows tblgen to handle include "foo.td" when the quote is exactly
the last character in a file.  rdar://6695728

llvm-svn: 67232
2009-03-18 20:36:45 +00:00
Douglas Gregor
7bc62681cf Add TGSourceMgr.cpp to CMake build, sort lines
llvm-svn: 67042
2009-03-16 17:04:14 +00:00
Sebastian Redl
da664dfdd7 Add TableGen syntax highlighting for the jEdit editor.
llvm-svn: 67005
2009-03-14 10:15:32 +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
Ted Kremenek
68e7aca3cb Further constify Record::isSubClassOf.
llvm-svn: 66970
2009-03-13 22:20:10 +00:00
Chris Lattner
e4db3f1556 Fix escaping in asm string literals correctly by having tblgen unescape
them, then the asmprinter emitter reescape them.

llvm-svn: 66958
2009-03-13 21:33:17 +00:00
Chris Lattner
8b349828db add a horrible hack to fix the build.
llvm-svn: 66957
2009-03-13 21:23:43 +00:00
Chris Lattner
ec4303f889 add support for a few simple escape characters in tblgen strings.
llvm-svn: 66949
2009-03-13 21:03:27 +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
Argyrios Kyrtzidis
b277b8187d Unbreak build, bring in std::string for GCC 4.3
llvm-svn: 66876
2009-03-13 08:12:13 +00:00
Evan Cheng
a7e21323da Unbreak build.
llvm-svn: 66874
2009-03-13 07:41:30 +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
Bob Wilson
7c7573dc3f Fix an inconsistent use of LLVMGCCDIR. In all other cases, this directory
refers to the "prefix" directory, i.e., one level above "bin".  LLVMGCCPATH
is used as the directory containing the llvm-gcc executable, so add a "/bin"
suffix to get from LLVMGCCDIR to LLVMGCCPATH.

llvm-svn: 66823
2009-03-12 19:47:24 +00:00
Duncan Sands
b27c523449 It makes no sense to have a ODR version of common
linkage, so remove it.

llvm-svn: 66690
2009-03-11 20:14:15 +00:00
Chris Lattner
8fdb9ac396 implement support for C-style string literal concatenation in td files.
llvm-svn: 66663
2009-03-11 17:08:13 +00:00
Duncan Sands
aadb34c357 Remove the one-definition-rule version of extern_weak
linkage: this linkage type only applies to declarations,
but ODR is only relevant to globals with definitions.

llvm-svn: 66650
2009-03-11 08:08:06 +00:00
Daniel Dunbar
dd8b83d6c9 Add -disable-bindings for utils/NewNightlyTest.pl
llvm-svn: 66566
2009-03-10 19:33:13 +00:00
Duncan Sands
5ab54d488f Introduce new linkage types linkonce_odr, weak_odr, common_odr
and extern_weak_odr.  These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global.  In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time.   This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function.  If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body.  The
code generators on the other hand map weak and weak_odr linkage
to the same thing.

llvm-svn: 66339
2009-03-07 15:45:40 +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
Mike Stump
979a5ea539 .emacs file bits for automatically setting the llvm.org coding style. Thanks Anton.
llvm-svn: 66032
2009-03-04 14:14:37 +00:00
Mikhail Glushenkov
65cb3e0861 'append_cmd' should split its argument.
Makes '(append_cmd "-foo a b c")' work.

llvm-svn: 65623
2009-02-27 06:46:55 +00:00
Chris Lattner
246fd7ca83 these utils don't need exports.
llvm-svn: 65559
2009-02-26 19:02:23 +00:00
Mon P Wang
c9b4dab417 Added support to have TableGen provide information if an intrinsic (core
or target) can be overloaded or not.

llvm-svn: 65404
2009-02-24 23:17:49 +00:00
Bill Wendling
9d4eb136da Overhaul my earlier submission due to feedback. It's a large patch, but most of
them are generic changes.

- Use the "fast" flag that's already being passed into the asm printers instead
  of shoving it into the DwarfWriter.

- Instead of calling "MI->getParent()->getParent()" for every MI, set the
  machine function when calling "runOnMachineFunction" in the asm printers.

llvm-svn: 65379
2009-02-24 08:30:20 +00:00
Bill Wendling
0d8316c5e0 - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emit
a DBG_LABEL or not. We want to fall back to the original way of emitting debug
  info when we're in -O0/-fast mode.
- Add plumbing in to pass the "Fast" flag to places that need it.
- XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I
  need to investigate still.

llvm-svn: 65367
2009-02-24 02:35:30 +00:00
Misha Brukman
10d6b192a4 * Fixed spelling
* Linters now return their information instead of printing it, to
  enable easier unittesting
* Added support for finding tabs in files, added to C++ linter

llvm-svn: 65202
2009-02-20 23:44:54 +00:00
Misha Brukman
13dd5f564d Keep the newline character at the end of the lines whose trailing whitespace we
are deleting; otherwise, everything ends up on a single line.

llvm-svn: 65185
2009-02-20 22:30:46 +00:00
Misha Brukman
9d4bf3a090 Only strip the newline character at the end of the lines that we're considering
for length and for trailing whitespace; otherwise, the whitespace themselves
will also be removed.

llvm-svn: 65182
2009-02-20 22:28:45 +00:00
Bill Wendling
0a1cd0bf22 We have logic in there to emit a default debugging label at the beginning of a
function. Emitting another label after the prologue messes up the debugging. We
are doing that because the first DebugLoc object it sees is different from the
previous, which was nothing. Check for this situation, and don't emit one if
it's the first.

llvm-svn: 65180
2009-02-20 22:19:20 +00:00
Bill Wendling
75751a4769 Add an accessor method to DwarfWriter to tell of debugging info should be emitted.
llvm-svn: 65092
2009-02-20 00:44:43 +00:00
Bill Wendling
2666a629bd Print out a new label only if the debug location *tuple* is different. The debug
locations may change, but the tuples may be the same.

llvm-svn: 65039
2009-02-19 09:16:38 +00:00
Bill Wendling
a7909157af Forgot to check that debug information is supported.
llvm-svn: 65034
2009-02-19 08:06:12 +00:00
Bill Wendling
306b992133 Put code that generates debug labels into TableGen so that it can be used by
everyone.

llvm-svn: 64978
2009-02-18 23:12:06 +00:00
Dan Gohman
30770ee7b3 Add explicit keywords.
llvm-svn: 64915
2009-02-18 16:37:45 +00:00
Cedric Venet
48be6b5e15 Unbreak the build on win32.
Cleanup some warning.

Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.

Only tested with VS2008. hope it does not break anything. feel free to revert.

llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Duncan Sands
5aeb9b727a Generalize some alias analysis logic from atomic
intrinsics to any IntrWriteArgMem intrinsics.

llvm-svn: 64551
2009-02-14 10:56:35 +00:00
Julien Lerouge
5d91210214 Fix MingW build: define GTEST_OS_WINDOWS if OS is MingW, but disable
exceptions.

llvm-svn: 64367
2009-02-12 08:02:35 +00:00
Bill Wendling
4ed3ee18ca Don't try to strip a file we just moved.
llvm-svn: 64263
2009-02-11 00:14:53 +00:00
Bill Wendling
f9d81f44cf Strip the LTO dylib.
llvm-svn: 64119
2009-02-09 06:42:40 +00:00
Bill Wendling
3f8a7a8f5d Small fix for the 'strip' command. Do a list of .so files.
llvm-svn: 64112
2009-02-09 04:01:11 +00:00
Evan Cheng
d040b30c1d Eliminate a 'control reaches end of non-void function' warning.
llvm-svn: 64111
2009-02-09 03:07:24 +00:00
Bill Wendling
d8f6731440 Don't run 'strip' on files that aren't there.
llvm-svn: 64108
2009-02-09 02:18:35 +00:00
Bill Wendling
0b9f8789a8 Remove warnings about not being able to delete something. Don't run lipo on gccas, gccld, and llvm-config scripts.
llvm-svn: 64107
2009-02-09 02:13:33 +00:00