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

2517 Commits

Author SHA1 Message Date
Dan Gohman
adbee18064 Remove bogus Updated line.
llvm-svn: 97263
2010-02-26 21:15:49 +00:00
Chris Lattner
594d027cdb add some helpful comments to the emitter
llvm-svn: 97219
2010-02-26 08:15:02 +00:00
Chris Lattner
ae14b0d790 switch from my nice hashtable based merging solution to a
gross little neighbor merging implementation.  This one has
the benefit of not violating the ordering of patterns, so it
generates code that passes tests again.

llvm-svn: 97218
2010-02-26 08:08:41 +00:00
Chris Lattner
c84d763dfb fix same bug in CheckChainCompatibleMatcher::isEqualImpl
llvm-svn: 97217
2010-02-26 08:06:02 +00:00
Chris Lattner
a26437c8f2 fix a nasty bug in CheckTypeMatcher::isEqualImpl
llvm-svn: 97216
2010-02-26 08:05:36 +00:00
Chris Lattner
938c57ccc6 finish off the factoring optimization along the lines of the
current design.  This generates a matcher that successfully
runs, but it turns out that the factoring we're doing violates
the ordering of patterns, so we end up matching (e.g.) movups
where we want movaps.  This won't due, but I'll address this in
a follow on patch.  It's nice to not be on by default yet! :)

llvm-svn: 97215
2010-02-26 07:36:37 +00:00
Chris Lattner
6f18300453 add a new setNumChildren method for resizing scopes. Tweak getHash() so
that we never return a tombstone value, which (thankfully) triggers an
assert in densemap.

llvm-svn: 97214
2010-02-26 07:35:27 +00:00
Chris Lattner
e4b5559cf8 change the scope node to include a list of children to be checked
instead of to have a chained series of scope nodes.  This makes
the generated table smaller, improves the efficiency of the
interpreter, and make the factoring optimization much more 
reasonable to implement.

llvm-svn: 97160
2010-02-25 19:00:39 +00:00
Dan Gohman
ab316457bb Add the union keyword.
llvm-svn: 97155
2010-02-25 18:17:58 +00:00
Daniel Dunbar
3009f309df Add simple script for finding most-recent-rev-before-N in a git-svn repo; useful
when bisecting multiple repos in sync.

llvm-svn: 97150
2010-02-25 18:07:07 +00:00
Chris Lattner
ea2fcbcd28 Implement the first half of redundancy factoring: efficiently
splitting all the patterns under scope nodes into equality sets
based on their first node.  The second step is to rewrite the
graph info a form that exposes the sharing.  Before I do this, 
I want to redesign the Scope node.

llvm-svn: 97130
2010-02-25 07:45:24 +00:00
Chris Lattner
3c648b2491 factor the print method better.
llvm-svn: 97125
2010-02-25 06:53:39 +00:00
Chris Lattner
c40658bc35 add methods to do equality checks and get hashes of Matchers
llvm-svn: 97123
2010-02-25 06:49:58 +00:00
Chris Lattner
e875ef2dc9 formatting.
llvm-svn: 97097
2010-02-25 02:09:00 +00:00
Chris Lattner
02110cc687 rename fooMatcherNode to fooMatcher.
llvm-svn: 97096
2010-02-25 02:04:40 +00:00
Chris Lattner
07ef4b0d6d add some noop code to push it out of my tree.
llvm-svn: 97094
2010-02-25 01:57:41 +00:00
Chris Lattner
43351d1bfd rename PushMatcherNode -> ScopeMatcherNode to more accurately
reflect what it does.  Switch the sense of the Next and the Check
arms to be more logical.  No functionality change.

llvm-svn: 97093
2010-02-25 01:56:48 +00:00
Jeffrey Yasskin
0c926bb186 Filter the future all-of-llvm shared library out of the llvm-config
results.  I'm checking this in before the shared library so that I can
tell if it breaks anything on its own.

llvm-svn: 97089
2010-02-25 01:21:38 +00:00
Chris Lattner
35b88592cd add a fixme for an experiment that defeated me for the time being.
llvm-svn: 97081
2010-02-25 00:03:03 +00:00
Chris Lattner
071ecfc919 contract movechild+checktype into a new checkchild node, shrinking the
x86 table by 1200 bytes.

llvm-svn: 97053
2010-02-24 20:15:25 +00:00
Chris Lattner
119a10f065 split the movechild/record/moveparent -> recordchild optzn into a
movechild/record -> recordchild/movechild and 
movechild/moveparent -> noop xforms.  This slightly shrinks the tables
(x86 to 117454) and enables adding future improvements.

llvm-svn: 97051
2010-02-24 19:52:48 +00:00
Chris Lattner
84308c9ca0 emit a histogram of the opcodes in comments.
llvm-svn: 97047
2010-02-24 19:17:12 +00:00
Chris Lattner
fb5e88009e lets not break the old isel.
llvm-svn: 97034
2010-02-24 07:41:11 +00:00
Chris Lattner
c4518bb9c4 Since the new instruction selector now works, I don't need to keep
the old one around for comparative purposes: have the
ENABLE_NEW_ISEL #define (which is not enabled on mainline) stop
emitting the old isel at all, yay for build time win.

llvm-svn: 97033
2010-02-24 07:35:09 +00:00
Chris Lattner
dbdbb30a7c implement a simple proof-of-concept optimization for
the new isel: fold movechild+record+moveparent into a
single recordchild N node.  This shrinks the X86 table
from 125443 to 117502 bytes.

