Owen Anderson
49f037ac29
Allow SmallPtrSet to hold pointers to const data.
...
llvm-svn: 40556
2007-07-27 18:07:02 +00:00
Dan Gohman
4788552deb
Re-apply 40504, but with a fix for the segfault it caused in oggenc:
...
Make the alignedload and alignedstore patterns always require 16-byte
alignment. This way when they are used in the "Fs" instructions, in which
a vector instruction is used for a scalar purpose, they can still require
the full vector alignment. And add a regression test for this.
llvm-svn: 40555
2007-07-27 17:16:43 +00:00
Duncan Sands
5d49bcdce0
It seems logical that InReg should be incompatible
...
with StructReturn and ByVal, so make it so.
llvm-svn: 40554
2007-07-27 16:45:18 +00:00
Duncan Sands
07c9066238
As the number of parameter attributes increases,
...
Verifier::visitFunction is suffering a combinatorial
explosion due to the number of mutually incompatible
attributes. This patch tidies the whole thing up
using attribute masks. While there I fixed some
small bugs: (1) the ByVal attribute tests cast a
type to a pointer type, which can fail. Yes, the
fact it is of a pointer type is checked before,
but a failing check does not cause the program
to exit, it continues on outputting further errors;
(2) Nothing was checking that an sret attribute is
on the first parameter; (3) nothing was checking that
a function for which isStructReturn() is true has a
parameter with the sret attribute and vice-versa (I
don't think it is possible for this to go wrong, but
it seems right to check it).
llvm-svn: 40553
2007-07-27 15:09:54 +00:00
Duncan Sands
644f917358
Support for trampolines, except for X86 codegen which is
...
still under discussion.
llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Christopher Lamb
14bbb15f07
Move subreg lowering pass to be right after regalloc, per feedback.
...
llvm-svn: 40548
2007-07-27 07:36:14 +00:00
Evan Cheng
931de40afa
Reverting 40504 for now. It's breaking oggenc.
...
llvm-svn: 40547
2007-07-27 01:37:47 +00:00
Devang Patel
a51e0a3d8d
Fix thinko. Update return status appropriately.
...
llvm-svn: 40546
2007-07-26 20:21:42 +00:00
Owen Anderson
0f692f27a3
Fix a bug introduced in my last commit.
...
llvm-svn: 40542
2007-07-26 18:57:04 +00:00
Steve Naroff
c701ace221
Add Type::isOCUVectorType().
...
Convert isFunctionType(), isStructureType(), and isUnionType() to the new API.
llvm-svn: 40541
2007-07-26 18:32:01 +00:00
Owen Anderson
dbf23ccaa0
Fix a couple more bugs in the phi construction by pulling in code that does
...
almost the same things from LCSSA.
llvm-svn: 40540
2007-07-26 18:26:51 +00:00
Evan Cheng
dfa5d283fd
Test case for PR1573.
...
llvm-svn: 40539
2007-07-26 17:45:57 +00:00
Evan Cheng
d204d08b97
Make sure epilogue esp adjustment is placed before any terminator and pop instructions.
...
llvm-svn: 40538
2007-07-26 17:45:41 +00:00
Evan Cheng
936d17aa1b
Don't pollute the meaning of isUnpredicatedTerminator.
...
llvm-svn: 40537
2007-07-26 17:32:14 +00:00
Evan Cheng
e9ba8e0765
Fix test.
...
llvm-svn: 40536
2007-07-26 17:07:03 +00:00
Evan Cheng
ca6e041903
Minor bug.
...
llvm-svn: 40535
2007-07-26 17:02:45 +00:00
Dan Gohman
30f060be80
Fix the alias analysis query in DAGCombiner to not add in two
...
offsets. The SrcValueOffset values are the real offsets from the
SrcValue base pointers.
llvm-svn: 40534
2007-07-26 16:14:06 +00:00
Dan Gohman
6e853bc73f
Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDead
...
to Instruction::mayWriteToMemory, fixing a FIXME, and helping
various places that call mayWriteToMemory directly.
llvm-svn: 40533
2007-07-26 16:06:08 +00:00
Dan Gohman
eb47d9213c
Remove a bogus return statement, what appears to have been a pasto
...
from Relation::contradicts in Relation::incorporate.
llvm-svn: 40531
2007-07-26 15:29:35 +00:00
Dan Gohman
f2af2bb6aa
DummyInst's member functions don't need to be virtual.
...
llvm-svn: 40530
2007-07-26 15:25:08 +00:00
Dan Gohman
c9edd977ea
In the .loc directive, print the fields as "debug" fields, so they
...
don't get decorated as if for immediate fields for instructions.
llvm-svn: 40529
2007-07-26 15:24:15 +00:00
Dan Gohman
cecd4b3793
Fix a whitespace difference between CMPSSrr and CMPSDrr.
...
llvm-svn: 40528
2007-07-26 15:11:50 +00:00
Dan Gohman
336718dd5c
Fix a pasto in a comment.
...
llvm-svn: 40527
2007-07-26 15:11:00 +00:00
Steve Naroff
49ab97761b
Fix the following bogus diagnostic...reported by Jeroen.
...
#include <stdio.h>
int
main(void) {
int test = 0;
printf("Type is %s\n", (test >= 1 ? "short" : "char"));
return (0);
}
It comes up with a diagnostic that's misleading upon first read.
t.c:7:36: error: incompatible operand types ('char *' and 'char *')
printf("Type is %s\n", (test >= 1 ? "short" : "char"));
^ ~~~~~~~ ~~~~~~
1 diagnostic generated.
llvm-svn: 40526
2007-07-26 14:35:56 +00:00
Christopher Lamb
e9d738cefc
Add a MachineFunction pass, which runs post register allocation, that turns subreg insert/extract instruction into register copies. This ensures correct code gen if the coalescer isn't able to remove all subreg instructions.
...
llvm-svn: 40521
2007-07-26 08:18:32 +00:00
Christopher Lamb
18603b03e1
Teach DAG scheduling how to properly emit subreg insert/extract machine instructions. PR1350
...
llvm-svn: 40520
2007-07-26 08:12:07 +00:00
Christopher Lamb
2f3becc49c
Have register info provide the inverse mapping of register->superregisters. PR1350
...
llvm-svn: 40519
2007-07-26 08:01:58 +00:00
Christopher Lamb
cde0ee5221
Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350
...
llvm-svn: 40518
2007-07-26 07:48:21 +00:00
Evan Cheng
ce5185b181
Same goes for constantpool, etc.
...
llvm-svn: 40517
2007-07-26 07:35:15 +00:00
Christopher Lamb
a8fc0e527b
Add selection DAG nodes for subreg insert/extract. PR1350
...
llvm-svn: 40516
2007-07-26 07:34:40 +00:00
Christopher Lamb
d37b256f0e
Fix 80 col violation.
...
llvm-svn: 40515
2007-07-26 07:03:08 +00:00
Christopher Lamb
0dbc152d2e
Remove subreg index from MachineInstr's and also keep vregs as unsigned when adding operands.
...
llvm-svn: 40514
2007-07-26 07:00:46 +00:00
Christopher Lamb
c9ea29456a
Teach TableGen about the new vector types.
...
llvm-svn: 40513
2007-07-26 06:41:18 +00:00
Chris Lattner
b50f1e4103
add another link.
...
llvm-svn: 40512
2007-07-26 06:11:49 +00:00
Chris Lattner
626246e93c
don't expect to be able to reparse arbitrary system headers.
...
llvm-svn: 40511
2007-07-26 05:59:05 +00:00
Christopher Lamb
3fead96121
Fix infinite recursion for when extract_vector_elt is legal. Unfortunately no public targets use this code-path, so no test.
...
llvm-svn: 40510
2007-07-26 03:33:13 +00:00
Steve Naroff
62b35d41cd
Forgot a return stmt (oops).
...
llvm-svn: 40509
2007-07-26 03:18:02 +00:00
Steve Naroff
185616f293
Various improvements to Sema::ParseMemberReferenceExpr().
...
- Added source range support to Diag's.
- Used the new type predicate API to remove dealing with the canonical
type explicitly.
- Added Type::isRecordType().
- Removed some casts.
- Removed a const qualifier from RecordType::getDecl().
llvm-svn: 40508
2007-07-26 03:11:44 +00:00
Christopher Lamb
6e082ad617
Fix comments for new types.
...
llvm-svn: 40507
2007-07-26 01:48:57 +00:00
Christopher Lamb
cd97a21064
Add support for 3 element 32-bit vector ValueTypes.
...
llvm-svn: 40506
2007-07-26 01:46:52 +00:00
Dan Gohman
8455bd3fae
Remove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code from the
...
x86 target, replacing them with the new alignment attributes on memory
references.
llvm-svn: 40504
2007-07-26 00:31:09 +00:00
Owen Anderson
3b8cc30a61
Fix what is _hopefully_ the last corner case for loops.
...
llvm-svn: 40503
2007-07-25 23:54:42 +00:00
Evan Cheng
630c1f75b8
Mac OS X x86-64 lower 4G address is not available.
...
llvm-svn: 40502
2007-07-25 23:41:36 +00:00
Evan Cheng
952aa6988b
Mac OS X should use 0x90 to fill in gaps to satisfy function alignment requirements.
...
llvm-svn: 40501
2007-07-25 23:36:05 +00:00
Evan Cheng
86eb3fd97d
EmitAlignment() also emits optional fill value.
...
llvm-svn: 40500
2007-07-25 23:35:07 +00:00
Evan Cheng
5c6a31e9a0
Functions with LinkOnce and weak linkage still need to be aligned. Doh.
...
llvm-svn: 40499
2007-07-25 22:28:16 +00:00
Owen Anderson
8707412593
My last commit was not correct for nested loops. Fix it, and add a testcase for it.
...
llvm-svn: 40498
2007-07-25 22:19:40 +00:00
Owen Anderson
3c67004d47
Fix an infinite loop on 300.twolf.
...
llvm-svn: 40497
2007-07-25 22:03:06 +00:00
Owen Anderson
3f3ca5444e
Forgot to include this file in my last commit.
...
llvm-svn: 40496
2007-07-25 21:30:15 +00:00
Owen Anderson
9b796348bd
Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr.
...
llvm-svn: 40495
2007-07-25 21:26:36 +00:00