Chris Lattner
a10c41c6df
improve encoding information for branches. We now know they have
...
8 or 32-bit immediates, which allows the new encoder to handle
them.
llvm-svn: 95927
2010-02-11 21:45:31 +00:00
Daniel Dunbar
3ee9e4a9a5
MC: Move assembler-backend's fixup list into the fragment.
...
llvm-svn: 95926
2010-02-11 21:29:46 +00:00
Daniel Dunbar
fa324dd09b
MC: Move MCSectionData::Fixup out to MCAsmFixup.
...
llvm-svn: 95925
2010-02-11 21:29:29 +00:00
Chris Lattner
b82b965968
make getFixupKindInfo return a const reference, allowing
...
the tables to be const. Teach MCCodeEmitter to handle
the target-indep kinds so that we don't crash on them.
llvm-svn: 95924
2010-02-11 21:27:18 +00:00
Jakob Stoklund Olesen
da3bd912ec
Revert functional change. This broke a bunch of tests.
...
llvm-svn: 95921
2010-02-11 21:19:44 +00:00
Chris Lattner
a0e0de6974
switch to target-indep fixups for 1/2/4/8 byte data.
...
llvm-svn: 95920
2010-02-11 21:17:54 +00:00
Devang Patel
c83d8c3ccf
revert 95903.
...
llvm-svn: 95918
2010-02-11 20:58:56 +00:00
Jakob Stoklund Olesen
8b992fb512
It is always good to do a cross-class join when the large register has a tiny interval.
...
Also avoid division by zero.
llvm-svn: 95917
2010-02-11 20:58:45 +00:00
Johnny Chen
6b88fb6575
Added LDRT/LDRBT/STRT/STRBT for disassembly only.
...
llvm-svn: 95916
2010-02-11 20:31:08 +00:00
Chris Lattner
4718a3f4ea
unbreak the build.
...
llvm-svn: 95915
2010-02-11 19:52:11 +00:00
Devang Patel
b41ff23af9
Destroy MDNodes while destructing llvm context.
...
llvm-svn: 95903
2010-02-11 19:35:10 +00:00
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