Commit Graph

15831 Commits

Author SHA1 Message Date
Paul Robinson
6079f00035 Teach ISel not to optimize 'optnone' functions.
Based on work by Andrea Di Biagio.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195317 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 06:33:32 +00:00
Eric Christopher
7b98dd33fd Move DebugInfoOffset member near the other data member it helps describe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 01:29:16 +00:00
Eric Christopher
b553c81cf6 Reflow some documentation and remove whitespace comments. Move
DebugInfoOffset data member up with the rest of the data members.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195298 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 01:29:13 +00:00
Eric Christopher
1531e711ac Add more documenation for the lookup tables data members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 01:16:31 +00:00
Eric Christopher
bd355a033e Reorder language in the CompileUnit description and add a comment.
Language may only be a temporary addition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195296 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 01:14:00 +00:00
Eric Christopher
76ef8af358 Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 01:01:30 +00:00
Eric Christopher
ba5ab8289c Constify the DIEs used for pubname and pubtype tables. Propagate
through findAttribute etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195290 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 00:48:22 +00:00
Benjamin Kramer
16e2f0ef1a MachineBlockPlacement: Strengthen the source order bias when picking an exit block.
We now only allow breaking source order if the exit block frequency is
significantly higher than the other exit block. The actual bias is
currently under a flag so the best cut-off can be found; the flag
defaults to the old behavior. The idea is to get some benchmark coverage
over different values for the flag and pick the best one.

When we require the new frequency to be at least 20% higher than the old
frequency I see a 5% speedup on zlib's deflate when compressing a random
file on x86_64/westmere. Hal reported a small speedup on Fhourstones on
a BG/Q and no regressions in the test suite.

The test case is the full long_match function from zlib's deflate. I was
reluctant to add it for previous tweaks to branch probabilities because
it's large and potentially fragile, but changed my mind since it's an
important use case and more likely to break with all the current work
going into the PGO infrastructure.

Differential Revision: http://llvm-reviews.chandlerc.com/D2202

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195265 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 19:08:44 +00:00
David Blaikie
ba883cebd6 DwarfCompileUnit: Initialize DebugInfoOffset.
While not strictly necessary (the class has an invariant that
"setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone
client that actually gets the default zero offset is buggy/broken) this
is consistent with the code as originally written and the removal of the
initialization was an accident in r195166.

Suggested by Manman Ren.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195263 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 18:52:39 +00:00
David Blaikie
89cadbe6b0 CR feedback for r195166: Add comments regarding type unit mapping and type units disabling cross-CU sharing.
Changes suggested by Manman Ren.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195262 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 18:40:16 +00:00
Eric Christopher
9259787e4f Remove polymorphic destruction for DIE. DIEBlocks are owned elsewhere
and not polymorphically deleted and they are the only thing that derive
from DIE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195183 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 00:54:31 +00:00
Eric Christopher
b88a94faaa Remove capability for polymorphic destruction from LexicalScope
and LexicalScopes, we're not using it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195182 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 00:54:28 +00:00
Eric Christopher
1f12b50b83 Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195181 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 00:54:25 +00:00
Eric Christopher
73a69d6e93 Formatting, 80-col, trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195180 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 00:54:19 +00:00
Jack Carter
1357859c0d long line correction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-20 00:32:32 +00:00
Aditya Nandakumar
3da011f561 Fixed an extra for(typo) in the comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195171 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 23:51:32 +00:00
Jack Carter
2f0f121732 long lines and white space correction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195170 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 23:43:22 +00:00
David Blaikie
6fe6dc19f8 DebugInfo: Partial implementation of DWARF type units.
Emit DW_TAG_type_units into the debug_info section using compile unit
headers. This is bogus/unusable by debuggers, but testable and provides
more isolated review.

Subsequent patches will include support for type unit headers and
emission into the debug_types section, as well as comdat grouping the
types based on their hash. Also the CompileUnit type will be renamed
'Unit' and relevant portions pulled out into respective CompileUnit and
TypeUnit types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195166 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 23:08:21 +00:00
David Blaikie
d4010998b0 DebugInfo: Constify accelerator table handling, and separate type accelarator insertion in preparation for a second use of this code from type units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 22:51:04 +00:00
Juergen Ributzka
217baac774 [DAG] Refactor vector splitting code in SelectionDAG. No functional change intended.
Reviewed by Tom

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195156 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 21:20:17 +00:00
Rafael Espindola
72935dd909 Support multiple COFF sections with the same name but different COMDAT.
This is the first step to fix pr17918.

It extends the .section directive a bit, inspired by what the ELF one looks
like. The problem with using linkonce is that given

.section foo
.linkonce....

.section foo
.linkonce

