Charles Davis
1e063d14df
Add a new function attribute, 'alignstack'. It will indicate (when the backends
...
implement support for it) that the stack should be forcibly realigned in the
prologue (and the process reversed in the epilogue).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95945 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 00:31:15 +00:00
Jakob Stoklund Olesen
4a540f0593
Reapply coalescer fix for better cross-class coalescing.
...
This time with fixed test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95938 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 23:55:29 +00:00
Chris Lattner
0d7b0aa760
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)>>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 22:57:32 +00:00
Chris Lattner
7e85180d15
add a new MCInstPrinter::getOpcodeName interface, when it is
...
implemented, llvm-mc --show-inst now uses it to print the
instruction opcode as well as the number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95929 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 22:39:10 +00:00
Anton Korobeynikov
780679baa7
Document binutils requirements for coff targets (cygwin / mingw32).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 21:51:51 +00:00
Chris Lattner
b8db331588
improve encoding information for branches. We now know they have
...
8 or 32-bit immediates, which allows the new encoder to handle
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95927 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 21:45:31 +00:00
Daniel Dunbar
cb7d743b42
MC: Move assembler-backend's fixup list into the fragment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95926 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 21:29:46 +00:00
Daniel Dunbar
27ade18431
MC: Move MCSectionData::Fixup out to MCAsmFixup.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 21:29:29 +00:00
Chris Lattner
8d31de6268
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95924 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 21:27:18 +00:00
Jakob Stoklund Olesen
9637dd50f4
Revert functional change. This broke a bunch of tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95921 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 21:19:44 +00:00
Chris Lattner
11eafa8bed
switch to target-indep fixups for 1/2/4/8 byte data.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95920 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 21:17:54 +00:00
Devang Patel
cb419d3c6f
revert 95903.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95918 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 20:58:56 +00:00
Jakob Stoklund Olesen
a875fd0fdb
It is always good to do a cross-class join when the large register has a tiny interval.
...
Also avoid division by zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 20:58:45 +00:00
Johnny Chen
e4c7f0f6ec
Added LDRT/LDRBT/STRT/STRBT for disassembly only.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 20:31:08 +00:00
Chris Lattner
8b442a814e
unbreak the build.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95915 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:52:11 +00:00
Dan Gohman
4bcf51be15
llvm-db was removed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:35:26 +00:00
Devang Patel
11dbf8ee69
Destroy MDNodes while destructing llvm context.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95903 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:35:10 +00:00
Chris Lattner
b917c47c98
refactor x86 conditional branches to use a multipattern
...
that generates the 1-byte and 4-byte immediate versions
from one definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95902 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:31:22 +00:00
Chris Lattner
bd13fb6254
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:25:55 +00:00
Jeffrey Yasskin
42fc558624
Make Kaleidoscope not link against the interpreter, since that didn't
...
work anyway (Interpreter::getPointerToFunction doesn't return a
callable pointer), and improve the error message when an
ExecutionEngine can't be created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:15:20 +00:00
Dan Gohman
bbe99362e5
Add an svn:ignore.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:07:04 +00:00
Johnny Chen
811663f799
Forgot to also check in this file for vcvt (floating-point <-> fixed-point, VFP).
...
Sorry!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95892 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:47:03 +00:00
Dale Johannesen
39c7a198ea
Allow for more than one DBG_VALUE targeting the
...
same dead instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95890 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:23:23 +00:00
Dale Johannesen
3bfef03eb6
Don't allow DBG_VALUE to affect codegen.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:22:31 +00:00
Johnny Chen
27bb8d0a88
Added VCVT (between floating-point and fixed-point, VFP) for disassembly.
...
A8.6.297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95885 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:17:16 +00:00
Johnny Chen
c6f7b27fda
Added BKPT/tBKPT (breakpoint) to the instruction table for disassembly purpose.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:12:29 +00:00
Jakob Stoklund Olesen
b5b90eddcd
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95879 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 18:06:56 +00:00
Eric Christopher
dfdddd8ed6
Make sure that ConstantExpr offsets also aren't off of extern
...
symbols.
Thanks to Duncan Sands for the testcase!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95877 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 17:44:04 +00:00
Johnny Chen
ba6e033f4f
Add pseudo instruction TRAP for disassembly, which is encoded according to A5-21
...
as the "Permanently UNDEFINED" instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 17:14:31 +00:00
Bill Wendling
e9d10a6c39
Use .empty() instead of .size().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95871 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 10:37:57 +00:00
Chris Lattner
ecfb3c3d66
dont' call getX86RegNum on X86::RIP, it doesn't like that. This
...
fixes the remaining x86-64 jit failures afaik.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95867 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 08:45:56 +00:00
Chris Lattner
5526b69901
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95866 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 08:41:21 +00:00
Jeffrey Yasskin
d8735356a3
Fix (harmless) memory leak found by memcheck.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 07:16:13 +00:00
Chris Lattner
8b0f7a7d86
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 07:06:31 +00:00
Chris Lattner
a38c707d82
generalize EmitDisplacementField to work with any size
...
and rename it to EmitImmediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95859 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 06:54:23 +00:00
Chris Lattner
0e410918b8
eliminate the dead IsPCRel argument.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 06:51:36 +00:00
Chris Lattner
1b67060645
eliminate the dead "PCAdj" logic.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95857 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 06:49:52 +00:00
Jeffrey Yasskin
9233b15d01
Fix some of the memcheck errors found in the JIT unittests.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95856 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 06:41:30 +00:00
Chris Lattner
8c5ad3a5da
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 06:26:33 +00:00
Chris Lattner
2e1cdbf92d
convert to filecheck.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95854 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 06:24:37 +00:00
Chris Lattner
98df4f9cf2
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 05:11:54 +00:00
Chris Lattner
5cc25ce17d
a testcase that doesn't crash GVN but could someday.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95851 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 05:08:05 +00:00
Chris Lattner
1e452650c6
Make jump threading honor x|undef -> true and x&undef -> false,
...
instead of considering x|undef -> x, which may not be true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 04:40:44 +00:00
Eric Christopher
26d0e892e3
Add ConstantExpr handling to Intrinsic::objectsize lowering.
...
Update testcase accordingly now that we can optimize another
section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95846 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 01:48:54 +00:00
Devang Patel
f87052a55a
test case for r95842.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 01:31:01 +00:00
Bill Wendling
ca51d05138
Fix to get it to compile.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95840 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 01:15:27 +00:00
Bill Wendling
4cb4895e41
Don't print out a default newline when emitting the section offset. There are
...
almost always comments afterwards that need printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95839 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 01:13:02 +00:00
Jeffrey Yasskin
40966a7c68
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95837 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 01:07:39 +00:00
Jakob Stoklund Olesen
09eeac9f5f
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95832 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 00:34:33 +00:00
Jakob Stoklund Olesen
598b24c6d1
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95831 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 00:34:18 +00:00