Anton Korobeynikov
da7db7d9a1
Add helper for ultimate aliasee resoltion
...
llvm-svn: 48255
2008-03-11 22:28:56 +00:00
Devang Patel
5aafa6ee1f
Fix getOperand() for ReturnInst.
...
llvm-svn: 48229
2008-03-11 17:35:03 +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
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
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
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
Dale Johannesen
a1cc15fec4
Use uint64_t not unsigned long long.
...
llvm-svn: 48154
2008-03-10 17:05:01 +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
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
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
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
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
35e92c7bea
Not all users of a BB are Instructions any more.
...
llvm-svn: 48047
2008-03-08 07:48:41 +00:00
Dan Gohman
39b0ac4e59
Remove unused runPass methods.
...
llvm-svn: 48044
2008-03-08 01:43:56 +00:00
Evan Cheng
95cf661534
Implement x86 support for @llvm.prefetch. It corresponds to prefetcht{0|1|2} and prefetchnta instructions.
...
llvm-svn: 48042
2008-03-08 00:58:38 +00:00
Dan Gohman
6c11f47c54
There is no killUse.
...
llvm-svn: 48034
2008-03-07 22:24:41 +00:00
Devang Patel
2fbf7eef9c
Add new sretpromotion pass.
...
llvm-svn: 48032
2008-03-07 21:07:34 +00:00
Devang Patel
6c8219e732
RetVal is not used when there are more then one return operands.
...
llvm-svn: 48022
2008-03-07 20:08:07 +00:00
Andrew Lenharth
3f13b6630a
add a pass that can extract all kinds of global values, not just functions. Update llvm-extract to use it and optionally extract a global variable if you want it too
...
llvm-svn: 48015
2008-03-07 19:51:57 +00:00
Gordon Henriksen
a49d435b27
Cleanup some comments in the OCaml bindings.
...
Patch by Erick Tryzelaar.
llvm-svn: 48014
2008-03-07 19:13:06 +00:00
Bill Wendling
55bfd8c3f7
When setting the "unused" info, take into account something like this:
...
%r3<def> = OR %x3<kill>, %x3
We don't want to mark the %r3 as unused even though it's a sub-register of %x3.
llvm-svn: 48003
2008-03-06 23:22:43 +00:00
Gabor Greif
ad19df0687
fix typos
...
llvm-svn: 47994
2008-03-06 10:36:00 +00:00
Nick Lewycky
19b0df202e
Treat BBs that use BBs as proper predecessors and successors in the CFG.
...
llvm-svn: 47989
2008-03-06 06:54:53 +00:00
Dale Johannesen
8ee39c61f2
Clarify that CALLSEQ_START..END may not be nested,
...
and add some protection against creating such.
llvm-svn: 47957
2008-03-05 19:14:03 +00:00
Evan Cheng
0a62cb44ce
Add a target lowering hook to control whether it's worthwhile to compress fp constant.
...
For x86, if sse2 is available, it's not a good idea since cvtss2sd is slower than a movsd load and it prevents load folding. On x87, it's important to shrink fp constant since fldt is very expensive.
llvm-svn: 47931
2008-03-05 01:30:59 +00:00
Dan Gohman
d9d874b0cd
Codegen support for i128 SINT_TO_FP.
...
llvm-svn: 47928
2008-03-05 01:08:17 +00:00
Evan Cheng
6325446666
Refactor code. Remove duplicated functions that basically do the same thing as
...
findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies.
llvm-svn: 47927
2008-03-05 00:59:57 +00:00
Devang Patel
b2fae1d13f
Revert SmallVector ctor variants.
...
llvm-svn: 47908
2008-03-04 21:54:56 +00:00
Devang Patel
5dc63480db
Add FunctionType ctor variant that takes SmallVector params.
...
llvm-svn: 47895
2008-03-04 18:57:05 +00:00
Evan Cheng
b9bd5a879d
Fix 80 column violations.
...
llvm-svn: 47877
2008-03-04 03:19:19 +00:00
Evan Cheng
567d2e5b57
Rename isOperand() to isOperandOf() (and other similar methods). It always confuses me.
...
llvm-svn: 47872
2008-03-04 00:41:45 +00:00
Bill Wendling
632ea65072
This is the initial check-in for adding register scavenging to PPC. (Currently,
...
PPC-64 doesn't work.) This also lowers the spilling of the CR registers so that
it uses a register other than the default R0 register (the scavenger scrounges
for one). A significant part of this patch fixes how kill information is
handled.
llvm-svn: 47863
2008-03-03 22:19:16 +00:00
Devang Patel
9d91785987
s/isReturnStruct()/hasStructRetAttr()/g
...
llvm-svn: 47857
2008-03-03 21:46:28 +00:00
Chris Lattner
e209be4985
Stub out a Path::GetMainExecutable call to find the path to the
...
main executable of a program. This needs to be implemented on windows.
llvm-svn: 47835
2008-03-03 02:55:43 +00:00
Chris Lattner
bf6acfb71d
make operand accessors const-correct
...
llvm-svn: 47814
2008-03-02 05:32:05 +00:00
Chris Lattner
f724e34ddc
Add a new ShuffleVectorInst::getMaskValue method.
...
llvm-svn: 47813
2008-03-02 05:28:33 +00:00
Nick Lewycky
3cc9be0b59
Add an unwind_to field to basic blocks, making them Users instead of Values.
...
This is the first checkin for PR1269, the new EH infrastructure.
llvm-svn: 47802
2008-03-02 02:48:09 +00:00
Dale Johannesen
208cc8f1b9
Add MVT::is128BitVector and is64BitVector. Shrink
...
unaligned load/store code using them. Per review
of unaligned load/store vector patch.
llvm-svn: 47782
2008-03-01 03:40:57 +00:00
Devang Patel
4eedfd2421
Add pass to promote sret.
...
This pass transforms
%struct._Point = type { i32, i32, i32, i32, i32, i32 }
define internal void @foo(%struct._Point* sret %agg.result)
into
%struct._Point = type { i32, i32, i32, i32, i32, i32 }
define internal %struct._Point @foo()
This pass updates foo() clients appropriately to use
getresult instruction to extract return values.
This pass is not yet ready for prime time.
llvm-svn: 47776
2008-02-29 23:34:08 +00:00
Anton Korobeynikov
0e8b146152
Use enumeration for preffered EH dwarf encoding reason
...
llvm-svn: 47770
2008-02-29 22:09:08 +00:00
Evan Cheng
26edb59d97
Don't fill eh frames even though these are text sections.
...
llvm-svn: 47765
2008-02-29 19:36:59 +00:00
Dan Gohman
105c1d4106
Add support to APInt for shift and rotate operations with APInt
...
instead of uint32_t for the shift/rotate count operand type.
llvm-svn: 47741
2008-02-29 01:40:47 +00:00
Dan Gohman
35723eb4f6
Add a method to APFloat to convert directly from APInt.
...
llvm-svn: 47738
2008-02-29 01:26:11 +00:00
Dale Johannesen
cbde4c2206
Interface of getByValTypeAlignment differed between
...
generic & x86 versions; change generic to follow x86
and improve comments. Add PPC version (not right
for non-Darwin.)
llvm-svn: 47734
2008-02-28 22:31:51 +00:00
Duncan Sands
e28886a913
Document that the shuffle mask may contain undef
...
values.
llvm-svn: 47719
2008-02-28 17:12:11 +00:00
Evan Cheng
c799065cc3
Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to 16-byte boundaries.
...
llvm-svn: 47703
2008-02-28 00:43:03 +00:00
Devang Patel
a1a6882519
Remove dead code.
...
llvm-svn: 47700
2008-02-27 23:33:51 +00:00
Anton Korobeynikov
ae24cca0e4
Preparation step for some cleanup/generalization in EH information emission:
...
provide TAI hook for selection of EH data emission format. Currently unused.
llvm-svn: 47699
2008-02-27 23:33:50 +00:00
Anton Korobeynikov
b3666760ce
Assert on invalid PHINode::addIncoming() arguments. Patch by Erick Tryzelaar!
...
llvm-svn: 47697
2008-02-27 22:37:28 +00:00
Nick Kledzik
91a6dcff32
fixes from review of first commit
...
llvm-svn: 47695
2008-02-27 22:25:36 +00:00