llvm-svn: 97031
2010-02-24 07:31:45 +00:00
Chris Lattner
c308ed9bd8 The new isel passes all tests, time to start making it go fast.
Also add an easy macro at the top of DAGISelEmitter.cpp to enable
it.  Lets see if I can avoid accidentally turning it on :)

llvm-svn: 97029
2010-02-24 07:06:50 +00:00
Chris Lattner
7878da5c39 The new isel was not properly handling patterns that covered
internal nodes with flag results.  Record these with a new 
OPC_MarkFlagResults opcode and use this to update the interior
nodes' flag results properly.  This fixes CodeGen/X86/i256-add.ll
with the new isel.

llvm-svn: 97021
2010-02-24 05:33:42 +00:00
Sean Callanan
a5bd688c68 Changed the table generator so that the X86
disassembler never recognizes InitReg instructions.

llvm-svn: 97017
2010-02-24 02:56:25 +00:00
Mikhail Glushenkov
653efea01f Trailing whitespace.
llvm-svn: 96923
2010-02-23 09:05:01 +00:00
Mikhail Glushenkov
c47f951a86 Implement order-preserving option forwarding.
Needed to correctly handle things like 'llvmc -framework Foo foo.o -framework
Bar bar.o' - before this commit all '-framework' options would've been grouped
together in the beginning.

Due to our dependence on CommandLine this turned out to be a giant hack; we will
migrate away from CommandLine eventually.

llvm-svn: 96922
2010-02-23 09:04:57 +00:00
Mikhail Glushenkov
232ae779ee Correct option forwarding: initial implementation.
Does not work, but the infrastructure changes are in place.

llvm-svn: 96920
2010-02-23 09:04:44 +00:00
Mikhail Glushenkov
d030cced3d New experimental/undocumented feature: 'works_on_empty'.
For now, just enough support to make -filelist work.

llvm-svn: 96918
2010-02-23 09:04:28 +00:00
Mikhail Glushenkov
947daddd81 Add a way to enable '-opt=foo' forwarding.
llvm-svn: 96916
2010-02-23 09:04:13 +00:00
Daniel Dunbar
93911572ff Eliminate llvmgcc_version testing variable.
llvm-svn: 96908
2010-02-23 07:56:28 +00:00
Daniel Dunbar
cb977c7241 Kill unused llvmgccmajvers testing variable.
llvm-svn: 96906
2010-02-23 07:56:18 +00:00
Chris Lattner
5b5d31f533 add some #if 0'd out code for checking that named values in
input/output patterns have the same type.  It turns out that 
this triggers all the time because we don't infer types 
between these boundaries.  Until we do, don't turn this on.

llvm-svn: 96905
2010-02-23 07:50:58 +00:00
Chris Lattner
8b5a000583 Reject patterns that use a name multiple times in the src or result
of a pattern and where the uses have different types.

llvm-svn: 96904
2010-02-23 07:22:28 +00:00
Chris Lattner
da756c0018 reject patterns that have dead named arguments in the input pattern
this is tidier and can find bugs.

llvm-svn: 96900
2010-02-23 06:55:24 +00:00
Chris Lattner
df30185383 reject patterns that mention a name in the destination pattern
but not in the input.  Previously, this would trigger an abort
late in the isel logic.

llvm-svn: 96898
2010-02-23 06:35:45 +00:00
Chris Lattner
1a749c367d merge some code.
llvm-svn: 96896
2010-02-23 06:16:51 +00:00
Chris Lattner
4c22c51356 more tidying up
llvm-svn: 96891
2010-02-23 05:59:10 +00:00
Chris Lattner
55115233db reduce indentation by eliminating 'else after return'
llvm-svn: 96889
2010-02-23 05:51:07 +00:00
Chris Lattner
49b1b721fc really fix an off-by-one error
llvm-svn: 96845
2010-02-23 01:07:39 +00:00
Chris Lattner
68fd68d9ff switch the value# in OPC_CompleteMatch and OPC_EmitNode to use a
VBR encoding for the insanity being perpetrated by the spu backend. 

llvm-svn: 96843
2010-02-23 00:59:59 +00:00
Chris Lattner
49ec9f853e add a new Push2 opcode for targets (like cellspu) which have
ridiculously ginormous patterns and need more than one byte
of displacement for encodings.  This fixes CellSPU/fdiv.ll.
SPU is still doing something else ridiculous though.

llvm-svn: 96833
2010-02-22 23:55:39 +00:00
Chris Lattner
fbca302fe2 Change ComplexPattern handling to push the node being matched as
well as the operands produced when the pattern is matched.  This
allows CheckSame to work correctly when matching replicated 
names involving ComplexPatterns.  This fixes a bunch of MSP430 
failures, we're down to 13 failures, two of which are
due to a sched bug.

llvm-svn: 96824
2010-02-22 23:33:44 +00:00
Chris Lattner
1613c59dbe add a new CheckMultiOpcode opcode for checking that a node
has one of the list of acceptable opcodes for a complex 
pattern.  This fixes 4 regtest failures.

llvm-svn: 96814
2010-02-22 22:30:37 +00:00
Chris Lattner
b77c4c6a30 When matching patterns that have a complex pattern as their root, make
sure to only run the complex pattern on nodes where the target opts in.
This patch only handles targets with one opcode specified so far, but
fixes 16 failures, only 34 left.

