Commit Graph

36654 Commits

Author SHA1 Message Date
Dale Johannesen
b63fa050b7 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 18:34:01 +00:00
Anton Korobeynikov
713a13906a Reapply the patch with fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 17:43:25 +00:00
Chris Lattner
a91cfa9cd0 revert anton's recent stringmap patch, which breaks clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 17:24:51 +00:00
Anton Korobeynikov
f429a519c8 Make StringMap to be more STL'ish. Patch by Mikhail Glushenkov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46612 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 12:30:40 +00:00
Anton Korobeynikov
75fb496fc6 Whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 12:10:41 +00:00
Evan Cheng
7bdc5f734f Add a comment for a nasty short term hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46610 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 10:05:13 +00:00
Evan Cheng
bb81d97feb 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46609 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 09:59:15 +00:00
Christopher Lamb
8535624739 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 07:27:46 +00:00
Christopher Lamb
175e81598a Add more thorough error checking for NULL register classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 07:09:08 +00:00
Evan Cheng
c67aa7cbd5 Add x86 specific getFrameIndexOffset(). This fixes local variable debugging info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 04:06:00 +00:00
Evan Cheng
72bebb9205 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46597 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 03:37:28 +00:00
Evan Cheng
0a75538a68 Makes the same change in ppc backend: avoid inserting prologue before debug labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46596 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 03:33:38 +00:00
Dan Gohman
fa9b80eb64 Avoid unnecessarily casting away const, fixing a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46591 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 01:05:10 +00:00
Dan Gohman
bbfb9c57c7 Avoid unnecessarily casting away const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46590 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 01:01:48 +00:00
Dan Gohman
35e9f7d711 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46588 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 00:44:33 +00:00
Dan Gohman
1a0248690a Rename ISD::FLT_ROUNDS to ISD::FLT_ROUNDS_ to avoid conflicting
with the real FLT_ROUNDS (defined in <float.h>).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 00:41:03 +00:00
Evan Cheng
00dff8dda2 Also avoid adding callee save code before debug labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46586 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 00:27:49 +00:00
Dan Gohman
c6c391dadd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46585 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31 00:25:39 +00:00
Evan Cheng
294e652491 Fixed a bug in MergeValueInAsValue() pointed out by David Greene. Replace val# with previous liverange's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 22:44:55 +00:00
Evan Cheng
965d1b4bba 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46571 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 20:08:35 +00:00
Dale Johannesen
43b8f3b7d3 Adjust loop per review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 19:44:39 +00:00
Evan Cheng
6b2cf285bd 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 19:35:32 +00:00
Devang Patel
59c8d8ae89 Supply appropriate arch info to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 19:19:31 +00:00
Dale Johannesen
7757fff6ae Accept getelementptr starting at GV with all 0 indices as a
legitimate way of representing global variable GV in debug info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46565 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 19:00:21 +00:00
Devang Patel
c60141ba43 Always put version numbers at the end because they are optional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46563 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 18:30:11 +00:00
Evan Cheng
ff9b373e8f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46562 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 18:18:23 +00:00
Devang Patel
21b70b237d Enable exception handling if it is supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 17:43:03 +00:00
Dan Gohman
f38dc192dd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46556 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 16:35:31 +00:00
Nick Lewycky
b4b0417220 Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
list just to see if whether the list is empty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46555 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 08:01:28 +00:00
Nick Lewycky
c7444498ee Use empty() instead of comparing size() with zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46554 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 07:54:16 +00:00
Nick Lewycky
d29ce1783c Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46553 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 07:45:37 +00:00
Tanya Lattner
e504d76a15 Pointers change size depending upon the target. Remove them to make the test more stable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46548 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 05:15:15 +00:00
Evan Cheng
d2c860cef1 Skip over the label which marks the beginning of the function before inserting prologue code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46546 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 03:57:33 +00:00
Scott Michel
15dcd8e19d Back out mods to llvmAsmParser, incorrectly committed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46545 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 03:10:00 +00:00
Scott Michel
7f9ba9bb3c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46544 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 02:55:46 +00:00
Owen Anderson
772601a885 Make DSE much more aggressive by performing DCE earlier. Update a testcase to reflect this increased aggressiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 01:24:47 +00:00
Owen Anderson
9a8ff8cd0f Fix an issue where, under very specific circumstances, memdep could end up dereferencing the end
of one of its internal maps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46541 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 01:24:05 +00:00
Chris Lattner
b10e0da065 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 00:39:15 +00:00
Dan Gohman
b625f2f896 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 00:15:11 +00:00
Evan Cheng
0d9e976ad2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:34:22 +00:00
Evan Cheng
c748412c42 Update this test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:30:05 +00:00
Duncan Sands
648f880dc9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:29:08 +00:00
Chris Lattner
c69d3c9442 Don't let globalopt hack on volatile loads or stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:01:37 +00:00
Ted Kremenek
d25c9cd3ff Altered ctor for APSInt to accept an optional "isUnsigned" flag. Default
behavior is unchanged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 18:55:14 +00:00
Dan Gohman
3035959425 Use empty() instead of comparing size() with zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46514 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 13:02:09 +00:00
Dan Gohman
9f65c39f80 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:43:50 +00:00
Dan Gohman
0e9dfb0900 Update this file for 2.0 syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:35:50 +00:00
Dan Gohman
ba42d2b937 Add comments describing what the loop depth values mean. Also, make a
minor simplification to the loop depth calculation code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:12:40 +00:00
Dan Gohman
97cf759b82 Fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46510 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:09:55 +00:00
Dan Gohman
b10abe1e8c Remove top-level const qualifiers from casts, avoiding associated
compiler warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46509 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:08:20 +00:00