Christopher Lamb [Sun, 16 Mar 2008 03:12:01 +0000 (03:12 +0000)]
Make insert_subreg a two-address instruction, vastly simplifying LowerSubregs pass. Add a new TII, subreg_to_reg, which is like insert_subreg except that it takes an immediate implicit value to insert into rather than a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48412
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sat, 15 Mar 2008 00:26:23 +0000 (00:26 +0000)]
Minor documentation fix.
Patch by Erick Tryzelaar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48382
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 15 Mar 2008 00:19:36 +0000 (00:19 +0000)]
Remove isImplicitDef TargetInstrDesc flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48381
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 15 Mar 2008 00:03:38 +0000 (00:03 +0000)]
Replace all target specific implicit def instructions with a target independent one: TargetInstrInfo::IMPLICIT_DEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48380
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 14 Mar 2008 23:58:56 +0000 (23:58 +0000)]
Expose Module::dump via C and Ocaml.
Patch by Erick Tryzelaar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48379
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Fri, 14 Mar 2008 23:52:53 +0000 (23:52 +0000)]
Expose Module::dump via C and Ocaml.
Patch by Erick Tryzelaar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48378
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Fri, 14 Mar 2008 22:03:02 +0000 (22:03 +0000)]
move the Use destructor where it belongs to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48376
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 22:01:01 +0000 (22:01 +0000)]
Back out r48353. Not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48375
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 14 Mar 2008 21:36:24 +0000 (21:36 +0000)]
Do not generate special entries in the dwarf eh
table for nounwind calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Mar 2008 21:17:54 +0000 (21:17 +0000)]
Restore this member, which is used on win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48372
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 20:44:01 +0000 (20:44 +0000)]
Fix PR2138. Apparently any modification to a std::multimap (including remove entries for a different key) can invalidate multimap iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Mar 2008 20:41:50 +0000 (20:41 +0000)]
this was removed from the Unix side.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48370
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 14 Mar 2008 18:27:04 +0000 (18:27 +0000)]
Update comments; getPassName no longer uses RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48369
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 14 Mar 2008 18:14:29 +0000 (18:14 +0000)]
Move the PMStack class out of Pass.h and into PassManagers.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48367
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 14 Mar 2008 17:41:26 +0000 (17:41 +0000)]
Implement the real calling convention for ppc32 Altivec:
vectors go at the end of the memory area, after all
non-vector parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48364
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 07:46:48 +0000 (07:46 +0000)]
Fix some 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48361
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 07:39:27 +0000 (07:39 +0000)]
Fix a number of encoding bugs. SSE 4.1 instructions MPSADBWrri, PINSRDrr, etc. have 8-bits immediate field (ImmT == Imm8).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48360
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 07:13:42 +0000 (07:13 +0000)]
Add debugging stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48359
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 14 Mar 2008 06:00:19 +0000 (06:00 +0000)]
Add an issue that is preventing instcombine from doing a simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48356
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 14 Mar 2008 05:23:57 +0000 (05:23 +0000)]
Simplify using getIntPtrConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48355
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 14 Mar 2008 05:12:19 +0000 (05:12 +0000)]
The inst combining of inttoptr into GEP with one index was using the bit size of
the type instead of the byte size. This was causing troublesome mis-compilations.
True to form, this took 2 days to find and is a one-line fix. :-P
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48354
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 01:47:49 +0000 (01:47 +0000)]
Add an MO_Undef MachineOperandType, intended for INSERT_SUBREG. Next up MO_Undead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48353
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 14 Mar 2008 00:53:31 +0000 (00:53 +0000)]
Tabs -> spaces
Use getIntPtrConstant in a couple places to shorten stuff up
Handle splitting vector shuffles with undefs in the mask
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48351
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 00:17:29 +0000 (00:17 +0000)]
Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48349
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 Mar 2008 00:14:55 +0000 (00:14 +0000)]
Livein copy scheduling fixes: do not coalesce physical register copies, correctly determine the safe location to insert the copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48348
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 23:07:40 +0000 (23:07 +0000)]
Use SDTNone instead of duplicating it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48346
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 23:04:27 +0000 (23:04 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48345
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 22:13:53 +0000 (22:13 +0000)]
More APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48344
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 13 Mar 2008 22:07:10 +0000 (22:07 +0000)]
Fix a bug in GVN that Duncan noticed, where we potentially need to insert a
pointer bitcast when performing return slot optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48343
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Thu, 13 Mar 2008 22:02:51 +0000 (22:02 +0000)]
Fix error in testing for END. notation.
Patch by Julien Lerouge. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48342
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 17:42:48 +0000 (17:42 +0000)]
Undo tweak. It had no obvious benefit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48341
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 13 Mar 2008 16:55:34 +0000 (16:55 +0000)]
Remove unused GetAddressOfSymbol()
Thanks Daniel Dunbar!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48340
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 08:05:02 +0000 (08:05 +0000)]
New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48338
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 08:04:35 +0000 (08:04 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48337
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 07:56:58 +0000 (07:56 +0000)]
Don't try to sink 3-address instruction if convertToThreeAddress created more than one instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48336
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 06:42:46 +0000 (06:42 +0000)]
A test case I forgot to check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48335
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 06:38:28 +0000 (06:38 +0000)]
Remove an unused command line option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48334
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 06:37:55 +0000 (06:37 +0000)]
TwoAddressInstructionPass enhancement. After it converts a two address instruction into a 3-address one, sink it past the instruction that kills the read-mod-write register if its definition is used past the kill. This reduces the number of live register by one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48333
91177308-0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Thu, 13 Mar 2008 05:47:01 +0000 (05:47 +0000)]
Get rid of a pseudo instruction and replace it with subreg based operation on real instructions, ridding the asm printers of the hack used to do this previously. In the process, update LowerSubregs to be careful about eliminating copies that have side affects.
Note: the coalescer will have to be careful about this too, when it starts coalescing insert_subreg nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48329
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Mar 2008 05:22:05 +0000 (05:22 +0000)]
Fix Path::GetMainExecutable on cygwin, patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48328
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Mar 2008 05:17:59 +0000 (05:17 +0000)]
remove extraneous namespace qualifier, PR2142
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48327
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Mar 2008 05:00:21 +0000 (05:00 +0000)]
move a bunch of trivial methods to be inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48326
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Mar 2008 04:33:03 +0000 (04:33 +0000)]
Various improvements suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48325
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 Mar 2008 03:29:42 +0000 (03:29 +0000)]
Fix an incorrect comment, PR2147.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48323
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 02:42:55 +0000 (02:42 +0000)]
Improve VarInfo::removeKill() by using std::find instead of linear search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48321
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 Mar 2008 02:42:41 +0000 (02:42 +0000)]
Update -mem2reg to use succ_iterator instead of iterating across TerminatorInst
successors. This makes it support nounwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48320
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 02:41:34 +0000 (02:41 +0000)]
Remove unused options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48319
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 02:08:36 +0000 (02:08 +0000)]
Eliminate a few unnecessary uses of dynamic_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48318
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 01:58:48 +0000 (01:58 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48317
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 01:57:34 +0000 (01:57 +0000)]
Don't redundantly clear std::vector members in destructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48316
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 01:48:32 +0000 (01:48 +0000)]
Change PMTopLevelManager's PassManagers vector element type from
Pass* to PMDataManager*. PMDataManager is more specific than Pass,
so this more accurately describes the objects that are being stored.
This eliminates the need for several dynamic_casts to PMDataManager*.
It does introduce one dynamic_cast though, in dumpPasses(). Give
this one a comment describing why a dynamic_cast is being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48315
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 01:21:31 +0000 (01:21 +0000)]
Change PMStack::push to accept a PMDataManager* instead of
a Pass*. PMDataManager* is what it actually holds, so this
makes it clearer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48314
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 01:08:50 +0000 (01:08 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48313
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 Mar 2008 01:07:53 +0000 (01:07 +0000)]
No need for typedefs with enums in C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48312
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 Mar 2008 00:44:09 +0000 (00:44 +0000)]
Refactor some code out of MachineSink into a MachineInstr query.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48311
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 12 Mar 2008 23:40:01 +0000 (23:40 +0000)]
Do not promote float params to double in varargs
calls here. This was done earlier for params in
the varargs part of the params; any float params
that survive to here are in the non-varargs part,
and must not be promoted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48310
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Mar 2008 22:19:41 +0000 (22:19 +0000)]
Experimental scheduler change to schedule / coalesce the copies added for function livein's. Take 2008-03-10-RegAllocInfLoop.ll, the schedule looks like this after these copies are inserted:
entry: 0x12049d0, LLVM BB @0x1201fd0, ID#0:
Live Ins: %EAX %EDX %ECX
%reg1031<def> = MOVPC32r 0
%reg1032<def> = ADD32ri %reg1031, <es:_GLOBAL_OFFSET_TABLE_>, %EFLAGS<imp-def>
%reg1028<def> = MOV32rr %EAX
%reg1029<def> = MOV32rr %EDX
%reg1030<def> = MOV32rr %ECX
%reg1027<def> = MOV8rm %reg0, 1, %reg0, 0, Mem:LD(1,1) [0x1201910 + 0]
%reg1025<def> = MOV32rr %reg1029
%reg1026<def> = MOV32rr %reg1030
%reg1024<def> = MOV32rr %reg1028
The copies unnecessarily increase register pressure and it will end up requiring a physical register to be spilled.
With -schedule-livein-copies:
entry: 0x12049d0, LLVM BB @0x1201fa0, ID#0:
Live Ins: %EAX %EDX %ECX
%reg1031<def> = MOVPC32r 0
%reg1032<def> = ADD32ri %reg1031, <es:_GLOBAL_OFFSET_TABLE_>, %EFLAGS<imp-def>
%reg1024<def> = MOV32rr %EAX
%reg1025<def> = MOV32rr %EDX
%reg1026<def> = MOV32rr %ECX
%reg1027<def> = MOV8rm %reg0, 1, %reg0, 0, Mem:LD(1,1) [0x12018e0 + 0]
Much better!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48307
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 12 Mar 2008 21:27:04 +0000 (21:27 +0000)]
Initial soft-float support for LegalizeTypes. I rewrote
the fcopysign expansion from LegalizeDAG to get rid of
what seems to be a bug: the use of sign extension means
that when copying the sign bit from an f32 to an f64,
the upper 32 bits of the f64 (now an i64) are set, not
just the top bit... I also generalized it to work for
any sized floating point types, and removed the bogosity:
SDOperand Mask1 = (SrcVT == MVT::f64)
? DAG.getConstantFP(BitsToDouble(1ULL << 63), SrcVT)
: DAG.getConstantFP(BitsToFloat(1U << 31), SrcVT);
Mask1 = DAG.getNode(ISD::BIT_CONVERT, SrcNVT, Mask1);
(here SrcNVT is an integer with the same size as SrcVT).
As far as I can see this takes a 1 << 63, converts to
a double, converts that to a floating point constant
then converts that to an integer constant, ending up
with... 1 << 63 as an integer constant! So I just
generate this integer constant directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48305
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 12 Mar 2008 20:52:10 +0000 (20:52 +0000)]
Change VirtRegMap's dump to dump to cerr, not DOUT, so that it
can be called from within a debuger without having -debug specified
on the command-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48298
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 12 Mar 2008 20:50:04 +0000 (20:50 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48297
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 12 Mar 2008 20:40:51 +0000 (20:40 +0000)]
Fix this test on hosts that don't have sse2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48296
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 12 Mar 2008 20:35:19 +0000 (20:35 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48295
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 12 Mar 2008 20:30:08 +0000 (20:30 +0000)]
Don't try to extract an i32 from an f64. This
getCopyToParts problem was noticed by the new
LegalizeTypes infrastructure. In order to avoid
this kind of thing in the future I've added a
check that EXTRACT_ELEMENT is only used with
integers. Once LegalizeTypes is up and running
most likely BUILD_PAIR and EXTRACT_ELEMENT can
be removed, in favour of using apints instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48294
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 Mar 2008 17:45:29 +0000 (17:45 +0000)]
Reimplement the parameter attributes support, phase #1. hilights:
1. There is now a "PAListPtr" class, which is a smart pointer around
the underlying uniqued parameter attribute list object, and manages
its refcount. It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
ParamAttrsWithIndex's, no need to make a SmallVector of a specific
size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
dereferencing the pointer is simplified to just access the
PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
bit simpler.
Phase #2 will rename some stuff (e.g. PAListPtr) and do other less
invasive changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 Mar 2008 17:14:06 +0000 (17:14 +0000)]
no need to keep around this output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48285
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Mar 2008 07:52:15 +0000 (07:52 +0000)]
Document an implementation detail about EXTRACT_SUBREG and INSERT_SUBREG sub-register operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48283
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Mar 2008 07:37:44 +0000 (07:37 +0000)]
Improve the return slot optimization to be both more aggressive (not limited to sret parameters), and
safer (when the passed pointer might be invalid). Thanks to Duncan and Chris for the idea behind this,
and extra thanks to Duncan for helping me work out the trap-safety.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48280
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Mar 2008 07:02:50 +0000 (07:02 +0000)]
Clean up my own mess.
X86 lowering normalize vector 0 to v4i32. However DAGCombine can fold (sub x, x) -> 0 after legalization. It can create a zero vector of a type that's not expected (e.g. v8i16). We don't want to disable the optimization since leaving a (sub x, x) is really bad. Add isel patterns for other types of vector 0 to ensure correctness. It's highly unlikely to happen other than in bugpoint reduced test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48279
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Mar 2008 04:22:57 +0000 (04:22 +0000)]
We also need to collect the VN IDs for the PHI instructions for later updating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48278
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Mar 2008 03:13:29 +0000 (03:13 +0000)]
When we're determining what registers to coallesce, track the VNInfo IDs for the definitions that
feed the PHI instructions. We'll need these IDs in order to update LiveIntervals properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48277
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 Mar 2008 02:25:52 +0000 (02:25 +0000)]
when the bitcode reader is referencing a paramattr, make sure to bump its refcount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48276
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Mar 2008 02:05:05 +0000 (02:05 +0000)]
Total brain cramp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48274
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 Mar 2008 00:50:01 +0000 (00:50 +0000)]
This is a simple fix for getting error messages from dlerror in
LoadLibraryPermanently. The current code modifies the value of a pointer
that is passed by value, so the caller never gets the message.
Patch by Julien Lerouge!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48270
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 12 Mar 2008 00:49:20 +0000 (00:49 +0000)]
One more bit of Altivec parameter passing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48269
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 12 Mar 2008 00:49:19 +0000 (00:49 +0000)]
Be backward compatible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48268
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 12 Mar 2008 00:32:32 +0000 (00:32 +0000)]
Check multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48267
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 12 Mar 2008 00:25:14 +0000 (00:25 +0000)]
Make this test x86-specific for now; targets that don't use
the automated CallingConv code to handle return values typically
don't support multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48265
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 12 Mar 2008 00:22:17 +0000 (00:22 +0000)]
Implement Altivec passing to varargs functions on ppc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48264
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Mar 2008 00:14:07 +0000 (00:14 +0000)]
Set NextMII after issuing a physical register spill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48263
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 12 Mar 2008 00:07:03 +0000 (00:07 +0000)]
Fix attribute handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48262
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 Mar 2008 00:02:46 +0000 (00:02 +0000)]
Minor debug output bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48261
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 Mar 2008 23:53:16 +0000 (23:53 +0000)]
Basic feature test for multiple return values in codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48260
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 11 Mar 2008 22:51:09 +0000 (22:51 +0000)]
Ultimately resolve aliases during linking, if possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48259
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 11 Mar 2008 22:43:42 +0000 (22:43 +0000)]
Testcase for PR2137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48258
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 11 Mar 2008 22:38:53 +0000 (22:38 +0000)]
Correctly propagate thread-local flag from aliasee to alias. This fixes PR2137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48257
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 Mar 2008 22:29:46 +0000 (22:29 +0000)]
Use PassManagerBase instead of FunctionPassManager for functions
that merely add passes. This allows them to be used with either
FunctionPassManager or PassManager, or even with a custom new
kind of pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48256
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 11 Mar 2008 22:28:56 +0000 (22:28 +0000)]
Add helper for ultimate aliasee resoltion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48255
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 11 Mar 2008 22:24:29 +0000 (22:24 +0000)]
Handle multiple ret values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48254
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 11 Mar 2008 22:08:21 +0000 (22:08 +0000)]
Initialize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48253
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 Mar 2008 21:53:06 +0000 (21:53 +0000)]
Check to see if a two-entry PHI block can be simplified
before trying to merge the block into its predecessors.
This allows two-entry-phi-return.ll to be simplified
into a single basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48252
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 Mar 2008 21:47:57 +0000 (21:47 +0000)]
Make this test more challenging to help it avoid being
optimized away before it tests what it is intended to test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48251
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 11 Mar 2008 21:42:20 +0000 (21:42 +0000)]
Update testcase for recent aliases change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48250
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 11 Mar 2008 21:41:14 +0000 (21:41 +0000)]
Honour aliases visibility during asm emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48249
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 11 Mar 2008 21:40:17 +0000 (21:40 +0000)]
Honour aliases visibility when reading from/writing to bitcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48248
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 Mar 2008 21:37:00 +0000 (21:37 +0000)]
Add a test to ensure that all-ones vectors are materialized with pcmpeqd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48247
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 11 Mar 2008 21:34:46 +0000 (21:34 +0000)]
Transfer physical register spill info when load / store folding happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48246
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 Mar 2008 21:29:43 +0000 (21:29 +0000)]
Use the correct value for InSignBit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48245
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 Mar 2008 21:11:25 +0000 (21:11 +0000)]
Initial codegen support for functions and calls with multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48244
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Mar 2008 19:50:13 +0000 (19:50 +0000)]
Implement basic support for the 'f' register class constraint. This basically
works, but probably won't if you mix it with 't' or 'u' yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48243
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Mar 2008 19:30:09 +0000 (19:30 +0000)]
coalesce away 80-bit floating point copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48241
91177308-0d34-0410-b5e6-
96231b3b80d8