Dan Gohman
83d9009473
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
157e75d975
Fix a copy+pasto in an assertion string.
...
llvm-svn: 53419
2008-07-10 19:58:23 +00:00
Dan Gohman
b379840cf7
Stack objects have nonnegative indices, not just positive indices.
...
llvm-svn: 53418
2008-07-10 19:57:25 +00:00
Dan Gohman
bb0847c84c
Escape the graph name. This unbreaks -view-cfg.
...
llvm-svn: 53417
2008-07-10 19:55:54 +00:00
Dan Gohman
2b9dccb286
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
a6c09579f0
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
90a916539d
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
e667a05fcb
Correct a comment.
...
llvm-svn: 53401
2008-07-10 11:21:59 +00:00
Evan Cheng
3ec3113431
- 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
cd6afe938b
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
80f6966c7f
- 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
e10fc737ca
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
679872b05f
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
f6e651fcf2
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
80f0406385
Silence a warning
...
llvm-svn: 53326
2008-07-09 13:56:43 +00:00
Anton Korobeynikov
7b144cc108
Drop enum and use constants for SectionFlags
...
llvm-svn: 53325
2008-07-09 13:41:07 +00:00
Anton Korobeynikov
03614f247c
First sketch of special section objects
...
llvm-svn: 53320
2008-07-09 13:28:49 +00:00
Anton Korobeynikov
3399dc61e5
Unbreak
...
llvm-svn: 53317
2008-07-09 13:27:37 +00:00
Anton Korobeynikov
1f697cd97b
Another bunch of hacks for named sections support
...
llvm-svn: 53315
2008-07-09 13:26:52 +00:00
Anton Korobeynikov
933bf0ecc4
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
751cfda7dd
Handle ELF mergeable sections
...
llvm-svn: 53306
2008-07-09 13:23:37 +00:00
Anton Korobeynikov
f42d75201a
Provide general hook for section name calculation
...
llvm-svn: 53304
2008-07-09 13:22:46 +00:00
Anton Korobeynikov
c421fcddb4
Print entity size for mergeable sections
...
llvm-svn: 53303
2008-07-09 13:22:17 +00:00
Anton Korobeynikov
059999d321
Move flag decoding stuff into special hook
...
llvm-svn: 53297
2008-07-09 13:20:07 +00:00
Anton Korobeynikov
ca271dd426
Properly handle linkonce stuff
...
llvm-svn: 53296
2008-07-09 13:19:38 +00:00
Anton Korobeynikov
782a69505d
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
c150d11dbd
Make hooks virtual
...
llvm-svn: 53293
2008-07-09 13:18:21 +00:00
Anton Korobeynikov
5bc572ad96
Add default section name resolution routine
...
llvm-svn: 53292
2008-07-09 13:18:02 +00:00
Anton Korobeynikov
552675bb0f
Constify
...
llvm-svn: 53291
2008-07-09 13:17:36 +00:00
Anton Korobeynikov
651865851c
Add code for default section falgs computation
...
llvm-svn: 53290
2008-07-09 13:16:59 +00:00
Chris Lattner
b650adae49
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
86adf455bd
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
2e23cd5a18
const-ify SelectionDAG::getNodeValueTypes.
...
llvm-svn: 53264
2008-07-09 00:00:42 +00:00
Dan Gohman
5b24b3baef
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
e2169bec88
The graph name really does matter for configurations that use gv.
...
llvm-svn: 53259
2008-07-08 23:33:46 +00:00
Evan Cheng
6af015292e
Unbreak C++ tests on x86 Darwin.
...
llvm-svn: 53237
2008-07-08 16:40:43 +00:00
Duncan Sands
65028bf60d
Add some helpers for manipulating function
...
parameter attributes.
llvm-svn: 53228
2008-07-08 09:41:30 +00:00
Matthijs Kooijman
4cf0a68307
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
8aaa85f108
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
b854603cb5
Add some convenience methods for manipulating
...
call attributes.
llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Nick Lewycky
9cecc07bec
Expand SCEVUDiv of power of 2 to a lshr instruction.
...
llvm-svn: 53217
2008-07-08 05:05:37 +00:00
Evan Cheng
5be1103646
Avoid unnecessary string construction during asm printing.
...
llvm-svn: 53215
2008-07-08 00:55:58 +00:00
Dan Gohman
cd25487258
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
93e0208361
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
60e964b34c
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
d7da49634d
Use StringMap for greater justice!
...
llvm-svn: 53202
2008-07-07 20:59:31 +00:00
Dan Gohman
d787dcfa3d
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
255eb1d296
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
f2b95cb24f
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
1834981eb0
Make ilist noncopyable too.
...
llvm-svn: 53190
2008-07-07 18:43:32 +00:00