Dan Gohman [Mon, 23 Mar 2009 20:20:43 +0000 (20:20 +0000)]
When unfolding a load during scheduling, the new operator node has
a data dependency on the load node, so it really needs a
data-dependence edge to the load node, even if the load previously
existed.
And add a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67554
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 23 Mar 2009 18:27:36 +0000 (18:27 +0000)]
Update test for pr3864.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67545
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 23 Mar 2009 18:24:37 +0000 (18:24 +0000)]
Fix PR3391 and PR3864. Reg allocator infinite looping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67544
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 17:39:36 +0000 (17:39 +0000)]
Don't set SUnit::hasPhysRegDefs to true unless the defs are
actually have uses, which reflects the way it's used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67540
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 16:23:01 +0000 (16:23 +0000)]
Fix canClobberPhysRegDefs to check all SDNodes grouped together
in an SUnit, instead of just the first one. This fix is needed
by some upcoming scheduler changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67531
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 16:10:52 +0000 (16:10 +0000)]
Add a new bit to SUnit to record whether a node has implicit physreg
defs, regardless of whether they are actually used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67528
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 15:57:19 +0000 (15:57 +0000)]
Now that errs() is properly non-buffered, there's no need to
explicitly flush it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67526
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 15:54:02 +0000 (15:54 +0000)]
Clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67525
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 15:50:52 +0000 (15:50 +0000)]
LoopVR is not CFGOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67524
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 15:49:37 +0000 (15:49 +0000)]
Enhance LiveValues to work on PHI operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67523
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 15:48:29 +0000 (15:48 +0000)]
Make getOperandNumForIncomingValue and getOperandNumForIncomingBlock
static member functions, and add getIncomingValueNumForOperand
and getIncomingBlockNumForOperand, which are the respective
inverses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67522
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 15:40:10 +0000 (15:40 +0000)]
Correct some comments. Operand numbers start at 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67518
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 23 Mar 2009 08:01:15 +0000 (08:01 +0000)]
Model inline asm constraint which ties an input to an output register as machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67512
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 23 Mar 2009 07:19:58 +0000 (07:19 +0000)]
Do not fold away subreg_to_reg if the source register has a sub-register index. That means the source register is taking a sub-register of a larger register. e.g. On x86
%RAX<def> = ...
%RAX<def> = SUBREG_TO_REG 0, %EAX:3<kill>, 3
The first def is defining RAX, not EAX so the top bits were not zero-extended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67511
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 06:46:20 +0000 (06:46 +0000)]
fix a bug Alexei Svitkine pointed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67510
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 05:55:36 +0000 (05:55 +0000)]
When we restore signal handlers, restore them back to what they
were when we came around, not to their default handler. This
should fix PR3848
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67509
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 05:42:29 +0000 (05:42 +0000)]
factorize signal registration, part of PR3848.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67508
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 05:02:44 +0000 (05:02 +0000)]
Fix a grammaro in a comment that Bill noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67507
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 04:53:34 +0000 (04:53 +0000)]
tt'ify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67505
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 04:52:53 +0000 (04:52 +0000)]
VC++ 6.0 is not future work :)
Do not recommend llvm::OStream anymore. Use raw_ostream or MemoryBuffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67504
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 23 Mar 2009 04:28:24 +0000 (04:28 +0000)]
Add comments explaining why there's only one register for
i8 return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67502
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 23 Mar 2009 03:45:56 +0000 (03:45 +0000)]
Missed this as part of r67451.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67500
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 19:22:53 +0000 (19:22 +0000)]
Fix PR3860 by correcting a predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67473
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 22 Mar 2009 11:33:16 +0000 (11:33 +0000)]
Add some explanations of how apint loads and stores
work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67471
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 22 Mar 2009 08:56:15 +0000 (08:56 +0000)]
Really should pass -dylib to the linker...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67469
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 22 Mar 2009 08:28:45 +0000 (08:28 +0000)]
A dylib should be built as a dylib and not a bundle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67468
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:18:18 +0000 (00:18 +0000)]
add method to access a template argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67458
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 21 Mar 2009 21:27:31 +0000 (21:27 +0000)]
Factorize out a concept - no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67454
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 21 Mar 2009 18:12:24 +0000 (18:12 +0000)]
Re-commit r67334 and r67349 with fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67451
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 06:55:54 +0000 (06:55 +0000)]
add a fastpath to ConstantExpr::getBitCast to handle the case when an obviously
unneeded bitcast is requested. This is common for frontends who just unconditionally
cast even if the target is often the right type already. THis prevents going into
getFoldedCast which switches on the opcode and does a bunch of other stuff before
doing the same opzn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67435
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 05:40:09 +0000 (05:40 +0000)]
add some inline methods for infix operators on sparse vectors,
tidy some df iteration stuff, patch by John Mosby!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67428
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 21 Mar 2009 00:05:07 +0000 (00:05 +0000)]
Removed AFGR32 register class
Handle odd registers allocation in FGR32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67422
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 20 Mar 2009 23:16:43 +0000 (23:16 +0000)]
Fix a few more indentation problems and an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67416
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 20 Mar 2009 22:42:55 +0000 (22:42 +0000)]
No functional changes. Fix indentation and whitespace only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 22:41:15 +0000 (22:41 +0000)]
Fix instcombine to not introduce undefined shifts when merging two
shifts together. This fixes PR3851.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67411
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 20 Mar 2009 21:53:29 +0000 (21:53 +0000)]
Don't load values out of global constants with weak
linkage: the value may be replaced with something
different at link time. (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67407
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Mar 2009 20:42:23 +0000 (20:42 +0000)]
Simplify this code; use a while instead of an if and a do-while.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67400
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 20 Mar 2009 18:03:34 +0000 (18:03 +0000)]
For inline asm output operand that matches an input. Encode the input operand index in the high bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67387
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 20 Mar 2009 14:10:20 +0000 (14:10 +0000)]
Fixed comment for libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67373
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 20 Mar 2009 13:49:20 +0000 (13:49 +0000)]
Fixed build warnings for unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67372
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 20 Mar 2009 13:42:20 +0000 (13:42 +0000)]
Reformatting. Inserted code comments. Cleaned interfaces.
Removed unncessary code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67371
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 20 Mar 2009 09:38:50 +0000 (09:38 +0000)]
Fixed the comment. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67370
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 20 Mar 2009 07:56:31 +0000 (07:56 +0000)]
Revert r67334 and r37349 which break "make check" on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67368
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 20 Mar 2009 05:08:24 +0000 (05:08 +0000)]
Apply the patch requested in PR3846.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67364
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Fri, 20 Mar 2009 05:06:58 +0000 (05:06 +0000)]
Added option to enable generating less precise mad (multiply addition)
for those architectures that support the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67363
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 20 Mar 2009 01:28:21 +0000 (01:28 +0000)]
The last use in a block that doesn't have successors
(return or unreachable) is a kill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67357
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 20 Mar 2009 00:14:09 +0000 (00:14 +0000)]
Fix typo's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67349
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 19 Mar 2009 23:26:52 +0000 (23:26 +0000)]
Fix the Win32 VS2008 build:
- Make type declarations match the struct/class keyword of the definition.
- Move AddSignalHandler into the namespace where it belongs.
- Correctly call functions from template base.
- Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67347
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 19 Mar 2009 20:30:06 +0000 (20:30 +0000)]
Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67335
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 19 Mar 2009 20:27:23 +0000 (20:27 +0000)]
More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67334
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 19 Mar 2009 19:09:48 +0000 (19:09 +0000)]
Renamed unittest files to have a consistent {Tt}est suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67326
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 19 Mar 2009 18:53:45 +0000 (18:53 +0000)]
SADDO and UADDO are commutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67319
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 19 Mar 2009 18:03:56 +0000 (18:03 +0000)]
Clear the cached cost when removing a function in
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67311
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 19 Mar 2009 17:29:04 +0000 (17:29 +0000)]
Add a liveness analysis pass for LLVM IR values. This computes
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67309
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 19 Mar 2009 17:23:29 +0000 (17:23 +0000)]
Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67307
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 19 Mar 2009 17:22:53 +0000 (17:22 +0000)]
This pass keeps a map of Instructions to Rank numbers,
and was deleting Instructions without clearing the
corresponding map entry. This led to nondeterministic
behavior if the same address got allocated to another
Instruction within a short time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67306
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Mar 2009 17:18:09 +0000 (17:18 +0000)]
Fix regression in 'tblgen -gen-clang-diags-defs': Emit the diagnostic kind instead of "DIAGNOSTICCONTROLLED".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67305
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Mar 2009 17:15:43 +0000 (17:15 +0000)]
Fix PEI to not walk off the start of a block when an updated instruction
is the first in its block. This is PR3842.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67304
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 19 Mar 2009 11:37:15 +0000 (11:37 +0000)]
Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67302
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 19 Mar 2009 06:31:22 +0000 (06:31 +0000)]
Fix a couple glaring whitespace issues. This file isn't internally consistent
either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67288
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 19 Mar 2009 05:51:39 +0000 (05:51 +0000)]
Remove strange extra semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67287
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 19 Mar 2009 05:21:56 +0000 (05:21 +0000)]
Add support to tablegen for naming the nodes themselves, not just the operands,
in selectiondag patterns. This is required for the upcoming shuffle_vector rewrite,
and as it turns out, cleans up a hack in the Alpha instruction info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67286
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 19 Mar 2009 02:12:28 +0000 (02:12 +0000)]
Added support for Mips O32 Calling Convention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67280
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Mar 2009 21:36:46 +0000 (21:36 +0000)]
tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67244
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Mar 2009 21:28:47 +0000 (21:28 +0000)]
'tblgen -gen-clang-diags-options' now outputs the OptionTable:
static const WarningOption OptionTable[] = {
{"unused-macros", DIAGS(UnusedMacrosDiags)}
...
};
This table is not yet properly sorted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67242
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Mar 2009 21:16:16 +0000 (21:16 +0000)]
Add another Clang TableGen-backend (-gen-clang-diags-options) for emitting
declarations for controlling groups of warnings. Currently this transforms:
def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;
into:
static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67239
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Mar 2009 20:36:45 +0000 (20:36 +0000)]
include the null at the end of a memorybuffer as part of the buffer.
This allows tblgen to handle include "foo.td" when the quote is exactly
the last character in a file. rdar://
6695728
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67232
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 18 Mar 2009 17:45:11 +0000 (17:45 +0000)]
These tests are now passing on Darwin because of r67139.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Mar 2009 16:48:45 +0000 (16:48 +0000)]
aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka Duncan)
for pointing this out :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67212
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Mar 2009 16:32:19 +0000 (16:32 +0000)]
Fix PR3826 - InstComb assert with vector shift, by not calling ComputeNumSignBits on a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67211
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Mar 2009 16:23:56 +0000 (16:23 +0000)]
add an assertion to make it clear that PHI nodes are not allowed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67210
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Wed, 18 Mar 2009 12:48:48 +0000 (12:48 +0000)]
Explicitly check for StoreInst, do not lose the chance to delete
unused loads or bitcasts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67202
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Wed, 18 Mar 2009 10:13:08 +0000 (10:13 +0000)]
Revert my previous change on Local.cpp, instead, fix the bug on scalarrepl.
If the instruction has no users, it is also not only used by debug info
and should not be deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67194
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 18 Mar 2009 09:38:28 +0000 (09:38 +0000)]
Add -relocation-model=pic so that the test works
both in Linux and Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67191
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Wed, 18 Mar 2009 07:56:13 +0000 (07:56 +0000)]
Fix a bug.
If I->use_empty(), this method should return false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67180
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Wed, 18 Mar 2009 06:24:04 +0000 (06:24 +0000)]
Added missing support for widening when splitting an unary op (PR3683)
and expanding a bit convert (PR3711). In both cases, we extract the
valid part of the widen vector and then do the conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67175
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 18 Mar 2009 02:43:01 +0000 (02:43 +0000)]
Add another test case for r64440.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67156
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 18 Mar 2009 00:44:45 +0000 (00:44 +0000)]
xfail these tests for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67143
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Mar 2009 00:43:52 +0000 (00:43 +0000)]
Disable the "call to immediate" optimization on x86-64. It is
not safe in general because the immediate could be an arbitrary
value that does not fit in a 32-bit pcrel displacement.
Conservatively fall back to loading the value into a register
and calling through it.
We still do the optzn on X86-32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67142
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Mar 2009 00:31:45 +0000 (00:31 +0000)]
Fix PR3807 by inserting 'insertelement' instructions in the normal dest of
an invoke instead of after the invoke (in its block), which is invalid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67139
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 18 Mar 2009 00:19:44 +0000 (00:19 +0000)]
A more proper -mtriple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67138
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 18 Mar 2009 00:16:36 +0000 (00:16 +0000)]
Temporary fix. I think Rafael wanted this to be Linux-only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67137
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Mar 2009 23:58:30 +0000 (23:58 +0000)]
LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
it is not APInt clean, but even when it is it needs to be evaluated carefully
to determine whether it is actually profitable.
This fixes a crash on PR3806
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67134
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2009 23:43:59 +0000 (23:43 +0000)]
Don't force promotion of return arguments on the callee.
Some architectures (like x86) don't require it.
This fixes bug 3779.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67132
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Mar 2009 21:15:18 +0000 (21:15 +0000)]
Add BUILTIN_EXPECT Support/Compiler macro.
- Use for exceptional buffer conditions in raw_ostream:write to shave
off a cycle or two.
- Please rename if you have a better one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67103
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Mar 2009 20:23:43 +0000 (20:23 +0000)]
this is apparently passing now. Evan/Dan, please check
to see if this is producing the expected code or not, I'm
not sure what the test was intended to check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67099
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 17 Mar 2009 19:47:21 +0000 (19:47 +0000)]
test case for rev. 67095.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Mar 2009 19:36:00 +0000 (19:36 +0000)]
Fix codegen to compute the size of an allocation by multiplying the
size by the array amount as an i32 value instead of promoting from
i32 to i64 then doing the multiply. Not doing this broke wrap-around
assumptions that the optimizers (validly) made. The ultimate real
fix for this is to introduce i64 version of alloca and remove mallocinst.
This fixes PR3829
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67093
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Mar 2009 17:55:15 +0000 (17:55 +0000)]
Remove a condition which is always true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67089
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 17 Mar 2009 17:08:25 +0000 (17:08 +0000)]
Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67085
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Tue, 17 Mar 2009 16:45:16 +0000 (16:45 +0000)]
CellSPU:
Revert inadvertent mis-fix of fneg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67084
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Mar 2009 16:14:59 +0000 (16:14 +0000)]
Minimal raw_ostream unit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67083
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 17 Mar 2009 15:46:15 +0000 (15:46 +0000)]
r66870 missed this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67082
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 17 Mar 2009 11:38:29 +0000 (11:38 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67080
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 17 Mar 2009 09:46:22 +0000 (09:46 +0000)]
Reapply r67049, with the test adjusted for darwin
(which produces "call L_f$stub" rather than "call f").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67079
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Tue, 17 Mar 2009 06:33:10 +0000 (06:33 +0000)]
Fix a problem with DAGCombine where we were building an illegal build
vector shuffle mask. Forced the mask to be built using i32. Note: this will
be irrelevant once vector_shuffle no longer takes a build vector for the
shuffle mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67076
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Mar 2009 02:45:40 +0000 (02:45 +0000)]
Recognize bswapl as bswap too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67072
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Mar 2009 02:17:27 +0000 (02:17 +0000)]
Recognize "bswapq" as an alternate spelling for the bswap instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67071
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Mar 2009 01:53:36 +0000 (01:53 +0000)]
raw_ostream: Return '*this' explicitly (instead of implicitly via
write) to expose more alias information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67070
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Mar 2009 01:36:56 +0000 (01:36 +0000)]
raw_ostream: Put all exceptional conditions in raw_ostream::write
under a single branch.
Also, add a FIXME for formatted output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67069
91177308-0d34-0410-b5e6-
96231b3b80d8