llvm-svn: 96813
2010-02-22 22:18:05 +00:00
Chris Lattner
85fa3173ff fix most of the failures in the x86 suite by handling multiple
result nodes correctly.  Note that this includes a horrible hack
in DAGISelHeader which cannot be fixed reasonably without 
eliminating (parallel) from input patterns.  That, in turn,
can't be done until we support writing multiple result patterns
for the X86and_flag and related multiple-result nodes.

llvm-svn: 96767
2010-02-21 23:54:05 +00:00
Chris Lattner
691dcb90a4 Always emit register class id references as i32 like
DAGISelEmitter does.  This fixes 11 arm failures (8 
left).

llvm-svn: 96757
2010-02-21 20:53:45 +00:00
Chris Lattner
fc00a4e6b8 Sort the patterns before adding them to the FA so that we get the
least cost matches.  This gets us from 195 -> 208 passes on the ppc codegen tests.

llvm-svn: 96747
2010-02-21 19:22:06 +00:00
Chris Lattner
4a9c3615f8 emit table indexes before each row so that it is debuggable.
llvm-svn: 96730
2010-02-21 07:16:41 +00:00
Chris Lattner
594803ba50 fix a table size miscomputation, target opcodes are 2 bytes.
With this, the matcher actually works reasonably well, but
crashes on larger examples in the scheduler.

llvm-svn: 96727
2010-02-21 06:44:29 +00:00
Chris Lattner
98d6a38236 emit to the right streams, to avoid emitting the push
body before the push.

llvm-svn: 96726
2010-02-21 06:30:04 +00:00
Chris Lattner
359c75b60c oops don't turn this on for everyone yet.
llvm-svn: 96725
2010-02-21 06:03:56 +00:00
Chris Lattner
0164635dad implement the last known missing feature: updating uses of results
of the matched pattern to use the newly created node results.  Onto
the "making it actually work" phase!

llvm-svn: 96724
2010-02-21 06:03:07 +00:00
Chris Lattner
8983077c87 Lots of improvements to the new dagisel emitter. This gets it to
the point where it is to the 95% feature complete mark, it just
needs result updating to be done (then testing, optimization 
etc).

More specificallly, this adds support for chain and flag handling
on the result nodes, support for sdnodexforms, support for variadic
nodes, memrefs, pinned physreg inputs, and probably lots of other
stuff.

In the old DAGISelEmitter, this deletes the dead code related to
OperatorMap, cleans up a variety of dead stuff handling "implicit
remapping" from things like globaladdr -> targetglobaladdr (which
is no longer used because globaladdr always needs to be legalized),
and some minor formatting fixes.

llvm-svn: 96716
2010-02-21 03:22:59 +00:00
Chris Lattner
e6302b3565 add emitter support for integer constants and simple physreg references.
llvm-svn: 96663
2010-02-19 07:49:56 +00:00
Chris Lattner
80491f4c52 fix this to work more determinstically, patch by Thomas Veith!
llvm-svn: 96661
2010-02-19 07:02:20 +00:00
Chris Lattner
28cc2f3f44 I confused myself, temporaries will be recorded right along with other inputs.
llvm-svn: 96639
2010-02-19 00:33:13 +00:00
Chris Lattner
fc0b27563f introduce a new ResultVal and start keeping track of temporary values.
llvm-svn: 96636
2010-02-19 00:27:40 +00:00
Chris Lattner
4cfdecc52b add support for referencing registers and immediates,
building the tree to represent them but not emitting 
table entries for them yet.

llvm-svn: 96617
2010-02-18 22:03:03 +00:00
Chris Lattner
5bc53ac6f5 start sketching out the structure of code for result emission generation.
Nothing real here yet.

llvm-svn: 96575
2010-02-18 06:47:49 +00:00
Chris Lattner
76506b3749 rename the child field to 'next'. This is not a parent/child
relationship, this is a linear list relationship.

llvm-svn: 96561
2010-02-18 02:53:41 +00:00
Chris Lattner
955650be1f eliminate the MatcherNodeWithChild class, give the 'child'
field to MatcherNode.

llvm-svn: 96560
2010-02-18 02:49:24 +00:00
Chris Lattner
025ca7158a fit in 80 cols
llvm-svn: 96541
2010-02-18 00:23:27 +00:00
Chris Lattner
a1f12685c7 redisable this to save people a small amount of build time.
llvm-svn: 96497
2010-02-17 19:19:50 +00:00
Chris Lattner
2ec1f1a54a move isOnlyReachableByFallthrough out of MachineBasicBlock into AsmPrinter,
and add a sparc implementation that knows about delay slots.  Patch by
Nathan Keynes!

llvm-svn: 96492
2010-02-17 18:52:56 +00:00
Chris Lattner
b8c69426ef reduce nesting.
llvm-svn: 96466
2010-02-17 06:53:36 +00:00
Chris Lattner
143e2b6181 improve comments, the matcher is now feature complete, on to codegen.
llvm-svn: 96464
2010-02-17 06:47:35 +00:00
Chris Lattner
955ce23e27 sink special case "cannotyetselect" for intrinsics out of the
tblgen splatted code into the implementation.

llvm-svn: 96460
2010-02-17 06:28:22 +00:00
Chris Lattner
8f3afbc621 Emulate the current isel's "IsChainCompatible" logic for now.
I'd like to eventually rip it out, but for now producing the
same selections as the old matcher is more important.

llvm-svn: 96458
2010-02-17 06:23:39 +00:00
Chris Lattner
15eb8504cd properly record chain inputs to complex patterns,
resolving a fixme.

