Chris Lattner
d91c01484c
add a note
...
llvm-svn: 57557
2008-10-15 05:53:25 +00:00
Chris Lattner
7194e8406a
add support for folding immediates into stores when they
...
are due to argument passing in calls. This is significant because
it hits all immediate arguments to calls on x86-32.
llvm-svn: 57556
2008-10-15 05:38:32 +00:00
Chris Lattner
214643296b
fold immediates into stores in simple cases, this produces diffs like
...
this:
- movl $0, %eax
- movl %eax, _yy_n_chars
+ movl $0, _yy_n_chars
llvm-svn: 57555
2008-10-15 05:30:52 +00:00
Chris Lattner
5716b8daa4
fold compare of null pointer into compare with 0.
...
llvm-svn: 57553
2008-10-15 05:18:04 +00:00
Chris Lattner
928e8e5092
Some minor cleanups:
...
1. Compute action in X86SelectSelect based on MVT instead of type.
2. Use TLI.getValueType(..) instead of MVT::getVT(..) because the former
handles pointers and the later doesn't.
3. Don't pass TLI into isTypeLegal, since it already has access to it as
an ivar.
#2 gives fast isel some minor new functionality: handling load/stores of
pointers.
llvm-svn: 57552
2008-10-15 05:07:36 +00:00
Chris Lattner
da69b5e401
Use switch on VT instead of Type* comparisons.
...
llvm-svn: 57551
2008-10-15 04:32:45 +00:00
Chris Lattner
052e062f08
Use X86FastEmitCompare for FCMP_OEQ and FCMP_UNE: it doesn't
...
change the generated code, but makes the code simpler.
llvm-svn: 57550
2008-10-15 04:29:23 +00:00
Chris Lattner
d7024dafbf
refactor compare emission out into a new X86FastEmitCompare method,
...
which makes it easy to share the compare/imm folding logic with 'setcc'.
This shaves a bunch of instructions off the common select case, which
happens a lot in llvm-gcc.
llvm-svn: 57549
2008-10-15 04:26:38 +00:00
Chris Lattner
cbea6edde5
Fold immediates into compares when possible, producing "cmp $4, %eax" instead of
...
loading 4 into a register and then doing the compare.
llvm-svn: 57548
2008-10-15 04:13:29 +00:00
Chris Lattner
905dbd0dea
more minor refactoring of X86SelectBranch, no functionality change.
...
llvm-svn: 57547
2008-10-15 04:02:26 +00:00
Chris Lattner
99d88895b6
factor buildmi calls in X86SelectBranch
...
llvm-svn: 57546
2008-10-15 03:58:05 +00:00
Chris Lattner
97e96bcca0
factor some more BuildMI's in X86SelectCmp
...
llvm-svn: 57545
2008-10-15 03:52:54 +00:00
Chris Lattner
e66c12b3f5
factor some BuildMI calls, no functionality change.
...
llvm-svn: 57544
2008-10-15 03:47:17 +00:00
Evan Cheng
cb8b4e9dd4
- Add target lowering hooks that specify which setcc conditions are illegal,
...
i.e. conditions that cannot be checked with a single instruction. For example,
SETONE and SETUEQ on x86.
- Teach legalizer to implement *illegal* setcc as a and / or of a number of
legal setcc nodes. For now, only implement FP conditions. e.g. SETONE is
implemented as SETO & SETNE, SETUEQ is SETUO | SETEQ.
- Move x86 target over.
llvm-svn: 57542
2008-10-15 02:05:31 +00:00
Dan Gohman
c070ffc493
FastISel support for exception-handling constructs.
...
- Move the EH landing-pad code and adjust it so that it works
with FastISel as well as with SDISel.
- Add FastISel support for @llvm.eh.exception and
@llvm.eh.selector.
llvm-svn: 57539
2008-10-14 23:54:11 +00:00
Dale Johannesen
19407daf55
Accept -march=i586, because gcc does (a synonym
...
for pentium). Fixes
gcc.target/i386/20000720-1.c
gcc.target/i386/pr26826.c
llvm-svn: 57528
2008-10-14 22:06:33 +00:00
Evan Cheng
3faedff2de
Rename LoadX to LoadExt.
...
llvm-svn: 57526
2008-10-14 21:26:46 +00:00
Jim Grosbach
d0ff59ec42
Update ARM Insn encoding to get endian-ness to match the documentation (31-0 left to right)
...
llvm-svn: 57524
2008-10-14 20:36:24 +00:00
Dan Gohman
9543edc4ef
Fix command-line option printing to print two spaces where needed,
...
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.
llvm-svn: 57521
2008-10-14 20:25:08 +00:00
Evan Cheng
39a819027c
Fix indentation.
...
llvm-svn: 57508
2008-10-14 17:15:39 +00:00
Dan Gohman
e08e0dcfcc
When doing the very-late shift-and address-mode optimization,
...
create a new DAG node to represent the new shift to keep the
DAG consistent, even though it'll almost always be folded into
the address.
If a user of the resulting address has multiple uses, the
nodes may get revisited by a later MatchAddress call, in which
case DAG inconsistencies do matter.
This fixes PR2849.
llvm-svn: 57465
2008-10-13 20:52:04 +00:00
Anton Korobeynikov
6204f4ac43
Update size of inst correctly with segment override.
...
llvm-svn: 57414
2008-10-12 10:30:11 +00:00
Chris Lattner
7910d59d44
Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
...
parameters instead of raw Constants. This prevents the constants from
being selected by the isel pass, fixing PR2735.
llvm-svn: 57385
2008-10-11 22:08:30 +00:00
Duncan Sands
f175d9eae0
Fix comment typo.
...
llvm-svn: 57381
2008-10-11 19:34:24 +00:00
Anton Korobeynikov
d8b3e6f0ce
Add ability to override segment (mostly for code emitter purposes).
...
llvm-svn: 57380
2008-10-11 19:09:15 +00:00
Dale Johannesen
03d0a7d70c
Fix SSE4.1 roundss, roundsd. While the instructions have
...
the same pattern as roundpd/roundps, the Intel compiler
builtins do not: rounds* has an extra operand. Fixes
gcc.target/i386/sse4_1-rounds[sd]-[1234].c
llvm-svn: 57370
2008-10-10 23:51:03 +00:00
Anton Korobeynikov
e44fccb2f0
Fix a thinko and unbreak sparc default CC
...
llvm-svn: 57368
2008-10-10 21:47:37 +00:00
Anton Korobeynikov
f5398df73c
Extend set of return registers on sparc until someone will implement MRV support there. At least, this will allow libgcc compile, however we are not ABI-compatible with stuff compiled with native gcc.
...
llvm-svn: 57364
2008-10-10 20:30:14 +00:00
Anton Korobeynikov
1ead869e67
Ignore extra 'r' modifier for now
...
llvm-svn: 57363
2008-10-10 20:29:50 +00:00
Anton Korobeynikov
ffdc3498b4
Use expand for smul_lohi for now
...
llvm-svn: 57362
2008-10-10 20:29:31 +00:00
Anton Korobeynikov
8ed548b24a
Add rudimentary support for 'r' register operand
...
llvm-svn: 57359
2008-10-10 20:28:10 +00:00
Anton Korobeynikov
ba8bb3e12f
Cleanup
...
llvm-svn: 57358
2008-10-10 20:27:31 +00:00
Anton Korobeynikov
6054846989
Add rudimentary asmprinter support for printing inline asm operands for sparc.
...
llvm-svn: 57346
2008-10-10 10:15:03 +00:00
Anton Korobeynikov
a12d563611
Add dummy 'm' inline asm constraint handler for Sparc. I'm not sure, whether it is correct, however :)
...
llvm-svn: 57345
2008-10-10 10:14:47 +00:00
Anton Korobeynikov
8cfd14b138
Cleanup
...
llvm-svn: 57344
2008-10-10 10:14:15 +00:00
Dale Johannesen
075a62519f
Add a "loses information" return value to APFloat::convert
...
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Dale Johannesen
9e57068854
Rename APFloat::convertToAPInt to bitcastToAPInt to
...
make it clearer what the function does. No functional
change.
llvm-svn: 57325
2008-10-09 18:53:47 +00:00
Chris Lattner
284ae75537
get CodeGen/Alpha/mul128.ll to work.
...
llvm-svn: 57318
2008-10-09 04:50:56 +00:00
Dale Johannesen
817eff07b1
(re)Put const weak strings in appropriate section on Darwin.
...
g++dg/abi/key2.C
llvm-svn: 57309
2008-10-08 21:49:47 +00:00
Jim Grosbach
974799922e
Comment to be explicit that the enumeration values for CondCodes matter.
...
llvm-svn: 57295
2008-10-08 16:24:35 +00:00
Duncan Sands
bc53ce331a
Use template to distinguish between function variants.
...
GCC 4.4.0 gives an error on the "int" declaration for example
saying that it has already been declared (using the "short"
one). Using templates here allow the compiler to distinguish
between the function to choose.
Also, "llvm/Support/DataTypes.h" was not included, leading to
error messages about not knowing "uint32_t" for example.
Patch by Samuel Tardieu.
llvm-svn: 57292
2008-10-08 07:44:52 +00:00
Duncan Sands
8f296a3788
Add <cstdio> include where needed by gcc-4.4.
...
Patch by Samuel Tardieu.
llvm-svn: 57291
2008-10-08 07:23:46 +00:00
Dan Gohman
c65ca09308
Add MBB successors and physreg Uses in the same order that
...
SDISel typically adds them in. This makes it a little easier
to compare FastISel output with SDISel output.
llvm-svn: 57266
2008-10-07 22:10:33 +00:00
Dan Gohman
2561119124
Instead of emitting an implicit use for the super-register of
...
X86::CL that was used, emit an EXTRACT_SUBREG from the CL
super-register to CL. This more precisely describes how the
CL register is being used.
llvm-svn: 57264
2008-10-07 21:50:36 +00:00
Jim Grosbach
8ac554209f
Unconditional branch instruction encoding fix. Needs to use ABI, not AXI, to get the proper opcode bits.
...
llvm-svn: 57262
2008-10-07 21:08:09 +00:00
Jim Grosbach
5fb8bb7434
need ARM.h for ARMCC definition
...
llvm-svn: 57261
2008-10-07 21:01:51 +00:00
Owen Anderson
c9a628af26
Add an option to enable StrongPHIElimination, for ease of testing.
...
llvm-svn: 57259
2008-10-07 20:22:28 +00:00
Jim Grosbach
d44d20be6e
Encode the conditional execution predicate when JITing.
...
llvm-svn: 57258
2008-10-07 19:05:35 +00:00
Dale Johannesen
3d2e449078
Model hardwired inputs & outputs of x86 8-bit divides correctly.
...
Fixes local RA miscompilation of gcc.c-torture/execute/20020904-1.c -O0.
llvm-svn: 57257
2008-10-07 18:54:28 +00:00
Jim Grosbach
61f8207ac9
Clarify naming and correct conditional so that CMP and CMN instructions get the Rn operand encoded properly
...
llvm-svn: 57252
2008-10-07 17:42:09 +00:00