Dan Gohman
f8f44b4837
Reword a comment to be less ambiguous.
...
llvm-svn: 54135
2008-07-28 18:42:57 +00:00
Dan Gohman
7ae5bf35a2
Don't use reinterpret_cast when it isn't needed.
...
llvm-svn: 54130
2008-07-27 23:12:19 +00:00
Dan Gohman
9742f7772d
Rename SDOperand to SDValue.
...
llvm-svn: 54128
2008-07-27 21:46:04 +00:00
Dan Gohman
47c5cdbc34
Tidy SDNode::use_iterator, and complete the transition to have it
...
parallel its analogue, Value::value_use_iterator. The operator* method
now returns the user, rather than the use.
llvm-svn: 54127
2008-07-27 20:43:25 +00:00
Dan Gohman
2a0bc8f6e1
Rename isOnlyUseOf to isOnlyUserOf.
...
llvm-svn: 54124
2008-07-27 18:06:42 +00:00
Dan Gohman
bdbaf4d128
Improve comments for SDNode use-count methods. No functionality change.
...
llvm-svn: 54123
2008-07-27 17:44:52 +00:00
Dan Gohman
c28f2265a4
Rename the version of CreateRet that's a convenience method for creating
...
multiple-valued return values, so that the name CreateRet is just for
creating plain ret statements.
llvm-svn: 54053
2008-07-25 20:36:15 +00:00
Duncan Sands
46a694af35
Fix error: ‘std::ostream’ has not been declared
...
when compiling with gcc 4.3.
llvm-svn: 54041
2008-07-25 19:29:14 +00:00
Nate Begeman
a6cdff50b0
Remove unnecessary implicit argument
...
llvm-svn: 54031
2008-07-25 17:56:27 +00:00
Nate Begeman
ce064348d9
Fix minor issues with VICmp/VFCmp constant expressions
...
llvm-svn: 54030
2008-07-25 17:35:37 +00:00
Nate Begeman
8757bedd41
Add predicate for GhostLinkage, used by the JIT
...
llvm-svn: 54027
2008-07-25 17:26:48 +00:00
Dan Gohman
1c8549fd7f
Add a #include for the uses of uint64_t.
...
llvm-svn: 54016
2008-07-25 15:39:12 +00:00
Dan Gohman
3ede9e57a2
Add a #include <cassert>, since this file use assert.
...
llvm-svn: 54003
2008-07-25 00:44:19 +00:00
Dan Gohman
11a4531b1b
Apply a patch from Mahadevan R, with minor formatting changes, to
...
workaround a GCC 3.3 bug observed on OpenBSD.
llvm-svn: 54002
2008-07-25 00:36:05 +00:00
Dan Gohman
680e1bd958
Enable rematerialization of constants using AliasAnalysis::pointsToConstantMemory,
...
and knowledge of PseudoSourceValues. This unfortunately isn't sufficient to allow
constants to be rematerialized in PIC mode -- the extra indirection is a
complication.
llvm-svn: 54000
2008-07-25 00:02:30 +00:00
Evan Cheng
e91c8c4508
Rename instance variables, parameter argument names to eliminate a bunch of compilation warnings with -Wshadow.
...
llvm-svn: 53970
2008-07-24 00:08:56 +00:00
Chris Lattner
e92598ef91
Make CreateBinOp/CreateNeg/CreateNot do constant folding.
...
llvm-svn: 53950
2008-07-23 06:58:10 +00:00
Dan Gohman
6564581be0
Enable first-class aggregates support.
...
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.
The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.
llvm-svn: 53941
2008-07-23 00:34:11 +00:00
Owen Anderson
7b8947cc31
Change the heuristics used in the coalescer, register allocator, and within
...
live intervals itself to use an instruction count approximation that is
not affected by inserting empty indices.
llvm-svn: 53937
2008-07-22 22:46:49 +00:00
Dan Gohman
b7d67aaa88
Add insertvalue and extractvalue folding support in IRBuilder.
...
llvm-svn: 53931
2008-07-22 20:19:25 +00:00
Dan Gohman
12c36eae69
IRBuilder support for insertvalue and extractvalue.
...
llvm-svn: 53926
2008-07-22 18:25:25 +00:00
Dan Gohman
7c7d8f931d
Assert that the DAG root value is a chain value.
...
llvm-svn: 53925
2008-07-22 18:04:23 +00:00
Anton Korobeynikov
090eca95ab
Tie small stuff to non-small by default on ELF platforms
...
llvm-svn: 53919
2008-07-22 17:09:41 +00:00
Bruno Cardoso Lopes
96ab649026
Basic support for small sections
...
llvm-svn: 53907
2008-07-22 15:26:53 +00:00
Bill Wendling
01f491daa7
Removing tabs.
...
llvm-svn: 53902
2008-07-22 07:14:12 +00:00
Dan Gohman
634b43862d
Correct the name of MachineMemOperand's include guard.
...
llvm-svn: 53895
2008-07-22 00:52:54 +00:00
Dan Gohman
183bd17a66
InsertValue and ExtractValue constant expressions are always
...
folded. Remove code that handled the case where they aren't
folded, and remove bitcode reader/writer support for them.
llvm-svn: 53887
2008-07-21 23:30:30 +00:00
Dan Gohman
b024b0eedd
Enhance the GraphWriter support for edge destinations, and teach the
...
SelectionDAG graph writer to make use of them. Now, nodes with multiple
values are displayed as such, with incoming edges pointing to the
specific value they use.
llvm-svn: 53875
2008-07-21 21:06:55 +00:00
Dan Gohman
b91bef08a7
Add titles to the various SelectionDAG viewGraph calls
...
that include useful information like the name of the
block being viewed and the current phase of compilation.
llvm-svn: 53872
2008-07-21 20:00:07 +00:00
Dan Gohman
8762ce04fd
Make the GraphWriter be more consistent about the string
...
used for the graph "title" and the graph "label", as there
are differences in interpretation of these strings
between viewers.
llvm-svn: 53871
2008-07-21 19:57:57 +00:00
Duncan Sands
6e31474e71
Add VerifyNode, a place to put sanity checks on
...
generic SDNode's (nodes with their own constructors
should do sanity checking in the constructor). Add
sanity checks for BUILD_VECTOR and fix all the places
that were producing bogus BUILD_VECTORs, as found by
"make check". My favorite is the BUILD_VECTOR with
only two operands that was being used to build a
vector with four elements!
llvm-svn: 53850
2008-07-21 10:20:31 +00:00
Anton Korobeynikov
5c0eb7e991
Use generic ELFTargetAsmInfo and DarwinTargetAsmInfo for X86 code
...
llvm-svn: 53788
2008-07-19 13:15:21 +00:00
Anton Korobeynikov
5298428cff
Add TargetAsmInfo stuff for all darwin-based targets
...
llvm-svn: 53787
2008-07-19 13:14:46 +00:00
Anton Korobeynikov
3724600253
Add TargetAsmInfo for all ELF-based targets
...
llvm-svn: 53786
2008-07-19 13:14:11 +00:00
Anton Korobeynikov
583ed0eb6e
Remove bogus assertion. This unbreaks mingw, where ConstantSDNode
...
has alignment 8 and LoadSDNode (used as LargestT template) - 4.
llvm-svn: 53782
2008-07-19 05:52:44 +00:00
Dan Gohman
f38f99ccc5
Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.
...
Fix a leak that this turned up in LowerSubregs.cpp.
And, comment a leak in LiveIntervalAnalysis.cpp.
llvm-svn: 53746
2008-07-17 23:49:46 +00:00
Owen Anderson
cb787a2004
Make MergeBlockIntoPredecessor more aggressive when the same successor appears
...
more than once.
llvm-svn: 53731
2008-07-17 19:42:29 +00:00
Dan Gohman
8981962672
Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
...
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.
Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.
This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.
These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.
llvm-svn: 53728
2008-07-17 19:10:17 +00:00
Evan Cheng
d57da4e81f
Indentation.
...
llvm-svn: 53727
2008-07-17 18:41:20 +00:00
Nate Begeman
af01bfff99
SSE codegen for vsetcc nodes
...
llvm-svn: 53719
2008-07-17 16:51:19 +00:00
Duncan Sands
41aeb22c1d
Factorize some code for determining which libcall to use.
...
llvm-svn: 53713
2008-07-17 02:36:29 +00:00
Owen Anderson
7fb36c8bba
Factor MergeBlockIntoPredecessor out into BasicBlockUtils.
...
llvm-svn: 53705
2008-07-17 00:01:40 +00:00
Devang Patel
a6c5ff690a
Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
...
llvm-svn: 53692
2008-07-16 17:54:34 +00:00
Dan Gohman
7e1e10f7d2
Fix the name of BreakCriticalMachineEdge.h's include guard
...
llvm-svn: 53686
2008-07-16 16:04:07 +00:00
Dan Gohman
9f52e3890f
Correct a top-level comment.
...
llvm-svn: 53685
2008-07-16 16:03:31 +00:00
Dan Gohman
dd8c0b17bf
Clarify the comments here, to make slightly more clear the
...
difference in purpose of TargetInstrInfo and TargetInstrDesc,
which isn't immediately obvious from the name.
llvm-svn: 53683
2008-07-16 16:02:59 +00:00
Dan Gohman
2cd7961ade
Tidy a doxygen comment.
...
llvm-svn: 53682
2008-07-16 15:59:56 +00:00
Dan Gohman
c4400b8618
SelectionDAG::AssignNodeIds is unused.
...
llvm-svn: 53636
2008-07-15 18:29:32 +00:00
Dan Gohman
e76fd33ee5
Reapply 53476 and 53480, with a fix so that it properly updates
...
the BB member to the current basic block after emitting
instructions.
llvm-svn: 53567
2008-07-14 18:19:29 +00:00
Chris Lattner
8a9725bffe
Reapply r53540, now with the matching header!
...
llvm-svn: 53557
2008-07-14 17:32:59 +00:00