llvm-svn: 96457
2010-02-17 06:08:25 +00:00
Chris Lattner
abb5e906a7 simplify IsChainCompatible codegen, add comments. no
functionality change.

llvm-svn: 96453
2010-02-17 05:35:28 +00:00
Chris Lattner
44d2031ca8 Prep work to handle input chains of matched patterns and checking for
'ischaincompatible' when a pattern has more than one input chain.  Need
to do some commenting and cleanup now that I understand how this works.

llvm-svn: 96443
2010-02-17 02:16:19 +00:00
Chris Lattner
ac9295346b record input chains.
llvm-svn: 96437
2010-02-17 01:34:15 +00:00
Chris Lattner
a6df2a60e5 prefix captured value names with $ so they look like
variables.  Use the fancy OpNo variable instead of i,
which has the right index including chains.

llvm-svn: 96436
2010-02-17 01:27:29 +00:00
Chris Lattner
ab430d225c improve comments on OPC_Record to say what we're recording a node.
llvm-svn: 96433
2010-02-17 01:03:09 +00:00
Chris Lattner
fdd452441a improve comments in generated matcher a bit.
llvm-svn: 96422
2010-02-17 00:39:26 +00:00
Chris Lattner
1f818d2e25 make the new isel generator plop out a CheckComplexPattern function
for evaluating complex patterns.  Some cleanup has to happen before
this can be used though.

llvm-svn: 96419
2010-02-17 00:31:50 +00:00
Chris Lattner
ebf80812e3 fix inverted condition.
llvm-svn: 96416
2010-02-17 00:11:30 +00:00
Chris Lattner
3499eaaac1 complex patterns don't get 'record' nodes, they implicitly
record all their results.

llvm-svn: 96412
2010-02-16 23:16:25 +00:00
Chris Lattner
c89e98d63b clean up some code, eliminate NodeIsComplexPattern, which
does the same thing as getComplexPatternInfo.

llvm-svn: 96411
2010-02-16 23:13:59 +00:00
Chris Lattner
617c3a5c69 fix indentation
llvm-svn: 96409
2010-02-16 22:38:31 +00:00
Chris Lattner
0d35c68d5c fix rdar://7653908, a crash on a case where we would fold a load
into a roundss intrinsic, producing a cyclic dag.  The root cause
of this is badness handling ComplexPattern nodes in the old dagisel
that I noticed through inspection.  Eliminate a copy of the of the
code that handled ComplexPatterns by making EmitChildMatchCode call
into EmitMatchCode.

llvm-svn: 96408
2010-02-16 22:35:06 +00:00
Chris Lattner
cafd2c75a1 simplify this code. In the new world order there is no
need to scan the entire subtree of the pattern anymore.

llvm-svn: 96369
2010-02-16 19:19:58 +00:00
Chris Lattner
ebcd505b14 convert the new matcher to check intermediate nodes for a single
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does.  This 
substantially simplifies the code and improves opportunities for
sharing.

llvm-svn: 96368
2010-02-16 19:15:55 +00:00
Chris Lattner
eba9f75b00 change dag isel emitter to only call 'IsProfitableToFold' on nodes
with chains.  On interior nodes that lead up to them, we just directly
check that there is a single use.  This generates slightly more
efficient code.

llvm-svn: 96366
2010-02-16 19:03:34 +00:00
Chris Lattner
2507e6b51f mark all the generated node predicates 'const'.
llvm-svn: 96337
2010-02-16 07:26:36 +00:00
Chris Lattner
a9550b6d27 generate code for node and pattern predicates. Note that this won't
build if enabled, it will fail with constness issues. I'll resolve 
these next.

llvm-svn: 96336
2010-02-16 07:21:10 +00:00
Chris Lattner
5a026d7367 refactor some code into a local class.
llvm-svn: 96334
2010-02-16 06:52:01 +00:00
Chris Lattner
eb72054cb3 remove now dead code and fixme.
llvm-svn: 96333
2010-02-16 06:15:00 +00:00
Chris Lattner
5901090df8 remove dead code. This is never generated for any targets in mainline.
llvm-svn: 96332
2010-02-16 06:14:22 +00:00
Chris Lattner
104828612b add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.

llvm-svn: 96331
2010-02-16 06:10:58 +00:00
Evan Cheng
b5fe25544c Split SelectionDAGISel::IsLegalAndProfitableToFold to
IsLegalToFold and IsProfitableToFold. The generic version of the later simply checks whether the folding candidate has a single use.

This allows the target isel routines more flexibility in deciding whether folding makes sense. The specific case we are interested in is folding constant pool loads with multiple uses.

llvm-svn: 96255
2010-02-15 19:41:07 +00:00
Chris Lattner
bc3bc62709 Check in the first big step of rewriting DAGISelEmitter to
produce a table based matcher instead of gobs of C++ Code.

Though it's not done yet, the shrinkage seems promising,
the table for the X86 ISel is 75K and still has a lot of 
optimization to come (compare to the ~1.5M of .o generated
the old way, much of which will go away).

The code is currently disabled by default (the #if 0 in
DAGISelEmitter.cpp).  When enabled it generates a dead
SelectCode2 function in the DAGISel Header which will
eventually replace SelectCode.

There is still a lot of stuff left to do, which are
documented with a trail of FIXMEs.

llvm-svn: 96215
2010-02-15 08:04:42 +00:00
Mikhail Glushenkov
47bcd93456 Revert r96130 ("Forward parameter options as '-option=param'").
This behaviour must be configurable.

