Anton Korobeynikov
c66de6687b
Testcases for recent stdcall / fastcall mangling improvements
...
llvm-svn: 95982
2010-02-12 15:29:13 +00:00
Anton Korobeynikov
ffbf0f7027
Setup correct data layout to match gcc's expectations on mingw32.
...
llvm-svn: 95981
2010-02-12 15:28:56 +00:00
Anton Korobeynikov
7073515c86
Cleanup stdcall / fastcall name mangling.
...
This should fix alot of problems we saw so far, e.g. PRs 5851 & 2936
llvm-svn: 95980
2010-02-12 15:28:40 +00:00
Dan Gohman
2f46f79492
Reverse the order for collecting the parts of an addrec. The order
...
doesn't matter, except that ScalarEvolution tends to need less time
to fold the results this way.
llvm-svn: 95979
2010-02-12 11:08:26 +00:00
Dan Gohman
c40eb525ad
Reapply the new LoopStrengthReduction code, with compile time and
...
bug fixes, and with improved heuristics for analyzing foreign-loop
addrecs.
This change also flattens IVUsers, eliminating the stride-oriented
groupings, which makes it easier to work with.
llvm-svn: 95975
2010-02-12 10:34:29 +00:00
Lang Hames
46f6d32509
* Updated the cost matrix normalization proceedure to better handle infinite costs.
...
* Enabled R1/R2 application for nodes with infinite spill costs in the Briggs heuristic (made
safe by the changes to the normalization proceedure).
* Removed a redundant header.
llvm-svn: 95973
2010-02-12 09:43:37 +00:00
Evan Cheng
dc2bb77b1b
Update test to match 95961.
...
llvm-svn: 95971
2010-02-12 07:48:46 +00:00
Evan Cheng
06c22ed109
Test for 95961.
...
llvm-svn: 95962
2010-02-12 02:35:03 +00:00
Chris Lattner
c3dbd2e2fc
add a bunch of mod/rm encoding types for fixed mod/rm bytes.
...
This will work better for the disassembler for modeling things
like lfence/monitor/vmcall etc.
llvm-svn: 95960
2010-02-12 02:06:33 +00:00
Evan Cheng
86a3020e95
Test case for 95958.
...
llvm-svn: 95959
2010-02-12 02:02:23 +00:00
Chris Lattner
bde30aec54
revert r95949, it turns out that adding new prefixes is not a
...
great solution for the disassembler, we'll go with "plan b".
llvm-svn: 95957
2010-02-12 01:55:31 +00:00
Daniel Dunbar
08f1b2f670
MC: Fix bug where trailing tied operands were forgotten; the X86 assembler
...
matcher is now free of implicit operands!
- Still need to clean up the code now that we don't to worry about implicit
operands, and to make it a hard error if an instruction fails to specify all
of its operands for some reason.
llvm-svn: 95956
2010-02-12 01:46:54 +00:00
Johnny Chen
d4e67c4648
Added coprocessor Instructions CDP, CDP2, MCR, MCR2, MRC, MRC2, MCRR, MCRR2,
...
MRRC, MRRc2. For disassembly only.
llvm-svn: 95955
2010-02-12 01:44:23 +00:00
Bob Wilson
2fd80c3d94
Add a new pass on machine instructions to optimize away PHI cycles that
...
reduce down to a single value. InstCombine already does this transformation
but DAG legalization may introduce new opportunities. This has turned out to
be important for ARM where 64-bit values are split up during type legalization:
InstCombine is not able to remove the PHI cycles on the 64-bit values but
the separate 32-bit values can be optimized. I measured the compile time
impact of this (running llc on 176.gcc) and it was not significant.
llvm-svn: 95951
2010-02-12 01:30:21 +00:00
Daniel Dunbar
c82069746b
X86: Fix definition for RCL/RCR.*m? operations -- they were getting represented
...
with "tied memory operands", which is wrong.
llvm-svn: 95950
2010-02-12 01:22:03 +00:00
Chris Lattner
abfe545e92
add another bit of space for new kinds of instruction prefixes.
...
llvm-svn: 95949
2010-02-12 01:15:16 +00:00
Nate Begeman
a146ac8f86
Add a missing pattern for movhps so that we get:
...
movq (%ecx,%edx,2), %xmm2
movhps (%ecx,%eax,2), %xmm2
rather than:
movq (%eax, %edx, 2), %xmm2
movq (%eax, %ebx, 2), %xmm3
movlhps %xmm3, %xmm2
Testcase forthcoming.
llvm-svn: 95948
2010-02-12 01:10:45 +00:00
Chris Lattner
9307e00dc0
fix the encodings of monitor and mwait, which were completely
...
busted in both encoders. I'm not bothering to fix it in the
old one at this point.
llvm-svn: 95947
2010-02-12 01:06:22 +00:00
Chris Lattner
f6aca786be
improve support for minix, PR6280, patch by
...
Kees van Reeuwijk!
llvm-svn: 95946
2010-02-12 00:37:46 +00:00
Charles Davis
d69c12ecc6
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).
llvm-svn: 95945
2010-02-12 00:31:15 +00:00
Jakob Stoklund Olesen
b800ff8ca9
Reapply coalescer fix for better cross-class coalescing.
...
This time with fixed test cases.
llvm-svn: 95938
2010-02-11 23:55:29 +00:00
Chris Lattner
fcce3c5ee4
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)>>
llvm-svn: 95935
2010-02-11 22:57:32 +00:00
Chris Lattner
144a1b7a24
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.
llvm-svn: 95929
2010-02-11 22:39:10 +00:00
Anton Korobeynikov
76b8d76b39
Document binutils requirements for coff targets (cygwin / mingw32).
...
llvm-svn: 95928
2010-02-11 21:51:51 +00:00
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
Dan Gohman
c69b856563
llvm-db was removed.
...
llvm-svn: 95904
2010-02-11 19:35:26 +00:00
Devang Patel
b41ff23af9
Destroy MDNodes while destructing llvm context.
...
llvm-svn: 95903
2010-02-11 19:35:10 +00:00
Chris Lattner
63870006bf
refactor x86 conditional branches to use a multipattern
...
that generates the 1-byte and 4-byte immediate versions
from one definition.
llvm-svn: 95902
2010-02-11 19:31:22 +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
Jeffrey Yasskin
472348ab92
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.
llvm-svn: 95896
2010-02-11 19:15:20 +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