Evan Cheng
efd142a920
SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
...
Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.
llvm-svn: 46659
2008-02-02 04:07:54 +00:00
Devang Patel
8df7cc1119
Add comment explaining what is lower level analysis pass.
...
llvm-svn: 46658
2008-02-02 01:43:30 +00:00
Devang Patel
1a06334403
Do not strip symbols when EH is ON.
...
llvm-svn: 46657
2008-02-02 01:32:38 +00:00
Gordon Henriksen
931e121ad1
Fixing a bug creating floating point constants of type other
...
than double through the C bindings. Thanks to Tomas Lindquist
Olsen for reporting it.
llvm-svn: 46656
2008-02-02 01:07:50 +00:00
Evan Cheng
4e7ff941f1
Frame index can be negative.
...
llvm-svn: 46655
2008-02-02 00:17:00 +00:00
Lauro Ramos Venancio
192c07b727
CBackend: Implement unaligned load/store.
...
llvm-svn: 46646
2008-02-01 21:25:59 +00:00
Duncan Sands
9aa789fda3
Don't drop function/call return attributes like 'nounwind'.
...
llvm-svn: 46645
2008-02-01 20:37:16 +00:00
Evan Cheng
124c3525d1
Update llvm.dbg.func.start.
...
llvm-svn: 46636
2008-02-01 09:12:11 +00:00
Evan Cheng
d6e44ab5ec
Remove the nasty LABEL hack with a much less evil one. Now llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before.
...
llvm-svn: 46635
2008-02-01 09:10:45 +00:00
Evan Cheng
263070ea2b
Rename RecordLabel to RecordSourceLine because that's what it is doing.
...
llvm-svn: 46628
2008-02-01 02:05:57 +00:00
Anton Korobeynikov
d47eedb7e9
Add convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov!
...
llvm-svn: 46625
2008-01-31 23:02:33 +00:00
Evan Cheng
27b32b87ed
Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and re-commit.
...
llvm-svn: 46623
2008-01-31 21:00:00 +00:00
Dale Johannesen
8ef8f24c40
Chris' change to print an approximation to long doubles
...
exposed a bug in APFloat's long double->double conversion of
NaNs. Broke several things in the ieee part of gcc testsuite.
llvm-svn: 46617
2008-01-31 18:34:01 +00:00
Anton Korobeynikov
bf5435b91d
Reapply the patch with fix.
...
llvm-svn: 46615
2008-01-31 17:43:25 +00:00
Chris Lattner
ed55b5bd97
revert anton's recent stringmap patch, which breaks clang.
...
llvm-svn: 46614
2008-01-31 17:24:51 +00:00
Anton Korobeynikov
816bcaba2b
Make StringMap to be more STL'ish. Patch by Mikhail Glushenkov!
...
llvm-svn: 46612
2008-01-31 12:30:40 +00:00
Anton Korobeynikov
14dd514eff
Whitespace cleanup
...
llvm-svn: 46611
2008-01-31 12:10:41 +00:00
Evan Cheng
f4f1d44779
Add a comment for a nasty short term hack.
...
llvm-svn: 46610
2008-01-31 10:05:13 +00:00
Evan Cheng
1c6c16ea11
Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.
...
llvm-svn: 46609
2008-01-31 09:59:15 +00:00
Christopher Lamb
0592cf7e74
Allow ComplexExpressions in InstrInfo.td files to be slightly more... complex! ComplexExpressions can now have attributes which affect how TableGen interprets
...
the pattern when generating matchin code.
The first (and currently, only) attribute causes the immediate parent node of the ComplexPattern operand to be passed into the matching code rather than the node at the root of the entire DAG containing the pattern.
llvm-svn: 46606
2008-01-31 07:27:46 +00:00
Christopher Lamb
58ffa8c57a
Add more thorough error checking for NULL register classes.
...
llvm-svn: 46605
2008-01-31 07:09:08 +00:00
Evan Cheng
6332dbec69
Add x86 specific getFrameIndexOffset(). This fixes local variable debugging info.
...
llvm-svn: 46598
2008-01-31 04:06:00 +00:00
Evan Cheng
a41d3bcb12
MRegisterInfo::getLocation() is a really bad idea. Its function is to calculate the offset from frame pointer to a stack slot and then storing the delta in a MachineLocation object. The name is bad (it implies a getter), and MRegisterInfo doesn't need to know about MachineLocation.
...
Replace getLocation() with getFrameIndexOffset() which returns the delta from frame pointer to stack slot. Dwarf writer can then use the information for whatever it wants.
llvm-svn: 46597
2008-01-31 03:37:28 +00:00
Evan Cheng
3c0486fb38
Makes the same change in ppc backend: avoid inserting prologue before debug labels.
...
llvm-svn: 46596
2008-01-31 03:33:38 +00:00
Dan Gohman
a65951fef0
Avoid unnecessarily casting away const, fixing a FIXME.
...
llvm-svn: 46591
2008-01-31 01:05:10 +00:00
Dan Gohman
ed346f2ed5
Avoid unnecessarily casting away const.
...
llvm-svn: 46590
2008-01-31 01:01:48 +00:00
Dan Gohman
c2fdeee1ed
Fix a typo in a comment.
...
llvm-svn: 46588
2008-01-31 00:44:33 +00:00
Dan Gohman
9ba4d76816
Rename ISD::FLT_ROUNDS to ISD::FLT_ROUNDS_ to avoid conflicting
...
with the real FLT_ROUNDS (defined in <float.h>).
llvm-svn: 46587
2008-01-31 00:41:03 +00:00
Evan Cheng
4863fcc3eb
Also avoid adding callee save code before debug labels.
...
llvm-svn: 46586
2008-01-31 00:27:49 +00:00
Dan Gohman
3646fdda67
Create a new class, MemOperand, for describing memory references
...
in the backend. Introduce a new SDNode type, MemOperandSDNode, for
holding a MemOperand in the SelectionDAG IR, and add a MemOperand
list to MachineInstr, and code to manage them. Remove the offset
field from SrcValueSDNode; uses of SrcValueSDNode that were using
it are all all using MemOperandSDNode now.
Also, begin updating some getLoad and getStore calls to use the
PseudoSourceValue objects.
Most of this was written by Florian Brander, some
reorganization and updating to TOT by me.
llvm-svn: 46585
2008-01-31 00:25:39 +00:00
Evan Cheng
b9b740119d
Fixed a bug in MergeValueInAsValue() pointed out by David Greene. Replace val# with previous liverange's.
...
llvm-svn: 46579
2008-01-30 22:44:55 +00:00
Evan Cheng
a3395a61cc
Treat the label for the first @llvm.dbg.stoppoint the same way as the dbg_func_start label. Make sure nothing else is inserted before them.
...
Note this solution might be somewhat fragile since ISD::LABEL may be used for other
purposes. If that ends up to be an issue, we may need to introduce a different node
for debug labels.
llvm-svn: 46571
2008-01-30 20:08:35 +00:00
Dale Johannesen
19cf69ff9d
Adjust loop per review feedback.
...
llvm-svn: 46569
2008-01-30 19:44:39 +00:00
Evan Cheng
a3ff8e6110
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
540d03bda9
Supply appropriate arch info to darwin assembler.
...
llvm-svn: 46567
2008-01-30 19:19:31 +00:00
Dale Johannesen
56d4903db5
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
ebde4b34aa
Always put version numbers at the end because they are optional.
...
llvm-svn: 46563
2008-01-30 18:30:11 +00:00
Evan Cheng
29cfb67e28
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
b432c9e866
Enable exception handling if it is supported.
...
llvm-svn: 46560
2008-01-30 17:43:03 +00:00
Dan Gohman
02b6792dd4
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
6b016703a9
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
625e89c8b0
Use empty() instead of comparing size() with zero.
...
llvm-svn: 46554
2008-01-30 07:54:16 +00:00
Nick Lewycky
0e3a5cb14a
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
cee9d51be9
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
ed17ef7e18
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
cd2bb20b5f
Back out mods to llvmAsmParser, incorrectly committed
...
llvm-svn: 46545
2008-01-30 03:10:00 +00:00
Scott Michel
bb713ae0c7
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
4e4b116750
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
b255ada55b
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
b9e5b8fb9e
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
47a7d6fafe
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
084a1cdcdd
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
a13e5146d4
Update this test case.
...
llvm-svn: 46526
2008-01-29 19:30:05 +00:00
Duncan Sands
032a5d2690
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
ade0abb498
Don't let globalopt hack on volatile loads or stores.
...
llvm-svn: 46523
2008-01-29 19:01:37 +00:00
Ted Kremenek
31cfda76cd
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
70de4cb1cd
Use empty() instead of comparing size() with zero.
...
llvm-svn: 46514
2008-01-29 13:02:09 +00:00
Dan Gohman
cf8827a282
Fix a typo in a comment.
...
llvm-svn: 46513
2008-01-29 12:43:50 +00:00
Dan Gohman
d63d9feadd
Update this file for 2.0 syntax.
...
llvm-svn: 46512
2008-01-29 12:35:50 +00:00
Dan Gohman
06d31580fb
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
929391a19a
Fix 80-col violations.
...
llvm-svn: 46510
2008-01-29 12:09:55 +00:00
Dan Gohman
b456a15a5b
Remove top-level const qualifiers from casts, avoiding associated
...
compiler warnings.
llvm-svn: 46509
2008-01-29 12:08:20 +00:00
Dan Gohman
cd170a7017
Fix a typo in a comment.
...
llvm-svn: 46508
2008-01-29 12:07:11 +00:00
Dan Gohman
57eb1b5711
Fix a typo in a comment.
...
llvm-svn: 46507
2008-01-29 12:06:33 +00:00
Dan Gohman
242223abd5
Add explicit keywords.
...
llvm-svn: 46506
2008-01-29 11:36:12 +00:00
Chris Lattner
00d7cb9942
llvm.sqrt(-0.0) is defined.
...
llvm-svn: 46500
2008-01-29 07:00:44 +00:00
Chris Lattner
17819d971e
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
95bf1d4d7b
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
f4e5e556fd
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
05837edae7
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
48d37806e2
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
1e7ec74ad3
This would be better done as an executable test.
...
llvm-svn: 46493
2008-01-29 06:04:54 +00:00
Duncan Sands
aaaeee2ac0
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
5aa1615add
RegAllocBigBlock doesn't need LiveVariables either.
...
llvm-svn: 46488
2008-01-29 02:32:13 +00:00
Scott Michel
167502a508
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
ef33767efb
Properly expand extract-element for non-power-of-2 codegen
...
llvm-svn: 46486
2008-01-29 02:24:00 +00:00
Dale Johannesen
2b3bc30420
Handle 'X' constraint in asm's better.
...
llvm-svn: 46485
2008-01-29 02:21:21 +00:00
Devang Patel
67fa0521b6
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
ceae3bbf4d
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
7bcf58f8a4
New test.
...
llvm-svn: 46479
2008-01-29 01:10:04 +00:00
Bill Wendling
f0b7d4993f
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
9fd577a22c
Added destructor for template class FoldingSetNodeWrapper.
...
Added getValue() to FoldingSetNodeWrapper.
llvm-svn: 46465
2008-01-28 22:05:23 +00:00
Lauro Ramos Venancio
0f54a09163
Simplify the code and fix a typo.
...
llvm-svn: 46458
2008-01-28 20:02:51 +00:00
Duncan Sands
2a80ba8c7c
Pure/const functions with ByVal parameters cannot
...
be marked readonly either.
llvm-svn: 46456
2008-01-28 19:25:47 +00:00
Lauro Ramos Venancio
99929d20e7
Fix fpcmp infinite loop when comparing "29-266" with "29-268".
...
llvm-svn: 46455
2008-01-28 18:23:23 +00:00
Chris Lattner
a116071547
this test is now compiled into the right thing.
...
llvm-svn: 46454
2008-01-28 17:38:46 +00:00
Duncan Sands
9f6f4d39f7
Unbreak builds with differing object and source
...
directories. Patch by Sam Bishop.
llvm-svn: 46453
2008-01-28 17:38:30 +00:00
Duncan Sands
54af54fe08
Make this more likely to be passed byval.
...
llvm-svn: 46451
2008-01-28 10:35:11 +00:00
Bill Wendling
96a1b810ec
If the function has no machine instructions, then emit a "nop" so that
...
the function label isn't associated with something it shouldn't be.
llvm-svn: 46449
2008-01-28 09:15:03 +00:00
Chris Lattner
a8b4a56061
Transform calls to memcpy into llvm.memcpy calls, patch by Eli Friedman.
...
llvm-svn: 46433
2008-01-28 04:41:43 +00:00
Chris Lattner
6379fc68ff
reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE
...
output. Patch contributed by Sam Bishop!
llvm-svn: 46432
2008-01-28 04:18:41 +00:00
Nick Lewycky
8ea81e8ba4
Handle some more combinations of extend and icmp. Fixes PR1940.
...
llvm-svn: 46431
2008-01-28 03:48:02 +00:00
Chris Lattner
710b441174
Fix PR1932 by disabling an xform invalid for fdiv.
...
llvm-svn: 46429
2008-01-28 00:58:18 +00:00
Chris Lattner
2f2427e5aa
make handling of overflow and undefined results much more clear.
...
Patch by Eli Friedman, thanks!
llvm-svn: 46428
2008-01-28 00:36:27 +00:00
Chris Lattner
1b706dd680
Fix PR1938 by forcing the code that uses an undefined value to branch one
...
way or the other. Rewriting the code itself prevents subsequent analysis
passes from making contradictory conclusions about the code that could
cause an infeasible path to be made feasible.
llvm-svn: 46427
2008-01-28 00:32:30 +00:00
Chris Lattner
9422fb70fe
Always for PACKAGEVERSION to 'mainline' for teh llvm web page.
...
llvm-svn: 46425
2008-01-27 23:43:26 +00:00
Chris Lattner
2ee91f4300
Fix PowerPC/./2007-10-18-PtrArithmetic.ll
...
llvm-svn: 46424
2008-01-27 23:32:17 +00:00
Chris Lattner
34d6b6a319
Update this test. Due to dag combiner improvements, we now compile
...
f7/f11 to:
_f7:
eor r0, r0, #2 , 2 @ -2147483648
bx lr
_f11:
bic r0, r0, #2 , 2 @ -2147483648
bx lr
instead of:
_f7:
fmsr s0, r0
fnegs s0, s0
fmrs r0, s0
bx lr
_f11:
fmsr s0, r0
fabss s0, s0
fmrs r0, s0
bx lr
llvm-svn: 46423
2008-01-27 23:26:37 +00:00
Chris Lattner
d0496d0433
fix a crash on CodeGen/X86/vector-rem.ll
...
llvm-svn: 46422
2008-01-27 23:21:58 +00:00
Chris Lattner
d329270854
Add support for frameworks. Patch by Shantonu Sen!
...
llvm-svn: 46421
2008-01-27 22:58:59 +00:00
Owen Anderson
9a8c890c02
Reg alloc doesn't really need LiveVariables.
...
llvm-svn: 46420
2008-01-27 22:00:00 +00:00
Owen Anderson
e913aad94e
Fixes for BreakCriticalMachineCodeEdge by Fernando.
...
llvm-svn: 46419
2008-01-27 19:51:03 +00:00
Nick Lewycky
efb16f7057
Be more careful modifying the use_list while also iterating through it.
...
llvm-svn: 46417
2008-01-27 18:35:00 +00:00
Duncan Sands
053c9871cd
Revert r46393: readonly/readnone functions are no
...
longer allowed to write through byval arguments.
llvm-svn: 46416
2008-01-27 18:12:58 +00:00
Chris Lattner
888560d62c
Implement some dag combines that allow doing fneg/fabs/fcopysign in integer
...
registers if used by a bitconvert or using a bitconvert. This allows us to
avoid constant pool loads and use cheaper integer instructions when the
values come from or end up in integer regs anyway. For example, we now
compile CodeGen/X86/fp-in-intregs.ll to:
_test1:
movl $2147483648, %eax
xorl 4(%esp), %eax
ret
_test2:
movl $1065353216, %eax
orl 4(%esp), %eax
andl $3212836864, %eax
ret
Instead of:
_test1:
movss 4(%esp), %xmm0
xorps LCPI2_0, %xmm0
movd %xmm0, %eax
ret
_test2:
movss 4(%esp), %xmm0
andps LCPI3_0, %xmm0
movss LCPI3_1, %xmm1
andps LCPI3_2, %xmm1
orps %xmm0, %xmm1
movd %xmm1, %eax
ret
bitconverts can happen due to various calling conventions that require
fp values to passed in integer regs in some cases, e.g. when returning
a complex.
llvm-svn: 46414
2008-01-27 17:42:27 +00:00
Chris Lattner
2e4719ec55
add a note
...
llvm-svn: 46413
2008-01-27 07:31:41 +00:00
Chris Lattner
d05d2011d0
Use fldz and fld1 for long double constants instead of a constant pool load.
...
llvm-svn: 46411
2008-01-27 06:19:31 +00:00
Chris Lattner
5e8bf5673b
make isExactlyValue work for long double.
...
llvm-svn: 46410
2008-01-27 06:19:08 +00:00
Bill Wendling
8c491162d2
The CorrelatedExpressions pass is now no more.
...
llvm-svn: 46409
2008-01-27 06:13:32 +00:00
Bill Wendling
60361a16f8
The CorrelatedExpressionElimination pass is known to be buggy. Remove it.
...
This fixes PR1769.
llvm-svn: 46408
2008-01-27 06:11:41 +00:00
Chris Lattner
f1a6c9fe86
For long double constants, print an approximation of their value to the .s file to make it easier to read.
...
llvm-svn: 46407
2008-01-27 06:09:28 +00:00
Chris Lattner
fa1e7eef30
Fold fptrunc(add (fpextend x), (fpextend y)) -> add(x,y), as GCC does.
...
llvm-svn: 46406
2008-01-27 05:29:54 +00:00
Chris Lattner
2dd23b9f32
Add some notes.
...
llvm-svn: 46405
2008-01-26 20:12:07 +00:00
Chris Lattner
250789f1bd
Remove some code for inferring alignment info from the x86 backend
...
now that the dag combiner does it.
llvm-svn: 46404
2008-01-26 20:07:42 +00:00
Chris Lattner
596704405f
New test to verify that "merging 4 loads into a vec load" continues to work and
...
continues to infer alignment info.
llvm-svn: 46403
2008-01-26 20:06:45 +00:00
Chris Lattner
1472c7fe76
make this 64-bit safe
...
llvm-svn: 46402
2008-01-26 19:50:30 +00:00
Chris Lattner
e30e33af4f
Infer alignment of loads and increase their alignment when we can tell they are
...
from the stack. This allows us to compile stack-align.ll to:
_test:
movsd LCPI1_0, %xmm0
movapd %xmm0, %xmm1
*** andpd 4(%esp), %xmm1
andpd _G, %xmm0
addsd %xmm1, %xmm0
movl 20(%esp), %eax
movsd %xmm0, (%eax)
ret
instead of:
_test:
movsd LCPI1_0, %xmm0
** movsd 4(%esp), %xmm1
** andpd %xmm0, %xmm1
andpd _G, %xmm0
addsd %xmm1, %xmm0
movl 20(%esp), %eax
movsd %xmm0, (%eax)
ret
llvm-svn: 46401
2008-01-26 19:45:50 +00:00
Chris Lattner
364963d41c
remove a useless xfailed test.
...
llvm-svn: 46400
2008-01-26 19:35:46 +00:00
Duncan Sands
dc157a4f0a
Invert this test, because it is wrong if we allow
...
readonly functions to use byval parameters as local
storage (how much do we want this?).
llvm-svn: 46399
2008-01-26 12:33:01 +00:00
Bill Wendling
1a17ef02c8
If there's no instructions being emitted on X86 for a function, emit a
...
nop. Emit the nop directly for PPC.
llvm-svn: 46398
2008-01-26 09:03:52 +00:00
Bill Wendling
a60c61dc1a
Need to convert to LLVM code and not C.
...
llvm-svn: 46397
2008-01-26 06:56:08 +00:00
Bill Wendling
0b973210f8
Rename the .c to .ll
...
llvm-svn: 46396
2008-01-26 06:53:40 +00:00
Bill Wendling
0f69974fdb
Move testcase to the code gen directory.
...
llvm-svn: 46395
2008-01-26 06:53:06 +00:00
Bill Wendling
5079483957
If there are no machine instructions emitted for a function, then insert
...
a "nop" instruction so that we don't have the function's label associated
with something that it's not supposed to be associated with.
llvm-svn: 46394
2008-01-26 06:51:24 +00:00
Duncan Sands
c4dc3dc3a2
Create an explicit copy for byval parameters even
...
when inlining a readonly function.
llvm-svn: 46393
2008-01-26 06:41:49 +00:00
Bill Wendling
0862e3421d
If we have a function like this:
...
void bork() {
int *address = 0;
*address = 0;
}
It's compiled into LLVM code that looks like this:
define void @bork() noreturn nounwind {
entry:
unreachable
}
This is bad on some platforms (like PPC) because it will generate the label for
the function but no body. The label could end up being associated with some
non-code related stuff, like a section. This places a "trap" instruction if the
SimplifyCFG pass removed all code from the function leaving only one
"unreachable" instruction.
llvm-svn: 46387
2008-01-26 01:43:44 +00:00
Devang Patel
8797851fbe
Add another testcase.
...
llvm-svn: 46385
2008-01-26 01:21:48 +00:00
Chris Lattner
31e9edce1c
Fix some bugs in SimplifyNodeWithTwoResults where it would call deletenode to
...
delete a node even if it was not dead in some cases. Instead, just add it to
the worklist. Also, make sure to use the CombineTo methods, as it was doing
things that were unsafe: the top level combine loop could touch dangling memory.
This fixes CodeGen/Generic/2008-01-25-dag-combine-mul.ll
llvm-svn: 46384
2008-01-26 01:09:19 +00:00
Chris Lattner
720d8999c7
don't bother making x&-1 only to simplify it in dag combine. This commonly occurs expanding i64 ops.
...
llvm-svn: 46383
2008-01-26 01:05:42 +00:00
Evan Cheng
2df73ea849
New test case.
...
llvm-svn: 46382
2008-01-26 00:35:43 +00:00
Chris Lattner
cb3cf546c3
reduce indentation
...
llvm-svn: 46377
2008-01-25 23:34:24 +00:00
Chris Lattner
0af861c43a
add a testcase for a bug Duncan pointed out.
...
llvm-svn: 46372
2008-01-25 22:36:24 +00:00
Duncan Sands
f52faf9a64
Do this more neatly.
...
llvm-svn: 46369
2008-01-25 22:06:51 +00:00
Chris Lattner
6532001fc0
Reorder a field to reduce the size of StackObject. Note that this
...
may require a clean rebuild on leopard. :(
llvm-svn: 46360
2008-01-25 17:49:41 +00:00
Duncan Sands
e5433a90ce
Test for PR1942.
...
llvm-svn: 46357
2008-01-25 17:36:44 +00:00
Chris Lattner
fc80996a21
fix long lines.
...
llvm-svn: 46355
2008-01-25 17:24:52 +00:00
Chris Lattner
919ad97c01
JITEmitter.cpp was trying to sync the icache for function stubs, but
...
was actually passing a completely incorrect size to sys_icache_invalidate.
Instead of having the JITEmitter do this (which doesn't have the correct
size), just make the target sync its own stubs.
llvm-svn: 46354
2008-01-25 16:41:09 +00:00
Duncan Sands
d7d4d2b522
Add more assertions to catch accesses outside of
...
arrays. Also, as a convenience, don't barf, just
return false, if someone calls isTruncStoreLegal
or isLoadXLegal with an extended type for the in
memory type.
llvm-svn: 46352
2008-01-25 10:20:53 +00:00
Owen Anderson
6af19fd1e2
DeadStoreElimination can treat byval parameters as if there were alloca's for the purpose of removing end-of-function stores.
...
llvm-svn: 46351
2008-01-25 10:10:33 +00:00
Chris Lattner
fe34236d73
move this field back. Moving the field causes miscompilations (!) of voronoi and others.
...
llvm-svn: 46350
2008-01-25 07:29:34 +00:00
Chris Lattner
2d7a830ff3
Add skeletal code to increase the alignment of loads and stores when
...
we can infer it. This will eventually help stuff, though it doesn't
do much right now because all fixed FI's have an alignment of 1.
llvm-svn: 46349
2008-01-25 07:20:16 +00:00
Chris Lattner
6068832dbe
move MachineFrameInfo::CreateFixedObject out of line, give MachineFrameInfo
...
a reference to TargetFrameInfo. Rearrange order of fields in StackObject to
save a word.
llvm-svn: 46348
2008-01-25 07:19:06 +00:00
Chris Lattner
da52d9e093
include alignment and volatility information in -view-*-dags output
...
llvm-svn: 46347
2008-01-25 06:40:45 +00:00
Chris Lattner
c0afc54c7f
add a fixme.
...
llvm-svn: 46346
2008-01-25 06:20:20 +00:00
Chris Lattner
f4523c35cb
optimize fxor like for
...
llvm-svn: 46345
2008-01-25 06:14:17 +00:00
Chris Lattner
84ab724e06
Add target-specific dag combines for FAND(x,0) and FOR(x,0). This allows
...
us to compile:
double test(double X) {
return copysign(0.0, X);
}
into:
_test:
andpd LCPI1_0(%rip), %xmm0
ret
instead of:
_test:
pxor %xmm1, %xmm1
andpd LCPI1_0(%rip), %xmm1
movapd %xmm0, %xmm2
andpd LCPI1_1(%rip), %xmm2
movapd %xmm1, %xmm0
orpd %xmm2, %xmm0
ret
llvm-svn: 46344
2008-01-25 05:46:26 +00:00
Anton Korobeynikov
fcde616864
Provide correct DWARF register numbering for debug information emission on x86-32/Darwin.
...
This should fix bunch of issues.
llvm-svn: 46337
2008-01-25 00:34:13 +00:00
Devang Patel
0c4e4da654
New test.
...
llvm-svn: 46333
2008-01-24 23:55:34 +00:00
Chris Lattner
8d83271b25
Don't dump the function!
...
llvm-svn: 46320
2008-01-24 19:28:11 +00:00
Chris Lattner
23dd05514e
getUnderlyingObject can return null, handle this.
...
llvm-svn: 46318
2008-01-24 19:07:10 +00:00