llvm-svn: 96210
2010-02-15 03:17:06 +00:00
Chris Lattner
3d4086208b constize
llvm-svn: 96199
2010-02-14 22:33:49 +00:00
Chris Lattner
4a7b56d74e clean up a bunch of code, move some random predicates
on TreePatternNode to be methods on TreePatternNode.

llvm-svn: 96197
2010-02-14 22:22:58 +00:00
Chris Lattner
8d7e9178d4 remove the DisablePatternForFastISel predicate, which is a check
that predated -fast-isel which attempted to speed up the dag pattern
matchers at -O0.  Since fast-isel is around, this is basically 
obsolete and removing it shrinks the generated dag isels.

llvm-svn: 96188
2010-02-14 21:11:53 +00:00
Chris Lattner
1a9a2e116d add an insertion operator.
llvm-svn: 96187
2010-02-14 21:10:33 +00:00
Chris Lattner
216edab8dd tidy up
llvm-svn: 96186
2010-02-14 21:10:15 +00:00
Mikhail Glushenkov
09bf7f44e8 Forward parameter options as '-option=parameter'.
Some tools do not like the '-option parameter' form. Should this be
configurable?

llvm-svn: 96130
2010-02-13 22:37:28 +00:00
Chris Lattner
d971210bd9 pull a bunch of huge inline methods in the PatternCodeEmitter
class out of line.

llvm-svn: 96113
2010-02-13 20:06:50 +00:00
Sean Callanan
0bc10793b0 Added the rdtscp instruction to the x86 instruction
tables.

llvm-svn: 96073
2010-02-13 02:06:11 +00:00
Sean Callanan
9806eade6e Fixed encodings for invlpg, invept, and invvpid.
llvm-svn: 96065
2010-02-13 01:48:34 +00:00
Chris Lattner
5b01ab848c remove special cases for vmlaunch, vmresume, vmxoff, and swapgs
fix swapgs to be spelled right.

llvm-svn: 96058
2010-02-13 00:41:14 +00:00
Chris Lattner
1d25e3978d Remove special cases for [LM]FENCE, MONITOR and MWAIT from
encoder and decoder by using new MRM_ forms.

llvm-svn: 96048
2010-02-12 23:54:57 +00:00
Sean Callanan
21a160f4bf Reworked the Intel disassembler to support instructions
whose opcodes extend into the ModR/M field using the
Form field of the instruction rather than by special
casing each instruction.  Commented out the special
casing of VMCALL, which is the first instruction to use
this special form.  While I was in the neighborhood,
added a few comments for people modifying the Intel
disassembler. 

llvm-svn: 96043
2010-02-12 23:39:46 +00:00
Chris Lattner
c3dbd2e2fc add a bunch of mod/rm encoding types for fixed mod/rm bytes.
This will work better for the disassembler for modeling things
like lfence/monitor/vmcall etc.

llvm-svn: 95960
2010-02-12 02:06:33 +00:00
Daniel Dunbar
08f1b2f670 MC: Fix bug where trailing tied operands were forgotten; the X86 assembler
matcher is now free of implicit operands!
 - Still need to clean up the code now that we don't to worry about implicit
   operands, and to make it a hard error if an instruction fails to specify all
   of its operands for some reason.

llvm-svn: 95956
2010-02-12 01:46:54 +00:00
Chris Lattner
fcce3c5ee4 enhance llvm-mc -show-inst to print the enum of an instruction, like so:
testb	%al, %al                ## <MCInst #2412 TEST8rr
                                        ##   <MCOperand Reg:2>
                                        ##   <MCOperand Reg:2>>
	jne	LBB1_7                  ## <MCInst #938 JNE_1
                                        ##   <MCOperand Expr:(LBB1_7)>>

llvm-svn: 95935
2010-02-11 22:57:32 +00:00
Chris Lattner
1bc8cf5d29 work around a gcc bug with -Wuninitialized.
llvm-svn: 95808
2010-02-10 21:22:51 +00:00
Daniel Dunbar
0e4c6eb0d7 lit: Ignore dot files when scanning for tests (e.g., editor temprary files,
etc.)

llvm-svn: 95803
2010-02-10 21:00:55 +00:00
Daniel Dunbar
4254b19c9a MC/AsmMatcher: Tweak conversion function name.
llvm-svn: 95802
2010-02-10 21:00:47 +00:00
Daniel Dunbar
59cb3a1ca4 MC/AsmMatcher: Add support for creating tied operands when constructing MCInsts.
- Pretty messy, but we need to rework how we handle tied operands in MCInst
   anyway.

llvm-svn: 95774
2010-02-10 08:15:48 +00:00
Daniel Dunbar
54d6a41882 Remove stray DOS newline.
llvm-svn: 95765
2010-02-10 04:10:10 +00:00
Sean Callanan
c022448a07 Updated the enhanced disassembly library's TableGen
backend to not use exceptions at all except in cases
of actual error.

llvm-svn: 95762
2010-02-10 03:23:23 +00:00
Sean Callanan
65a17e3ac6 Updated the TableGen emitter for the Enhanced
Disassembler to take advantage of the refactored
AsmWriterInst.h.  Note removed parser code.

