Evan Cheng [Thu, 28 Aug 2008 07:53:51 +0000 (07:53 +0000)]
If a copy isn't coalesced, but its src is defined by trivial computation. Re-materialize the src to replace the copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55467
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 28 Aug 2008 07:52:25 +0000 (07:52 +0000)]
FsFLD0S{S|D} and V_SETALLONES are as cheap as moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Aug 2008 04:02:44 +0000 (04:02 +0000)]
Make the verifier reject instructions which have null pointers
for operands: rdar://
6179606. no testcase, because I can't write
a .ll file that is this broken ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55460
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 28 Aug 2008 03:33:03 +0000 (03:33 +0000)]
Clear the intervals list in "destroy", patch by
Prakash Prabhu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55458
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 28 Aug 2008 02:44:49 +0000 (02:44 +0000)]
Split the ATOMIC NodeType's to include the size, e.g.
ATOMIC_LOAD_ADD_{8,16,32,64} instead of ATOMIC_LOAD_ADD.
Increased the Hardcoded Constant OpActionsCapacity to match.
Large but boring; no functional change.
This is to support partial-word atomics on ppc; i8 is
not a valid type there, so by the time we get to lowering, the
ATOMIC_LOAD nodes looks the same whether the type was i8 or i32.
The information can be added to the AtomicSDNode, but that is the
largest SDNode; I don't fully understand the SDNode allocation,
but it is sensitive to the largest node size, so increasing
that must be bad. This is the alternative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55457
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 28 Aug 2008 01:51:09 +0000 (01:51 +0000)]
This test crashes on non-x86 host; make SSE explicit.
Feel free to fix a better way!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55456
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Aug 2008 00:20:07 +0000 (00:20 +0000)]
Fix a missing #include. Patch by Andrew John Hughes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55451
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 23:52:12 +0000 (23:52 +0000)]
Reorganize the lifetimes of the major objects SelectionDAGISel
works with.
SelectionDAG, FunctionLoweringInfo, and SelectionDAGLowering
objects now get created once per SelectionDAGISel instance, and
can be reused across blocks and across functions. Previously,
they were created and destroyed each time they were needed.
This reorganization simplifies the handling of PHI nodes, and
also SwitchCases, JumpTables, and BitTestBlocks. This
simplification has the side effect of fixing a bug in FastISel
where successor PHI nodes weren't being updated correctly.
This is also a step towards making the transition from FastISel
into and out of SelectionDAG faster, and also making
plain SelectionDAG faster on code with lots of little blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55450
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Aug 2008 22:30:02 +0000 (22:30 +0000)]
Add a helper method that will be used to support EXTRACT_SUBREG for selecting trunc's in fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55439
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Aug 2008 21:32:04 +0000 (21:32 +0000)]
Make "movdq2q" and "movq2dq" dependent upon having SSE2 because they use the
SSE2 registers as well as the MMX registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55436
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 27 Aug 2008 21:10:13 +0000 (21:10 +0000)]
Put file scoped constants in an anonymous namespace. Use the "using namespace
llvm" for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55435
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 Aug 2008 20:58:54 +0000 (20:58 +0000)]
Move the check whether it's worth remating to caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55434
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Aug 2008 20:55:23 +0000 (20:55 +0000)]
Do not apply the transformation if the target does not support DestTy natively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55433
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Aug 2008 20:51:49 +0000 (20:51 +0000)]
Backout 55429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55432
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 20:41:38 +0000 (20:41 +0000)]
Fix FastISel's bitcast code for the case where getRegForValue fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55431
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 Aug 2008 20:33:50 +0000 (20:33 +0000)]
Refactor isSafeToReMat out of 2addr pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55430
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Aug 2008 20:00:27 +0000 (20:00 +0000)]
Add facility to create a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55429
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Aug 2008 18:58:30 +0000 (18:58 +0000)]
Use TargetLowering to get the types in fast isel, which handles pointer types correctly for our purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55428
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 18:15:05 +0000 (18:15 +0000)]
Don't check TLI.getOperationAction. The FastISel way is to
just try to do the action and let the tablegen-generated code
determine if there is target-support for an operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55427
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 18:10:19 +0000 (18:10 +0000)]
Add a new FastISel method, getRegForValue, which takes care of
the details of materializing constants and other values into
registers, and make use of it in several places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55426
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 18:01:42 +0000 (18:01 +0000)]
Add a comment about the current floating-point constant code in FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55425
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 27 Aug 2008 17:50:18 +0000 (17:50 +0000)]
Fix typos and whitespaces. Other cosmetic changes based on feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55424
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 27 Aug 2008 17:36:58 +0000 (17:36 +0000)]
Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55423
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 17:33:15 +0000 (17:33 +0000)]
Reinstate the x86-64 portion of r55190. When doing extloads into
64-bit registers from 16-bit and smaller memory locations, prefer
instructions that define the entire 64-bit register, to avoid
partial-register updates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55422
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 16:29:48 +0000 (16:29 +0000)]
Optimize ScheduleDAGRRList's topological sort to use one pass instead
of two, and to not need a scratch std::vector. Also, compute the ordering
immediately in the result array, instead of in another scratch std::vector
that is copied to the result array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55421
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 16:27:25 +0000 (16:27 +0000)]
Optimize ScheduleDAG's ComputeDepths and ComputeHeights to not need
a scratch std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55420
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 16:19:44 +0000 (16:19 +0000)]
Remove the std::ostream form of PseudoSourceValue's print,
which isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55419
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 16:18:22 +0000 (16:18 +0000)]
Update a comment to reflect recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55418
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 15:24:43 +0000 (15:24 +0000)]
Unbreak PseudoSourceValue::print. This fixes -print-machine-instrs
and various other things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55415
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 14:48:06 +0000 (14:48 +0000)]
Diagnose uses of unsized types with the byval attribute in the
verifier. See PR2711 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55414
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 14:44:57 +0000 (14:44 +0000)]
Update wording, as aggregates are now first-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55413
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 27 Aug 2008 06:51:14 +0000 (06:51 +0000)]
Add DebugInfoBuilder. Patch by Talin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55409
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 27 Aug 2008 01:09:54 +0000 (01:09 +0000)]
Basic FastISel support for floating-point constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55401
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Aug 2008 00:35:37 +0000 (00:35 +0000)]
Fix handling of inttoptr and ptrtoint when unhandled operands are present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55400
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 27 Aug 2008 00:31:01 +0000 (00:31 +0000)]
Add support for fast isel of inttoptr and ptrtoint in the cases where truncation is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55399
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 23:46:32 +0000 (23:46 +0000)]
Factor out a large amoutn of the cast handling code in fast isel into helper methods.
This simultaneously makes the code simpler and adds support for sext as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55398
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 23:19:23 +0000 (23:19 +0000)]
Add a MachineInstrBuilder method for adding floating-point
immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55397
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 23:14:49 +0000 (23:14 +0000)]
Add support for fast isel of zext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55396
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 26 Aug 2008 22:36:50 +0000 (22:36 +0000)]
disallow direct access to SDValue::ResNo, provide a getter instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55394
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 22:34:28 +0000 (22:34 +0000)]
Add support for fptosi of constants in fast isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55393
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 22:07:42 +0000 (22:07 +0000)]
Put a heuristic in place to prevent GVN from falling into bad cases with massively complicated CFGs.
This speeds up a particular testcase from 12+ hours to 5 seconds with little perceptible loss of quality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55391
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 21:42:18 +0000 (21:42 +0000)]
Optimize SelectionDAG's topological sort to use one pass instead
of two, and to not need a scratch std::vector. Also, use the
SelectionDAG's topological sort in LegalizeDAG instead of having
a separate implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55389
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 21:28:54 +0000 (21:28 +0000)]
Refactor the bitcast code into its own function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55387
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 21:21:20 +0000 (21:21 +0000)]
Refactor a bunch of FastISelEmitter code into a helper class, and
put each major step in a separate function. This makes the high
level sequence of events easier to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55385
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 20:57:08 +0000 (20:57 +0000)]
Make FastISel use the correct argument type when casting GEP indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55384
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 20:52:40 +0000 (20:52 +0000)]
Don't select binary instructions with illegal types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55383
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 20:37:00 +0000 (20:37 +0000)]
Add support for fast isel of sitofp, and remove some unnecessary and imprecise legality checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55381
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Tue, 26 Aug 2008 19:49:04 +0000 (19:49 +0000)]
- small bug corrected: incorrect iterator type.
- fix to please VS: add a return after an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55380
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 18:51:24 +0000 (18:51 +0000)]
Use a combination of copyRegToReg and ISD::BIT_CONVERT when doing fast isel of bitcasts,
allowing it to support the full range of conversions people might ask for in a correct manner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55378
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 18:50:40 +0000 (18:50 +0000)]
These assertions should be return false's instead, allowing the client to detect the failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55377
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 18:50:00 +0000 (18:50 +0000)]
We need to check that the return type is correct, even in cases where we don't
have a return type that differs from the operand types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55376
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 18:03:31 +0000 (18:03 +0000)]
Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy requested
was inserted or not. This allows bitcast in fast isel to properly handle the case
where an appropriate reg-to-reg copy is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55375
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 26 Aug 2008 17:57:54 +0000 (17:57 +0000)]
If IV is used in a int-to-float cast inside the loop then try to eliminate the cast operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55374
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 17:44:42 +0000 (17:44 +0000)]
Add support for fast isel of non-constant fptosi instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55373
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 26 Aug 2008 17:44:40 +0000 (17:44 +0000)]
fix doxygen comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55372
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 26 Aug 2008 16:41:15 +0000 (16:41 +0000)]
Grammar fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55371
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 26 Aug 2008 16:34:01 +0000 (16:34 +0000)]
Added "str()" method to raw_string_ostream.
str() mirrors the same method in std::ostringstream.
str() flushes the buffered stream contents to string and returns a reference to the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55370
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Aug 2008 07:01:28 +0000 (07:01 +0000)]
code simplification, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55363
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Aug 2008 06:50:46 +0000 (06:50 +0000)]
stabilize more printing, this doesn't cause a problem
in the example attached to PR2590, but is a problem in general.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55361
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Aug 2008 06:49:06 +0000 (06:49 +0000)]
stablize SubRegsSet printing, part of PR2590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55360
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Aug 2008 06:43:25 +0000 (06:43 +0000)]
Stabilize 'getDwarfRegNumFull' output to not depend on random memory
orders, part of PR2590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55359
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Aug 2008 06:19:02 +0000 (06:19 +0000)]
If an xmm register is referenced explicitly in an inline asm, make sure to
assign it to a version of the xmm register with the regclass that matches its
type. This fixes PR2715, a bug handling some crazy xpcom case in mozilla.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55358
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Aug 2008 06:07:47 +0000 (06:07 +0000)]
typo fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55355
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 01:44:34 +0000 (01:44 +0000)]
Actually recycle SDNode allocations. SelectionDAG is using
RecyclingAllocator, but this change is needed for the nodes
to actually be recycled. This cuts SelectionDAG's memory
usage high-water-mark in half in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55351
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 26 Aug 2008 01:38:29 +0000 (01:38 +0000)]
Avoid a warning about isTargetNullPtr being unused in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55350
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 01:22:59 +0000 (01:22 +0000)]
Throw the switch to allow FastISel to emit instructions whose return types different from their inputs. Next step: adding lowering pattens in FastISel that actually use these newly available opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55349
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 26 Aug 2008 01:13:44 +0000 (01:13 +0000)]
This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55348
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 26 Aug 2008 00:42:26 +0000 (00:42 +0000)]
Enhance TableGen to emit code for FastISel of opcodes with variadic return types without slowing down opcodes that are not variadic. No such opcodes are currently generated, but in theory it should be a matter of just hitting the switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55347
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 25 Aug 2008 23:58:18 +0000 (23:58 +0000)]
Add a RetVT parameter to emitted FastISel methods, so that we will be able to pass the desired return
type down. This is not currently used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55345
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 25 Aug 2008 23:43:09 +0000 (23:43 +0000)]
Deepen the map structure tablegen uses to compute FastISel patterns, in preparation for having patterns
with return types that differ from their input types. This is not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55344
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 25 Aug 2008 22:34:37 +0000 (22:34 +0000)]
Implement 32 & 64 bit versions of PPC atomic
binary primitives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55343
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 25 Aug 2008 22:20:39 +0000 (22:20 +0000)]
Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55342
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 25 Aug 2008 21:58:43 +0000 (21:58 +0000)]
80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55341
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 25 Aug 2008 21:32:34 +0000 (21:32 +0000)]
Expand bitcast support in fast isel to support bitcasts of non-constant values by emitting reg-reg copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55340
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 25 Aug 2008 21:27:18 +0000 (21:27 +0000)]
Try approach to moving call address load inside of callseq_start. Now it's done during the preprocess of x86 isel. callseq_start's chain is changed to load's chain node; while load's chain is the last of callseq_start or the loads or copytoreg nodes inserted to move arguments to the right spot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55338
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 25 Aug 2008 21:09:52 +0000 (21:09 +0000)]
Remove PPC-specific lowering for atomics; the
generic stuff works fine.
Mark rewritten cmp-and-swap as not using CR1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55336
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 25 Aug 2008 20:20:32 +0000 (20:20 +0000)]
Add support for fast isel of (integer) immediate materialization pattens, and use them to support
bitcast of constants in fast isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55325
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 25 Aug 2008 18:53:58 +0000 (18:53 +0000)]
Adjust grep's for new code sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55320
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 25 Aug 2008 18:53:26 +0000 (18:53 +0000)]
It's important for the cmp-and-swap to balance
loads and stores but it's even more important for
it to store the right value.:(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55319
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 25 Aug 2008 18:32:39 +0000 (18:32 +0000)]
Nevermind. This broke the bootstrap (?!).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55318
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 25 Aug 2008 18:20:52 +0000 (18:20 +0000)]
MOVQ2DQ and MOVQ2DQ use SSE2. We should conditionalize the use of these
instructions on having SSE2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55317
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Aug 2008 17:03:15 +0000 (17:03 +0000)]
Fix pasto (values -> types) noticed by Josh Conner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55315
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Aug 2008 04:55:46 +0000 (04:55 +0000)]
flush stream after dumping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55301
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 25 Aug 2008 04:11:42 +0000 (04:11 +0000)]
Fix asm printing of MOVSDto64mr and MOV64toSDrm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55300
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 24 Aug 2008 21:48:46 +0000 (21:48 +0000)]
Fix this test. Don't null out the file, just XFAIL it until patch can be fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55296
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 24 Aug 2008 21:45:30 +0000 (21:45 +0000)]
Temporarily reverting r55292. It's causing a bootstraping failure:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc ... src/libiberty/make-temp-file.c -o make-temp-file.o
Assertion failed: (Node2Index[SU->NodeNum] > Node2Index[I->Dep->NodeNum] && "Wrong topological sorting"), function InitDAGTopologicalSorting, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp, line 508.
../../../../llvm-gcc.src/libiberty/hashtab.c:955: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[4]: *** [hashtab.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [multi-do] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libiberty] Error 2
make: *** [all] Error 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55295
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Aug 2008 20:46:13 +0000 (20:46 +0000)]
remove the type checking logic already done by tblgen, just keep the
parts tblgen doesn't do (checking for constant, alloca, enclosing
function has gc marker). This passes dj! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55294
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Aug 2008 20:37:32 +0000 (20:37 +0000)]
simplify PseudoSourceValue printing a bit. Unnest all of PseudoSourceValue.cpp from the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55293
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 24 Aug 2008 19:19:55 +0000 (19:19 +0000)]
Move callseq_start above the call address load to allow load to be folded into the call node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55292
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 24 Aug 2008 18:51:20 +0000 (18:51 +0000)]
Print PseudoSourceValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55291
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Aug 2008 18:38:56 +0000 (18:38 +0000)]
we should use 'class' for non-pod types instead of 'struct' to
make it easier to deal with the VC++ struct/class bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55290
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Aug 2008 18:33:17 +0000 (18:33 +0000)]
add a hack to temporarily allow pseudo source values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Aug 2008 18:28:30 +0000 (18:28 +0000)]
make sure to flush the stream after dumping, to make sure it goes out immediately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55288
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sun, 24 Aug 2008 12:30:46 +0000 (12:30 +0000)]
Use additionnal include directory instead of ../ in #include.
Suggested by aKor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55282
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sun, 24 Aug 2008 11:56:40 +0000 (11:56 +0000)]
Updating VC++ project.
Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55279
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sun, 24 Aug 2008 03:18:23 +0000 (03:18 +0000)]
Update GC docs for clarified naming and AsmWriter refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55275
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 23 Aug 2008 23:39:31 +0000 (23:39 +0000)]
improve encapsulation of the BBExecutable set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55271
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 23 Aug 2008 23:36:38 +0000 (23:36 +0000)]
Switch an assortment of maps, sets and vectors to more efficient versions,
patch contributed by m-s!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55270
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 23 Aug 2008 22:53:13 +0000 (22:53 +0000)]
get MachineConstantPool off std::ostream, onto raw_ostream. It would be
really nice if someone converted MachineFunction::print to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55268
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 23 Aug 2008 22:52:27 +0000 (22:52 +0000)]
minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55267
91177308-0d34-0410-b5e6-
96231b3b80d8