Commit Graph

3469 Commits

Author SHA1 Message Date
Anton Korobeynikov
c33a744f0e Use isWeakForLinker() hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53318 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:27:59 +00:00
Anton Korobeynikov
e87f52d722 Switch to new section name handling facility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53316 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:27:16 +00:00
Anton Korobeynikov
7e7fc82cf3 Another bunch of hacks for named sections support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53315 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:26:52 +00:00
Anton Korobeynikov
1290ecf5b9 Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53314 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:26:24 +00:00
Anton Korobeynikov
87fc6b4f86 Drop mergeable flag, if size is no suitable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53313 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:26:05 +00:00
Anton Korobeynikov
2a889172a4 Fix several bugs in named sections handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53312 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:25:46 +00:00
Anton Korobeynikov
b20015b621 Add hacky way to distinguish named and named sections. This will be generalized in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53311 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:25:26 +00:00
Anton Korobeynikov
0e48a0ca16 Fix thinko
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53309 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:24:38 +00:00
Anton Korobeynikov
c6f4947d48 Drop dead member reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53308 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:24:18 +00:00
Anton Korobeynikov
4039e680bc Add funny darwin section selection logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53307 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:23:57 +00:00
Anton Korobeynikov
01b0e24c25 Handle ELF mergeable sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53306 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:23:37 +00:00
Anton Korobeynikov
4260ad3e7d Provide section selection for X86 ELF targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53305 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:23:08 +00:00
Anton Korobeynikov
265c5259ab Provide general hook for section name calculation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53304 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:22:46 +00:00
Anton Korobeynikov
6d82942092 Print entity size for mergeable sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53303 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:22:17 +00:00
Anton Korobeynikov
f447e3d311 Split PrintSectionFlags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53302 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:21:49 +00:00
Anton Korobeynikov
b9a02fcaf6 Split UniqueSectionForGlobal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53301 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:21:29 +00:00
Anton Korobeynikov
b9e58efdb9 Split PreferredEHDataFormat hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53300 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:21:08 +00:00
Anton Korobeynikov
4468b7a988 Split X86TargetAsmInfo into 4 subtarget-specific classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53299 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:20:48 +00:00
Anton Korobeynikov
8210045b9f Whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53298 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:20:27 +00:00
Anton Korobeynikov
6e405f3f77 Move flag decoding stuff into special hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53297 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:20:07 +00:00
Anton Korobeynikov
29b03f7375 Properly handle linkonce stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53296 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:19:38 +00:00
Anton Korobeynikov
c0f41db19c Provide skeletone code for calculation of section, where global should be emitted into
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53295 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 13:19:08 +00:00
Evan Cheng
526be70f94 Back out 53254. It broke ppc debug info codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53280 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-09 06:36:53 +00:00
Dale Johannesen
f71cb9b3ed Make debug info come out in data-only files.
This is a question of the debugging setup code not
being called at the right time, and it's called from
target-dependent code for some reason.  I have only
attempted to fix Darwin, but I'm pretty sure it's
broken elsewhere; I'll leave that to people who can
test it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53254 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 21:56:22 +00:00
Evan Cheng
ab8faba2fb Unbreak C++ tests on x86 Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53237 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 16:40:43 +00:00
Evan Cheng
77c8f7674d Avoid unnecessary string construction during asm printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53215 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 00:55:58 +00:00
Dan Gohman
8e5f2c6f65 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53212 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 23:14:23 +00:00
Evan Cheng
ae270f66aa ATT asm printer just print register AsmName's instead of calling tolower on each charater of Name. This speeds it up by 10%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53208 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 22:21:06 +00:00
Dan Gohman
6b345ee9b2 Make DenseMap's insert return a pair, to more closely resemble std::map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53177 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 17:46:23 +00:00
Duncan Sands
126d90770b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53137 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-04 11:47:58 +00:00
Duncan Sands
ececf99c07 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53134 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-04 09:55:48 +00:00
Evan Cheng
cb2627395d Back out 53091 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53109 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 18:11:29 +00:00
Evan Cheng
9f1c8317a4 - 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 09:09:37 +00:00
Anton Korobeynikov
f550f472ee llvm-gcc sometimes marks external declarations hidden, because intializers are
processed separately. Honour such situation and emit PIC relocations properly
in such case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53091 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 07:43:14 +00:00
Evan Cheng
457b88fb95 commuteInstruction should preserve dead markers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53060 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 00:04:51 +00:00
Owen Anderson
f660c171c8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53058 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02 23:41:07 +00:00
Duncan Sands
4bdcb61af3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53035 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02 17:40:58 +00:00
Bill Wendling
aa8f8889a8 Darwin doesn't need exception handling information for the "move" info when
debug information is being output, because it's leet!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52994 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 23:34:48 +00:00
Dan Gohman
2dad0250f6 Prune a few dependencies on MachineFunction.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 18:15:35 +00:00
Evan Cheng
4576f6d7a9 Do not use computationally expensive scheduling heuristics with -fast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52971 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 18:05:03 +00:00
Duncan Sands
d9ad8abc8e Highlight that getMergeValues optimization is
being suppressed here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52952 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 08:00:49 +00:00
Dan Gohman
4406604047 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 00:05:16 +00:00
Dan Gohman
d19a53ba1d std::ostream and std::string microoptimizations for asm printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52929 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 22:03:41 +00:00
Dan Gohman
87060f55f2 Update comments to new-style syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 21:00:56 +00:00
Dan Gohman
7f460203b0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:59:49 +00:00
Evan Cheng
db8d56b825 Split scheduling from instruction selection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:45:06 +00:00
Duncan Sands
f9516208e5 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52893 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 10:19:09 +00:00
Anton Korobeynikov
4d580651b3 Unbreak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52866 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:10:06 +00:00
Anton Korobeynikov
f0302cd1ae Temporary rever invalid commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:09:48 +00:00
Anton Korobeynikov
e51ab444f4 Move printing of module-level GVs into dedicated helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52864 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:09:32 +00:00