llvm-svn: 95760
2010-02-10 02:47:08 +00:00
Sean Callanan
d21eecd9a2 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
bd21fff65c 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
c1249e600e 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
1e496fad4f 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
1248c51819 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
7acf9be6c4 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
804c2270c7 pass stringref by value instead of by const&
llvm-svn: 95627
2010-02-09 00:34:28 +00:00
Jakob Stoklund Olesen
83ebc265b3 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
d0d363d1a9 Make lit's gtest support honor config.environment.
llvm-svn: 95398
2010-02-05 18:09:19 +00:00
Torok Edwin
37e451649c 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
cd07a3a0b7 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
9b2879bd70 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
0016281dc2 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
08265d2e9b 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
4ce1281b20 Minor code cleanup.
llvm-svn: 94848
2010-01-29 21:57:46 +00:00
Dan Gohman
b550d3a78e 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
ef102f1ed3 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
f65b05e7e1 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
2112298100 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
1eca6e4925 Recognize 'add_executable' when analyzing CMake files.
llvm-svn: 94777
2010-01-29 01:10:55 +00:00
Ted Kremenek
cce1825bc9 Update CMake build.
llvm-svn: 94776
2010-01-29 01:10:25 +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
Mikhail Glushenkov
ee410352c8 Escape double quotes in 'help'.
llvm-svn: 94543
2010-01-26 14:55:04 +00:00
Chris Lattner
5a57121631 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
1942b96584 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
a0ef4e4068 AsmMatcher: Add a comment.
llvm-svn: 94261
2010-01-23 00:26:16 +00:00
Daniel Dunbar
856d040f58 Make GetSourceVersion more portable, thanks Pawel!
llvm-svn: 94186
2010-01-22 18:14:21 +00:00
Daniel Dunbar
ca283162fa 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
55d6538336 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
c82f536a5c 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
b9ad4c901e update mkpatch, patch by Garrison Venn!
llvm-svn: 93771
2010-01-18 21:09:05 +00:00
Eric Christopher
3c5d9dc0e3 Remove the InlineHint attribute. There are no current or planned
users.

llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Dale Johannesen
c396179c7e 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
882cb240a6 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
56464738cc Use ENABLE_ASSERTIONS throughout.
llvm-svn: 93423
2010-01-14 10:19:55 +00:00
Stuart Hastings
a27112f01a Erm, previous patch was wrong; Thanks Bill\!
llvm-svn: 93381
2010-01-14 00:34:53 +00:00
Stuart Hastings
47cfd4abc0 Enable assertions by default for Apple-style builds.
llvm-svn: 93380
2010-01-14 00:22:05 +00:00
Benjamin Kramer
cdbc36f961 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
123aee69c0 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
03fedbe06b 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
0e21161e32 Add DEBUG_DECLARE. Not used yet.
llvm-svn: 93040
2010-01-09 01:24:25 +00:00
Dale Johannesen
610f0ce9aa Add DEBUG_VALUE. Not used yet.
llvm-svn: 93030
2010-01-08 23:51:25 +00:00
Duncan Sands
4ef1119d94 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
9ef9e2c758 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
19324a5b81 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
eef5772b46 Have TableGen emit code that uses dbgs() rather than errs().
llvm-svn: 92738
2010-01-05 17:47:41 +00:00
Dan Gohman
9bcfdf98f1 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
3e856e5f8f tblgen/OptParser: Use EmitSourceFileHeader.
llvm-svn: 92521
2010-01-04 22:03:51 +00:00
Dan Gohman
a89531ec4f 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
f47c2a2335 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
3a5fc21b12 Typo.
llvm-svn: 92392
2010-01-01 04:40:54 +00:00
Mikhail Glushenkov
226e1c7f11 Make CheckForSuperfluousOptions handle list form of 'switch_on' correctly.
llvm-svn: 92391
2010-01-01 03:51:02 +00:00
Mikhail Glushenkov
f697106fb7 Minor simplifications.
llvm-svn: 92390
2010-01-01 03:50:51 +00:00
Mikhail Glushenkov
72ce967c39 Better error message.
llvm-svn: 92389
2010-01-01 03:50:34 +00:00
Daniel Dunbar
e7b673bbc4 lit: Add setuptools support.
llvm-svn: 92169
2009-12-26 22:58:39 +00:00
Daniel Dunbar
8dae6490fd lit: Sink code into a 'lit' package.
llvm-svn: 92168
2009-12-26 22:58:23 +00:00
Bill Wendling
318224b8f1 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
cb80704195 Don't emit trailing semicolon.
llvm-svn: 92133
2009-12-24 17:49:28 +00:00
Mikhail Glushenkov
1de24c23ea Cosmetic issue: more consistent naming.
llvm-svn: 91998
2009-12-23 12:49:41 +00:00
Mikhail Glushenkov
7db8203dd2 Allow (set_option SwitchOption, true).
llvm-svn: 91997
2009-12-23 12:49:30 +00:00
Daniel Dunbar
0c5f079749 Suppress compiler warning.
llvm-svn: 91959
2009-12-23 00:45:10 +00:00
Sean Callanan
983f906451 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
3bfe36b5d9 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
2c532518c0 .llx is no more.
llvm-svn: 91784
2009-12-19 20:56:53 +00:00
Nuno Lopes
d0b1ef8875 fix build and while at it remove a redudant include
llvm-svn: 91774
2009-12-19 11:52:18 +00:00
Daniel Dunbar
bc03a42df1 More bzero -> memset that I missed.
llvm-svn: 91757
2009-12-19 04:16:57 +00:00
Daniel Dunbar
a1563328bb Add missing newlines at EOF (for clang++).
llvm-svn: 91756
2009-12-19 04:16:48 +00:00
Sean Callanan
18fa59f381 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
17556ab401 Fix a comment.
llvm-svn: 91741
2009-12-19 01:46:09 +00:00
Eli Friedman
241630ece5 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
606e829658 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
40eeddfb23 Add a 'set_option' action for use in OptionPreprocessor.
llvm-svn: 91594
2009-12-17 07:49:16 +00:00
Mikhail Glushenkov
29f6764c94 Refactoring, no functionality change.
llvm-svn: 91593
2009-12-17 07:48:49 +00:00
Mikhail Glushenkov
f95b51aeac s/TokenizeCmdline/TokenizeCmdLine/
llvm-svn: 91592
2009-12-17 07:48:34 +00:00
Jim Grosbach
483afaa7f7 Add @earlyclobber TableGen constraint
llvm-svn: 91554
2009-12-16 19:43:02 +00:00
Bill Wendling
18fe802d05 Remove superfluous 'extern' variable that was causing a warning with clang.
llvm-svn: 91552
2009-12-16 19:36:42 +00:00
Bill Wendling
0de1598c3b 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
8747fc993f lit: Improve error when gtest discovery fails.
llvm-svn: 91458
2009-12-15 22:00:37 +00:00
Dan Gohman
1b3e6a82f8 Revert 90628, which was incorrect.
llvm-svn: 91448
2009-12-15 20:21:44 +00:00
Jim Grosbach
114ea00f73 whitespace
llvm-svn: 91442
2009-12-15 19:28:13 +00:00
Mikhail Glushenkov
7743ee06be Convert llvmc tests to FileCheck.
llvm-svn: 91420
2009-12-15 07:21:14 +00:00
Mikhail Glushenkov
2d69ef4077 Support hook invocation from 'append_cmd'.
llvm-svn: 91419
2009-12-15 07:20:50 +00:00
Mikhail Glushenkov
93c8d86be9 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
39b16212f2 Allow $CALL(Hook, '$INFILE') for non-join tools.
llvm-svn: 91402
2009-12-15 03:04:02 +00:00
Daniel Dunbar
96d1aed265 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
dfb16eea66 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
d3f3848384 NNT: Always create the -sentdata.txt file.
llvm-svn: 91301
2009-12-14 17:58:27 +00:00
Daniel Dunbar
b7c5aa749a Remove unneeded ';' and a class/struct mismatch (noticed by clang).
llvm-svn: 90934
2009-12-09 02:58:09 +00:00
Daniel Dunbar
ea0c099b04 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
f4370545f2 Simplify a bit.
llvm-svn: 90785
2009-12-07 19:16:13 +00:00
Mikhail Glushenkov
8fc2b0daed Throw 'const char*' instead of 'std::string'.
llvm-svn: 90784
2009-12-07 19:15:57 +00:00
Mikhail Glushenkov
c05e105f51 Deprecate 'unpack_values'.
Use 'forward_values' + 'comma_separated' instead.

