Dan Gohman
685fd8081d
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
082af393ff
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
098cc6f22c
Remove unnecessary implicit argument
...
llvm-svn: 54031
2008-07-25 17:56:27 +00:00
Nate Begeman
c96e2e4968
Fix minor issues with VICmp/VFCmp constant expressions
...
llvm-svn: 54030
2008-07-25 17:35:37 +00:00
Nate Begeman
5f0cfd0968
Add predicate for GhostLinkage, used by the JIT
...
llvm-svn: 54027
2008-07-25 17:26:48 +00:00
Dan Gohman
a55fd4021e
Add a #include for the uses of uint64_t.
...
llvm-svn: 54016
2008-07-25 15:39:12 +00:00
Dan Gohman
2a343479f2
Add a #include <cassert>, since this file use assert.
...
llvm-svn: 54003
2008-07-25 00:44:19 +00:00
Dan Gohman
5d0a7a6914
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
09b0448dbc
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
a05c07eb62
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
6bbb53dac8
Make CreateBinOp/CreateNeg/CreateNot do constant folding.
...
llvm-svn: 53950
2008-07-23 06:58:10 +00:00
Dan Gohman
fa1211f69b
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
029182f3a3
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
62fffef385
Add insertvalue and extractvalue folding support in IRBuilder.
...
llvm-svn: 53931
2008-07-22 20:19:25 +00:00
Dan Gohman
bc17b19fb3
IRBuilder support for insertvalue and extractvalue.
...
llvm-svn: 53926
2008-07-22 18:25:25 +00:00
Dan Gohman
78f6b35cde
Assert that the DAG root value is a chain value.
...
llvm-svn: 53925
2008-07-22 18:04:23 +00:00
Anton Korobeynikov
4a4484ee97
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
9cfd2f8e57
Basic support for small sections
...
llvm-svn: 53907
2008-07-22 15:26:53 +00:00
Bill Wendling
3fe072e367
Removing tabs.
...
llvm-svn: 53902
2008-07-22 07:14:12 +00:00
Dan Gohman
7fea169c86
Correct the name of MachineMemOperand's include guard.
...
llvm-svn: 53895
2008-07-22 00:52:54 +00:00
Dan Gohman
d5d24f63fd
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
f1dc362547
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
581cc87f57
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
6dc08ebeb0
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
b0e3938651
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
4e05489745
Use generic ELFTargetAsmInfo and DarwinTargetAsmInfo for X86 code
...
llvm-svn: 53788
2008-07-19 13:15:21 +00:00
Anton Korobeynikov
c187438dcd
Add TargetAsmInfo stuff for all darwin-based targets
...
llvm-svn: 53787
2008-07-19 13:14:46 +00:00
Anton Korobeynikov
1d03fcc7c9
Add TargetAsmInfo for all ELF-based targets
...
llvm-svn: 53786
2008-07-19 13:14:11 +00:00
Anton Korobeynikov
fa8511bf08
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
0ece943845
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
27405efdc0
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
1705968102
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
d8c156e8be
Indentation.
...
llvm-svn: 53727
2008-07-17 18:41:20 +00:00
Nate Begeman
55b7becb29
SSE codegen for vsetcc nodes
...
llvm-svn: 53719
2008-07-17 16:51:19 +00:00
Duncan Sands
77a3d05f1e
Factorize some code for determining which libcall to use.
...
llvm-svn: 53713
2008-07-17 02:36:29 +00:00
Owen Anderson
c062381c7b
Factor MergeBlockIntoPredecessor out into BasicBlockUtils.
...
llvm-svn: 53705
2008-07-17 00:01:40 +00:00
Devang Patel
78e8a09f39
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
494fb26521
Fix the name of BreakCriticalMachineEdge.h's include guard
...
llvm-svn: 53686
2008-07-16 16:04:07 +00:00
Dan Gohman
52636b2a81
Correct a top-level comment.
...
llvm-svn: 53685
2008-07-16 16:03:31 +00:00
Dan Gohman
add5195334
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
b010a08d3a
Tidy a doxygen comment.
...
llvm-svn: 53682
2008-07-16 15:59:56 +00:00
Dan Gohman
1e5aa12b7d
SelectionDAG::AssignNodeIds is unused.
...
llvm-svn: 53636
2008-07-15 18:29:32 +00:00
Dan Gohman
adec96f438
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
8882b1c41c
Reapply r53540, now with the matching header!
...
llvm-svn: 53557
2008-07-14 17:32:59 +00:00
Chris Lattner
3b81a821b4
whitespace fix.
...
llvm-svn: 53537
2008-07-14 00:28:45 +00:00
Chris Lattner
0c5183d9a5
doxygenate comments and wrap to 80 cols.
...
llvm-svn: 53536
2008-07-14 00:27:31 +00:00
Ted Kremenek
0017db2ff5
Inline typedef for alist_iterator::pointer to work with MSVC++.
...
llvm-svn: 53517
2008-07-12 18:28:46 +00:00
Nick Lewycky
e424236c4e
operator[] is not defined for list::iterator. Overload it in ilist::iterator
...
to prevent silly things from happening accidentally. PR2171
llvm-svn: 53507
2008-07-12 07:00:52 +00:00
Evan Cheng
ef8412c822
Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
...
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Dan Gohman
9a542a4d5f
Add a utility function to MachineInstr for testing whether an instruction
...
has exactly one MachineMemOperand, and change some X86 lowering code to
make use of it.
llvm-svn: 53498
2008-07-12 00:10:52 +00:00
Dan Gohman
0e52a0c89e
Fix spelling of "hierarchy" in comments.
...
llvm-svn: 53489
2008-07-11 22:51:32 +00:00
Dan Gohman
cd9b66e5c1
Fix typos in comments.
...
llvm-svn: 53487
2008-07-11 22:48:20 +00:00
Dan Gohman
02c7c6cb33
Include a frame index in the "fixed stack" pseudo source value
...
instead of using the frame index for the SVOffset, which was
inconsistent.
llvm-svn: 53486
2008-07-11 22:44:52 +00:00
Ted Kremenek
1a74784517
Minor tweaks to the ImmutableList iterator interface.
...
Added partial specialization of DenseMapInfo<T> for ImmutableList.
llvm-svn: 53485
2008-07-11 22:43:07 +00:00
Dan Gohman
36a69373dc
Add support for putting NamedRegionTimers in TimerGroups, and
...
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.
llvm-svn: 53476
2008-07-11 21:54:34 +00:00
Dan Gohman
3707f1daba
Use find instead of lower_bound.
...
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Dan Gohman
0597e5b697
Trim unnecessary #includes.
...
llvm-svn: 53471
2008-07-11 20:38:31 +00:00
Duncan Sands
3e7d0fa3ca
It is pointless to turn a UINT_TO_FP into an
...
SINT_TO_FP libcall plus additional operations:
it might as well be a direct UINT_TO_FP libcall.
So only turn it into an SINT_TO_FP if the target
has special handling for SINT_TO_FP.
llvm-svn: 53461
2008-07-11 17:00:14 +00:00
Duncan Sands
37b7322b35
Add two missing SINT_TO_FP libcalls.
...
llvm-svn: 53460
2008-07-11 16:57:02 +00:00
Duncan Sands
927a3648d5
Add support for 128 bit shifts and 32 bit shifts
...
on 16 bit machines.
llvm-svn: 53458
2008-07-11 16:52:29 +00:00
Ted Kremenek
e4a6db3349
Make typedef public to make MSVC++ happy.
...
llvm-svn: 53433
2008-07-10 23:24:20 +00:00
Ted Kremenek
72a2d8e6b5
Make some typedefs public to make MSVC++ happy.
...
llvm-svn: 53432
2008-07-10 23:09:45 +00:00
Ted Kremenek
483300f96d
Make typedefs in ilist public (Visual C++ errors out when they are private).
...
llvm-svn: 53431
2008-07-10 22:58:10 +00:00
Bill Wendling
c20893b026
Pull r53428 from Gaz into mainline:
...
Remove warnings about unused/shadowed variables.
llvm-svn: 53430
2008-07-10 22:57:49 +00:00
Ted Kremenek
40a63884fe
Added ImmutableMap constructor that accepts a const TreeTy*.
...
llvm-svn: 53429
2008-07-10 22:57:10 +00:00
Dan Gohman
38c5ffb753
Tidy up #includes.
...
llvm-svn: 53426
2008-07-10 22:26:19 +00:00
Dan Gohman
f50b0a0cbd
Add a SubclassData field to SDNode, similar to what's done
...
in Value, to make use of some otherwise unused space. Use this
field to shrink LoadSDNode and StoreSDNode by moving the
addressing mode and ext/trunc fields there.
llvm-svn: 53422
2008-07-10 21:44:59 +00:00
Dan Gohman
84b6cc9cbe
Fix a copy+pasto in an assertion string.
...
llvm-svn: 53419
2008-07-10 19:58:23 +00:00
Dan Gohman
40e1c38d2d
Stack objects have nonnegative indices, not just positive indices.
...
llvm-svn: 53418
2008-07-10 19:57:25 +00:00
Dan Gohman
43f97716c7
Escape the graph name. This unbreaks -view-cfg.
...
llvm-svn: 53417
2008-07-10 19:55:54 +00:00
Dan Gohman
49eff5fbc0
Remove this file; the code that it went with is no longer
...
in the repository.
llvm-svn: 53416
2008-07-10 19:55:04 +00:00
Duncan Sands
abdcac66dc
Add support for 128 bit multiplicative operations.
...
Lack of these caused a bootstrap failure with Fortran
on x86-64 with LegalizeTypes turned on. While there,
be nice to 16 bit machines and support expansion of
i32 too.
llvm-svn: 53408
2008-07-10 15:35:05 +00:00
Duncan Sands
5e6d1402c2
Add a mysteriously missing libcall, FPTOSINT_F80_I32.
...
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.
llvm-svn: 53407
2008-07-10 15:33:02 +00:00
Duncan Sands
4603a2ae6b
Correct a comment.
...
llvm-svn: 53401
2008-07-10 11:21:59 +00:00
Evan Cheng
e9ba28dd68
- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
...
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.
llvm-svn: 53394
2008-07-10 07:35:43 +00:00
Chris Lattner
97c661df7a
add a helper method for code that wants to handle vector
...
constants by element without caring how they are formed.
llvm-svn: 53382
2008-07-10 00:28:34 +00:00
Evan Cheng
0e6973442d
- Replace use of std::map<std::string, ..> with StringMap. Replace use of std::map with DenseMap, std::set with SmallPtrSet. This results in minor speed up.
...
- Some code clean up.
llvm-svn: 53379
2008-07-10 00:04:23 +00:00
Dan Gohman
7d94c49db9
Simplify hasNUsesOfValue and hasAnyUsesOfValue even more. This
...
makes their special-case checks of use_size() less beneficial,
so remove them. This eliminates all but one use of use_size(),
which is in AssignTopologicalOrder, which uses it only once for
each node, and so can reasonably afford to recompute it, as
this allows the UsesSize field of SDNode to be removed
altogether.
llvm-svn: 53377
2008-07-09 23:03:14 +00:00
Dan Gohman
db4504fa57
Move MemoryVT out of LSBaseNode into MemSDNode, allowing the
...
getMemOperand function to be moved into the base class as well
and made non-virtual.
llvm-svn: 53372
2008-07-09 22:08:04 +00:00
Dan Gohman
89e71d48b8
Move the IsVolatile and SVOffset fields into the MemSDNode base
...
class, and store IsVolatile and Alignment in a more compact form.
This makes AtomicSDNode slightly larger, but it shrinks LoadSDNode
and StoreSDNode, which are much more common and are the largest of
the SDNode subclasses. Also, this lets the isVolatile() and
getAlignment() accessors be non-virtual.
llvm-svn: 53361
2008-07-09 21:23:02 +00:00
Anton Korobeynikov
86e706d448
Silence a warning
...
llvm-svn: 53326
2008-07-09 13:56:43 +00:00
Anton Korobeynikov
decb136538
Drop enum and use constants for SectionFlags
...
llvm-svn: 53325
2008-07-09 13:41:07 +00:00
Anton Korobeynikov
daee281590
First sketch of special section objects
...
llvm-svn: 53320
2008-07-09 13:28:49 +00:00
Anton Korobeynikov
deaa37362a
Unbreak
...
llvm-svn: 53317
2008-07-09 13:27:37 +00:00
Anton Korobeynikov
3d3d12f431
Another bunch of hacks for named sections support
...
llvm-svn: 53315
2008-07-09 13:26:52 +00:00
Anton Korobeynikov
60919583b3
Add hacky way to distinguish named and named sections. This will be generalized in the future.
...
llvm-svn: 53311
2008-07-09 13:25:26 +00:00
Anton Korobeynikov
908998f071
Handle ELF mergeable sections
...
llvm-svn: 53306
2008-07-09 13:23:37 +00:00
Anton Korobeynikov
9d6939b5fc
Provide general hook for section name calculation
...
llvm-svn: 53304
2008-07-09 13:22:46 +00:00
Anton Korobeynikov
94ff6f02ef
Print entity size for mergeable sections
...
llvm-svn: 53303
2008-07-09 13:22:17 +00:00
Anton Korobeynikov
2633a040a3
Move flag decoding stuff into special hook
...
llvm-svn: 53297
2008-07-09 13:20:07 +00:00
Anton Korobeynikov
ab778022d5
Properly handle linkonce stuff
...
llvm-svn: 53296
2008-07-09 13:19:38 +00:00
Anton Korobeynikov
7680198798
Provide skeletone code for calculation of section, where global should be emitted into
...
llvm-svn: 53295
2008-07-09 13:19:08 +00:00
Anton Korobeynikov
0bf332476a
Make hooks virtual
...
llvm-svn: 53293
2008-07-09 13:18:21 +00:00
Anton Korobeynikov
21539c6d1e
Add default section name resolution routine
...
llvm-svn: 53292
2008-07-09 13:18:02 +00:00
Anton Korobeynikov
aab504fb19
Constify
...
llvm-svn: 53291
2008-07-09 13:17:36 +00:00
Anton Korobeynikov
9e4ab5023a
Add code for default section falgs computation
...
llvm-svn: 53290
2008-07-09 13:16:59 +00:00
Chris Lattner
a660f4bb07
Add a little wrapper header that is put around bc files when emitting
...
bc files for modules with a target triple that indicates they are for
darwin. The reader unconditionally handles this, and the writer could
turn this on for more targets if we care.
This change has two benefits for darwin:
1) it allows us to encode the cpu type of the file in an easy to read
place that doesn't require decoding the bc file.
2) it works around a bug (IMO) in darwin's AR where it is incapable of
handling files that are not a multiple of 8 bytes long. BC files
are only guaranteed to be multiples of 4 bytes long.
llvm-svn: 53275
2008-07-09 05:14:23 +00:00
Nick Lewycky
b36bd47419
Remove getValueRange from SCEV. It wasn't doing anything there anyways, and a
...
more complete version is now available from the LoopVR pass.
llvm-svn: 53269
2008-07-09 03:21:51 +00:00
Dan Gohman
919936815e
const-ify SelectionDAG::getNodeValueTypes.
...
llvm-svn: 53264
2008-07-09 00:00:42 +00:00
Dan Gohman
e8d8d2ea42
Factor out the code for computing an alignment value, and make it
...
available to getAtomic in addition to just getLoad and getStore,
to prevent MachineMemOperands with 0 alignment.
llvm-svn: 53261
2008-07-08 23:46:32 +00:00
Dan Gohman
cb2ec30ef6
The graph name really does matter for configurations that use gv.
...
llvm-svn: 53259
2008-07-08 23:33:46 +00:00
Evan Cheng
0a1e672dff
Unbreak C++ tests on x86 Darwin.
...
llvm-svn: 53237
2008-07-08 16:40:43 +00:00
Duncan Sands
66336db096
Add some helpers for manipulating function
...
parameter attributes.
llvm-svn: 53228
2008-07-08 09:41:30 +00:00
Matthijs Kooijman
328494c428
Add CallSite::getArgumentNo() to be able to translate an operand number into a
...
argument number.
llvm-svn: 53225
2008-07-08 08:51:47 +00:00
Matthijs Kooijman
ea017c77ff
Add CallSite::getArgumentOffset() to hide the differences in operands betwen
...
Call and Invoke in a single method instead of having it hardcoded in multiple
places.
llvm-svn: 53224
2008-07-08 08:50:32 +00:00
Duncan Sands
78c8872d87
Add some convenience methods for manipulating
...
call attributes.
llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Nick Lewycky
3c947045ef
Expand SCEVUDiv of power of 2 to a lshr instruction.
...
llvm-svn: 53217
2008-07-08 05:05:37 +00:00
Evan Cheng
534952224c
Avoid unnecessary string construction during asm printing.
...
llvm-svn: 53215
2008-07-08 00:55:58 +00:00
Dan Gohman
3b46030375
Pool-allocation for MachineInstrs, MachineBasicBlocks, and
...
MachineMemOperands. The pools are owned by MachineFunctions.
This drastically reduces the number of calls to malloc/free made
during the "Emit" phase of scheduling, as well as later phases
in CodeGen. Combined with other changes, this speeds up the
"instruction selection" phase of CodeGen by 10% in some cases.
llvm-svn: 53212
2008-07-07 23:14:23 +00:00
Dan Gohman
7f8b6d5f80
Pool-allocation for SDNodes. The pool is allocated once for each function,
...
and reused across SelectionDAGs.
This drastically reduces the number of calls to malloc/free made during
instruction selection, and improves memory locality.
llvm-svn: 53211
2008-07-07 23:02:41 +00:00
Dan Gohman
e5932e5a3d
Add some basic Pool-allocation infrastructure. This adds a Recycler class,
...
for handling bookkeeping for deleted objects, as well as the alist class
template, for keeping lists of objects allocated from Recyclers, and some
related utilities.
llvm-svn: 53210
2008-07-07 22:58:06 +00:00
Bill Wendling
1214860a78
Use StringMap for greater justice!
...
llvm-svn: 53202
2008-07-07 20:59:31 +00:00
Dan Gohman
9169763955
Fix SDNode::MorphNodeTo (a function used by by SelectNodeTo) to
...
properly track dead nodes that are on the original SDNode's operand
list but not the new one, and have no other uses.
llvm-svn: 53201
2008-07-07 20:57:48 +00:00
Dan Gohman
aedb4a61b8
Move MachineMemOperand's constructor out of line, to avoid a
...
#include dependency on Support/MathExtras.h in the header file.
llvm-svn: 53200
2008-07-07 20:32:02 +00:00
Dan Gohman
75f9b72bfc
Shrink MachineMemOperand by storing the alignment in log form
...
and rearranging the fields.
llvm-svn: 53195
2008-07-07 20:05:04 +00:00
Dan Gohman
93e6fc4873
Make ilist noncopyable too.
...
llvm-svn: 53190
2008-07-07 18:43:32 +00:00
Dan Gohman
125919217a
Don't use std::advance just to increment or decrement by one.
...
llvm-svn: 53189
2008-07-07 18:39:33 +00:00
Dan Gohman
ff702ad891
Make BumpPtrAllocator noncopyable.
...
llvm-svn: 53188
2008-07-07 18:38:14 +00:00
Dan Gohman
2974879866
Add a space between * and /* to help simple-minded lexers.
...
llvm-svn: 53187
2008-07-07 18:34:27 +00:00
Dan Gohman
768f2c9246
Remove most of the uses of SDOperandPtr, usually replacing it with a
...
simple const SDOperand*, which is what's usually needed.
For AddNodeIDOperands, which is small, just duplicate the function to
accept an SDUse*.
For SelectionDAG::getNode - Add an overload that accepts SDUse* that
copies the operands into a temporary SDOperand array, but also has
special-case checks for 0 through 3 operands to avoid the copy in
the common cases.
llvm-svn: 53183
2008-07-07 18:26:29 +00:00
Dan Gohman
2860b7a608
Remove uses of "llvm/Support/Debug.h" from LLVM include files, which
...
all happened be unnecessary.
llvm-svn: 53182
2008-07-07 18:14:29 +00:00
Dan Gohman
f9c226beaf
Remove unnecessary static_casts.
...
llvm-svn: 53181
2008-07-07 18:08:20 +00:00
Dan Gohman
027b98686a
Remove an unnecessary reinterpret_cast.
...
llvm-svn: 53180
2008-07-07 18:07:36 +00:00
Dan Gohman
56e3f63ec5
Add explicit keywords.
...
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Dan Gohman
38740a98b2
Make DenseMap's insert return a pair, to more closely resemble std::map.
...
llvm-svn: 53177
2008-07-07 17:46:23 +00:00
Ted Kremenek
7c3d9cae58
Removed ImmutableMap::SlimFind and replaced it with ImmutableMap::lookup. The new method does the same thing, except that it returns a pointer to the mapped data type, and not to an internal tree node.
...
llvm-svn: 53171
2008-07-07 16:20:55 +00:00
Duncan Sands
2fa6cf5c2f
LegalizeTypes soft-float support for stores of a
...
float value.
llvm-svn: 53165
2008-07-07 00:08:12 +00:00
Anton Korobeynikov
a970df57bc
Add convenient helper for checking whether global is weak in linker sense
...
having weak or linkonce or common or extweak LLVM linkage.
llvm-svn: 53158
2008-07-05 23:48:30 +00:00
Nick Lewycky
a91c655ee5
80col
...
llvm-svn: 53153
2008-07-05 22:41:37 +00:00
Mon P Wang
5c755ff51b
Fixed generating incorrect aligned stores that I backout of r53031
...
that fixed problems in EmitStackConvert where the source and target type
have different alignment by creating a stack slot with the max
alignment of source and target type.
llvm-svn: 53150
2008-07-05 20:40:31 +00:00
Duncan Sands
93e180342a
Rather than having a different custom legalization
...
hook for each way in which a result type can be
legalized (promotion, expansion, softening etc),
just use one: ReplaceNodeResults, which returns
a node with exactly the same result types as the
node passed to it, but presumably with a bunch of
custom code behind the scenes. No change if the
new LegalizeTypes infrastructure is not turned on.
llvm-svn: 53137
2008-07-04 11:47:58 +00:00
Duncan Sands
04fb6bf468
Linux also does not require exception handling
...
moves in order to get correct debug info. Since
I can't imagine how any target could possibly
be any different, I've just stripped out the
option: now all the world's like Darwin!
llvm-svn: 53134
2008-07-04 09:55:48 +00:00
Bill Wendling
4bb9089db7
Don't return std::vector by value, but pass it in by reference to be filled.
...
llvm-svn: 53123
2008-07-03 23:13:02 +00:00
Bill Wendling
2e50689435
Revert my previous check-in that split up MachineModuleInfo. It turns out to
...
slow the compiler down at -O0 some 30% or more. Ooops.
llvm-svn: 53120
2008-07-03 22:53:42 +00:00
Devang Patel
a0e4fb8283
Provide a hook to set the code generation debug options to investigate lto failures.
...
llvm-svn: 53119
2008-07-03 22:53:14 +00:00
Evan Cheng
fad8be450d
Backed out 53031.
...
llvm-svn: 53110
2008-07-03 18:20:14 +00:00
Evan Cheng
7d98a48f15
- Remove calls to copyKillDeadInfo which is an N^2 function. Instead, propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc.
...
- Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list.
llvm-svn: 53097
2008-07-03 09:09:37 +00:00
Dan Gohman
99e6237ba7
Use operator new instead of new char[].
...
llvm-svn: 53067
2008-07-03 00:59:36 +00:00
Evan Cheng
7a265d83bf
- Add LiveVariables::replaceKillInstruction. This does a subset of instructionChanged. That is, it only update the VarInfo.kills if the new instruction is known to have the correct dead and kill markers.
...
- CommuteInstruction copies kill / dead markers over to new instruction. So use replaceKillInstruction instead.
llvm-svn: 53061
2008-07-03 00:07:19 +00:00
Owen Anderson
30cc028e4a
Make LiveVariables even more optional, by making it optional in the call to TargetInstrInfo::convertToThreeAddressInstruction
...
Also, if LV isn't around, then TwoAddr doesn't need to be updating flags, since they won't have been set in the first place.
llvm-svn: 53058
2008-07-02 23:41:07 +00:00
Dan Gohman
22e9707480
Replace a few uses of SelectionDAG::getTargetNode with
...
SelectionDAG::SelectNodeTo in the instruction selector. This
updates existing nodes in place instead of creating new ones.
Go back to selecting ISD::DBG_LABEL nodes into
TargetInstrInfo::DBG_LABEL nodes instead of leaving them
unselected, now that SelectNodeTo allows us to update them
in place.
llvm-svn: 53057
2008-07-02 23:23:19 +00:00
Eric Christopher
30f1d3f0db
Add a couple more helper functions to deal with
...
creating global constant strings and pointers
to global constant strings.
llvm-svn: 53051
2008-07-02 22:57:59 +00:00
Mon P Wang
2cf56ce269
Make the default min align of CreateStackTemporary to be 1
...
llvm-svn: 53036
2008-07-02 17:50:10 +00:00
Duncan Sands
739a0548c4
Add a new getMergeValues method that does not need
...
to be passed the list of value types, and use this
where appropriate. Inappropriate places are where
the value type list is already known and may be
long, in which case the existing method is more
efficient.
llvm-svn: 53035
2008-07-02 17:40:58 +00:00
Owen Anderson
286d0c40c3
Have DenseSet::insert return a bool indicating whether the insertion succeeded or not.
...
llvm-svn: 53033
2008-07-02 17:29:59 +00:00
Mon P Wang
4b7c1acf26
Fixed problem in EmitStackConvert where the source and target type
...
have different alignment by creating a stack slot with the max
alignment of source and target type.
llvm-svn: 53031
2008-07-02 17:07:12 +00:00
Chris Lattner
c0d47a2d22
optimize StringMap::clear
...
llvm-svn: 53009
2008-07-02 05:30:45 +00:00
Chris Lattner
bedd1b2427
Add a new (simple) StringMap::clear method, patch by Pratik
...
Solanki!
llvm-svn: 53008
2008-07-02 05:26:32 +00:00
Bill Wendling
82a9321f56
Sorry. I couldn't sleep at night knowing I put these ugly casts into the source tree.
...
llvm-svn: 53001
2008-07-02 00:35:47 +00:00
Ted Kremenek
19941499b8
Implemented operator!= for the ImmutableList iterator.
...
llvm-svn: 52998
2008-07-02 00:06:55 +00:00
Owen Anderson
31936d6ab6
Add a version of AddString that takes a const char* so we can avoid extraneous
...
conversions to std::string.
llvm-svn: 52995
2008-07-01 23:49:59 +00:00
Bill Wendling
b7bd02be57
Darwin doesn't need exception handling information for the "move" info when
...
debug information is being output, because it's leet!
llvm-svn: 52994
2008-07-01 23:34:48 +00:00
Evan Cheng
c963f6c14b
Avoid creating expensive comment string if it's not going to be printed.
...
llvm-svn: 52992
2008-07-01 23:18:29 +00:00
Ted Kremenek
9412c5240a
Added partial specialization of FoldingSetTrait for pointers.
...
llvm-svn: 52989
2008-07-01 22:30:13 +00:00
Bill Wendling
c8cdb883df
- Update comments.
...
- Don't use GlobalVariable::LinkageTypes when unsigned works.
llvm-svn: 52987
2008-07-01 22:08:01 +00:00
Devang Patel
59b71c23de
Fix dom tree compare. Don't forget to compare children!
...
llvm-svn: 52984
2008-07-01 21:41:00 +00:00
Owen Anderson
1d952533c2
Add a version of AsmPrinter::EOL that takes a const char* so that we don't have to do as many implicit std::string constructions.
...
Unfortunately, this doesn't appear to translate to a real speedup in practice.
llvm-svn: 52981
2008-07-01 21:16:27 +00:00
Devang Patel
67c79a4992
Fix typos in comments.
...
Thanks for the feedback!
llvm-svn: 52978
2008-07-01 19:50:56 +00:00
Evan Cheng
39a9ee48a2
DAGSize should not be public.
...
llvm-svn: 52977
2008-07-01 18:49:06 +00:00
Dan Gohman
e61e120c17
Prune a few dependencies on MachineFunction.h.
...
llvm-svn: 52976
2008-07-01 18:15:35 +00:00
Dan Gohman
2965f03545
Make ilist_traits<MachineBasicBlock>'s Parent member private.
...
llvm-svn: 52974
2008-07-01 18:13:58 +00:00
Dan Gohman
6edbdaa769
Fix apostrophes in a comment.
...
llvm-svn: 52972
2008-07-01 18:12:31 +00:00
Evan Cheng
2c9773155a
Do not use computationally expensive scheduling heuristics with -fast.
...
llvm-svn: 52971
2008-07-01 18:05:03 +00:00
Devang Patel
9dbe4d15ec
Add dom info verifier.
...
llvm-svn: 52967
2008-07-01 17:44:24 +00:00
Owen Anderson
3684013910
Make the subregister hashtable output more readable by wrapping the lines,
...
and mark it const along with the associated changes to TargetRegisterInfo.
llvm-svn: 52966
2008-07-01 17:34:38 +00:00
Owen Anderson
1760b92d27
Implement suggestions from Chris:
...
- Use a more accurate heuristic for the size of the hashtable.
- Use bitwise and instead of modulo since the size is a power of two.
- Use new[] instead of malloc().
llvm-svn: 52951
2008-07-01 07:02:30 +00:00
Seo Sanghyeon
6d228025fb
Compilation fix
...
llvm-svn: 52950
2008-07-01 05:27:28 +00:00
Owen Anderson
49cce257ae
Replace the dynamically computed std::set lookup method for subregisters with a hashtable-based
...
version that is computed by tblgen at the time LLVM is compiled.
llvm-svn: 52945
2008-07-01 00:18:52 +00:00
Dan Gohman
fb19f9402b
Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
...
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.
Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.
This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.
llvm-svn: 52943
2008-07-01 00:05:16 +00:00
Dan Gohman
9c24ff3da7
Make SmallVector's grow use memcpy in common cases
...
instead of std::uninitialized_copy, which uses memmove.
llvm-svn: 52928
2008-06-30 21:45:13 +00:00
Dan Gohman
2b11690e9f
Use plain operator new instead of new char[].
...
llvm-svn: 52927
2008-06-30 21:33:02 +00:00
Dan Gohman
4246cf8eea
Update comments to new-style syntax.
...
llvm-svn: 52925
2008-06-30 21:00:56 +00:00
Dan Gohman
5c73a886b4
Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect its
...
purpose, and give it a custom SDNode subclass so that it doesn't
need to have line number, column number, filename string, and
directory string, all existing as individual SDNodes to be the
operands.
This was the only user of ISD::STRING, StringSDNode, etc., so
remove those and some associated code.
This makes stop-points considerably easier to read in
-view-legalize-dags output, and reduces overhead (creating new
nodes and copying std::strings into them) on code containing
debugging information.
llvm-svn: 52924
2008-06-30 20:59:49 +00:00
Evan Cheng
0711d68fa7
Split scheduling from instruction selection.
...
llvm-svn: 52923
2008-06-30 20:45:06 +00:00
Ted Kremenek
8eb02960db
Added some comments and some cleanups.
...
llvm-svn: 52922
2008-06-30 20:41:22 +00:00
Dan Gohman
937aa04e87
Reorder the fields in TargetLowering to require less padding.
...
llvm-svn: 52919
2008-06-30 20:36:26 +00:00
Dan Gohman
c7779faf00
Change bools to 1-bit bitfields to shrink ArgListEntry slightly.
...
llvm-svn: 52918
2008-06-30 20:33:57 +00:00
Dan Gohman
31c8123d07
Replace some std::vectors that showed up in heap profiling with
...
SmallVectors. Change the signature of TargetLowering::LowerArguments
to avoid returning a vector by value, and update the two targets
which still use this directly, Sparc and IA64, accordingly.
llvm-svn: 52917
2008-06-30 20:31:15 +00:00
Owen Anderson
60a1c3b1e5
Add an isReachableFromEntry method.
...
llvm-svn: 52916
2008-06-30 20:28:02 +00:00
Ted Kremenek
245acdca67
Added ImmutableList, a companion ADT to ImmutableSet and ImmutableMap that is used to represent a purely functional list.
...
llvm-svn: 52911
2008-06-30 18:07:38 +00:00
Devang Patel
cdc51bdcd4
Remove old LTO interface.
...
llvm-svn: 52910
2008-06-30 18:05:29 +00:00
Chris Lattner
9d22f807c3
add convenience 'constructors'
...
llvm-svn: 52908
2008-06-30 18:02:44 +00:00
Duncan Sands
1ae6ef83ee
Revert the SelectionDAG optimization that makes
...
it impossible to create a MERGE_VALUES node with
only one result: sometimes it is useful to be able
to create a node with only one result out of one of
the results of a node with more than one result, for
example because the new node will eventually be used
to replace a one-result node using ReplaceAllUsesWith,
cf X86TargetLowering::ExpandFP_TO_SINT. On the other
hand, most users of MERGE_VALUES don't need this and
for them the optimization was valuable. So add a new
utility method getMergeValues for creating MERGE_VALUES
nodes which by default performs the optimization.
Change almost everywhere to use getMergeValues (and
tidy some stuff up at the same time).
llvm-svn: 52893
2008-06-30 10:19:09 +00:00
Evan Cheng
5447e4331b
Eliminate TargetRegisterDesc::ImmSubRegs. It's no longer in use.
...
llvm-svn: 52892
2008-06-30 07:32:56 +00:00
Evan Cheng
da3db11db3
- Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an empty string for ConstantAggregateZero case which surprises selectiondag.
...
- Correctly handle memcpy from constant string which is zero-initialized.
llvm-svn: 52891
2008-06-30 07:31:25 +00:00
Nick Lewycky
21d0a8cca0
Because of the laziness, the required passes must exist even after
...
LoopVR::runOnFunction runs.
This should accomplish that, but it doesn't. I think that's a PassManager bug,
but without a consumer of LoopVR in the tree, I can't give steps to reproduce.
llvm-svn: 52886
2008-06-30 01:04:39 +00:00
Nick Lewycky
48b1fd74dc
Add a value range analysis that lazily computes ranges using ScalarEvolutions.
...
llvm-svn: 52885
2008-06-30 00:04:21 +00:00
Anton Korobeynikov
a7c583d584
Revert (52748 and friends):
...
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.
This unbreaks llvm-gcc bootstrap.
llvm-svn: 52884
2008-06-29 17:57:03 +00:00
Anton Korobeynikov
2e052a81fd
Start refactoring of asmprinters: provide a TAI hook, which will select a 'section kind' for a global.
...
llvm-svn: 52868
2008-06-28 13:45:57 +00:00
Chris Lattner
1701328675
Add back the capability to include nul characters in strings with
...
GetConstantStringInfo. This will hopefully restore llvm-gcc to
happy bootstrap land.
llvm-svn: 52851
2008-06-28 05:33:32 +00:00
Owen Anderson
05546f67cb
Add a NextPowerOf2 function to calculate the next power of two greater than a given integer.
...
llvm-svn: 52839
2008-06-27 21:48:21 +00:00
Chris Lattner
36b4e8f2fe
implement some fixme's by making "autorenaming" in the value symbol table not
...
thrash the heap with string stuff (e.g. utostr).
llvm-svn: 52838
2008-06-27 21:26:26 +00:00
Chris Lattner
7775588132
add a helper.
...
llvm-svn: 52835
2008-06-27 21:15:25 +00:00
Chris Lattner
e43649fa62
Add a new version of Module::getFunction that takes a const char* instead
...
of a std::string. This avoids copying the string to the heap in common
cases. Patch by Pratik Solanki!
llvm-svn: 52834
2008-06-27 21:09:10 +00:00
Chris Lattner
5c91f4d7ba
Tweak IRBuilder to explicitly call the setName(const char*) method on Value
...
instead of passing the name into the instruction ctors. Since most
instruction ctors take their name as an std::string, this avoids copying the
string to the heap and a malloc and free.
Patch by Pratik Solanki!
llvm-svn: 52832
2008-06-27 18:49:21 +00:00
Cedric Venet
69cb7be3b1
Add an include file needed for VS.
...
Add two new file to codegen project (VS).
This unbreak the build for VS.
llvm-svn: 52831
2008-06-27 18:00:09 +00:00
Owen Anderson
4f024862f6
Cache subregister relationships in a set in TargetRegisterInfo to allow faster lookups.
...
This speeds up LiveVariables from 0.6279s to 0.6165s on kimwitu++.
llvm-svn: 52818
2008-06-27 06:56:04 +00:00
Chris Lattner
dc3f946137
fix the regressions from Eric's patch by making GetConstantStringInfo
...
tolerate a non-nul-terminated string, and handling a direct global
reference.
llvm-svn: 52813
2008-06-27 03:36:51 +00:00
Bill Wendling
54c3377d01
More cruft from revert...
...
llvm-svn: 52809
2008-06-27 01:37:37 +00:00
Bill Wendling
fcbb9525d0
Reverting broken patch r52803.
...
llvm-svn: 52806
2008-06-27 01:27:56 +00:00
Bill Wendling
f96d046d7c
- Remove a use of std::vector.
...
- Make sure that we're not recalculating the size of a vector
that never changes.
llvm-svn: 52803
2008-06-27 00:56:36 +00:00
Bill Wendling
c758698d2c
Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
...
some uses of std::vector, where it's return std::vector by value. Yuck!
llvm-svn: 52800
2008-06-27 00:09:40 +00:00
Chris Lattner
4ca6973589
allow updating the MPM, so that you can use one FunctionPAssManager with
...
multiple ModuleProviders, e.g. with the JIT.
llvm-svn: 52796
2008-06-26 22:26:45 +00:00
Bill Wendling
066eabb04d
Remove warnings about shadowed and unused variables.
...
llvm-svn: 52791
2008-06-26 18:11:45 +00:00
Owen Anderson
1aab7a5b2a
Use a DenseMap instead of an std::map for mangled name lookup. This is
...
improves AsmPrinter runtime on instcombine from 0.3920s to 0.3836s.
llvm-svn: 52787
2008-06-26 17:20:16 +00:00
Matthijs Kooijman
b032fedf7d
Add missing semicolumn in my last commit.
...
llvm-svn: 52780
2008-06-26 09:49:38 +00:00
Matthijs Kooijman
1b60621ac9
Improve comments wrt createInternalize.
...
llvm-svn: 52779
2008-06-26 09:48:11 +00:00
Dale Johannesen
a2de8eab61
Fixes the last x86-64 test failure in compat.exp:
...
<16 x float> is 64-byte aligned (for some reason),
which gets us into the stack realignment code. The
computation changing FP-relative offsets to SP-relative
was broken, assiging a spill temp to a location
also used for parameter passing. This
fixes it by rounding up the stack frame to a multiple
of the largest alignment (I concluded it wasn't fixable
without doing this, but I'm not very sure.)
llvm-svn: 52750
2008-06-26 01:51:13 +00:00
Eric Christopher
d0ab9c47e6
Move GetConstantStringInfo to lib/Analysis. Remove
...
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.
llvm-svn: 52748
2008-06-26 00:31:12 +00:00
Owen Anderson
b55675e1db
Remember which MachineOperand we were processing, so we don't have to scan the list to find it again later.
...
This speeds up live intervals from 0.37s to 0.30s on instcombine.
llvm-svn: 52745
2008-06-25 23:39:39 +00:00
Duncan Sands
33ff5c8d0d
Add support for expanding PPC 128 bit floats.
...
For this it is convenient to permit floats to
be used with EXTRACT_ELEMENT, so I tweaked
things to allow that. I also added libcalls
for ppcf128 to i32 forms of FP_TO_XINT, since
they exist in libgcc and this case can certainly
occur (and does occur in the testsuite) - before
the i64 libcall was being used. Also, the
XINT_TO_FP result seemed to be wrong when
the argument is an i128: the wrong fudge
factor was added (the i32 and i64 cases were
handled directly, but the i128 code fell
through to some generic softening code which
seemed to think it was i64 to f32!). So I
fixed it by adding a fudge factor that I
found in my breakfast cereal.
llvm-svn: 52739
2008-06-25 20:24:48 +00:00
Chris Lattner
d3406fc2a7
Switch the PPC backend and target-independent JIT to use the libsystem
...
InvalidateInstructionCache method instead of calling through
a hook on the JIT. This is a host feature, not a target feature.
llvm-svn: 52734
2008-06-25 17:18:44 +00:00
Chris Lattner
881d537d2c
Add a new InvalidateInstructionCache method to sys::Memory.
...
llvm-svn: 52731
2008-06-25 17:14:10 +00:00
Dan Gohman
aa01afd47c
Remove the OrigVT member from AtomicSDNode, as it is redundant with
...
the base SDNode's VTList.
llvm-svn: 52722
2008-06-25 16:07:49 +00:00
Mon P Wang
6a490371c9
Added MemOperands to Atomic operations since Atomics touches memory.
...
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub
llvm-svn: 52706
2008-06-25 08:15:39 +00:00
Dan Gohman
9aaafadc60
Make Allocate<T>() return a T* instead of a void*. And use
...
static_cast instead of reinterpret_cast.
llvm-svn: 52686
2008-06-24 17:49:26 +00:00
Dan Gohman
e1789e3783
Correct a comment.
...
llvm-svn: 52683
2008-06-24 17:46:48 +00:00
Chris Lattner
01602a18a9
Add support for building on solaris, working around namespace
...
polution problems from system headers. Patch by Nathan Keynes!
llvm-svn: 52682
2008-06-24 17:44:42 +00:00
Dan Gohman
d5cd61dca6
Pass std::string by reference. Thanks Chris!
...
llvm-svn: 52678
2008-06-24 16:40:22 +00:00
Matthijs Kooijman
19a6469e1b
Rename a few variables to be more consistent.
...
llvm-svn: 52672
2008-06-24 09:14:10 +00:00
Owen Anderson
04bbf4b5b7
Remove an incorrect comment.
...
llvm-svn: 52660
2008-06-24 00:15:10 +00:00
Owen Anderson
c2ec2f20f9
Use InstrSlots::NUM rather than pre-dividing by four. Also, mark this const.
...
llvm-svn: 52659
2008-06-24 00:08:35 +00:00
Dan Gohman
6269cc1ced
Comment fixes, and make Schedule() pure virtual.
...
llvm-svn: 52658
2008-06-24 00:02:44 +00:00
Dan Gohman
cb236f7de9
Add a clear() method to PriorityQueue.
...
llvm-svn: 52656
2008-06-23 23:47:46 +00:00
Owen Anderson
ba3e9de279
Add getScaledIntervalSize, which gives a measure of the size of an interval that is independent of the scaling of
...
the function due to empty index slots. This is suitable for use in backend heuristics that need to reason about the density
of an interval.
llvm-svn: 52652
2008-06-23 23:25:37 +00:00
Dan Gohman
e7ccb2c8c1
Simplify erase_one slightly. It's not necessary to preserve
...
the value of the element to be erased while the heap is
being updated.
llvm-svn: 52646
2008-06-23 21:46:21 +00:00
Dan Gohman
29a8220501
Use StringMap instead of std::map<std::string, SDNode*>.
...
llvm-svn: 52641
2008-06-23 21:08:32 +00:00
Dan Gohman
54cf756621
Add methods to StringMap to erase entries by key.
...
llvm-svn: 52640
2008-06-23 21:07:03 +00:00
Evan Cheng
c72dcd103c
Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit of 'reg' instead. If the top bit is set, than the LiveInterval represents a stack slot live interval.
...
llvm-svn: 52639
2008-06-23 21:03:19 +00:00
Wojciech Matyjewicz
41b744dc51
First step to fix PR2088. Implement routine to compute the
...
multiplicative inverse of a given number. Modify udivrem to allow input and
output pairs of arguments to overlap. Patch is based on the work by Chandler
Carruth.
llvm-svn: 52638
2008-06-23 19:39:50 +00:00
Dan Gohman
210e6c1876
Remove two convenience constructors because they're now private, and the
...
private implementation doesn't really need the convenience.
llvm-svn: 52629
2008-06-23 16:48:17 +00:00
Dan Gohman
4193f34538
Remove an unnecessary cast.
...
llvm-svn: 52626
2008-06-23 16:38:10 +00:00
Dan Gohman
6829fffaee
Use SCEVAddRecExpr::isAffine.
...
llvm-svn: 52614
2008-06-22 19:23:09 +00:00
Dan Gohman
0e4cf89f1a
Move a few more SCEVExpander methods out-of-line.
...
llvm-svn: 52612
2008-06-22 19:09:18 +00:00
Dan Gohman
b282cc6070
Reorder some fields in SDNode. This avoids padding,
...
reducings its size from 80 to 72 on 64-bit hosts.
llvm-svn: 52584
2008-06-21 19:26:15 +00:00
Dan Gohman
46520a25a4
Remove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeId
...
field, which is otherwise unused after instruction selection, as an index
into the SUnit array.
llvm-svn: 52583
2008-06-21 19:18:17 +00:00
Dan Gohman
a4db3352f9
Add a priority queue class, which is a wrapper around std::priority_queue
...
and provides fairly efficient removal of arbitrary elements. Switch
ScheduleDAGRRList from std::set to this new priority queue.
llvm-svn: 52582
2008-06-21 18:35:25 +00:00
Dan Gohman
e6e1348275
Change ScheduleDAG's SUnitMap from DenseMap<SDNode*, vector<SUnit*> >
...
to DenseMap<SDNode*, SUnit*>, and adjust the way cloned SUnit nodes are
handled so that only the original node needs to be in the map.
This speeds up llc on 447.dealII.llvm.bc by about 2%.
llvm-svn: 52576
2008-06-21 15:52:51 +00:00
Evan Cheng
f593a65497
Undo spill weight tweak. Need to investigate the performance regressions.
...
llvm-svn: 52572
2008-06-21 06:45:54 +00:00
Duncan Sands
b6a90ccaee
Add some methods for querying the nature of a
...
store, like the methods for loads (and neaten
those up a bit while there).
llvm-svn: 52547
2008-06-20 18:34:30 +00:00
Dan Gohman
795e2943a2
Add an allnodes_size method.
...
llvm-svn: 52541
2008-06-20 16:03:16 +00:00
Gordon Henriksen
9f337549a7
Add C binding for ExecutionEngine::addGlobalMapping.
...
llvm-svn: 52523
2008-06-20 02:16:11 +00:00
Dan Gohman
e8512ffba6
It's invalid to take the one-past-the-end address of a non-array
...
object.
llvm-svn: 52515
2008-06-20 00:49:21 +00:00
Owen Anderson
eb31adeba4
Add an idx_iterator to the insertvalue and extractvalue instructions.
...
llvm-svn: 52493
2008-06-19 17:15:57 +00:00
Dan Gohman
386c2f616f
The inline keyword goes before the return type. This fixes a compiler warning.
...
llvm-svn: 52492
2008-06-19 16:16:06 +00:00
Evan Cheng
55bc848640
Minor spiller tweak to unfavor reload into load/store instructions.
...
llvm-svn: 52477
2008-06-19 01:16:17 +00:00
Dan Gohman
095ca74a7f
Move SCEVExpander::visitAddExpr out-of-line.
...
llvm-svn: 52464
2008-06-18 16:37:11 +00:00
Dan Gohman
be928e3b21
Move LSR's private isZero function to a public SCEV member
...
function, and make use of it in several places.
llvm-svn: 52463
2008-06-18 16:23:07 +00:00
Evan Cheng
84da6318ca
Add MachineRegisterInfo::use_empty.
...
llvm-svn: 52451
2008-06-18 07:47:55 +00:00
Devang Patel
772a008738
Check empty dominance frontier.
...
llvm-svn: 52437
2008-06-18 02:12:09 +00:00