Devang Patel
8df7cc1119
Add comment explaining what is lower level analysis pass.
...
llvm-svn: 46658
2008-02-02 01:43:30 +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
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
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
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
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
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
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
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
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
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
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
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
242223abd5
Add explicit keywords.
...
llvm-svn: 46506
2008-01-29 11:36:12 +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
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