llvm-svn: 90774
2009-12-07 18:25:54 +00:00
Mikhail Glushenkov
9f567e2e67 Implement 'forward_value' and 'forward_transformed_value'.
llvm-svn: 90770
2009-12-07 17:03:05 +00:00
Mikhail Glushenkov
cc733b27be Refactoring, no functionality change.
llvm-svn: 90764
2009-12-07 10:51:55 +00:00
Dan Gohman
247374da74 Minor code simplification.
llvm-svn: 90628
2009-12-05 00:05:43 +00:00
Daniel Dunbar
91a54350f8 OptParser: Emit HelpText field for option groups.
llvm-svn: 90599
2009-12-04 21:41:24 +00:00
Mikhail Glushenkov
00a1410d6d Forward -save-temps to llvm-gcc.
llvm-svn: 90214
2009-12-01 06:51:30 +00:00
Eric Christopher
7c99bfd96e 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
f7eaf3980c 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
43465889de Sketch TableGen disassembler emitter, based on patch by Sean Callanan.
llvm-svn: 89833
2009-11-25 02:13:23 +00:00
Dan Gohman
7c41aa00c0 Delete some dead and non-obvious code.
llvm-svn: 89729
2009-11-24 01:48:15 +00:00
Dan Gohman
b5ec39e2dc Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.
Note that "hasDotLocAndDotFile"-style debug info was already broken;
people wanting this functionality should implement it in the
AsmPrinter/DwarfWriter code.

llvm-svn: 89711
2009-11-23 23:20:51 +00:00
Daniel Dunbar
da651bf31a FileCheck, PR5239: Try to find the intended match on failures, but looking for a
good nearby fuzzy match. Frequently the input is nearly correct, and just
showing the user the a nearby sensible match is enough to diagnose the problem.
 - The "fuzzyness" is pretty simple and arbitrary, but worked on my three test
   cases. If you encounter problems, or places you think FileCheck should have
   guessed but didn't, please add test cases to PR5239.

For example, previously FileCheck would report this:
--
t.cpp:21:55: error: expected string not found in input
// CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]] %a0)
                                                      ^
