Erick Tryzelaar
f6fcdbcf9c
Use the ocaml tag 0 since we are just returning an option value.
...
llvm-svn: 97612
2010-03-02 23:59:08 +00:00
Erick Tryzelaar
e9096c8289
Don't use an ocaml keyword in an ocamldoc comment.
...
llvm-svn: 97611
2010-03-02 23:59:05 +00:00
Erick Tryzelaar
94feaafe1e
Expose the optimization level for the jit in ocaml.
...
llvm-svn: 97610
2010-03-02 23:59:03 +00:00
Erick Tryzelaar
98b05d67e9
Remove module providers from ocaml.
...
llvm-svn: 97609
2010-03-02 23:59:00 +00:00
Erick Tryzelaar
ad0e0cb0df
Add Module functions in place of module providers.
...
llvm-svn: 97608
2010-03-02 23:58:54 +00:00
Chris Lattner
8d63704021
merge two loops over all nodes in the graph into one.
...
llvm-svn: 97606
2010-03-02 23:12:51 +00:00
Chris Lattner
1eb6eb059c
eliminate PreprocessForRMW now that isel handles it.
...
We still preprocess calls and fp return stuff.
llvm-svn: 97598
2010-03-02 22:33:56 +00:00
Chris Lattner
71ddd8e2aa
remove 300 lines of code that is now dead in the MSP430 backend
...
now that isel handles chains more aggressively. This also
allows us to make isLegalToFold non-virtual.
llvm-svn: 97597
2010-03-02 22:30:08 +00:00
Chris Lattner
dd030701bd
Fix some issues in WalkChainUsers dealing with
...
CopyToReg/CopyFromReg/INLINEASM. These are annoying because
they have the same opcode before an after isel. Fix this by
setting their NodeID to -1 to indicate that they are selected,
just like what automatically happens when selecting things that
end up being machine nodes.
With that done, give IsLegalToFold a new flag that causes it to
ignore chains. This lets the HandleMergeInputChains routine be
the one place that validates chains after a match is successful,
enabling the new hotness in chain processing. This smarter
chain processing eliminates the need for "PreprocessRMW" in the
X86 and MSP430 backends and enables MSP to start matching it's
multiple mem operand instructions more aggressively.
I currently #if out the dead code in the X86 backend and MSP
backend, I'll remove it for real in a follow-on patch.
The testcase changes are:
test/CodeGen/X86/sse3.ll: we generate better code
test/CodeGen/X86/store_op_load_fold2.ll: PreprocessRMW was
miscompiling this before, we now generate correct code
Convert it to filecheck while I'm at it.
test/CodeGen/MSP430/Inst16mm.ll: Add a testcase for mem/mem
folding to make anton happy. :)
llvm-svn: 97596
2010-03-02 22:20:06 +00:00
Johnny Chen
7041f2cef6
Added 32-bit Thumb instruction CLREX (Clear-Exclusive) for disassembly only.
...
llvm-svn: 97595
2010-03-02 22:11:06 +00:00
Evan Cheng
b86044b7b7
Allow specialization of ScopedHashTable of non-default DenseMapInfo.
...
llvm-svn: 97594
2010-03-02 22:10:24 +00:00
Bill Wendling
ce153affa3
Okay. One last attempt:
...
Place the LSDA into the TEXT section on Mach-O. This saves space.
llvm-svn: 97592
2010-03-02 21:50:35 +00:00
Chris Lattner
f61e34d120
this testcase is failing because pic16 doesn't define a reg/reg
...
xor pattern. I have no plans to fix this XFAIL.
llvm-svn: 97587
2010-03-02 20:48:24 +00:00
Erick Tryzelaar
a48e627126
Add support for use to ocaml.
...
llvm-svn: 97586
2010-03-02 20:32:32 +00:00
Erick Tryzelaar
9f9857e98c
Rename LLVMUseIteratorRef to LLVMUseRef since we don't refer to iterators in llvm-c.
...
llvm-svn: 97585
2010-03-02 20:32:28 +00:00
Chris Lattner
7ecdcadcc9
xfail this for now.
...
llvm-svn: 97584
2010-03-02 19:53:25 +00:00
Johnny Chen
9dc2105478
Removed the extra S from the multiclass def T2I_adde_sube_s_irs as well as from
...
the opc string passed in, since it's a given from the class inheritance of T2sI.
The fixed the extra 's' in adcss & sbcss when disassembly printing.
llvm-svn: 97582
2010-03-02 19:38:59 +00:00
Chris Lattner
27a184b851
run HandleMergeInputChains even if we only have one input chain.
...
llvm-svn: 97581
2010-03-02 19:34:59 +00:00
Dan Gohman
d55f574589
When expanding an expression such as (A + B + C + D), sort the operands
...
by loop depth and emit loop-invariant subexpressions outside of loops.
This speeds up MultiSource/Applications/viterbi and others.
llvm-svn: 97580
2010-03-02 19:32:21 +00:00
Evan Cheng
62e795ab8c
Swap parameters of isSafeToMove and isSafeToReMat for consistency.
...
llvm-svn: 97578
2010-03-02 19:03:01 +00:00
Evan Cheng
10194a425c
Fix typo.
...
llvm-svn: 97577
2010-03-02 19:02:27 +00:00
Chris Lattner
35ec683b78
clean up some testcases.
...
llvm-svn: 97576
2010-03-02 18:56:03 +00:00
Chris Lattner
fb8c2b2f57
the sorting predicate should work for comparing an element
...
to itself, even though this isn't wildly useful.
llvm-svn: 97574
2010-03-02 18:15:02 +00:00
Johnny Chen
44908a5e17
Added 32-bit Thumb instructions: CPS, SDIV, UDIV, SXTB16, SXTAB16, UXTAB16, SEL,
...
SMMULR, SMMLAR, SMMLSR, TBB, TBH, and 16-bit Thumb instruction CPS for
disassembly only.
llvm-svn: 97573
2010-03-02 18:14:57 +00:00
Devang Patel
f200b39d13
Fix grammar.
...
Thanks Duncan!
llvm-svn: 97572
2010-03-02 17:58:15 +00:00
Johnny Chen
0dae1cbf1c
AL is an optional mnemonic extension for always, except in IT instructions.
...
Add printMandatoryPredicateOperand() PrintMethod for IT predicate printing.
Ref: A8.3 Conditional execution
llvm-svn: 97571
2010-03-02 17:57:15 +00:00
Johnny Chen
d520eabcb9
Change some asm shift opcode strings to lowercase.
...
llvm-svn: 97567
2010-03-02 17:03:18 +00:00
Xerxes Ranby
09d9a690d2
fix typo add missing (
...
llvm-svn: 97565
2010-03-02 13:42:03 +00:00
Xerxes Ranby
b1baf6583e
Unbreak llvm-arm-linux buildbot and fix PR5309.
...
llvm-svn: 97564
2010-03-02 13:26:18 +00:00
Duncan Sands
d90d594e46
Rather than passing "false" for InsertBefore, AddressSpace for ThreadLocal,
...
and nothing for AddressSpace, pass 0 for InsertBefore, "false" for ThreadLocal
and AddressSpace for AddressSpace. Spotted by gcc-4.5.
llvm-svn: 97563
2010-03-02 11:18:43 +00:00
Chris Lattner
925ac71f26
Fix the xfail I added a couple of patches back. The issue
...
was that we weren't properly handling the case when interior
nodes of a matched pattern become dead after updating chain
and flag uses. Now we handle this explicitly in
UpdateChainsAndFlags.
llvm-svn: 97561
2010-03-02 07:50:03 +00:00
Chris Lattner
350bb062b2
I was confused about this, it turns out that MorphNodeTo
...
*does* delete ex-operands that become dead.
llvm-svn: 97559
2010-03-02 07:14:49 +00:00
Chris Lattner
9732ab6d86
factor node morphing out to its own helper method.
...
llvm-svn: 97558
2010-03-02 06:55:04 +00:00
Chris Lattner
47f2a839ec
attributes are not part of types anymore, patch by James Woodyatt!
...
llvm-svn: 97557
2010-03-02 06:36:51 +00:00
Chris Lattner
58811e7732
eliminate CodeGen/DAGISelHeader.h, it is empty now.
...
llvm-svn: 97556
2010-03-02 06:36:28 +00:00
Chris Lattner
f98f124a73
Sink InstructionSelect() out of each target into SDISel, and rename it
...
DoInstructionSelection. Inline "SelectRoot" into it from DAGISelHeader.
Sink some other stuff out of DAGISelHeader into SDISel.
Eliminate the various 'Indent' stuff from various targets, which dates
to when isel was recursive.
17 files changed, 114 insertions(+), 430 deletions(-)
llvm-svn: 97555
2010-03-02 06:34:30 +00:00
Eric Christopher
118dc6a645
Only save vector registers if we've defined for the vector registers.
...
Fixes PR5309.
llvm-svn: 97554
2010-03-02 06:25:00 +00:00
Chris Lattner
e797fd0a84
move some code out of DAGISelHeader up to SelectionDAGISel.h where it
...
is shared by all targets.
llvm-svn: 97553
2010-03-02 06:04:12 +00:00
Erick Tryzelaar
72a37135fb
Fix looking up MD names to not need a module.
...
llvm-svn: 97550
2010-03-02 05:32:52 +00:00
Eric Christopher
b3762a05c5
Move the docsdir to /usr/share/doc/llvm to match other projects.
...
Fixes PR6267.
llvm-svn: 97549
2010-03-02 05:17:21 +00:00
Eric Christopher
f0ee6a1407
Make sure we save CXXFLAGS before setting it as pedantic and regenerate
...
configure.
Fixes PR6388.
Patch by Yann Droneaud!
llvm-svn: 97548
2010-03-02 05:06:54 +00:00
Eric Christopher
1dd31c7814
Add file to CMakeLists.txt
...
llvm-svn: 97545
2010-03-02 02:49:43 +00:00
Evan Cheng
036aa49d2e
Add skeleton of a machine level cse pass.
...
llvm-svn: 97543
2010-03-02 02:38:24 +00:00
Evan Cheng
909f779e77
Add count() and lookup() to ScopedHashTable. It might be useful to get information out of the hash table.
...
llvm-svn: 97542
2010-03-02 02:37:33 +00:00
Chris Lattner
2f846eeaca
Use the right induction variable.
...
llvm-svn: 97541
2010-03-02 02:37:23 +00:00
Chris Lattner
b884fe867e
Rewrite chain handling validation and input TokenFactor handling
...
stuff now that we don't care about emulating the old broken
behavior of the old isel. This eliminates the
'CheckChainCompatible' check (along with IsChainCompatible) which
did an incorrect and inefficient scan *up* the chain nodes which
happened as the pattern was being formed and does the validation
at the end in HandleMergeInputChains when it forms a structural
pattern. This scans "down" the graph, which means that it is
quickly bounded by nodes already selected. This also handles
token factors that get "trapped" in the dag.
Removing the CheckChainCompatible nodes also shrinks the
generated tables by about 6K for X86 (down to 83K).
There are two pieces remaining before I can nuke PreprocessRMW:
1. I xfailed a test because we're now producing worse code in a
case that has nothing to do with the change: it turns out that
our use of MorphNodeTo will leave dead nodes in the graph
which (depending on how the graph is walked) end up causing
bogus uses of chains and blocking matches. This is really
bad for other reasons, so I'll fix this in a follow-up patch.
2. CheckFoldableChainNode needs to be improved to handle the TF.
llvm-svn: 97539
2010-03-02 02:22:10 +00:00
Dan Gohman
4cec543952
Fix several places to handle vector operands properly.
...
Based on a patch by Micah Villmow for PR6438.
llvm-svn: 97538
2010-03-02 02:14:38 +00:00
Dan Gohman
52f5563973
Non-affine post-inc SCEV expansions have more code which must be
...
emitted after the increment. Make sure the insert position
reflects this. This fixes PR6453.
llvm-svn: 97537
2010-03-02 01:59:21 +00:00
Bill Wendling
78c5b7a76d
Remove dead parameter passing.
...
llvm-svn: 97536
2010-03-02 01:55:18 +00:00
Devang Patel
d0fa304dc7
Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases.
...
llvm-svn: 97533
2010-03-02 01:26:20 +00:00
Dan Gohman
6f34abd092
Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul,
...
respectively.
llvm-svn: 97531
2010-03-02 01:11:08 +00:00
Dan Gohman
6232f73c7b
PerformTailCallOpt was renamed to GuaranteedTailCallOpt to
...
better reflect its meaning, now that tail call optimizations
are done by default in some cases.
llvm-svn: 97530
2010-03-02 01:08:11 +00:00
Chris Lattner
7894ab3a99
remove dead code.
...
llvm-svn: 97529
2010-03-02 00:40:26 +00:00
Chris Lattner
4b07568a56
add some missing \n's
...
llvm-svn: 97527
2010-03-02 00:13:03 +00:00
Bob Wilson
0fd415820b
Don't attempt load PRE when there is no real redundancy (i.e., the load is in
...
a loop and is itself the only dependency).
llvm-svn: 97526
2010-03-02 00:09:29 +00:00
Chris Lattner
c1f2e15332
refactor some code out of OPC_EmitMergeInputChains into a
...
new helper function.
llvm-svn: 97525
2010-03-02 00:00:03 +00:00
Chris Lattner
ac8b9246f6
remove some functions that were only used by the
...
old isel generated code.
llvm-svn: 97522
2010-03-01 23:40:33 +00:00
Bob Wilson
892432b7ef
When GVN needs to split critical edges for load PRE, check all of the
...
predecessors before returning. Otherwise, if multiple predecessor edges need
splitting, we only get one of them per iteration. This makes a small but
measurable compile time improvement with -enable-full-load-pre.
llvm-svn: 97521
2010-03-01 23:37:32 +00:00
Chris Lattner
3144e66377
fixme resolved.
...
llvm-svn: 97517
2010-03-01 23:08:51 +00:00
Chris Lattner
bd6e193f54
remove a little hack I did for the old isel, not needed
...
now that it is gone.
llvm-svn: 97516
2010-03-01 22:51:11 +00:00
Chris Lattner
3d869722b6
resolve some fixmes
...
llvm-svn: 97515
2010-03-01 22:49:06 +00:00
Chris Lattner
281827286e
resolve a fixme and simplify code by moving insertion of the
...
EmitMergeInputChainsMatcher node up into EmitResultCode. This
doesn't have much of an effect on the generated code, the X86
table is exactly the same size.
llvm-svn: 97514
2010-03-01 22:46:42 +00:00
Chris Lattner
1e634e31de
resolve a fixme by having the .td file parser reject thigns like
...
(set GPR, somecomplexpattern)
if somecomplexpattern doesn't declare what it can match.
llvm-svn: 97513
2010-03-01 22:29:19 +00:00
Evan Cheng
7263cf8431
MemoryDepAnalysis is not used if redundant load processing is disabled.
...
llvm-svn: 97512
2010-03-01 22:23:12 +00:00
Chris Lattner
19c92aea01
remove all but one version of SelectionDAG::MorphNodeTo
...
(the most general) the others are dead.
llvm-svn: 97511
2010-03-01 22:20:05 +00:00
Chris Lattner
00f2e4b6d6
remove dead code, simplify.
...
llvm-svn: 97510
2010-03-01 22:19:47 +00:00
Chris Lattner
d39f75ba39
Fix PR2590 by making PatternSortingPredicate actually be
...
ordered correctly. Previously it would get in trouble when
two patterns were too similar and give them nondet ordering.
We force this by using the record ID order as a fallback.
The testsuite diff is due to alpha patterns being ordered
slightly differently, the change is a semantic noop afaict:
< lda $0,-100($16)
---
> subq $16,100,$0
llvm-svn: 97509
2010-03-01 22:09:11 +00:00
Chris Lattner
664ac989ff
tolerate factoring the *last* node for CellSPU.
...
llvm-svn: 97508
2010-03-01 22:04:33 +00:00
Evan Cheng
87d50aa18a
Remove the optimize for code size limitation on r67917. Optimize 64-bit imul by constants into leas + shl regardless if optimizing for code size. The size saving from using imulq isn't worth it. Also, the lea and shl instructions may expose further optimization.
...
llvm-svn: 97507
2010-03-01 22:00:11 +00:00
Chris Lattner
33758dcad2
optimize tblgen compile time by eliminating the old isel.
...
llvm-svn: 97504
2010-03-01 21:49:54 +00:00
Dan Gohman
5341a86450
Make llc opt into the addPassesToEmitFile verify pass.
...
llvm-svn: 97502
2010-03-01 21:45:21 +00:00
Chris Lattner
55ef1ebe52
remove a terrible hack that disabled assertions from this file because of build time
...
problems. rdar://7697850.
llvm-svn: 97500
2010-03-01 21:20:46 +00:00
Jakob Stoklund Olesen
115da88f01
Use methods to determine if a LiveInterval is spillable.
...
Don't accidentally produce unspillable intervals for deeply nested loops.
llvm-svn: 97496
2010-03-01 20:59:38 +00:00
Devang Patel
aaecdaeb5d
Remove tests that checks @llvm.dbg.stoppoint handling.
...
llvm-svn: 97493
2010-03-01 20:33:48 +00:00
Chris Lattner
d35a728a34
stop using anders-aa
...
llvm-svn: 97492
2010-03-01 20:24:50 +00:00
Chris Lattner
8c1132746b
stop using anders-aa
...
llvm-svn: 97491
2010-03-01 20:24:05 +00:00
Chris Lattner
7d2c1592f3
remove andersen's tests.
...
llvm-svn: 97490
2010-03-01 20:23:15 +00:00
Devang Patel
2e7ddea828
@llvm.dbg.stoppoint intrinsic is not used anymore.
...
Delete dead testcase.
llvm-svn: 97489
2010-03-01 19:46:08 +00:00
Ted Kremenek
5c74a4b00b
Update CMake build.
...
llvm-svn: 97488
2010-03-01 19:42:47 +00:00
Devang Patel
4e728b3823
Update to use new debug info encoding scheme. As a bonus, now the test passes!
...
llvm-svn: 97487
2010-03-01 19:41:26 +00:00
Chris Lattner
94fd3388b0
don't emit the old sdnodexform stuff for the new isel.
...
llvm-svn: 97486
2010-03-01 19:39:15 +00:00
Chris Lattner
3780ca6ef2
stop using generated sdnodexforms.
...
llvm-svn: 97485
2010-03-01 19:38:53 +00:00
Chris Lattner
883b868765
note that andersaa was removed in 2.7
...
llvm-svn: 97484
2010-03-01 19:29:17 +00:00
Chris Lattner
5ea3e65929
remove anders-aa from mainline, it isn't maintained and is
...
tantalyzing enough that people keep trying to use it.
llvm-svn: 97483
2010-03-01 19:24:17 +00:00
Johnny Chen
718ed8a6d5
Added STRHT for disassembly only and fixed a bug in AI3sthpo class where the W
...
bit should be set to 0 instead of 1.
llvm-svn: 97481
2010-03-01 19:22:00 +00:00
Devang Patel
ed56bcfd91
Remove this test because it checks wheter optimizer handled @llvm.dbg.global_variable appropriately or not. LLVM does not use this scheme to encode debug info for global variables any more.
...
llvm-svn: 97480
2010-03-01 19:14:25 +00:00
Devang Patel
d8425df136
Remove test to check bugfix in handing debug info for global variables using intrinsics. Now, debug info for global variable is encoded using metadata. The old code path is now history and there is no need to have a test to check a bug fix in old code path.
...
llvm-svn: 97477
2010-03-01 19:09:55 +00:00
Chris Lattner
2563e83759
Turn on the new isel by default. Here are some fun numbers
...
with a release-asserts build on x86-64-darwin10:
LLC Size:
Old: 15,426,852
New: 12,759,140 (down 2.7M)
LLI Size:
Old: 9,926,876
New: 8,864,292 (down 1.1M)
X86ISelDAGToDAG.o size:
Old: 1,401,232
New: 162,868 (down 1.3M)
Time to build X86ISelDAGToDAG.o:
Old: 67.147u 2.060s 1:09.78
New: 4.234u 0.387s 0:04.77
llvm-svn: 97475
2010-03-01 19:05:25 +00:00
Devang Patel
9aef3e5de1
Remove dead test.
...
llvm-svn: 97474
2010-03-01 19:04:23 +00:00
Devang Patel
dd596b1248
Replace test case that uses @llvm.dbg.* intrinsic with a test that uses metadata.
...
llvm-svn: 97473
2010-03-01 19:02:51 +00:00
Torok Edwin
04a0eab01b
Missed a \n in previous commit.
...
llvm-svn: 97472
2010-03-01 19:00:55 +00:00
Torok Edwin
12b02282d9
Add command-line flag to tblgen to turn off generating comments for the new
...
isel (defaults it to generate comments).
This reduces the size of the generated source file.
llvm-svn: 97470
2010-03-01 18:49:10 +00:00
Chris Lattner
c1a3190870
Accelerate isel dispatch for tables that start with a top-level
...
OPC_SwitchOpcode to use a table lookup instead of having to go
through the interpreter for this.
llvm-svn: 97469
2010-03-01 18:47:11 +00:00
Devang Patel
890644e3a7
These two tests check whether oprimizer safely ignores @llvm.dbg.stoppoint intrinsic or not. This intrinsic is not used anymore.
...
llvm-svn: 97468
2010-03-01 18:45:28 +00:00
John McCall
c6dbe30e88
Don't potentially read past the end of the fill data when making a NaN from
...
an APInt.
llvm-svn: 97467
2010-03-01 18:38:45 +00:00
Devang Patel
1392621e0f
This test checks whether LICM ignores @llvm.dbg.stoppoint intrinsics appropriately or not. Now, llvm does not use this intrinsic. Remove this test.
...
llvm-svn: 97466
2010-03-01 18:32:27 +00:00
Devang Patel
3bf0571bb0
Rewrite test to test VLA using new debug info encoding scheme.
...
llvm-svn: 97465
2010-03-01 18:30:58 +00:00
Devang Patel
4aefd92040
Remove this generic debug info intrinsic test. LLVM does not use this llvm.dbg.stoppoint intrinsic anymore. There are tests to check new implementation, which attaches location information directly with an instruction using metadata.
...
llvm-svn: 97464
2010-03-01 18:30:08 +00:00
Dan Gohman
c3c3c6829f
Fix optimization of ISD::TRUNCATE on vector operands. Based on a patch
...
by Micah Villmow for PR6335.
llvm-svn: 97461
2010-03-01 17:59:21 +00:00
Dan Gohman
b0e07d53c1
Add explicit keywords.
...
llvm-svn: 97460
2010-03-01 17:56:46 +00:00
Dan Gohman
904d34c90f
Add a comment.
...
llvm-svn: 97459
2010-03-01 17:56:04 +00:00
Dan Gohman
39917c7c81
Add some debug output to LoopSimplify.
...
llvm-svn: 97458
2010-03-01 17:55:27 +00:00
Dan Gohman
7886c49d5c
Add the alignstack keyword.
...
llvm-svn: 97457
2010-03-01 17:53:39 +00:00
Dan Gohman
882c95605f
LLVM instruction syntax doesn't have trailing semicolons.
...
llvm-svn: 97456
2010-03-01 17:53:15 +00:00
Dan Gohman
01b443fdd3
Spelling fixes.
...
llvm-svn: 97454
2010-03-01 17:51:02 +00:00
Dan Gohman
8b0a419eb1
Spelling fixes.
...
llvm-svn: 97453
2010-03-01 17:49:51 +00:00
Dan Gohman
574e72d17d
Whitespace cleanups.
...
llvm-svn: 97452
2010-03-01 17:47:21 +00:00
Dan Gohman
2055938113
Use Doxygen comment syntax.
...
llvm-svn: 97451
2010-03-01 17:45:15 +00:00
Dan Gohman
312d604ee2
This is now done.
...
llvm-svn: 97450
2010-03-01 17:43:57 +00:00
Dan Gohman
96d45008a6
Fix a missing newline in debug output.
...
llvm-svn: 97449
2010-03-01 17:42:55 +00:00
Dan Gohman
0c39a35457
Prune #includes.
...
llvm-svn: 97448
2010-03-01 17:42:17 +00:00
Dan Gohman
a269a0a667
Fix spelling.
...
llvm-svn: 97447
2010-03-01 17:41:39 +00:00
Dan Gohman
74b189fcb2
Don't print "Modified" for passes which haven't modified anything.
...
llvm-svn: 97446
2010-03-01 17:34:28 +00:00
Nathan Keynes
42a5be5121
Add JIT support to the TODO list (test commit)
...
llvm-svn: 97443
2010-03-01 10:40:41 +00:00
Chris Lattner
86878b4a1e
Emit type checks late instead of early, this encourages
...
structural matching code to be factored and shared this
shrinks the X86 isel table from 86537 to 83890 bytes.
llvm-svn: 97442
2010-03-01 07:54:59 +00:00
Chris Lattner
e89ca7c146
some trivial microoptimizations.
...
llvm-svn: 97441
2010-03-01 07:43:08 +00:00
Chris Lattner
a44697c394
Emit a redundant check for immediates at root context, e.g. (imm 0).
...
This allows formation of OpcodeSwitch for top level patterns, in
particular on X86. This saves about 1K of data space in the x86
table and makes the dispatch much more efficient.
llvm-svn: 97440
2010-03-01 07:27:07 +00:00
Chris Lattner
053a28a397
eliminate the CheckMultiOpcodeMatcher code and have each
...
ComplexPattern at the root be generated multiple times, once
for each opcode they are part of. This encourages factoring
because the opcode checks get treated just like everything
else in the matcher.
llvm-svn: 97439
2010-03-01 07:17:40 +00:00
Chris Lattner
f4d1775263
add a new OPC_SwitchOpcode which is semantically equivalent
...
to a scope where every child starts with a CheckOpcode, but
executes more efficiently. Enhance DAGISelMatcherOpt to
form it.
This also fixes a bug in CheckOpcode: apparently the SDNodeInfo
objects are not pointer comparable, we have to compare the
enum name.
llvm-svn: 97438
2010-03-01 06:59:22 +00:00
Chris Lattner
db5b73a77f
pull MarkFlagResult out from between an EmitNode/CompleteMatch
...
pair. This encourages MorphNodeTo formation, this gets us 200
more MorphNodeTo's on X86 and shrinks the table a bit.
llvm-svn: 97434
2010-03-01 02:33:14 +00:00
Chris Lattner
4634d9beef
enhance RecordNode and RecordChild comments to indicate what
...
slot they're recording into, no functionality change.
llvm-svn: 97433
2010-03-01 02:24:17 +00:00
Chris Lattner
90b1b9d984
Emit redundant opcode checks for andimm and orimm tests at root
...
so that we get grouping at the top level.
Add an optimization to reorder type check & record nodes
after opcode checks. We prefer to expose tree shape
matching which improves grouping and will enhance the next
optimization.
llvm-svn: 97432
2010-03-01 02:15:34 +00:00
Chris Lattner
58e7dad842
inline the node transforms and node predicates into the generated
...
dispatcher method. This eliminates the dependence of the new isel's
generated code on the old isel's predicates, however some random
hand written isel code still uses them.
llvm-svn: 97431
2010-03-01 01:54:19 +00:00
Chris Lattner
560169d5c4
simplify some code now that chain/flag results are not stored in
...
the vtlist for emitnode.
llvm-svn: 97429
2010-02-28 23:00:47 +00:00
Chris Lattner
d86751711d
don't emit useless functions. These were producing
...
warnings in release-assert builds if there were no cases.
llvm-svn: 97428
2010-02-28 22:57:03 +00:00
Mikhail Glushenkov
abd56bde0e
80-col violations/trailing whitespace.
...
llvm-svn: 97427
2010-02-28 22:54:30 +00:00
Chris Lattner
53cf6b8444
eliminate GetInt1/2
...
llvm-svn: 97426
2010-02-28 22:38:43 +00:00
Chris Lattner
5ef43cec36
hoist the new isel interpreter out of DAGISelHeader.h
...
(which gets #included into the middle of each
target's DAGISel class) into a .cpp file where it is
only compiled once.
llvm-svn: 97425
2010-02-28 22:37:22 +00:00
Chris Lattner
d303a365df
change a few opcodes to use VBRs instead of embedding
...
immediate sizes into the opcode.
llvm-svn: 97423
2010-02-28 22:14:32 +00:00
Chris Lattner
16e601eea1
move all the opcodes out of DAGISelHeader.h (which gets
...
#included into the middle of each isel class) into a real
header.
llvm-svn: 97421
2010-02-28 21:58:42 +00:00
Chris Lattner
b6ac685606
resolve a fixme by using hte new flag.
...
llvm-svn: 97420
2010-02-28 21:56:16 +00:00
Chris Lattner
a838264af1
enhance the EmitNode/MorphNodeTo operands to take a bit that
...
specifies whether there is an output flag or not. Use this
instead of redundantly encoding the chain/flag results in the
output vtlist.
llvm-svn: 97419
2010-02-28 21:53:42 +00:00
Chris Lattner
af197502d6
enhance the new isel to handle the 'node already exists'
...
case of MorphNodeTo directly.
llvm-svn: 97417
2010-02-28 21:36:14 +00:00
Chris Lattner
9d67dcadce
use MorphNodeTo instead of SelectNodeTo. SelectNodeTo
...
is just a silly wrapper around MorphNodeTo.
llvm-svn: 97416
2010-02-28 20:55:18 +00:00
Chris Lattner
102a8a01e6
enhance the new isel to use SelectNodeTo for most patterns,
...
even some the old isel didn't. There are several parts of
this that make me feel dirty, but it's no worse than the
old isel. I'll clean up the parts I can do without ripping
out the old one next.
llvm-svn: 97415
2010-02-28 20:49:53 +00:00
Erick Tryzelaar
84f5ba80df
Add support getting the operands of a User to ocaml.
...
llvm-svn: 97414
2010-02-28 20:45:03 +00:00
Erick Tryzelaar
9190a2af9d
Add support for global aliases to ocaml.
...
llvm-svn: 97413
2010-02-28 20:44:58 +00:00
Erick Tryzelaar
e533a41c24
Add support for inserting inline asm to ocaml.
...
llvm-svn: 97412
2010-02-28 20:44:53 +00:00
Chris Lattner
90e7924cf0
add some random nounwinds.
...
llvm-svn: 97411
2010-02-28 20:36:49 +00:00
Chris Lattner
5cc165c67c
I'm removing andersaa after the branch is made.
...
llvm-svn: 97409
2010-02-28 18:57:59 +00:00
Chris Lattner
b1af865aa6
simplify this code, return only ever has zero or one operands.
...
llvm-svn: 97408
2010-02-28 18:53:13 +00:00
John McCall
c12b133d00
Properly clear all the extra bits in a significand when making a NaN from an
...
APInt. Be certain to set the integer bit in an x87 extended-precision
significand so that we don't accidentally make a pseudo-NaN.
llvm-svn: 97382
2010-02-28 12:49:50 +00:00
John McCall
512b650210
Add an override to StringRef::getAsInteger which parses into an APInt.
...
It gets its own implementation totally divorced from the (presumably
performance-sensitive) routines which parse into a uint64_t.
Add APInt::operator|=(uint64_t), which is situationally much better than
using a full APInt.
llvm-svn: 97381
2010-02-28 09:55:58 +00:00
Erick Tryzelaar
28db1a3e61
Add support for getting a null pointer.
...
llvm-svn: 97380
2010-02-28 09:46:27 +00:00
Erick Tryzelaar
272d62bc5a
Add a way to look up a type by it's name in a module.
...
llvm-svn: 97379
2010-02-28 09:46:21 +00:00
Erick Tryzelaar
6fdb7a6547
Add replace_all_uses_with to ocaml.
...
llvm-svn: 97378
2010-02-28 09:46:16 +00:00
Erick Tryzelaar
06894b3824
Add support for global variables in an address space for llvm-c and ocaml.
...
llvm-svn: 97377
2010-02-28 09:46:13 +00:00
Erick Tryzelaar
0fb26ef01f
Add indirect br support to llvm-c and ocaml.
...
llvm-svn: 97376
2010-02-28 09:46:06 +00:00
Erick Tryzelaar
d8531faf95
Add metadata functions to llvm-c and ocaml.
...
llvm-svn: 97375
2010-02-28 09:45:59 +00:00
Chris Lattner
56c50da3f6
remove redundant instruction.
...
llvm-svn: 97374
2010-02-28 07:23:21 +00:00