Commit Graph

95796 Commits

Author SHA1 Message Date
Bill Wendling
5ebe6ccf65 Use a default value for the prologue's debug location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190366 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 23:28:15 +00:00
Manman Ren
d4fc36f264 Debug Info: In DIBuilder, the context fields of a TAG_inheritance and a
TAG_friend are updated to use scope reference.

Added testing cases to verify that class with inheritance can be uniqued.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190364 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 23:07:58 +00:00
Manman Ren
e72aba9c0f Debug Info: move DIScope::getContext back from DwarfDebug.
This partially reverts r190330. DIScope::getContext now returns DIScopeRef
instead of DIScope. We construct a DIScopeRef from DIScope when we are
dealing with subprogram, lexical block or name space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190362 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 22:35:23 +00:00
Andrew Trick
ee50a46026 mi-sched: smooth out the cyclicpath heuristic.
Arnold's idea.

I generally try to avoid stateful heuristics because it can make
debugging harder. However, we need a way to prevent the latency
priority from dominating, and it somewhat makes sense to schedule
aggressively for latency only within an issue group.

Swift in particular likes this, and it doesn't hurt anyone else:
| Benchmarks/MiBench/consumer-lame              |  10.39% |
| Benchmarks/Misc/himenobmtxpa                  |   9.63% |

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 22:28:08 +00:00
Jack Carter
3af4d25067 white spaces and long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190358 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 22:02:08 +00:00
Eli Friedman
b1c54930cb Don't shrink atomic ops to bool in GlobalOpt.
LLVM IR doesn't currently allow atomic bool load/store operations, and the
transformation is dubious anyway because it isn't profitable on all platforms.

PR17163.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 22:00:13 +00:00
Bill Wendling
1d5ad97531 Set the encoding to '0' if we don't have an MAB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 21:22:44 +00:00
Quentin Colombet
2c6ef1c433 [InstCombiner] Expose opportunities to merge subtract and comparison.
Several architectures use the same instruction to perform both a comparison and
a subtract. The instruction selection framework does not allow to consider
different basic blocks to expose such fusion opportunities.

Therefore, these instructions are “merged” by CSE at MI IR level.

To increase the likelihood of CSE to apply in such situation, we reorder the
operands of the comparison, when they have the same complexity, so that they
matches the order of the most frequent subtract.
E.g.,

icmp A, B
...
sub B, A

<rdar://problem/14514580>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:56:48 +00:00
Manman Ren
0b9ba182a7 Debug Info Testing: remove a commented out line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:45:34 +00:00
Bill Wendling
b0c8b25177 Another attempt to fix windows buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:29:32 +00:00
Bill Wendling
e1e9008e7c Attempt to fix buildbots by giving an explicit output to the llvm-mc command.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190349 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:22:38 +00:00
Bill Wendling
e93ad1a580 Expand test to make sure that we can generate compact unwind from an ASM file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190348 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:12:36 +00:00
Bill Wendling
4f02c41a36 Expand test to make sure that we can generate compact unwind from an ASM file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190347 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:10:54 +00:00
Eric Christopher
28b020d373 Always add global names. We're adding them in the rest of the code
as well as types.

No functional change as they're not emitted unless the option
is true anyhow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:03:20 +00:00
Eric Christopher
5747932508 Rename for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190345 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:03:17 +00:00
Eric Christopher
328a20471d Add the gnu pubnames and pubtypes sections to the mc object file
handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190344 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:03:14 +00:00
Eric Christopher
d4ad5e32a6 Add constant defines for gnu pubnames and gnu pubtypes - they're used
for the gdb index as the names convey.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:03:11 +00:00
Eric Christopher
8e54341935 Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190342 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 20:03:08 +00:00
Bill Wendling
da11df0c22 Call generateCompactUnwindEncodings() right before we need to output the frame information.
There are more than one paths to where the frame information is emitted. Place
the call to generateCompactUnwindEncodings() into the method which outputs the
frame information, thus ensuring that the encoding is there for every path. This
involved threading the MCAsmBackend object through to this method.

<rdar://problem/13623355>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:48:37 +00:00
Manman Ren
2c9905a1f3 Debug Info: Use DIScopeRef for DIType::getContext.
In DIBuilder, the context field of a TAG_member is updated to use the
scope reference. Verifier is updated accordingly.
    
DebugInfoFinder now needs to generate a type identifier map to have
access to the actual scope. Same applies for BreakpointPrinter.
    
processModule of DebugInfoFinder is called during initialization phase
of the verifier to make sure the type identifier map is constructed early
enough.
    
We are now able to unique a simple class as demonstrated by the added
testing case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190334 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:47:11 +00:00
Bob Wilson
0b67c2127e Update CMake file to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190331 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:25:11 +00:00
Manman Ren
18eb245a2e Debug Info: move DIScope::getContext to DwarfDebug.
DIScope::getContext is a wrapper function that calls the specific getContext
method on each subclass. When we switch DIType::getContext to return DIScopeRef
instead of DIScope, DIScope::getContext can no longer return a DIScope without
a type identifier map.
    
DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
to have easy access to the type identifier map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190330 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:23:58 +00:00
Bob Wilson
db3a9e64f8 Revert patches to add case-range support for PR1255.
The work on this project was left in an unfinished and inconsistent state.
Hopefully someone will eventually get a chance to implement this feature, but
in the meantime, it is better to put things back the way the were.  I have
left support in the bitcode reader to handle the case-range bitcode format,
so that we do not lose bitcode compatibility with the llvm 3.3 release.

