Sean Callanan
515937d2ea
Changed AsmWriterOperand to also include the index of the
...
operand into the CodeGenInstruction's list of operands,
which is useful for EDEmitter. (Still working on PR6219)
llvm-svn: 95759
2010-02-10 02:27:43 +00:00
Chris Lattner
a9dfb1bc07
Introduce a new CodeGenInstruction::ConstraintInfo class
...
for representing constraint info semantically instead of
as a c expression that will be blatted out to the .inc
file. Fix X86RecognizableInstr to use this instead of
parsing C code :).
llvm-svn: 95753
2010-02-10 01:45:28 +00:00
Sean Callanan
d4b19e12ed
Fixed some indentation in the AsmWriterInst
...
implementation. Also changed the constructor
so that it does not require a Record, making it
usable by the EDEmitter.
llvm-svn: 95715
2010-02-09 23:06:35 +00:00
Sean Callanan
a36341366b
Added AsmWriterInst.cpp to the CMakeList so that
...
it builds OK on Visual Studio.
llvm-svn: 95702
2010-02-09 22:29:16 +00:00
Sean Callanan
b7e8f4a30e
Per PR 6219, factored AsmWriterInst and AsmWriterOperand
...
out of the AsmWriterEmitter. This patch does the physical
code movement, but leaves the implementation unchanged. I'll
make any changes necessary to generalize the code in a
separate patch.
llvm-svn: 95697
2010-02-09 21:50:41 +00:00
Chris Lattner
b06015aa69
move target-independent opcodes out of TargetInstrInfo
...
into TargetOpcodes.h. #include the new TargetOpcodes.h
into MachineInstr. Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the
codebase.
llvm-svn: 95687
2010-02-09 19:54:29 +00:00
Chris Lattner
60db0a6ba5
pass stringref by value instead of by const&
...
llvm-svn: 95627
2010-02-09 00:34:28 +00:00
Jakob Stoklund Olesen
74bb06c0f0
Reintroduce the InlineHint function attribute.
...
This time it's for real! I am going to hook this up in the frontends as well.
The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.
We need some experiments to determine if that is the right thing to do.
llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Jeffrey Yasskin
03a3df1235
Make lit's gtest support honor config.environment.
...
llvm-svn: 95398
2010-02-05 18:09:19 +00:00
Torok Edwin
372c7d5f93
New flag for GenLibDeps, and llvm-config-perobjincl.
...
This allows to show the explicit files that need to be built/linked to get an
LLVM component.
llvm-svn: 95300
2010-02-04 09:31:35 +00:00
Chris Lattner
41ad1905c9
sink handling of target-independent machine instrs (other
...
than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp
file. This allows elimination of the
NO_ASM_WRITER_BOILERPLATE hack among other things.
llvm-svn: 95177
2010-02-03 01:00:52 +00:00
Daniel Dunbar
3b8a4663b9
AsmMatcherEmitter: Use stable_sort when reordering instructions, so that order
...
is still deterministic even amongst ambiguous instructions (eventually ambiguous
match orders will be a hard error, but we aren't there yet).
llvm-svn: 95157
2010-02-02 23:46:36 +00:00
Daniel Dunbar
cf18153de2
AsmMatcher: Create operand classes before use, apparently records aren't visited
...
in the order they were declared.
llvm-svn: 94868
2010-01-30 01:02:37 +00:00
Daniel Dunbar
e9aa36c895
FileCheck: When looking for "possible matches", only compare against the prefix
...
line. Turns out edit_distance can be slow if the string we are scanning for
happens to be quite large.
llvm-svn: 94860
2010-01-30 00:24:06 +00:00
Dan Gohman
2bf486eb14
Minor code cleanup.
...
llvm-svn: 94848
2010-01-29 21:57:46 +00:00
Dan Gohman
df22bbf76c
Skip whitespace when looking for a potential intended match.
...
Before:
<stdin>:94:1: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
After:
<stdin>:94:2: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
llvm-svn: 94847
2010-01-29 21:55:16 +00:00
Dan Gohman
838fb09a75
Fix the position of the caret in the FileCheck error message.
...
Before:
test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^
After:
test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^
llvm-svn: 94846
2010-01-29 21:53:18 +00:00
Daniel Dunbar
864b1aae63
FileCheck: Switch "possible match" calculation to use StringRef::edit_distance.
...
- Thanks Doug, who is obviously less lazy than me!
llvm-svn: 94795
2010-01-29 03:22:19 +00:00
Sean Callanan
e8f5e8c9f8
Quick fix to make the header file for the enhanced
...
disassembly information have a better comment (and
better guard macros).
llvm-svn: 94781
2010-01-29 01:34:29 +00:00
Ted Kremenek
9d1e666af0
Recognize 'add_executable' when analyzing CMake files.
...
llvm-svn: 94777
2010-01-29 01:10:55 +00:00
Ted Kremenek
ffe9c20eaa
Update CMake build.
...
llvm-svn: 94776
2010-01-29 01:10:25 +00:00
Sean Callanan
82436d1666
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
Mikhail Glushenkov
81068d0a3d
Escape double quotes in 'help'.
...
llvm-svn: 94543
2010-01-26 14:55:04 +00:00
Chris Lattner
823aed16f9
make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
...
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Sean Callanan
86c1181c3d
Modified the register matcher function in AsmMatcher to
...
be static. Also made it possible for clients to get it
and no other functions from ...GenAsmMatcher.inc by
defining REGISTERS_ONLY before including GenAsmMatcher.inc.
This sets the stage for target-specific lexers that can
identify registers and return AsmToken::Register as
appropriate.
llvm-svn: 94266
2010-01-23 00:40:33 +00:00
Daniel Dunbar
e197409277
AsmMatcher: Add a comment.
...
llvm-svn: 94261
2010-01-23 00:26:16 +00:00
Daniel Dunbar
b33a43b521
Make GetSourceVersion more portable, thanks Pawel!
...
llvm-svn: 94186
2010-01-22 18:14:21 +00:00
Daniel Dunbar
c7d76c5cef
lit: Separate test suite from test name with spaces, to make it easier to cut and paste.
...
llvm-svn: 94134
2010-01-22 02:04:28 +00:00
Daniel Dunbar
87b8faf227
Add a simple script for getting a version tag from a svn/git-svn/git
...
repository. Feel free to add support for your favorite VCS.
llvm-svn: 94077
2010-01-21 16:09:59 +00:00
Bob Wilson
586a9b08ce
The change in r90189 adds a link in a directory outside the iPhone platform
...
directory when building the llvmCore_Embedded project. Fix this by putting
the iPhone platform directory into DEST_DIR instead of DEST_ROOT. I also
noticed what appears to be an unintentional use of DEVELOPER_BIN instead of
DEVELOPER_DIR, so I fixed that and changed to use DEVELOPER_DIR in some places
that were hardcoded to "Developer". Finally, the other changes here allowed
some refactoring and simplification, which I have done.
llvm-svn: 93878
2010-01-19 16:42:10 +00:00
Chris Lattner
5a52727ad0
update mkpatch, patch by Garrison Venn!
...
llvm-svn: 93771
2010-01-18 21:09:05 +00:00
Eric Christopher
8444d7536c
Remove the InlineHint attribute. There are no current or planned
...
users.
llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Dale Johannesen
881ba0bb92
Remove DEBUG_DECLARE, looks like we don't need it.
...
Also, DEBUG_VALUE has side effects.
llvm-svn: 93498
2010-01-15 01:50:44 +00:00
Chris Lattner
f29c0b6880
Split the TargetAsmParser "ParseInstruction" interface in half:
...
the new ParseInstruction method just parses and returns a list of
target operands. A new MatchInstruction interface is used to
turn the operand list into an MCInst.
This requires new/deleting all the operands, but it also gives
targets the ability to use polymorphic operands if they want to.
llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Bill Wendling
22fe58e1b9
Use ENABLE_ASSERTIONS throughout.
...
llvm-svn: 93423
2010-01-14 10:19:55 +00:00
Stuart Hastings
e355daf7b0
Erm, previous patch was wrong; Thanks Bill\!
...
llvm-svn: 93381
2010-01-14 00:34:53 +00:00
Stuart Hastings
b65256c414
Enable assertions by default for Apple-style builds.
...
llvm-svn: 93380
2010-01-14 00:22:05 +00:00
Benjamin Kramer
c6fe3c3273
Reimplement getToken and SplitString as "StringRef helper functions"
...
- getToken is modeled after StringRef::split but it can split on multiple
separator chars and skips leading seperators.
- SplitString is a StringRef::split variant for more than 2 elements with the
same behaviour as getToken.
llvm-svn: 93161
2010-01-11 18:03:24 +00:00
Dan Gohman
62f05b262b
Tighten up the vim LLVM IR syntax highlighting regex for labels, and add a
...
highlighting rule for identifiers.
llvm-svn: 93056
2010-01-09 17:22:48 +00:00
Dan Gohman
d5ae136971
Set the vim auto-indent setting for open braces after case statements to
...
follow LLVM source convention.
Before:
case X: {
stuff;
}
After:
case X: {
stuff;
}
llvm-svn: 93055
2010-01-09 17:15:21 +00:00
Dale Johannesen
237254dcab
Add DEBUG_DECLARE. Not used yet.
...
llvm-svn: 93040
2010-01-09 01:24:25 +00:00
Dale Johannesen
8f04740650
Add DEBUG_VALUE. Not used yet.
...
llvm-svn: 93030
2010-01-08 23:51:25 +00:00
Duncan Sands
78376ad7e1
Partially address a README by having functionattrs consider calls to
...
memcpy, memset and other intrinsics that only access their arguments
to be readnone if the intrinsic's arguments all point to local memory.
This improves the testcase in the README to readonly, but it could in
theory be made readnone, however this would involve more sophisticated
analysis that looks through the memcpy.
llvm-svn: 92829
2010-01-06 08:45:52 +00:00
Dan Gohman
404a984780
Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGen
...
uses several kinds of opcode values which are not declared within
that enum. This fixes PR5946.
llvm-svn: 92794
2010-01-05 22:26:32 +00:00
David Greene
297bfe6d71
Add an !eq() operator to TableGen. It operates on strings only.
...
Use !cast<string>() to compare other types of objects.
llvm-svn: 92754
2010-01-05 19:11:42 +00:00
David Greene
fb652a7a5c
Have TableGen emit code that uses dbgs() rather than errs().
...
llvm-svn: 92738
2010-01-05 17:47:41 +00:00
Dan Gohman
ea6f91ff64
Change SelectCode's argument from SDValue to SDNode *, to make it more
...
clear what information these functions are actually using.
This is also a micro-optimization, as passing a SDNode * around is
simpler than passing a { SDNode *, int } by value or reference.
llvm-svn: 92564
2010-01-05 01:24:18 +00:00
Daniel Dunbar
74be83582c
tblgen/OptParser: Use EmitSourceFileHeader.
...
llvm-svn: 92521
2010-01-04 22:03:51 +00:00
Dan Gohman
673e23558b
Replace some special-case code which probably was buggy with an assertion
...
verifying that the special case does not occur.
llvm-svn: 92504
2010-01-04 20:36:57 +00:00
Dan Gohman
b91411c9b9
Remove the CPAttrParentAsRoot code, which is unused, and inconvenient
...
for a refactoring I'm working on.
llvm-svn: 92503
2010-01-04 20:31:55 +00:00
Mikhail Glushenkov
9b0afc36a8
Typo.
...
llvm-svn: 92392
2010-01-01 04:40:54 +00:00
Mikhail Glushenkov
c4f17987b6
Make CheckForSuperfluousOptions handle list form of 'switch_on' correctly.
...
llvm-svn: 92391
2010-01-01 03:51:02 +00:00
Mikhail Glushenkov
8711c8dbcf
Minor simplifications.
...
llvm-svn: 92390
2010-01-01 03:50:51 +00:00
Mikhail Glushenkov
554c054777
Better error message.
...
llvm-svn: 92389
2010-01-01 03:50:34 +00:00
Daniel Dunbar
2f57d9ad64
lit: Add setuptools support.
...
llvm-svn: 92169
2009-12-26 22:58:39 +00:00
Daniel Dunbar
ea21448978
lit: Sink code into a 'lit' package.
...
llvm-svn: 92168
2009-12-26 22:58:23 +00:00
Bill Wendling
b45a3d8de4
Use the 'MadeChange' variable instead of returning 'false' all of the time.
...
llvm-svn: 92155
2009-12-25 13:35:40 +00:00
Daniel Dunbar
54ed390727
Don't emit trailing semicolon.
...
llvm-svn: 92133
2009-12-24 17:49:28 +00:00
Mikhail Glushenkov
382495a0ff
Cosmetic issue: more consistent naming.
...
llvm-svn: 91998
2009-12-23 12:49:41 +00:00
Mikhail Glushenkov
f48a0c43b6
Allow (set_option SwitchOption, true).
...
llvm-svn: 91997
2009-12-23 12:49:30 +00:00
Daniel Dunbar
c7dccd8ad2
Suppress compiler warning.
...
llvm-svn: 91959
2009-12-23 00:45:10 +00:00
Sean Callanan
36eab80875
Fixes to the X86 disassembler:
...
Made LEA memory operands emit only 4 MCInst operands.
Made the scale operand equal 1 for instructions that have no
SIB byte.
llvm-svn: 91919
2009-12-22 21:12:55 +00:00
David Greene
dbf7074296
Fix a bug in !subst where TableGen would go and resubstitute text it had
...
just substituted. This could cause infinite looping in certain
pathological cases.
llvm-svn: 91843
2009-12-21 21:21:34 +00:00
Chris Lattner
5c13f389cb
.llx is no more.
...
llvm-svn: 91784
2009-12-19 20:56:53 +00:00
Nuno Lopes
91b866a163
fix build and while at it remove a redudant include
...
llvm-svn: 91774
2009-12-19 11:52:18 +00:00
Daniel Dunbar
3a821f7f0c
More bzero -> memset that I missed.
...
llvm-svn: 91757
2009-12-19 04:16:57 +00:00
Daniel Dunbar
f008ea5fa0
Add missing newlines at EOF (for clang++).
...
llvm-svn: 91756
2009-12-19 04:16:48 +00:00
Sean Callanan
04cc307edd
Table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit
...
incarnations), integrated into the MC framework.
The disassembler is table-driven, using a custom TableGen backend to
generate hierarchical tables optimized for fast decode. The disassembler
consumes MemoryObjects and produces arrays of MCInsts, adhering to the
abstract base class MCDisassembler (llvm/MC/MCDisassembler.h).
The disassembler is documented in detail in
- lib/Target/X86/Disassembler/X86Disassembler.cpp (disassembler runtime)
- utils/TableGen/DisassemblerEmitter.cpp (table emitter)
You can test the disassembler by running llvm-mc -disassemble for i386
or x86_64 targets. Please let me know if you encounter any problems
with it.
llvm-svn: 91749
2009-12-19 02:59:52 +00:00
Dan Gohman
b0da63da1e
Fix a comment.
...
llvm-svn: 91741
2009-12-19 01:46:09 +00:00
Eli Friedman
36623cc253
Fix an issue in googletest where a name was used before it was defined.
...
llvm-svn: 91718
2009-12-18 21:38:44 +00:00
Mikhail Glushenkov
d7015906d0
Make 'set_option' work with list options.
...
This works now: (set_option "list_opt", ["val_1", "val_2", "val_3"])
llvm-svn: 91679
2009-12-18 11:27:26 +00:00
Mikhail Glushenkov
1fe2678a06
Add a 'set_option' action for use in OptionPreprocessor.
...
llvm-svn: 91594
2009-12-17 07:49:16 +00:00
Mikhail Glushenkov
9bbd4eb9f5
Refactoring, no functionality change.
...
llvm-svn: 91593
2009-12-17 07:48:49 +00:00
Mikhail Glushenkov
bea9ce8826
s/TokenizeCmdline/TokenizeCmdLine/
...
llvm-svn: 91592
2009-12-17 07:48:34 +00:00
Jim Grosbach
2a282f2f86
Add @earlyclobber TableGen constraint
...
llvm-svn: 91554
2009-12-16 19:43:02 +00:00
Bill Wendling
8478ed5d18
Remove superfluous 'extern' variable that was causing a warning with clang.
...
llvm-svn: 91552
2009-12-16 19:36:42 +00:00
Bill Wendling
098a38b5ce
Some command lines don't like numbers with leading zeros. Remove them.
...
llvm-svn: 91463
2009-12-15 22:42:19 +00:00
Daniel Dunbar
c6d3c5ef76
lit: Improve error when gtest discovery fails.
...
llvm-svn: 91458
2009-12-15 22:00:37 +00:00
Dan Gohman
c87c16b030
Revert 90628, which was incorrect.
...
llvm-svn: 91448
2009-12-15 20:21:44 +00:00
Jim Grosbach
38c4f4b5d1
whitespace
...
llvm-svn: 91442
2009-12-15 19:28:13 +00:00
Mikhail Glushenkov
66a664870b
Convert llvmc tests to FileCheck.
...
llvm-svn: 91420
2009-12-15 07:21:14 +00:00
Mikhail Glushenkov
62b65ecf18
Support hook invocation from 'append_cmd'.
...
llvm-svn: 91419
2009-12-15 07:20:50 +00:00
Mikhail Glushenkov
096fc103fb
Validate the generated C++ code in llvmc tests.
...
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:
- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional
llvm-svn: 91404
2009-12-15 03:04:52 +00:00
Mikhail Glushenkov
2cb65bd5ab
Allow $CALL(Hook, '$INFILE') for non-join tools.
...
llvm-svn: 91402
2009-12-15 03:04:02 +00:00
Daniel Dunbar
1542d735d9
NNT: Make sure stderr for build commands goes to log file, as intended but misdirected.
...
llvm-svn: 91379
2009-12-15 00:41:47 +00:00
Daniel Dunbar
8165f02e8c
NNT: Use [e]grep -a when scanning logs, its possibly they will have non-text
...
characters in them, in which case the grep will just return 'Binary file
matches' and the whole thing falls over.
llvm-svn: 91302
2009-12-14 17:58:33 +00:00
Daniel Dunbar
37e0439b17
NNT: Always create the -sentdata.txt file.
...
llvm-svn: 91301
2009-12-14 17:58:27 +00:00
Daniel Dunbar
0d886ca091
Remove unneeded ';' and a class/struct mismatch (noticed by clang).
...
llvm-svn: 90934
2009-12-09 02:58:09 +00:00
Daniel Dunbar
564c96bd5e
lit: Prevent crash-on-invalid (when run on directory which has no test suite).
...
llvm-svn: 90871
2009-12-08 19:49:30 +00:00
Mikhail Glushenkov
57a67facb8
Simplify a bit.
...
llvm-svn: 90785
2009-12-07 19:16:13 +00:00
Mikhail Glushenkov
fca845187d
Throw 'const char*' instead of 'std::string'.
...
llvm-svn: 90784
2009-12-07 19:15:57 +00:00
Mikhail Glushenkov
67c106664b
Deprecate 'unpack_values'.
...
Use 'forward_values' + 'comma_separated' instead.
llvm-svn: 90774
2009-12-07 18:25:54 +00:00
Mikhail Glushenkov
6b6be99632
Implement 'forward_value' and 'forward_transformed_value'.
...
llvm-svn: 90770
2009-12-07 17:03:05 +00:00
Mikhail Glushenkov
d5774dfb8d
Refactoring, no functionality change.
...
llvm-svn: 90764
2009-12-07 10:51:55 +00:00
Dan Gohman
e79368d3ff
Minor code simplification.
...
llvm-svn: 90628
2009-12-05 00:05:43 +00:00
Daniel Dunbar
eebf029d1d
OptParser: Emit HelpText field for option groups.
...
llvm-svn: 90599
2009-12-04 21:41:24 +00:00
Mikhail Glushenkov
ed163ed103
Forward -save-temps to llvm-gcc.
...
llvm-svn: 90214
2009-12-01 06:51:30 +00:00
Eric Christopher
d6206a8b00
Add a soft link so that in an apple style build we can find libLTO.dylib.
...
llvm-svn: 90189
2009-12-01 02:26:01 +00:00
Daniel Dunbar
53b95c4080
Fix FileCheck crash when fuzzy scanning starting at the end of the file.
...
llvm-svn: 90065
2009-11-29 08:30:24 +00:00
Daniel Dunbar
e502433d7f
Sketch TableGen disassembler emitter, based on patch by Sean Callanan.
...
llvm-svn: 89833
2009-11-25 02:13:23 +00:00