Devang Patel
af305d2342
Remove unused GetAddressOfSymbol()
...
Thanks Daniel Dunbar!
llvm-svn: 48340
2008-03-13 16:55:34 +00:00
Evan Cheng
442d708bfb
New test case.
...
llvm-svn: 48338
2008-03-13 08:05:02 +00:00
Evan Cheng
57bb088542
Typo.
...
llvm-svn: 48337
2008-03-13 08:04:35 +00:00
Evan Cheng
8f8a8b28e9
Don't try to sink 3-address instruction if convertToThreeAddress created more than one instructions.
...
llvm-svn: 48336
2008-03-13 07:56:58 +00:00
Evan Cheng
ecde45ecb5
A test case I forgot to check in.
...
llvm-svn: 48335
2008-03-13 06:42:46 +00:00
Evan Cheng
21449c76bc
Remove an unused command line option.
...
llvm-svn: 48334
2008-03-13 06:38:28 +00:00
Evan Cheng
5c26bde55e
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.
...
llvm-svn: 48333
2008-03-13 06:37:55 +00:00
Christopher Lamb
dd55d3f1b2
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.
llvm-svn: 48329
2008-03-13 05:47:01 +00:00
Chris Lattner
02e727ff88
Fix Path::GetMainExecutable on cygwin, patch by Sam Bishop.
...
llvm-svn: 48328
2008-03-13 05:22:05 +00:00
Chris Lattner
4dec91222a
remove extraneous namespace qualifier, PR2142
...
llvm-svn: 48327
2008-03-13 05:17:59 +00:00
Chris Lattner
c994c0295a
move a bunch of trivial methods to be inline.
...
llvm-svn: 48326
2008-03-13 05:00:21 +00:00
Chris Lattner
4d650c4bee
Various improvements suggested by Duncan
...
llvm-svn: 48325
2008-03-13 04:33:03 +00:00
Chris Lattner
723f2a1646
Fix an incorrect comment, PR2147.
...
llvm-svn: 48323
2008-03-13 03:29:42 +00:00
Evan Cheng
0ceb8eb150
Improve VarInfo::removeKill() by using std::find instead of linear search.
...
llvm-svn: 48321
2008-03-13 02:42:55 +00:00
Nick Lewycky
7698bfbe16
Update -mem2reg to use succ_iterator instead of iterating across TerminatorInst
...
successors. This makes it support nounwind.
llvm-svn: 48320
2008-03-13 02:42:41 +00:00
Evan Cheng
4f610c0de1
Remove unused options.
...
llvm-svn: 48319
2008-03-13 02:41:34 +00:00
Dan Gohman
565df95a36
Eliminate a few unnecessary uses of dynamic_cast.
...
llvm-svn: 48318
2008-03-13 02:08:36 +00:00
Dan Gohman
1e9860a2ed
Fix a typo.
...
llvm-svn: 48317
2008-03-13 01:58:48 +00:00
Dan Gohman
1412f515c3
Don't redundantly clear std::vector members in destructors.
...
llvm-svn: 48316
2008-03-13 01:57:34 +00:00
Dan Gohman
73caf5ff10
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.
llvm-svn: 48315
2008-03-13 01:48:32 +00:00
Dan Gohman
11eecd635c
Change PMStack::push to accept a PMDataManager* instead of
...
a Pass*. PMDataManager* is what it actually holds, so this
makes it clearer.
llvm-svn: 48314
2008-03-13 01:21:31 +00:00
Dan Gohman
abf8892706
Fix a typo in a comment.
...
llvm-svn: 48313
2008-03-13 01:08:50 +00:00
Dan Gohman
37f10d4aeb
No need for typedefs with enums in C++.
...
llvm-svn: 48312
2008-03-13 01:07:53 +00:00
Evan Cheng
399e1101ba
Refactor some code out of MachineSink into a MachineInstr query.
...
llvm-svn: 48311
2008-03-13 00:44:09 +00:00
Dale Johannesen
6424bd0b11
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.
llvm-svn: 48310
2008-03-12 23:40:01 +00:00
Evan Cheng
65e9d5f1a8
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!
llvm-svn: 48307
2008-03-12 22:19:41 +00:00
Duncan Sands
723849a17f
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.
llvm-svn: 48305
2008-03-12 21:27:04 +00:00
Dan Gohman
34ae72c435
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.
llvm-svn: 48298
2008-03-12 20:52:10 +00:00
Dan Gohman
bf68f9fd8d
Fix typos in comments.
...
llvm-svn: 48297
2008-03-12 20:50:04 +00:00
Dan Gohman
f7492cf0ec
Fix this test on hosts that don't have sse2.
...
llvm-svn: 48296
2008-03-12 20:40:51 +00:00
Duncan Sands
c54fe97f08
Fix typo.
...
llvm-svn: 48295
2008-03-12 20:35:19 +00:00
Duncan Sands
87de65fc29
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.
llvm-svn: 48294
2008-03-12 20:30:08 +00:00
Chris Lattner
8a923e7c28
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.
llvm-svn: 48289
2008-03-12 17:45:29 +00:00
Chris Lattner
ee8d960ed1
no need to keep around this output.
...
llvm-svn: 48285
2008-03-12 17:14:06 +00:00
Evan Cheng
136a24742c
Document an implementation detail about EXTRACT_SUBREG and INSERT_SUBREG sub-register operand.
...
llvm-svn: 48283
2008-03-12 07:52:15 +00:00
Owen Anderson
6ff0b822b4
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.
llvm-svn: 48280
2008-03-12 07:37:44 +00:00
Evan Cheng
99ee78ef63
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.
llvm-svn: 48279
2008-03-12 07:02:50 +00:00
Owen Anderson
944b1c76ab
We also need to collect the VN IDs for the PHI instructions for later updating.
...
llvm-svn: 48278
2008-03-12 04:22:57 +00:00
Owen Anderson
70aaab6dc5
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.
llvm-svn: 48277
2008-03-12 03:13:29 +00:00
Chris Lattner
e7b19035ed
when the bitcode reader is referencing a paramattr, make sure to bump its refcount.
...
llvm-svn: 48276
2008-03-12 02:25:52 +00:00
Evan Cheng
0903aef2ff
Total brain cramp.
...
llvm-svn: 48274
2008-03-12 02:05:05 +00:00
Chris Lattner
1f49988a7a
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!
llvm-svn: 48270
2008-03-12 00:50:01 +00:00
Dale Johannesen
0d98256c05
One more bit of Altivec parameter passing.
...
llvm-svn: 48269
2008-03-12 00:49:20 +00:00
Anton Korobeynikov
2f22e3f690
Be backward compatible
...
llvm-svn: 48268
2008-03-12 00:49:19 +00:00
Devang Patel
cc189b5606
Check multiple return values.
...
llvm-svn: 48267
2008-03-12 00:32:32 +00:00
Dan Gohman
35f8f07c00
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.
llvm-svn: 48265
2008-03-12 00:25:14 +00:00
Dale Johannesen
b28456ef18
Implement Altivec passing to varargs functions on ppc.
...
llvm-svn: 48264
2008-03-12 00:22:17 +00:00
Evan Cheng
105cb3988b
Set NextMII after issuing a physical register spill.
...
llvm-svn: 48263
2008-03-12 00:14:07 +00:00
Devang Patel
fa8667a2dd
Fix attribute handling.
...
llvm-svn: 48262
2008-03-12 00:07:03 +00:00
Evan Cheng
b398635456
Minor debug output bug.
...
llvm-svn: 48261
2008-03-12 00:02:46 +00:00
Dan Gohman
8a361c1f92
Basic feature test for multiple return values in codegen.
...
llvm-svn: 48260
2008-03-11 23:53:16 +00:00
Anton Korobeynikov
e6d90f5a95
Ultimately resolve aliases during linking, if possible
...
llvm-svn: 48259
2008-03-11 22:51:09 +00:00
Anton Korobeynikov
80b53b8f6b
Testcase for PR2137
...
llvm-svn: 48258
2008-03-11 22:43:42 +00:00
Anton Korobeynikov
e8fa50f63a
Correctly propagate thread-local flag from aliasee to alias. This fixes PR2137
...
llvm-svn: 48257
2008-03-11 22:38:53 +00:00
Dan Gohman
24570836b2
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.
llvm-svn: 48256
2008-03-11 22:29:46 +00:00
Anton Korobeynikov
da7db7d9a1
Add helper for ultimate aliasee resoltion
...
llvm-svn: 48255
2008-03-11 22:28:56 +00:00
Devang Patel
7358165c99
Handle multiple ret values.
...
llvm-svn: 48254
2008-03-11 22:24:29 +00:00
Devang Patel
f6269f0914
Initialize.
...
llvm-svn: 48253
2008-03-11 22:08:21 +00:00
Dan Gohman
20af5a0fe7
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.
llvm-svn: 48252
2008-03-11 21:53:06 +00:00
Dan Gohman
8e9ae96a4a
Make this test more challenging to help it avoid being
...
optimized away before it tests what it is intended to test.
llvm-svn: 48251
2008-03-11 21:47:57 +00:00
Anton Korobeynikov
6f51973734
Update testcase for recent aliases change
...
llvm-svn: 48250
2008-03-11 21:42:20 +00:00
Anton Korobeynikov
2601d7ee50
Honour aliases visibility during asm emission
...
llvm-svn: 48249
2008-03-11 21:41:14 +00:00
Anton Korobeynikov
db691cbd6d
Honour aliases visibility when reading from/writing to bitcode
...
llvm-svn: 48248
2008-03-11 21:40:17 +00:00
Dan Gohman
6616836e71
Add a test to ensure that all-ones vectors are materialized with pcmpeqd.
...
llvm-svn: 48247
2008-03-11 21:37:00 +00:00
Evan Cheng
a3891365b5
Transfer physical register spill info when load / store folding happens.
...
llvm-svn: 48246
2008-03-11 21:34:46 +00:00
Dan Gohman
44b4c07cd1
Use the correct value for InSignBit.
...
llvm-svn: 48245
2008-03-11 21:29:43 +00:00
Dan Gohman
1351025a91
Initial codegen support for functions and calls with multiple return values.
...
llvm-svn: 48244
2008-03-11 21:11:25 +00:00
Chris Lattner
8abed80a69
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.
llvm-svn: 48243
2008-03-11 19:50:13 +00:00
Chris Lattner
7b27ccfd5e
coalesce away 80-bit floating point copies.
...
llvm-svn: 48241
2008-03-11 19:30:09 +00:00
Chris Lattner
7930d8e775
convert a massive if statement to a switch.
...
llvm-svn: 48240
2008-03-11 19:28:17 +00:00
Chris Lattner
120ad01fcb
start handling the 'f' x87 constraint.
...
llvm-svn: 48239
2008-03-11 19:06:29 +00:00
Devang Patel
70c238a1d8
Skip functions that return multiple values.
...
llvm-svn: 48233
2008-03-11 18:04:06 +00:00
Dale Johannesen
1b12647544
The feature this is testing did not work in the general case,
...
and has been removed.
llvm-svn: 48232
2008-03-11 17:48:26 +00:00
Devang Patel
5aafa6ee1f
Fix getOperand() for ReturnInst.
...
llvm-svn: 48229
2008-03-11 17:35:03 +00:00
Devang Patel
5663fe6613
Become multiple return value aware.
...
Right now, the pass does not optimize tail recursions
involving multiple return values.
llvm-svn: 48228
2008-03-11 17:33:32 +00:00
Devang Patel
e418de3023
Add TODO reminder.
...
llvm-svn: 48227
2008-03-11 17:32:05 +00:00
Dan Gohman
d3a20c9e1e
Give PassManager and FunctionPassManager a common base class, with
...
add(Pass *) as a pure virtual member function. This will allow all
the various addPassesTo* functions in LLVM to avoid hard-coding what
type of PassManager is used.
llvm-svn: 48226
2008-03-11 16:41:42 +00:00
Dan Gohman
dfdf2c0633
Fix typos in comments.
...
llvm-svn: 48225
2008-03-11 16:18:48 +00:00
Christopher Lamb
342e4104d3
Missed part of recommit.
...
llvm-svn: 48224
2008-03-11 10:27:36 +00:00
Christopher Lamb
aa7c2105de
Recommitting parts of r48130. These do not appear to cause the observed failures.
...
llvm-svn: 48223
2008-03-11 10:09:17 +00:00
Christopher Lamb
a731239c30
Recommitting changes after more testing. These appear to cause no problems.
...
llvm-svn: 48222
2008-03-11 09:33:47 +00:00
Evan Cheng
d54660aeed
Use TargetRegisterInfo::getPhysicalRegisterRegClass. Remove duplicated code.
...
llvm-svn: 48221
2008-03-11 07:55:13 +00:00
Evan Cheng
d85667b89c
If there are multiple register classes that a register belongs to, return the super-class (e.g. on x86, returns GR32, not GR32_).
...
llvm-svn: 48220
2008-03-11 07:54:14 +00:00
Evan Cheng
34e5b34426
Learn how to xfail a test.
...
llvm-svn: 48219
2008-03-11 07:51:31 +00:00
Evan Cheng
e88a625ecd
When the register allocator runs out of registers, spill a physical register around the def's and use's of the interval being allocated to make it possible for the interval to target a register and spill it right away and restore a register for uses. This likely generates terrible code but is before than aborting.
...
llvm-svn: 48218
2008-03-11 07:19:34 +00:00
Evan Cheng
5b59e372dc
In 32-bit mode, mark 64-bit GPR's as unallocatable.
...
llvm-svn: 48217
2008-03-11 07:16:00 +00:00
Evan Cheng
756f9d9c51
XFAIL due to Dale's change.
...
llvm-svn: 48216
2008-03-11 07:15:44 +00:00
Duncan Sands
b29f93613d
Some LegalizeTypes code factorization and minor
...
enhancements.
llvm-svn: 48215
2008-03-11 06:41:14 +00:00
Chris Lattner
5c7bda440f
compile: double test() {}
...
into:
_test:
fldz
ret
instead of:
_test:
subl $12, %esp
#IMPLICIT_DEF %xmm0
movsd %xmm0, (%esp)
fldl (%esp)
addl $12, %esp
ret
llvm-svn: 48213
2008-03-11 06:21:08 +00:00
Nick Lewycky
a3860a2422
Fix the build on gcc 4.2.
...
llvm-svn: 48212
2008-03-11 05:56:09 +00:00
Devang Patel
d0f476471d
fix grammer
...
llvm-svn: 48211
2008-03-11 05:51:59 +00:00
Devang Patel
a7a2075ab8
Initial multiple return values support.
...
llvm-svn: 48210
2008-03-11 05:46:42 +00:00
Chris Lattner
1bd44363f2
Change the model for FP Stack return to use fp operands on the
...
RET instruction instead of using FpSET_ST0_32. This also generalizes
the code to handling returning of multiple FP results.
llvm-svn: 48209
2008-03-11 03:23:40 +00:00
Chris Lattner
3e0ec65678
variadic instructions don't have operand info for variadic arguments.
...
llvm-svn: 48208
2008-03-11 03:14:42 +00:00
Dan Gohman
319234d67c
Upgrade this test.
...
llvm-svn: 48207
2008-03-11 02:19:59 +00:00
Dan Gohman
d6819da453
Generalize ExpandIntToFP to handle the case where the operand is legal
...
and it's the result that requires expansion. This code is a little confusing
because the TargetLoweringInfo tables for [US]INT_TO_FP use the operand type
(the integer type) rather than the result type.
llvm-svn: 48206
2008-03-11 01:59:03 +00:00
Chris Lattner
d3090bcfc8
If a register operand comes from the variadic part of a node, don't
...
verify the register constraint matches what the instruction expects.
llvm-svn: 48205
2008-03-11 00:59:28 +00:00
Evan Cheng
850e143cbf
Temporarily revert 48175.
...
llvm-svn: 48204
2008-03-11 00:27:34 +00:00
Anton Korobeynikov
2591afca0a
Fix thinko: alias always defines new symbol. Even is aliasee itself is undefined.
...
llvm-svn: 48203
2008-03-11 00:24:53 +00:00
Dan Gohman
10f7d850cf
More APInt-ification.
...
llvm-svn: 48201
2008-03-11 00:11:06 +00:00
Chris Lattner
6aa4f515bb
emit an ID # for each regclass ID. Chris doesn't like to have to count.
...
llvm-svn: 48200
2008-03-11 00:00:23 +00:00
Chris Lattner
a4fa0ad30d
abort with an assert instead of a cerr to get line#
...
llvm-svn: 48199
2008-03-10 23:56:08 +00:00
Dan Gohman
fc42961f18
Use utostr instead of a stringstream.
...
llvm-svn: 48198
2008-03-10 23:55:07 +00:00
Scott Michel
92275427e5
- Style cleanup in IA64ISelLowering.h: add 'virtual' keyword for consistency.
...
- Add test pattern matching in CellSPU's icmp32.ll test harness
- Fix CellSPU fcmp.ll-generated assert.
llvm-svn: 48197
2008-03-10 23:49:09 +00:00
Dan Gohman
2a3aeb1f72
Correctly clone FlaggedNodes.
...
llvm-svn: 48196
2008-03-10 23:48:14 +00:00
Dan Gohman
2f3648b261
Initialize ArgTypes directly instead of manually copying in the elements.
...
llvm-svn: 48195
2008-03-10 23:41:23 +00:00
Dan Gohman
830d86cab8
APInt-ify this.
...
llvm-svn: 48194
2008-03-10 23:38:17 +00:00
Dan Gohman
de66dc88cd
Remove an unnecessary #include
...
llvm-svn: 48193
2008-03-10 23:37:12 +00:00
Chris Lattner
7362d38391
Don't emit FP_REG_KILL into a block that just returns. Nothing
...
can be live out of the block anyway, so it isn't needed.
llvm-svn: 48192
2008-03-10 23:34:12 +00:00
Dan Gohman
f4300950f1
Implement more support for fp-to-i128 and i128-to-fp conversions.
...
llvm-svn: 48189
2008-03-10 23:03:31 +00:00
Dale Johannesen
0fb187f81b
Disable prolog code that aligns the stack when a
...
local object of >16 byte alignment exists. It does not
work and getting it to work is not trivial, as explained
in the comment. This fixes all the remaining ppc32
failures in the struct-layout-1 part of the gcc testsuite.
(gcc does not support this either, and the only way to
get such an object is with __attribute__((aligned)) or
generic vectors; it can't be done in a standard-conforming
program, or with Altivec. So I think disabling it is OK.)
llvm-svn: 48188
2008-03-10 22:59:46 +00:00
Bill Wendling
24155f7381
Update llc flags for PPC register scavenger.
...
llvm-svn: 48187
2008-03-10 22:59:08 +00:00
Bill Wendling
c6c48fca74
Change the "enable/disable" mechanism so that we can enable PPC register
...
scavenging for 32-bit and 64-bit separately.
llvm-svn: 48186
2008-03-10 22:49:16 +00:00
Anton Korobeynikov
510fc32d15
Add sanity checks
...
llvm-svn: 48184
2008-03-10 22:36:53 +00:00
Anton Korobeynikov
d5160da577
Typo: 'function' => 'alias'
...
llvm-svn: 48183
2008-03-10 22:36:35 +00:00
Anton Korobeynikov
66a6271c07
Syntactic sugar'ify stuff :)
...
llvm-svn: 48182
2008-03-10 22:36:08 +00:00
Anton Korobeynikov
715ef43c2e
Always run 'make check' :) Fix fallout from prev. commit: query for possible
...
alias destination only if we don't have anything to link to
llvm-svn: 48181
2008-03-10 22:35:31 +00:00
Anton Korobeynikov
eeb5ca6f5f
Make error messages to have common style
...
llvm-svn: 48180
2008-03-10 22:34:46 +00:00
Anton Korobeynikov
e79f4c77f0
Properly link globals with aliases
...
llvm-svn: 48179
2008-03-10 22:34:28 +00:00
Anton Korobeynikov
1d9848e391
This passes now
...
llvm-svn: 48178
2008-03-10 22:34:11 +00:00
Anton Korobeynikov
f6439246cc
Remove the LinkGlobal weirderness in common linking phase.
...
llvm-svn: 48177
2008-03-10 22:33:53 +00:00
Anton Korobeynikov
1f93c50ace
Typo
...
llvm-svn: 48176
2008-03-10 22:33:22 +00:00
Evan Cheng
7abdb438a1
If the register allocator ran out of registers, just abort for now.
...
llvm-svn: 48175
2008-03-10 21:27:20 +00:00
Chris Lattner
4b3a7fa823
Eliminate the FP_GET_ST0/FP_SET_ST0 target-specific dag nodes, just lower to
...
copyfromreg/copytoreg instead.
llvm-svn: 48174
2008-03-10 21:08:41 +00:00
Devang Patel
d6cff517d6
Document multiple return values.
...
llvm-svn: 48173
2008-03-10 20:49:15 +00:00
Dan Gohman
272e234477
Fix mul expansion to check the correct number of bits for
...
zero extension when checking if an unsigned multiply is
safe.
llvm-svn: 48171
2008-03-10 20:42:19 +00:00
Evan Cheng
b9e4280e94
Somewhat better solution.
...
llvm-svn: 48170
2008-03-10 19:58:22 +00:00
Evan Cheng
ae2c56d93e
Default ISD::PREFETCH to expand.
...
llvm-svn: 48169
2008-03-10 19:38:10 +00:00
Evan Cheng
d4e1d9eeb2
Revert 48125, 48126, and 48130 for now to unbreak some x86-64 tests.
...
llvm-svn: 48167
2008-03-10 19:31:26 +00:00
Chris Lattner
514b3ed536
fix 80 col violations.
...
llvm-svn: 48166
2008-03-10 18:55:53 +00:00
Dale Johannesen
42d31b0783
The __sync primitives only work on x86 and alpha;
...
xfail this test elsewhere.
llvm-svn: 48164
2008-03-10 18:38:31 +00:00
Devang Patel
741f491d90
Simplify
...
llvm-svn: 48163
2008-03-10 18:38:30 +00:00
Devang Patel
64d0f07085
Restore optimization that merges blocks when inline function
...
has single return value.
llvm-svn: 48162
2008-03-10 18:34:00 +00:00
Devang Patel
72ea2dc9a9
Simplify
...
llvm-svn: 48161
2008-03-10 18:22:16 +00:00
Devang Patel
c0325b2040
simplify
...
llvm-svn: 48160
2008-03-10 18:11:41 +00:00
Dale Johannesen
94961bd37c
Add -m32 to compilation line; test is only valid in
...
32-bit environment. PR 2136.
llvm-svn: 48159
2008-03-10 17:56:53 +00:00
Nicolas Geoffray
708784ea4f
Stylistic modifications. No functionality changes.
...
llvm-svn: 48158
2008-03-10 17:46:45 +00:00
Dale Johannesen
fe2c0e2dca
These tests don't work unless SSE2 is active.
...
Judging from the checking comments this is intentional,
so add the flag (makes them pass on non-x86 host).
llvm-svn: 48157
2008-03-10 17:33:57 +00:00
Dale Johannesen
65aada6e8f
There is no "-mattr=+sse1" flag; fix test for non-x86 hosts.
...
llvm-svn: 48156
2008-03-10 17:13:37 +00:00
Dale Johannesen
a1cc15fec4
Use uint64_t not unsigned long long.
...
llvm-svn: 48154
2008-03-10 17:05:01 +00:00
Scott Michel
48e3375544
Integer comparison tests for CellSPU.
...
llvm-svn: 48152
2008-03-10 16:58:52 +00:00
Duncan Sands
cd4a6bed89
Fix formatting.
...
llvm-svn: 48151
2008-03-10 16:38:37 +00:00
Gordon Henriksen
962755dbf5
Refresh Makefile.ocaml in objdir if it is modified in srcdir.
...
Patch by Erick Tryzelaar!
llvm-svn: 48150
2008-03-10 16:15:32 +00:00
Gordon Henriksen
04e38cf30a
Refresh Makefile.ocaml in objdir if it is modified in srcdir.
...
Patch by Erick Tryzelaar!
llvm-svn: 48149
2008-03-10 15:58:40 +00:00
Gordon Henriksen
c1269c8fbe
Regenerate.
...
llvm-svn: 48148
2008-03-10 15:49:38 +00:00
Gordon Henriksen
4486f8b5bb
Adding ocamldoc generation.
...
Patch by Erick Tryzelaar.
llvm-svn: 48147
2008-03-10 15:49:16 +00:00
Gordon Henriksen
17296876db
Formatting improvements.
...
llvm-svn: 48146
2008-03-10 15:47:03 +00:00
Scott Michel
a6729e8666
Give TargetLowering::getSetCCResultType() a parameter so that ISD::SETCC's
...
return ValueType can depend its operands' ValueType.
This is a cosmetic change, no functionality impacted.
llvm-svn: 48145
2008-03-10 15:42:14 +00:00
Nicolas Geoffray
b1de7a35f9
Add description of individual bits in CR. This fix PR1765.
...
llvm-svn: 48143
2008-03-10 14:12:10 +00:00
Bill Wendling
2823eaebe8
Minor cleanup. No functionality change.
...
llvm-svn: 48142
2008-03-10 08:13:01 +00:00
Evan Cheng
4a3c5eab34
- Fix a subtle bug in RemoveCopyByCommutingDef. ALR is the live range where the source is defined; BLR is the live range which is defined by the copy.
...
If ALR and BLR overlaps and end of BLR extends beyond end of ALR, e.g.
A = or A, B
...
B = A
...
C = A<kill>
...
= B
then do not add kills of A to the newly created B interval.
- Also fix some kill info update bug.
llvm-svn: 48141
2008-03-10 08:11:32 +00:00
Evan Cheng
831ae49599
Doh
...
llvm-svn: 48140
2008-03-10 07:59:01 +00:00
Tanya Lattner
f7c52a1d52
Add nosubmit option to control what is sent back to the results server.
...
Patch by Joachim Durchholz. Thanks!
llvm-svn: 48139
2008-03-10 07:28:08 +00:00
Owen Anderson
75d04819a6
Move StrongPHIElimination after live interval analysis. This will make things happier down the road.
...
llvm-svn: 48138
2008-03-10 07:22:36 +00:00
Tanya Lattner
5f4b355f20
Remove llvm-upgrade and update tests.
...
llvm-svn: 48137
2008-03-10 07:21:50 +00:00
Evan Cheng
b5d11980d9
Avoid creating BUILD_VECTOR of all zero elements of "non-normalized" type (e.g. v8i16 on x86) after legalizer. Instruction selection does not expect to see them. In all likelihood this can only be an issue in a bugpoint reduced test case.
...
llvm-svn: 48136
2008-03-10 07:19:13 +00:00
Chris Lattner
176542a970
remove an execution test.
...
llvm-svn: 48135
2008-03-10 06:53:14 +00:00
Chris Lattner
853b6ba425
switch from hard coded g++/as tools to the ones detected from
...
the build system. Patch by Joachim Durchholz for PR2121
llvm-svn: 48134
2008-03-10 06:52:10 +00:00
Chris Lattner
0c1d7b43a6
Fix a typo
...
llvm-svn: 48133
2008-03-10 06:49:40 +00:00
Chris Lattner
ca43433493
Fix PR2120 by changing the replacement order to change compile_cxx
...
before compile_c. Patch by Joachim Durchholz!
llvm-svn: 48132
2008-03-10 06:45:35 +00:00
Christopher Lamb
4ba3f0430b
Allow insert_subreg into implicit, target-specific values.
...
Change insert/extract subreg instructions to be able to be used in TableGen patterns.
Use the above features to reimplement an x86-64 pseudo instruction as a pattern.
llvm-svn: 48130
2008-03-10 06:12:08 +00:00
Nick Lewycky
5cb21155e4
Update the .cvs files to match today's asm syntax change.
...
llvm-svn: 48128
2008-03-10 05:01:34 +00:00
Christopher Lamb
80b928e600
Revert accidentally committed local changes.
...
llvm-svn: 48126
2008-03-10 04:16:09 +00:00
Christopher Lamb
0faed2a9a6
Add support in TableGen for unknown operands that infer their type from the pattern their used in. This will be used to allow insert/extract subreg patterns in .td files!
...
llvm-svn: 48125
2008-03-10 04:13:41 +00:00
Nick Lewycky
fb2c1a999a
Turn unwind_to into "unwinds to".
...
llvm-svn: 48123
2008-03-10 02:20:00 +00:00
Dale Johannesen
4e622ec86d
Increase ISD::ParamFlags to 64 bits. Increase the ByValSize
...
field to 32 bits, thus enabling correct handling of ByVal
structs bigger than 0x1ffff. Abstract interface a bit.
Fixes gcc.c-torture/execute/pr23135.c and
gcc.c-torture/execute/pr28982b.c in gcc testsuite (were ICE'ing
on ppc32, quietly producing wrong code on x86-32.)
llvm-svn: 48122
2008-03-10 02:17:22 +00:00
Anton Korobeynikov
148562f13e
This works on x86_64
...
llvm-svn: 48121
2008-03-09 22:24:03 +00:00
Chris Lattner
aed9406bb7
Darwin PPC64 indirect call target goes in X12, not R12. This fixes these
...
two regression tests:
test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll
test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll
llvm-svn: 48120
2008-03-09 20:49:33 +00:00
Chris Lattner
78e817d7fc
cell really does support cross-regclass moves, because R3 is in lots of different regclasses, and the code is not consistent when it comes to value tracking.
...
llvm-svn: 48119
2008-03-09 20:31:11 +00:00
Chris Lattner
3ba79ed9e8
make sure ar.pfs is in a register class, this fixes test/CodeGen/IA64/ret-0.ll
...
llvm-svn: 48118
2008-03-09 20:12:44 +00:00
Chris Lattner
4c4234b59c
remove an extraneous (and ugly) default argument, thanks Duncan.
...
llvm-svn: 48117
2008-03-09 20:04:36 +00:00
Evan Cheng
b46ec99b7e
Fix RUN line.
...
llvm-svn: 48116
2008-03-09 19:55:22 +00:00
Ted Kremenek
d48ed17d18
Fix some compilation errors on msvc:
...
- "Redefinition of I" (iterator masks previous definition)
- include missing header file
Patch by Argiris Kirtzidis!
llvm-svn: 48115
2008-03-09 18:32:50 +00:00
Nick Lewycky
0ac65c3b99
And again.
...
llvm-svn: 48112
2008-03-09 17:13:05 +00:00
Nick Lewycky
929703b29e
Braces belong here. No functionality change.
...
llvm-svn: 48111
2008-03-09 17:11:18 +00:00
Anton Korobeynikov
971a4660a0
Temporary XFAIL the test, until I'll commit a fix
...
llvm-svn: 48110
2008-03-09 16:24:04 +00:00
Nick Lewycky
83750d9caf
SCCP also needs to be taught to follow unwind_to
...
llvm-svn: 48109
2008-03-09 09:44:38 +00:00
Chris Lattner
ce5f841bb5
fp_round's produced by getCopyFromParts should always be exact, because
...
they are produced by calls (which are known exact) and by cross block copies
which are known to be produced by extends.
This improves:
define double @test2() {
%tmp85 = call double asm sideeffect "fld0", "={st(0)}"()
ret double %tmp85
}
from:
_test2:
subl $20, %esp
# InlineAsm Start
fld0
# InlineAsm End
fstpl 8(%esp)
movsd 8(%esp), %xmm0
movsd %xmm0, (%esp)
fldl (%esp)
addl $20, %esp
#FP_REG_KILL
ret
to:
_test2:
# InlineAsm Start
fld0
# InlineAsm End
#FP_REG_KILL
ret
by avoiding a f64 <-> f80 trip
llvm-svn: 48108
2008-03-09 09:38:46 +00:00
Chris Lattner
86829f0ff7
teach X86InstrInfo::copyRegToReg how to copy into ST(0) from
...
an RFP register class.
Teach ScheduleDAG how to handle CopyToReg with different src/dst
reg classes.
This allows us to compile trivial inline asms that expect stuff
on the top of x87-fp stack.
llvm-svn: 48107
2008-03-09 09:15:31 +00:00
Nick Lewycky
271506f29c
Don't eliminate blocks that are only reachable by unwind_to.
...
llvm-svn: 48106
2008-03-09 08:50:23 +00:00
Chris Lattner
9e07537e8c
Add ScheduleDAG support for copytoreg where the src/dst register are
...
in different register classes, e.g. copy of ST(0) to RFP*. This gets
some really trivial inline asm working that plops things on the top of
stack (PR879)
llvm-svn: 48105
2008-03-09 08:49:15 +00:00
Chris Lattner
b79bafcec8
add some code to support cross-register class copying from
...
RST -> RFP{32/64/80}. We only handle ST(0) for now.
llvm-svn: 48104
2008-03-09 08:46:19 +00:00
Tanya Lattner
aa6f5c9ddd
Remove llvm-upgrade and update tests.
...
llvm-svn: 48103
2008-03-09 08:16:40 +00:00
Chris Lattner
c4c9dde04c
rearrange some code, no functionality change.
...
llvm-svn: 48101
2008-03-09 07:58:04 +00:00
Chris Lattner
381bbdb924
fix 80 col violation
...
llvm-svn: 48100
2008-03-09 07:51:01 +00:00
Nick Lewycky
42445be0df
Firstly, having a BranchInst isn't exclusive with having an unwind_to.
...
Secondly, we have to check whether the branch is actually pointing to the block
with the unwind in it. We could have gotten here because of the unwind_to alone.
llvm-svn: 48099
2008-03-09 07:50:37 +00:00
Chris Lattner
459f518703
claim ST(x) registers are 80 bits, which is true. This doesn't affect
...
codegen yet because these can't be spilled (they don't exist until after RA).
llvm-svn: 48098
2008-03-09 07:49:01 +00:00
Chris Lattner
83b3473dd8
extend fp values with FP_EXTEND not FP_ROUND.
...
llvm-svn: 48097
2008-03-09 07:47:22 +00:00
Nick Lewycky
f3d637fa14
A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_to
...
at all.
llvm-svn: 48096
2008-03-09 07:36:38 +00:00
Gordon Henriksen
95f4b77b0d
This patch cleans up the OCaml bindings so that they format nicely with
...
ocamldoc. It does not yet hook into the build system, though.
Patch by Erick Tryzelaar!
llvm-svn: 48095
2008-03-09 07:17:38 +00:00
Chris Lattner
4c869594bc
rename FP_SETRESULT -> FP_SET_ST0
...
llvm-svn: 48094
2008-03-09 07:08:44 +00:00
Chris Lattner
d587e580a6
rename FpGETRESULT32 -> FpGET_ST0_32 etc. Add support for
...
isel'ing value preserving FP roundings from one fp stack reg to another
into a noop, instead of stack traffic.
llvm-svn: 48093
2008-03-09 07:05:32 +00:00
Chris Lattner
a6ce71fb84
reduce this testcase more
...
llvm-svn: 48092
2008-03-09 06:57:21 +00:00
Chris Lattner
b6387c8a74
Finish implementing a readme entry: when inserting an i64 variable
...
into a vector of zeros or undef, and when the top part is obviously
zero, we can just use movd + shuffle. This allows us to compile
vec_set-B.ll into:
_test3:
movl $1234567, %eax
andl 4(%esp), %eax
movd %eax, %xmm0
ret
instead of:
_test3:
subl $28, %esp
movl $1234567, %eax
andl 32(%esp), %eax
movl %eax, (%esp)
movl $0, 4(%esp)
movq (%esp), %xmm0
addl $28, %esp
ret
llvm-svn: 48090
2008-03-09 05:42:06 +00:00
Nick Lewycky
11fc6f8765
Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
...
and also update the cloning interface's major user, the loop optimizations.
llvm-svn: 48088
2008-03-09 05:24:34 +00:00
Nick Lewycky
5ce9b521d7
Update the inliner and simplifycfg to handle unwind_to.
...
llvm-svn: 48086
2008-03-09 05:10:13 +00:00
Nick Lewycky
cc24104703
Two things. Preserve the unwind_to when splitting a BB.
...
Add the ability to remove just one instance of a BB from a phi node. This fixes
the compile error in the tree now.
llvm-svn: 48085
2008-03-09 05:04:48 +00:00
Nick Lewycky
4d0ed842b1
Prune the unwind_to labels on BBs that don't need them. Another step in the
...
removal of invoke, PR1269.
llvm-svn: 48084
2008-03-09 04:55:16 +00:00
Chris Lattner
93930dc28c
add a note
...
llvm-svn: 48064
2008-03-09 01:08:22 +00:00
Chris Lattner
eef374c197
Implement a readme entry, compiling
...
#include <xmmintrin.h>
__m128i doload64(short x) {return _mm_set_epi16(0,0,0,0,0,0,0,1);}
into:
movl $1, %eax
movd %eax, %xmm0
ret
instead of a constant pool load.
llvm-svn: 48063
2008-03-09 01:05:04 +00:00