Bob Wilson
188e15d7a5
pr6478: The frame pointer spill frame index is only defined when there is a
...
frame pointer.
llvm-svn: 97755
2010-03-04 21:42:36 +00:00
Evan Cheng
9b35d553df
Run machine licm before machine cse to avoid messing up licm opportunities.
...
llvm-svn: 97752
2010-03-04 21:28:09 +00:00
Evan Cheng
a9828532ff
Avoid cse load instructions unless they are known to be invariant loads.
...
llvm-svn: 97747
2010-03-04 21:18:08 +00:00
Bob Wilson
73b96c00d2
pr6480: Don't try producing ld/st-multiple instructions when the address is
...
an undef value. This is only going to come up for bugpoint-reduced tests --
correct programs will not access memory at undefined addresses -- so it's not
worth the effort of doing anything more aggressive.
llvm-svn: 97745
2010-03-04 21:04:38 +00:00
Erick Tryzelaar
4e7593750d
Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153.
...
We need this so can not bake DESTDIR into the O'Caml symlinks.
llvm-svn: 97743
2010-03-04 20:56:19 +00:00
Jakob Stoklund Olesen
3408cd6de1
Fix the remaining MUL8 and DIV8 to define AX instead of AL,AH.
...
These instructions technically define AL,AH, but a trick in X86ISelDAGToDAG
reads AX in order to avoid reading AH with a REX instruction.
Fix PR6489.
llvm-svn: 97742
2010-03-04 20:42:07 +00:00
Dan Gohman
265f85f6d8
Fix recognition of 16-bit bswap for C front-ends which emit the
...
clobber registers in a different order.
llvm-svn: 97741
2010-03-04 19:58:08 +00:00
Chris Lattner
27a8ee8574
not committing what you test = bad.
...
llvm-svn: 97740
2010-03-04 19:54:45 +00:00
Chris Lattner
dfd345bf39
make gep matching in fastisel match the base of the gep as a
...
register if it isn't possible to match the indexes *and* the base.
This fixes some fast isel rejects of load instructions on oggenc.
llvm-svn: 97739
2010-03-04 19:48:19 +00:00
Chris Lattner
860cbbb031
add a statistic for # times fastisel fails.
...
llvm-svn: 97738
2010-03-04 19:46:56 +00:00
Jeffrey Yasskin
d12b6277e8
Fix PR6360. It's easy for a stub's address to escape to user code, so we can't
...
just count references to it from JIT output to decide when to destroy it. This
patch waits to destroy the JIT's memory of a stub until the Function it refers
to is destroyed. External function stubs and GVIndirectSyms aren't destroyed
until the JIT itself is.
llvm-svn: 97737
2010-03-04 19:45:09 +00:00
Dan Gohman
632e2a2b8c
Fix a typo Duncan noticed.
...
llvm-svn: 97735
2010-03-04 19:11:28 +00:00
Johnny Chen
1ee942da0d
Added 32-bit Thumb instructions for Preload Data (PLD, PLDW) and Preload
...
Instruction (PLI) for disassembly only.
According to A8.6.120 PLI (immediate, literal), for example, different
instructions are generated for "pli [pc, #0 ]" and "pli [pc, #-0"]. The
disassembler solves it by mapping -0 (negative zero) to -1, -1 to -2, ..., etc.
llvm-svn: 97731
2010-03-04 17:40:44 +00:00
John McCall
45e11bf9a8
Simplify the condition-checking logic and hopefully clear up a build failure
...
that somehow got through my testing.
llvm-svn: 97728
2010-03-04 11:48:42 +00:00
John McCall
f762d454a4
Teach lit to honor conditional directives. The syntax is:
...
IF(condition(value)):
If the value satisfies the condition, the line is processed by lit; otherwise
it is skipped. A test with no unignored directives is resolved as Unsupported.
The test suite is responsible for defining conditions; conditions are unary
functions over strings. I've defined two conditions in the LLVM test suite,
TARGET (with values like those in TARGETS_TO_BUILD) and BINDING (with values
like those in llvm_bindings). So for example you can write:
IF(BINDING(ocaml)): RUN: %blah %s -o -
and the RUN line will only execute if LLVM was configured with the ocaml
bindings.
llvm-svn: 97726
2010-03-04 09:36:50 +00:00
Nick Lewycky
58ab63e179
Make the 'icmp pred trunc(ext(X)), CST --> icmp pred X, ext(trunc(CST))'
...
transformation much more careful. Truncating binary '01' to '1' sounds like it's
safe until you realize that it switched from positive to negative under a signed
interpretation, and that depends on the icmp predicate.
Also a few miscellaneous cleanups.
llvm-svn: 97721
2010-03-04 06:54:10 +00:00
Jeffrey Yasskin
14080c578d
Fix PR5291, in which a SmallPtrSet iterator was held across an insertion into
...
the set.
llvm-svn: 97720
2010-03-04 06:50:01 +00:00
Evan Cheng
df8f4b6142
Rename -machine-cse to -enable-machine-cse.
...
llvm-svn: 97713
2010-03-04 02:08:04 +00:00
Chris Lattner
3d7dc22a7a
add a comment.
...
llvm-svn: 97709
2010-03-04 01:43:43 +00:00
Chris Lattner
4f067261b6
so hey, it turns out that the histogram was completely wrong, because
...
we sometimes emit nodes multiple times to string buffers to size them.
Compute the histogram correctly.
llvm-svn: 97708
2010-03-04 01:34:29 +00:00
Evan Cheng
9120412740
Look ahead a bit to determine if a physical register def that is not marked dead is really alive. This is necessary to catch a lot of common cse opportunities for targets like x86.
...
llvm-svn: 97706
2010-03-04 01:33:55 +00:00
Chris Lattner
cf09c9dcef
zap fixme.
...
llvm-svn: 97705
2010-03-04 01:26:00 +00:00
Chris Lattner
72df178091
now that complexpatterns are all emitted at the end of the match
...
sequence, just emit instruction predicates right before them. This
exposes yet more factoring opportunitites, shrinking the X86 table
to 79144 bytes.
llvm-svn: 97704
2010-03-04 01:25:36 +00:00
Chris Lattner
2bbca2de9e
change the new isel matcher to emit ComplexPattern matches
...
as the very last thing before node emission. This should
dramatically reduce the number of times we do 'MatchAddress'
on X86, speeding up compile time. This also improves comments
in the tables and shrinks the table a bit, now down to
80506 bytes for x86.
llvm-svn: 97703
2010-03-04 01:23:08 +00:00
Jeffrey Yasskin
15b3688e56
Make sure JITResolvers don't leave any stubs behind. When a JITResolver was
...
destroyed, it could leave stubs in the StubToResolverMap, which would confuse
the lookup for subsequent lazy compilations.
llvm-svn: 97698
2010-03-04 00:32:33 +00:00
Chris Lattner
87aaa6af4f
enhance comment output to specify what recorded slot
...
numbers a ComplexPat will match into.
llvm-svn: 97696
2010-03-04 00:28:05 +00:00
Dan Gohman
9f6d374ab7
Fix more code to work properly with vector operands. Based on
...
a patch my Micah Villmow for PR6465.
llvm-svn: 97692
2010-03-04 00:23:16 +00:00
John McCall
282b01ff42
Teach the pic16 target to recognize pic16-*-* triples.
...
llvm-svn: 97691
2010-03-04 00:21:47 +00:00
Chris Lattner
19007009c8
inline CannotYetSelectIntrinsic into CannotYetSelect and simplify.
...
llvm-svn: 97690
2010-03-04 00:21:16 +00:00
Evan Cheng
9729f2a2b4
Fix a logic error. An instruction that has a live physical register def cannot be CSE'ed, but it *can* be used to replace a common subexpression.
...
llvm-svn: 97688
2010-03-03 23:59:08 +00:00
Evan Cheng
7310728cf9
Remove PHINodeTraits and use MachineInstrExpressionTrait instead.
...
llvm-svn: 97687
2010-03-03 23:55:49 +00:00
Erick Tryzelaar
0b21835716
Expose the rest of the llvm-c scalar opts to ocaml.
...
llvm-svn: 97685
2010-03-03 23:51:34 +00:00
Erick Tryzelaar
c99098f20d
Rename some ocaml functions.
...
llvm-svn: 97684
2010-03-03 23:51:30 +00:00
Erick Tryzelaar
d513bd7f7d
Expose the external functions for ocaml's execution engine as an optimization.
...
llvm-svn: 97683
2010-03-03 23:51:28 +00:00
Erick Tryzelaar
2825c880af
Expose alignment and stack alignment attributes to llvm-c and ocaml.
...
llvm-svn: 97682
2010-03-03 23:51:25 +00:00
Evan Cheng
8c608dffd5
Move MachineInstrExpressionTrait::getHashValue() out of line so it can skip over only virtual register defs. This matches what isEqual() is doing.
...
llvm-svn: 97680
2010-03-03 23:37:30 +00:00
Evan Cheng
36a7a94029
Re-apply r97667 but with a little bit of thought put into the patch. This implements a special DenseMapInfo trait for DenseMap<MachineInstr*> that compare the value of the MachineInstr rather than the pointer value. Since the hashing and equality test functions ignore defs it's useful for doing CSE kind optimization.
...
llvm-svn: 97678
2010-03-03 23:27:36 +00:00
Johnny Chen
c903faa636
Modified the asm string of 16-bit Thumb MUL instruction so that it prints:
...
MULS <Rdm>, <Rn>, <Rdm>
according to A8.6.105 MUL Encoding T1.
llvm-svn: 97675
2010-03-03 23:15:43 +00:00
Dan Gohman
fe6b41169a
Revert 97667. It broke a bunch of tests.
...
llvm-svn: 97673
2010-03-03 22:40:03 +00:00
Evan Cheng
57064125c4
Fix funky indentation and add comments.
...
llvm-svn: 97670
2010-03-03 21:54:14 +00:00
Evan Cheng
338c7aed4c
Move DenseMapInfo for MachineInstr* to MachineInstr.h
...
llvm-svn: 97667
2010-03-03 21:47:16 +00:00
Dan Gohman
cdc603ecae
Fix a bug in SelectionDAG's ReplaceAllUsesWith in the case where
...
CSE and recursive RAUW calls delete a node from the use list,
invalidating the use list iterator. There's currently no known
way to reproduce this in an unmodified LLVM, however there's no
fundamental reason why a SelectionDAG couldn't be formed which
would trigger this case.
llvm-svn: 97665
2010-03-03 21:33:37 +00:00
Evan Cheng
918ac5d21f
Machine CSE work in progress. It's doing some CSE now. But implicit def of physical registers are getting in the way.
...
llvm-svn: 97664
2010-03-03 21:20:05 +00:00
Evan Cheng
810a26689e
Add MachineRegisterInfo::hasOneUse and hasOneNonDBGUse.
...
llvm-svn: 97663
2010-03-03 21:18:38 +00:00
Chris Lattner
acb553060b
don't use always_inline with gcc 3.4, it has some unimplemented features
...
and is too old to really care about the performance of the generated
compiler.
llvm-svn: 97662
2010-03-03 20:47:12 +00:00
Evan Cheng
a139c6cb44
TopLevelMap[] reference is a pointer.
...
llvm-svn: 97661
2010-03-03 20:46:48 +00:00
Andrew Lenharth
89d887d0bc
Fix PR6444, note still doesn't compile libgcc2 all the way, but fixes that error. May not fix it in an ABI complient way. It wasn't clear what gcc does
...
llvm-svn: 97660
2010-03-03 20:15:31 +00:00
Chris Lattner
9e230fb6b2
fix incorrect folding of icmp with undef, PR6481.
...
llvm-svn: 97659
2010-03-03 19:46:03 +00:00
Bill Wendling
f0bd51c4e3
Revert...
...
--- Reverse-merging r97592 into '.':
U lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm-svn: 97657
2010-03-03 19:31:05 +00:00
Johnny Chen
c25f4d30f9
Added 32-bit Thumb instructions LDRT, LDRBT, LDRHT,,LDRSBT, LDRSHT, STRT, STRBT,
...
and STRHT for disassembly only.
llvm-svn: 97655
2010-03-03 18:45:36 +00:00