we would already have switched sections when getting to .linkonce. The cleanest
solution seems to be to add the comdat information in the .section itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195148 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 19:52:52 +00:00
Andrew Trick
0d63cf0812 Obvious pasto survived a couple rounds of cleanup.
Caught by Aaron Ballman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195138 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 18:29:45 +00:00
Eric Christopher
4d06b6d28f Formatting and 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195122 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 09:28:34 +00:00
Eric Christopher
5efc006438 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195121 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 09:11:26 +00:00
Eric Christopher
d2b3a0243c Refactor the section emission code to remove duplicates now that
we can emit various sections in any order.
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195120 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 09:04:50 +00:00
Eric Christopher
eee5230373 Reformat file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195119 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 09:04:36 +00:00
Andrew Trick
0b843861c6 Fix patchpoint comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195103 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 05:05:43 +00:00
Andrew Trick
8ddf988ef4 Add an abstraction to handle patchpoint operands.
Hard-coded operand indices were scattered throughout lowering stages
and layers. It was super bug prone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 03:29:56 +00:00
Juergen Ributzka
354362524a [weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file. The memory leaks in this version have been fixed. Thanks
Alexey for pointing them out.

Differential Revision: http://llvm-reviews.chandlerc.com/D2068

Reviewed by Andy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 00:57:56 +00:00
David Blaikie
8da7540802 DwarfDebug: Move trailing else to the same line as prior closing brace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-18 23:59:04 +00:00
David Blaikie
d6dffb40cb DwarfDebug: Remove some more redundant explicit constructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195059 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-18 23:57:26 +00:00
David Blaikie
4adba52570 DebugInfo: Simplify a few more explicit constructions, underconstrained types, and make DIType(MDNode*) explicit like all the other DI* node ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195055 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-18 23:33:32 +00:00
Alexey Samsonov
b21ab43cfc Revert r194865 and r194874.
This change is incorrect. If you delete virtual destructor of both a base class
and a subclass, then the following code:
  Base *foo = new Child();
  delete foo;
will not cause the destructor for members of Child class. As a result, I observe
plently of memory leaks. Notable examples I investigated are:
ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-18 09:31:53 +00:00
David Blaikie
17a88a7e8b Remove unnecessary temporary construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194981 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 21:59:31 +00:00
David Blaikie
fbf70b383d Remove redundant explicit default initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 21:57:33 +00:00
David Blaikie
08e51e1d97 DwarfCompileUnit: Add type safety to createGlobalVariableDIE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 21:55:13 +00:00
Bill Wendling
fe128c6ac8 Revert "Micro-optimization"
This reverts commit f1d9fe9d04.

This was causing PR17964. We need to use thread data before regular data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194960 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 10:53:13 +00:00
Benjamin Kramer
d5ae5b0186 DAGCombiner: Partially revert r192795, getNOT was fixed not to create illegal constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194959 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 10:40:03 +00:00
Matt Arsenault
ca1b7799aa Use more getZExtOrTruncs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 02:31:26 +00:00
Matt Arsenault
91053d585a Use getZExtOrTrunc instead of repeating the same logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194944 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 02:24:21 +00:00
Andrew Trick
bb756ca244 Added a size field to the stack map record to handle subregister spills.
Implementing this on bigendian platforms could get strange. I added a
target hook, getStackSlotRange, per Jakob's recommendation to make
this as explicit as possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194942 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 01:36:23 +00:00
Matt Arsenault
94437c9691 Use right address space pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17 00:06:39 +00:00
Matt Arsenault
e6e811277f Fix assert on unaligned access to global with different address space size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194934 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-16 20:50:54 +00:00
Matt Arsenault
4fe5b640ee Fix codegen for null different sized pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194932 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-16 20:24:41 +00:00
David Blaikie
1dc2723996 DwarfCompileUnit: Push type safety of DIDescriptor through CompileUnit::createAndAddDIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194902 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-16 00:29:01 +00:00
David Blaikie
21c9708c09 DwarfCompileUnit: Remove unnecessary OwningPtr<T>::get() call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194901 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-16 00:28:15 +00:00
Eric Christopher
87fd14d9b5 For dwarf4 use the correct form for referencing debug_loc locations,
and update test cases accordingly.

This doesn't affect the output dumped using llvm-dwarfdump, but
readelf does now dump the debug_loc section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194898 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-16 00:18:40 +00:00
David Blaikie
7b86771094 DwarfCompileUnit: Add type safety to CompileUnit::getNode by returning DICompileUnit instead of a raw MDNode*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194895 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15 23:54:45 +00:00
David Blaikie
942431fa71 DwarfCompileUnit: Add type safety by using DICompileUnit rather than raw MDNode* for the CU metadata node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194893 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15 23:52:02 +00:00
David Blaikie
aedaa723c2 DwarfCompileUnit: Simplify getLanguage() calls to use existing member function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15 23:50:53 +00:00