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
Dan Gohman
fca9922b1b
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
ddcc08e98f
Make BumpPtrAllocator noncopyable.
...
llvm-svn: 53188
2008-07-07 18:38:14 +00:00
Dan Gohman
68abfdf98d
Add a space between * and /* to help simple-minded lexers.
...
llvm-svn: 53187
2008-07-07 18:34:27 +00:00
Dan Gohman
d263602463
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
dd9c91e583
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
3755664b6d
Remove unnecessary static_casts.
...
llvm-svn: 53181
2008-07-07 18:08:20 +00:00
Dan Gohman
9112a5463e
Remove an unnecessary reinterpret_cast.
...
llvm-svn: 53180
2008-07-07 18:07:36 +00:00
Dan Gohman
955fdc7a4c
Add explicit keywords.
...
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Dan Gohman
c97817aac3
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
1d321b8875
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
0caf597378
LegalizeTypes soft-float support for stores of a
...
float value.
llvm-svn: 53165
2008-07-07 00:08:12 +00:00
Anton Korobeynikov
47e1a76977
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
e85e0b1bbc
80col
...
llvm-svn: 53153
2008-07-05 22:41:37 +00:00
Mon P Wang
a43d6758ac
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
3ea6f15708
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
aac5c915ed
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
e3ad6f2249
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
2c9a84d788
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
af72f3b02e
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
01e53a3406
Backed out 53031.
...
llvm-svn: 53110
2008-07-03 18:20:14 +00:00
Evan Cheng
1f6148a84c
- 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
9c78662057
Use operator new instead of new char[].
...
llvm-svn: 53067
2008-07-03 00:59:36 +00:00
Evan Cheng
7c3920e692
- 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
604f9f722d
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