<stdin>:19:30: note: scanning from here
define void @_Z2f15f1_s1(%1) nounwind {
                             ^
<stdin>:19:30: note: with variable "i64_i64_ty" equal to "%0"
--

and now it also reports this:
--
<stdin>:27:1: note: possible intended match here
define void @_Z2f25f2_s1(%0) nounwind {
^
--

which makes it clear that the CHECK just has an extra ' %a0' in it, without
having to check the input.

llvm-svn: 89631
2009-11-22 22:59:26 +00:00
Daniel Dunbar
acbdd9f541 FileCheck: When a string using variable references fails to match, print
additional information about the current definitions of the variables used in
the string.

llvm-svn: 89628
2009-11-22 22:08:06 +00:00
Daniel Dunbar
1b60708ac9 Allow '_' in FileCheck variable names, it is nice to have at least one
separate character.
 - Chris, OK?

llvm-svn: 89626
2009-11-22 22:07:50 +00:00
Bob Wilson
f8f20e67a3 Fix whitespace.
llvm-svn: 89582
2009-11-22 04:24:42 +00:00
Bob Wilson
5d46596707 Fix pr5470. Tablegen handles template arguments by temporarily setting their
values, resolving references to them, and then removing the definitions.
If a template argument is set to an undefined value, we need to resolve
references to that argument to an explicit undefined value.  The current code
leaves the reference to the template argument as it is, which causes an
assertion failure later when the definition of the template argument is
removed.

llvm-svn: 89581
2009-11-22 03:58:57 +00:00
Bob Wilson
ca49051ec8 Fix some spelling in comments.
llvm-svn: 89566
2009-11-21 22:44:20 +00:00
Bob Wilson
35c5b307d6 Avoid a redundant assertion.
llvm-svn: 89565
2009-11-21 22:39:27 +00:00
Daniel Dunbar
d03317047d TableGen/OptParser: When ordering options, make "sentinel" options appear before
everything else.

llvm-svn: 89368
2009-11-19 18:22:16 +00:00
Douglas Gregor
1c10c07e9c De-bork CMake build
llvm-svn: 89272
2009-11-18 23:20:09 +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
Daniel Dunbar
157d7f6596 lit: Fix exclude dirs functionality.
llvm-svn: 89210
2009-11-18 17:42:17 +00:00
Jeffrey Yasskin
0f846dbb3e Make X86-64 in the Large model always emit 64-bit calls.
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.

To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.

To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.

Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.

This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.

Thanks to echristo for lots of testing!

llvm-svn: 88984
2009-11-16 22:41:33 +00:00
Daniel Dunbar
20a9eda5a2 lit: Factor a new OneCommandPerFileTest out of SyntaxCheckTest.
- Used for running a single fixed command on a directory of files, with the
   option of deriving a temporary input file from the test source.

llvm-svn: 88844
2009-11-15 08:10:29 +00:00
Daniel Dunbar
b077010494 Remove duplicate implementation of excludes functionality, and support excluding
dirnames.

Also, add support for the 'unsupported' config property.

llvm-svn: 88838
2009-11-15 07:22:58 +00:00
Daniel Dunbar
a812eb66b3 lit: Add --repeat=N option, for running each test N times.
- Currently just useful for timing, although it could be extended as one (bad) way to deal with flaky tests.

llvm-svn: 88827
2009-11-15 01:02:09 +00:00
Benjamin Kramer
e9ba686ab8 Implement DISABLE_INLINE for MSVC. This required changing the position in all
forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi!

llvm-svn: 88798
2009-11-14 16:37:18 +00:00
Evan Cheng
b8c04e1226 Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
llvm-svn: 88753
2009-11-14 03:42:17 +00:00
Sandeep Patel
a167903217 Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
llvm-svn: 86797
2009-11-11 03:23:46 +00:00
Daniel Dunbar
fbe1d52c6a lit: Add ExampleTests, for testing lit and demonstrating test suite features.
llvm-svn: 86654
2009-11-10 02:41:17 +00:00
Daniel Dunbar
da307a7868 lit: Fix bug in --show-suites which accidentally override the list of tests.
llvm-svn: 86653
2009-11-10 02:40:21 +00:00
Daniel Dunbar
c5f49f8e59 Add a 'zkill' script, which is more-or-less a fancy (although not necessarily
very robust) version of killall. Because I like making shiny new wheels out of
spare parts.

For use by buildbots when people insist on making cc1 infinite loop. :)

llvm-svn: 86484
2009-11-08 21:51:53 +00:00
Anton Korobeynikov
7b3a35eee8 It is invalid to infer the value type from the result #0 of the node
since the instruction might use the other result of different type.

llvm-svn: 86462
2009-11-08 12:14:54 +00:00
Daniel Dunbar
ec7a3ae5f7 NNT: Remove DejaGNU test from NewNightlyTest reports, this aspect of testing is
handled by buildbots now.

llvm-svn: 86454
2009-11-08 09:34:14 +00:00
Daniel Dunbar
d4dcd76f71 lit: Hardcode whence seek value, os.SEEK_END isn't always available.
llvm-svn: 86449
2009-11-08 09:07:33 +00:00
Daniel Dunbar
761032e17e lit: Warn when a test suite contains no tests.
llvm-svn: 86448
2009-11-08 09:07:26 +00:00
Daniel Dunbar
642e76ff50 lit: Drop require_and_and support.
llvm-svn: 86447
2009-11-08 09:07:13 +00:00
Daniel Dunbar
dedae84dd3 lit: Workaround a Win32/subprocess bug when appending.
llvm-svn: 86437
2009-11-08 03:43:06 +00:00
Daniel Dunbar
a8040023d7 lit: Preserve the PATHEXT variable when running subcommands, this is important on Win32
llvm-svn: 86436
2009-11-08 03:35:19 +00:00
Chris Lattner
cfd2ade9d2 clang++ points out that this is pointless.
llvm-svn: 86239
2009-11-06 06:33:01 +00:00