Chris Lattner
d69e1c1bb2
refactor the conditional jump instructions in the .td file to
...
use a multipattern that generates both the 1-byte and 4-byte
versions from the same defm
llvm-svn: 95901
2010-02-11 19:25:55 +00:00
Johnny Chen
09cc8c09c5
Forgot to also check in this file for vcvt (floating-point <-> fixed-point, VFP).
...
Sorry!
llvm-svn: 95892
2010-02-11 18:47:03 +00:00
Dale Johannesen
810ebb35c9
Allow for more than one DBG_VALUE targeting the
...
same dead instruction.
llvm-svn: 95890
2010-02-11 18:23:23 +00:00
Dale Johannesen
406fad0bad
Don't allow DBG_VALUE to affect codegen.
...
llvm-svn: 95889
2010-02-11 18:22:31 +00:00
Johnny Chen
7c088ab119
Added VCVT (between floating-point and fixed-point, VFP) for disassembly.
...
A8.6.297
llvm-svn: 95885
2010-02-11 18:17:16 +00:00
Johnny Chen
c6ca0de853
Added BKPT/tBKPT (breakpoint) to the instruction table for disassembly purpose.
...
llvm-svn: 95884
2010-02-11 18:12:29 +00:00
Jakob Stoklund Olesen
3aca1b0249
Use array_pod_sort instead of std::sort for improved code size.
...
Use SmallVector instead of std::vector for better speed when indirectbr has
few successors.
llvm-svn: 95879
2010-02-11 18:06:56 +00:00
Eric Christopher
2e0201ee18
Make sure that ConstantExpr offsets also aren't off of extern
...
symbols.
Thanks to Duncan Sands for the testcase!
llvm-svn: 95877
2010-02-11 17:44:04 +00:00
Johnny Chen
b1e50a8594
Add pseudo instruction TRAP for disassembly, which is encoded according to A5-21
...
as the "Permanently UNDEFINED" instruction.
llvm-svn: 95873
2010-02-11 17:14:31 +00:00
Bill Wendling
6e7cc490d4
Use .empty() instead of .size().
...
llvm-svn: 95871
2010-02-11 10:37:57 +00:00
Chris Lattner
83ee8edc66
dont' call getX86RegNum on X86::RIP, it doesn't like that. This
...
fixes the remaining x86-64 jit failures afaik.
llvm-svn: 95867
2010-02-11 08:45:56 +00:00
Chris Lattner
c279bf31b7
fix a really nasty bug I introduced in r95693: r12 (and r12d,
...
r12b, etc) also encodes to a R/M value of 4, which is just
as illegal as ESP/RSP for the non-sib version an address.
This fixes x86-64 jit miscompilations of a bunch of programs.
llvm-svn: 95866
2010-02-11 08:41:21 +00:00
Chris Lattner
53d91ce3e1
Add and commonize encoder support for all immediates.
...
Stub out some dummy fixups to make things work.
We can now emit fixups like this:
subl $20, %esp ## encoding: [0x83,0xec,A]
## fixup A - offset: 2, value: 20, kind: fixup_1byte_imm
Emitting $20 as a single-byte fixup to be later resolved
by the assembler is ridiculous of course (vs just emitting
the byte) but this is a failure of the matcher, which
should be producing an imm of 20, not an MCExpr of 20.
llvm-svn: 95860
2010-02-11 07:06:31 +00:00
Chris Lattner
2e2935e175
generalize EmitDisplacementField to work with any size
...
and rename it to EmitImmediate.
llvm-svn: 95859
2010-02-11 06:54:23 +00:00
Chris Lattner
1fe88248f8
eliminate the dead IsPCRel argument.
...
llvm-svn: 95858
2010-02-11 06:51:36 +00:00
Chris Lattner
1d5fbc4deb
eliminate the dead "PCAdj" logic.
...
llvm-svn: 95857
2010-02-11 06:49:52 +00:00
Jeffrey Yasskin
ad23983452
Fix some of the memcheck errors found in the JIT unittests.
...
llvm-svn: 95856
2010-02-11 06:41:30 +00:00
Chris Lattner
a59eb7c09c
Rename ValueRequiresCast to ShouldOptimizeCast, to better reflect
...
what it does. Enhance it to return false to optimizing vector
sign extensions from vector comparisions, which is the idiom used
to get a splatted vector for a vector comparison.
Doing this breaks vector-casts.ll, add some compensating
transformations to handle the important case they cover without
depending on this canonicalization.
This fixes rdar://7434900 a serious pessimization of vector compares.
llvm-svn: 95855
2010-02-11 06:26:33 +00:00
Chris Lattner
a087e6e82f
Make DSE only scan blocks that are reachable from the entry
...
block. Other blocks may have pointer cycles that will crash
basicaa and other alias analyses. In any case, there is no
point wasting cycles optimizing dead blocks. This fixes
rdar://7635088
llvm-svn: 95852
2010-02-11 05:11:54 +00:00
Chris Lattner
733ffcdb1f
Make jump threading honor x|undef -> true and x&undef -> false,
...
instead of considering x|undef -> x, which may not be true.
llvm-svn: 95850
2010-02-11 04:40:44 +00:00
Eric Christopher
9516309f55
Add ConstantExpr handling to Intrinsic::objectsize lowering.
...
Update testcase accordingly now that we can optimize another
section.
llvm-svn: 95846
2010-02-11 01:48:54 +00:00
Bill Wendling
2aa666c419
Fix to get it to compile.
...
llvm-svn: 95840
2010-02-11 01:15:27 +00:00
Bill Wendling
123c791ff5
Don't print out a default newline when emitting the section offset. There are
...
almost always comments afterwards that need printing.
llvm-svn: 95839
2010-02-11 01:13:02 +00:00
Jeffrey Yasskin
8a1ee8f852
Make it possible to create multiple JIT instances at the same time, by removing
...
the global TheJIT and TheJITResolver variables. Lazy compilation is supported
by a global map from a stub address to the JITResolver that knows how to
compile it.
Patch by Olivier Meurant!
llvm-svn: 95837
2010-02-11 01:07:39 +00:00
Jakob Stoklund Olesen
3b5abdefc3
Reuse operand location when updating PHI instructions.
...
Calling RemoveOperand is very expensive on huge PHI instructions. This makes
early tail duplication run twice as fast on the Firefox JavaScript
interpreter.
llvm-svn: 95832
2010-02-11 00:34:33 +00:00
Jakob Stoklund Olesen
215d9f3898
Remove duplicate successors from indirectbr instructions before building the machine CFG.
...
This makes early tail duplication run 60 times faster when compiling the Firefox
JavaScript interpreter, see PR6186.
llvm-svn: 95831
2010-02-11 00:34:18 +00:00
Devang Patel
e87a8a944d
Ignore dbg info intrinsics.
...
llvm-svn: 95828
2010-02-11 00:20:49 +00:00
Mon P Wang
c17e781f35
The previous fix of widening divides that trap was too fragile as it depends on custom
...
lowering and requires that certain types exist in ValueTypes.h. Modified widening to
check if an op can trap and if so, the widening algorithm will apply only the op on
the defined elements. It is safer to do this in widening because the optimizer can't
guarantee removing unused ops in some cases.
llvm-svn: 95823
2010-02-10 23:37:45 +00:00
Dale Johannesen
5f337b582f
Ignore debug info one more place during coalescing.
...
llvm-svn: 95819
2010-02-10 23:04:09 +00:00
Bob Wilson
82d5534acc
Delete dead PHI machine instructions. These can be created due to type
...
legalization even when the IR-level optimizer has removed dead phis, such
as when the high half of an i64 value is unused on a 32-bit target.
I had to adjust a few test cases that had dead phis.
This is a partial fix for Radar 7627077.
llvm-svn: 95816
2010-02-10 22:58:57 +00:00
Dale Johannesen
9d9478a53a
Skip debug info in a couple of places.
...
llvm-svn: 95814
2010-02-10 21:47:48 +00:00
Bill Wendling
b288ec36ae
Use an index instead of pointers into the vector. If the vector resizes, then
...
the pointer values could be invalid.
llvm-svn: 95813
2010-02-10 21:41:57 +00:00
Dale Johannesen
99090c9fe0
When I rewrote this loop per Chris' preference I
...
changed its behavior. Oops.
llvm-svn: 95811
2010-02-10 21:41:41 +00:00
Eli Friedman
63e676c905
A few missed optimizations; the last one could have a significant impact on
...
code with lots of bitfields.
llvm-svn: 95809
2010-02-10 21:26:04 +00:00
Devang Patel
43cc7530be
Strip new llvm.dbg.value intrinsic.
...
llvm-svn: 95807
2010-02-10 21:19:56 +00:00
Daniel Dunbar
b20be19ae6
MC/X86 AsmMatcher: Fix a use after free spotted by d0k, and de-XFAIL
...
x86_32-encoding.s in on expectation of it passing.
llvm-svn: 95806
2010-02-10 21:19:28 +00:00
Dan Gohman
296f6e4952
Minor whitespace cleanups.
...
llvm-svn: 95801
2010-02-10 20:42:57 +00:00
Dan Gohman
a18a12c897
Use an AssemblyAnnotatorWriter to clean up IVUsers' debug output.
...
The "uses=" comments are just clutter in this context.
llvm-svn: 95799
2010-02-10 20:42:37 +00:00
Dan Gohman
f2323826d2
Add a hook to AssemblyAnnotationWriter to allow custom info comments
...
to be printed, in place of the familiar "uses=" comments.
llvm-svn: 95798
2010-02-10 20:41:46 +00:00
Dan Gohman
efb42fa7c7
Fix several comments which had previously been "the the" where a
...
different word was intended.
llvm-svn: 95795
2010-02-10 20:04:19 +00:00
Johnny Chen
9851630ae6
Added NOP, DBG, SVC to the instruction table for disassembly purpose.
...
llvm-svn: 95784
2010-02-10 18:02:25 +00:00
Dan Gohman
92b6122204
Fix "the the" and similar typos.
...
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Chris Lattner
72dfdc8b8a
emit some simple (and probably incorrect) fixups for symbolic
...
displacement values.
llvm-svn: 95773
2010-02-10 06:52:12 +00:00
Chris Lattner
6abaa9ee3c
keep track of what the current byte being emitted is
...
throughout the X86 encoder.
llvm-svn: 95771
2010-02-10 06:41:02 +00:00
Chris Lattner
aa22470a1a
simplify displacement handling, emit displacements by-operand
...
even for the immediate case. No functionality change.
llvm-svn: 95770
2010-02-10 06:30:00 +00:00
Dan Gohman
ff8027e33a
Canonicalize sizeof and alignof on pointer types to a canonical
...
pointer type.
llvm-svn: 95769
2010-02-10 06:13:07 +00:00
Daniel Dunbar
d2035fb242
MC: Switch MCFixup to just hold an MCExpr pointer instead of index into the
...
MCInst it came from.
llvm-svn: 95767
2010-02-10 04:47:08 +00:00
Evan Cheng
8bee7fb61d
Now that ShrinkDemandedOps() is separated out from DAG combine. It sometimes leave some obvious nops which dag combine used to clean up afterwards e.g. (trunk (ext n)) -> n. Look for them and squash them.
...
llvm-svn: 95757
2010-02-10 02:17:34 +00:00
Daniel Dunbar
75df429af0
llvm-mc: Remove --show-fixups and always show as part of --show-encoding.
...
Also, fix a silly memory leak.
llvm-svn: 95752
2010-02-10 01:41:14 +00:00
Dale Johannesen
12262a957f
Rewrite loop to suit Chris' preference.
...
llvm-svn: 95749
2010-02-10 01:31:26 +00:00