Chris Lattner
d53886bb48
fold compare of null pointer into compare with 0.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57553 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 05:18:04 +00:00
Chris Lattner
160f6cc209
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 05:07:36 +00:00
Chris Lattner
45ac17f521
Use switch on VT instead of Type* comparisons.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57551 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 04:32:45 +00:00
Chris Lattner
51ccb3deba
Use X86FastEmitCompare for FCMP_OEQ and FCMP_UNE: it doesn't
...
change the generated code, but makes the code simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57550 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 04:29:23 +00:00
Chris Lattner
9a08a61d79
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57549 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 04:26:38 +00:00
Chris Lattner
0e13c78347
Fold immediates into compares when possible, producing "cmp $4, %eax" instead of
...
loading 4 into a register and then doing the compare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57548 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 04:13:29 +00:00
Chris Lattner
709d829d3c
more minor refactoring of X86SelectBranch, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57547 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 04:02:26 +00:00
Chris Lattner
871d246fd4
factor buildmi calls in X86SelectBranch
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57546 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 03:58:05 +00:00
Chris Lattner
8aeeeb9d24
factor some more BuildMI's in X86SelectCmp
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57545 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 03:52:54 +00:00
Chris Lattner
54aebde0be
factor some BuildMI calls, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57544 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 03:47:17 +00:00
Dan Gohman
26367472a2
Adjust whitespace in debug messages to be more consistent
...
with other debug messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57543 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 02:57:38 +00:00
Evan Cheng
7f04268176
- 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 02:05:31 +00:00
Dan Gohman
dd5b58ad7b
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:54:11 +00:00
Daniel Dunbar
76dea9547d
Prevent assert when using '"' in names (via hexadecimal).
...
Update LangRef to mention \xx quoting in names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:51:43 +00:00
Daniel Dunbar
cad3580e99
Change getLLVMName to use raw_ostream & PrintLLVMName.
...
- Avoids duplicated quotification code.
- Remove QuoteNameIfNeeded.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57537 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:28:09 +00:00
Daniel Dunbar
c9debfbf06
Add llvm::hexdigit to StringExtras (number -> hexadecimal char)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57536 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:26:20 +00:00
Daniel Dunbar
13739433d0
Add some ReleaseNotes on clang codegen.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57535 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:25:09 +00:00
Daniel Dunbar
7c4f79a2a0
Remove Stacker.html from Xcode project.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57534 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:23:59 +00:00
Dale Johannesen
2194d46624
Accept -march=i586, because gcc does (a synonym
...
for pentium). Fixes
gcc.target/i386/20000720-1.c
gcc.target/i386/pr26826.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 22:06:33 +00:00
Evan Cheng
0329466b6b
Rename LoadX to LoadExt.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 21:26:46 +00:00
Jim Grosbach
2642196a65
Update ARM Insn encoding to get endian-ness to match the documentation (31-0 left to right)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:36:24 +00:00
Devang Patel
f5ff0cf03a
Remove dead code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57522 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:30:54 +00:00
Dan Gohman
b8cab9227a
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:25:08 +00:00
Devang Patel
b34dd13a0f
Document attributes changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57518 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:03:43 +00:00
Nicolas Geoffray
99a4d307b0
Add VMKit notes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57517 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 19:23:04 +00:00
Evan Cheng
403006205f
Combine (fcmp cc0 x, y) | (fcmp cc1 x, y) into a single fcmp when possible.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57515 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 18:44:08 +00:00
Evan Cheng
4990b257dd
- Somehow I forgot about one / une.
...
- Renumber fcmp predicates to match their icmp counterparts.
- Try swapping operands to expose more optimization opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 18:13:38 +00:00
Evan Cheng
552e3be775
Fix indentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57508 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 17:15:39 +00:00
Evan Cheng
8db90725cb
Optimize anding of two fcmp into a single fcmp if the operands are the same. e.g. uno && ueq -> ueq
...
ord && olt -> olt
ord && ueq -> oeq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57507 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 17:15:11 +00:00
Dan Gohman
9aeea5bd6a
Mention a few methods in ConstantSDNode that were renamed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57505 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 17:06:44 +00:00
Dan Gohman
364a39fc1c
HTML syntax fixes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57503 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 17:00:38 +00:00
Dan Gohman
0e451ceee3
Fix missing end tags and invalid HTML entity syntax.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57500 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 16:51:45 +00:00
Dan Gohman
01ac10142e
Add a missing close-tag.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57497 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 16:32:04 +00:00
Dan Gohman
44aa9214bf
Fix a few close tags.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57496 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 16:23:02 +00:00
Dan Gohman
1bbddce4d6
Fix a typo.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57495 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 16:13:59 +00:00
Dan Gohman
bd9f9af676
Add a brief mention of the new free-list management code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57490 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 15:14:55 +00:00
Gabor Greif
a8b8490b2b
minor corrections, improved formatting
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57486 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 11:31:14 +00:00
Gabor Greif
fa933f8384
typo and formatting tweaks
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57485 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 11:00:32 +00:00
Nuno Lopes
c8ed902298
little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57484 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 10:04:52 +00:00
Duncan Sands
9ba2379906
Mention the different constant folders that IRBuilder
...
can use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57483 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 07:06:37 +00:00
Chris Lattner
022f735c4d
new testcase for PR2797
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57481 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 06:56:04 +00:00
Chris Lattner
f1796b6223
add some upgrading notes from Pekka.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57480 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 06:37:11 +00:00
Chris Lattner
c702d16f53
add LSR and frameaddress info.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57478 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 06:02:29 +00:00
Ted Kremenek
3c3ec0c25d
Add static analyzer notes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57475 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 05:14:21 +00:00
Daniel Dunbar
f6e920919b
Remove stale src, core directories.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57473 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 03:56:55 +00:00
Chris Lattner
cc0426123d
more minor updates
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57472 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 00:52:49 +00:00
Chris Lattner
eeb4da0f69
more changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57470 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 22:06:31 +00:00
Chris Lattner
f301387a36
optimizer and codegen
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57468 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 21:50:36 +00:00
Chris Lattner
7752d1ac04
more updates.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57466 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 20:59:32 +00:00
Dan Gohman
7b8e96401c
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57465 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 20:52:04 +00:00