This reverts the following commits: 155464, 156374, 156377, 156613, 156704,
156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575,
157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884,
157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100,
159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659,
159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190328 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:14:35 +00:00
Sean Silva
cce639979d [docs] Fix Sphinx warning.
Adornments need to be at least as long as the thing they adorn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190327 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:13:28 +00:00
Sean Silva
0774681991 [docs] Fix some Sphinx toctree warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190326 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:09:00 +00:00
Manman Ren
02d296759c Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.
This helper function needs the type identifier map when we switch
DIType::getContext to return DIScopeRef instead of DIScope.

Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug
to have easy access to the map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:05:21 +00:00
Sean Silva
7f2576ddb0 [docs] Some typographical fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190324 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:05:03 +00:00
Manman Ren
c573305bce Debug Info: Rename DITypeRef to DIScopeRef.
A reference to a scope is more general than a reference to a type since
DIType is a subclass of DIScope.

A reference to a type can be either an identifier for the type or
the DIType itself, while a reference to a scope can be either an
identifier for the type (when the scope is indeed a type) or the
DIScope itself. A reference to a type and a reference to a scope
will be resolved in the same way. The only difference is in the
verifier when a field is a reference to a type (i.e. the containing
type field of a DICompositeType) or a field is a reference to a scope
(i.e. the context field of a DIType).

This is to get ready for switching DIType::getContext to return
DIScopeRef instead of DIScope.

Tighten up isTypeRef and isScopeRef to make sure the identifier is not
empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190322 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:03:51 +00:00
Manman Ren
626a4b785b Debug Info: Update isScope to make sure DIType is a scope and
TAG_file_type is also a scope.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190321 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 19:00:55 +00:00
Akira Hatanaka
2dd3afc5e6 [mips] When double precision loads and stores are split into two i32 loads and
stores, make sure the load or store that accesses the higher half does not have
an alignment that is larger than the offset from the original address.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190318 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 17:59:32 +00:00
Benjamin Kramer
54cf1413ac [stackprotector] Modernize code with IRBuilder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190317 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 17:38:01 +00:00
Joey Gouly
b57d99694b [ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
IT blocks can only be one instruction lonf, and can only contain a subset of
the 16 instructions.

Patch by Artyom Skrobov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190309 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 14:21:49 +00:00
Aaron Ballman
7b80d9233a A better way to silence the warning in MSVC (replaces r190304).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190308 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 14:17:30 +00:00
Aaron Ballman
4220bb24f5 Silencing a warning about control flow reaching the end of a non-void function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190304 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 13:22:45 +00:00
Robert Lytton
71537c1783 XCore handling of thread local lowering
Fix XCoreLowerThreadLocal trying to initialise globals
which have no initializer.

Add handling of const expressions containing thread local variables.
These need to be replaced with instructions, as the thread ID is
used to access the thread local variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190300 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 10:42:11 +00:00
Robert Lytton
7c739380ee XCore target: change to Sched::Source
This sidesteps a bug in PrescheduleNodesWithMultipleUses() which
does not check if callResources will be affected by the transformation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 10:42:05 +00:00
Robert Lytton
5c28673c3b XCore target: fix weak linkage attribute handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190298 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 10:41:57 +00:00
Bill Wendling
c3cee57f7d Generate compact unwind encoding from CFI directives.
We used to generate the compact unwind encoding from the machine
instructions. However, this had the problem that if the user used `-save-temps'
or compiled their hand-written `.s' file (with CFI directives), we wouldn't
generate the compact unwind encoding.

Move the algorithm that generates the compact unwind encoding into the
MCAsmBackend. This way we can generate the encoding whether the code is from a
`.ll' or `.s' file.

<rdar://problem/13623355>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190290 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 02:37:14 +00:00
Jiangning Liu
959cd8f49b Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following 26 instructions,
SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190288 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 02:20:27 +00:00
Manman Ren
56736c18c1 Debug Info Testing: use null instead of an empty string in context field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 00:12:17 +00:00
Renato Golin
8216947d4d Cross-compilation doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190282 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 20:44:48 +00:00
Sylvestre Ledru
0427f042ff Bring back the build of libprofile_rt on Sparc. It is now working correctly. See:
https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.3&arch=sparc&ver=1%3A3.3-9&stamp=1378398308

Thanks to Luca Falavigna for the patch



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190273 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 09:15:09 +00:00
Manman Ren
c7a25acefa Revert r190269 to fix dragonegg failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190271 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 06:02:56 +00:00
Manman Ren
4fa214b2b9 Debug Info: use null instead of "i32 0" in DIBuilder.
For context field of subroutine_type and when creating artificial types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190270 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 06:00:42 +00:00
Manman Ren
d372889eab Debug Info: pass in DIScope instead of DIDescriptor in createMemberType.
Improve readability. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190269 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 04:07:59 +00:00
Manman Ren
1ed2e1fb92 Debug Info Testing: update context from empty string to null.
Context should be either null or MDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190267 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 03:11:54 +00:00
Craig Topper
704e8d41fe Add neverHasSideEffects=1 on a couple move instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190259 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 00:50:45 +00:00
Craig Topper
89bf2e163c Using popcount should check the popcount feature flag not the SSE41 feature flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190258 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 00:47:31 +00:00
Bill Wendling
baaefaf828 Run clang-format on these header files. Part of a WIP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-07 11:55:36 +00:00
Akira Hatanaka
0917ca56dc [mips] Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190236 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-07 01:14:42 +00:00