Dale Johannesen
dce1b3cb2f
Adjust loop per review feedback.
...
llvm-svn: 46569
2008-01-30 19:44:39 +00:00
Evan Cheng
07f3cd3242
A semi-gross fix for a debug info issue. When inserting the "function start" label (i.e. first label in the entry block) take care to insert it at the beginning of the block.
...
llvm-svn: 46568
2008-01-30 19:35:32 +00:00
Devang Patel
3467628b95
Supply appropriate arch info to darwin assembler.
...
llvm-svn: 46567
2008-01-30 19:19:31 +00:00
Dale Johannesen
916037c01a
Accept getelementptr starting at GV with all 0 indices as a
...
legitimate way of representing global variable GV in debug info.
llvm-svn: 46565
2008-01-30 19:00:21 +00:00
Devang Patel
bfc534c67f
Always put version numbers at the end because they are optional.
...
llvm-svn: 46563
2008-01-30 18:30:11 +00:00
Evan Cheng
918b9c9335
Even though InsertAtEndOfBasicBlock is an ugly hack it still deserves a proper name. Rename it to EmitInstrWithCustomInserter since it does not necessarily insert
...
instruction at the end.
llvm-svn: 46562
2008-01-30 18:18:23 +00:00
Devang Patel
1d270b0e12
Enable exception handling if it is supported.
...
llvm-svn: 46560
2008-01-30 17:43:03 +00:00
Dan Gohman
dd9be7d05e
Add a new PseudoSourceValue class, which will be used to help track
...
memory reference information in the backend. Most of this was written by
Florian Brander, cleanup and updating to TOT by me.
llvm-svn: 46556
2008-01-30 16:35:31 +00:00
Nick Lewycky
ccd60a90c5
Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
...
list just to see if whether the list is empty.
llvm-svn: 46555
2008-01-30 08:01:28 +00:00
Nick Lewycky
e3818dcc4e
Use empty() instead of comparing size() with zero.
...
llvm-svn: 46554
2008-01-30 07:54:16 +00:00
Nick Lewycky
719599d263
Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
...
llvm-svn: 46553
2008-01-30 07:45:37 +00:00
Tanya Lattner
bfeb583bfb
Pointers change size depending upon the target. Remove them to make the test more stable.
...
llvm-svn: 46548
2008-01-30 05:15:15 +00:00
Evan Cheng
84adda6b67
Skip over the label which marks the beginning of the function before inserting prologue code.
...
llvm-svn: 46546
2008-01-30 03:57:33 +00:00
Scott Michel
4a4f50da13
Back out mods to llvmAsmParser, incorrectly committed
...
llvm-svn: 46545
2008-01-30 03:10:00 +00:00
Scott Michel
ab3702fba9
More cleanups for CellSPU:
...
- Expand tabs... (poss 80-col violations, will get them later...)
- Consolidate logic for SelectDFormAddr and SelectDForm2Addr into a single
function, simplifying maintenance. Also reduced custom instruction
generation for SPUvecinsert/INSERT_MASK.
llvm-svn: 46544
2008-01-30 02:55:46 +00:00
Owen Anderson
ad9a347656
Make DSE much more aggressive by performing DCE earlier. Update a testcase to reflect this increased aggressiveness.
...
llvm-svn: 46542
2008-01-30 01:24:47 +00:00
Owen Anderson
7d21431939
Fix an issue where, under very specific circumstances, memdep could end up dereferencing the end
...
of one of its internal maps.
llvm-svn: 46541
2008-01-30 01:24:05 +00:00
Chris Lattner
83227e350d
Fix a bug where scalarrepl would discard offset if type would match.
...
In practice this can only happen on code with already undefined behavior,
but this is still a good thing to handle correctly.
llvm-svn: 46539
2008-01-30 00:39:15 +00:00
Dan Gohman
13d1327796
Factor the addressing mode and the load/store VT out of LoadSDNode
...
and StoreSDNode into their common base class LSBaseSDNode. Member
functions getLoadedVT and getStoredVT are replaced with the common
getMemoryVT to simplify code that will handle both loads and stores.
llvm-svn: 46538
2008-01-30 00:15:11 +00:00
Evan Cheng
618761903d
Work in progress. This patch *fixes* x86-64 calls which are modelled as StructRet but really should be return in registers, e.g. _Complex long double, some 128-bit aggregates. This is a short term solution that is necessary only because llvm, for now, cannot model i128 nor call's with multiple results.
...
Status: This only works for direct calls, and only the caller side is done. Disabled for now.
llvm-svn: 46527
2008-01-29 19:34:22 +00:00
Evan Cheng
6a35d0f26e
Update this test case.
...
llvm-svn: 46526
2008-01-29 19:30:05 +00:00
Duncan Sands
f451b75224
When expanding an operand, it's not the result value
...
type that matters but the operand type. This fixes
2008-01-08-IllegalCMP.ll which crashed with the new
legalize infrastructure because SETCC with result
type i8 and operand type i64 was being custom expanded
by the X86 backend. With this fix, the gcc build gets
as far as the first libcall.
llvm-svn: 46525
2008-01-29 19:29:08 +00:00
Chris Lattner
e08ec140e0
Don't let globalopt hack on volatile loads or stores.
...
llvm-svn: 46523
2008-01-29 19:01:37 +00:00
Ted Kremenek
acc17d1b24
Altered ctor for APSInt to accept an optional "isUnsigned" flag. Default
...
behavior is unchanged.
llvm-svn: 46521
2008-01-29 18:55:14 +00:00
Dan Gohman
aad233ea10
Use empty() instead of comparing size() with zero.
...
llvm-svn: 46514
2008-01-29 13:02:09 +00:00
Dan Gohman
630f3a713c
Fix a typo in a comment.
...
llvm-svn: 46513
2008-01-29 12:43:50 +00:00
Dan Gohman
f5b35ce0f9
Update this file for 2.0 syntax.
...
llvm-svn: 46512
2008-01-29 12:35:50 +00:00
Dan Gohman
6f9748b626
Add comments describing what the loop depth values mean. Also, make a
...
minor simplification to the loop depth calculation code.
llvm-svn: 46511
2008-01-29 12:12:40 +00:00
Dan Gohman
241714222a
Fix 80-col violations.
...
llvm-svn: 46510
2008-01-29 12:09:55 +00:00
Dan Gohman
daa38f69cf
Remove top-level const qualifiers from casts, avoiding associated
...
compiler warnings.
llvm-svn: 46509
2008-01-29 12:08:20 +00:00
Dan Gohman
4463225e99
Fix a typo in a comment.
...
llvm-svn: 46508
2008-01-29 12:07:11 +00:00
Dan Gohman
c1c27c9fda
Fix a typo in a comment.
...
llvm-svn: 46507
2008-01-29 12:06:33 +00:00
Dan Gohman
522401f26e
Add explicit keywords.
...
llvm-svn: 46506
2008-01-29 11:36:12 +00:00
Chris Lattner
f898e3cc8f
llvm.sqrt(-0.0) is defined.
...
llvm-svn: 46500
2008-01-29 07:00:44 +00:00
Chris Lattner
83f411c586
eliminate additions of 0.0 when they are obviously dead. This has to be careful to
...
avoid turning -0.0 + 0.0 -> -0.0 which is incorrect.
llvm-svn: 46499
2008-01-29 06:52:45 +00:00
Owen Anderson
2688087c9c
Add a testcase for eliminating memcpy's at the end of functions. Forgot to commit this with my last commit.
...
llvm-svn: 46497
2008-01-29 06:40:32 +00:00
Chris Lattner
35f063e37c
Add target triples to these so they don't fail on linux.
...
llvm-svn: 46496
2008-01-29 06:26:07 +00:00
Duncan Sands
390baa691d
Use getPreferredAlignmentLog or getPreferredAlignment
...
to get the alignment of global variables, rather than
using hand-made versions.
llvm-svn: 46495
2008-01-29 06:23:44 +00:00
Owen Anderson
96b9e5423a
Add support for eliminating memcpy's at the end of functions. Also fix some errors I noticed in
...
the handling of eliminating stores to byval arguments.
llvm-svn: 46494
2008-01-29 06:18:36 +00:00
Duncan Sands
47bcca5cea
This would be better done as an executable test.
...
llvm-svn: 46493
2008-01-29 06:04:54 +00:00
Duncan Sands
84bc852b52
After recent changes we fail to optimize this test
...
sufficiently to have it pass. I'm removing it from
the testsuite and adding it to PR452 instead.
llvm-svn: 46492
2008-01-29 05:57:23 +00:00
Owen Anderson
fc41146d15
RegAllocBigBlock doesn't need LiveVariables either.
...
llvm-svn: 46488
2008-01-29 02:32:13 +00:00
Scott Michel
81b8a391a6
Fix to bug 1951: tblgen gratuitously renames variables when no temporary was
...
generated. This feature would only show up in fairly complex patterns, such
as this one in CellSPU:
def : Pat<(add (SPUhi tconstpool:$in, 0), (SPUlo tconstpool:$in, 0)),
(IOHLlo (ILHUhi tconstpool:$in), tconstpool:$in)>;
which generated the following emit code:
SDNode *Emit_0(const SDOperand &N, unsigned Opc0, unsigned Opc1, MVT::ValueType VT0, MVT::ValueType VT1) DISABLE_INLINE {
SDOperand N0 = N.getOperand(0);
SDOperand N00 = N0.getOperand(0);
SDOperand N01 = N0.getOperand(1);
SDOperand N1 = N.getOperand(1);
SDOperand N10 = N1.getOperand(0);
SDOperand N11 = N1.getOperand(1);
SDOperand Tmp3(CurDAG->getTargetNode(Opc0, VT0, N00), 0);
return CurDAG->SelectNodeTo(N.Val, Opc1, VT1, Tmp3, Tmp2); /* Tmp2 s/b N00 */
}
Tested against the test suites without incident.
llvm-svn: 46487
2008-01-29 02:29:31 +00:00
Nate Begeman
3eeac138f9
Properly expand extract-element for non-power-of-2 codegen
...
llvm-svn: 46486
2008-01-29 02:24:00 +00:00
Dale Johannesen
f12104ce4b
Handle 'X' constraint in asm's better.
...
llvm-svn: 46485
2008-01-29 02:21:21 +00:00
Devang Patel
86ff705c22
Filter loops that subtract induction variables.
...
These loops are not yet handled.
Fix PR 1912.
llvm-svn: 46484
2008-01-29 02:20:41 +00:00
Scott Michel
dc780aeb57
Overhaul Cell SPU's addressing mode internals so that there are now
...
only two addressing mode nodes, SPUaform and SPUindirect (vice the
three previous ones, SPUaform, SPUdform and SPUxform). This improves
code somewhat because we now avoid using reg+reg addressing when
it can be avoided. It also simplifies the address selection logic,
which was the main point for doing this.
Also, for various global variables that would be loaded using SPU's
A-form addressing, prefer D-form offs[reg] addressing, keeping the
base in a register if the variable is used more than once.
llvm-svn: 46483
2008-01-29 02:16:57 +00:00
Devang Patel
51fde22367
New test.
...
llvm-svn: 46479
2008-01-29 01:10:04 +00:00
Bill Wendling
839e21bce4
Add test to make sure that #pragma mark/error doesn't error if there are
...
unbalanced quotes.
llvm-svn: 46476
2008-01-29 00:41:29 +00:00
Ted Kremenek
752475ffa1
Added destructor for template class FoldingSetNodeWrapper.
...
Added getValue() to FoldingSetNodeWrapper.
llvm-svn: 46465
2008-01-28 22:05:23 +00:00