Colin LeMahieu [Sat, 30 May 2015 18:55:47 +0000 (18:55 +0000)]
[Hexagon] Adding basic relaxation functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238660
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Sat, 30 May 2015 18:42:22 +0000 (18:42 +0000)]
[MC] Allow backends to decide relaxation for unresolved fixups.
Differential Revision: http://reviews.llvm.org/D8217
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238659
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 30 May 2015 17:33:13 +0000 (17:33 +0000)]
[lib/Fuzzer] make assertions more informative and update comments for the user-supplied mutator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238658
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 May 2015 13:52:30 +0000 (13:52 +0000)]
[MC] Reorder MCSymbol members to reduce padding.
sizeof(MCSymbol) goes from 72 to 64 bytes on x86_64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238655
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 30 May 2015 13:01:42 +0000 (13:01 +0000)]
Stripped trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238654
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Sat, 30 May 2015 10:44:07 +0000 (10:44 +0000)]
Comment change. NFC
That comment misleads the current discussions in mentioned bug. Leave
the discussions to the bug. Also, adding a future change FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238653
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 10:35:03 +0000 (10:35 +0000)]
[x86] Unify the horizontal adding used for popcount lowering taking the
best approach of each.
For vNi16, we use SHL + ADD + SRL pattern that seem easily the best.
For vNi32, we use the PUNPCK + PSADBW + PACKUSWB pattern. In some cases
there is a huge improvement with this in IACA's estimated throughput --
over 2x higher throughput!!!! -- but the measurements are too good to be
true. In one narrow case, the SHL + ADD + SHL + ADD + SRL pattern looks
slightly faster, but I'm not sure I believe any of the measurements at
this point. Both are the exact same uops though. Hard to be confident of
anything past that.
If anyone wants to collect very detailed (Agner-level) timings with the
result of this patch, or with the i32 case replaced with SHL + ADD + SHl
+ ADD + SRL, I'd be very interested. Note that you'll need to test it on
both Ivybridge and Haswell, with both SSE3, SSSE3, and AVX selected as
I saw unique behavior in each of these buckets with IACA all of which
should be checked against measured performance.
But this patch is still a useful improvement by dropping duplicate work
and getting the much nicer PSADBW lowering for v2i64.
I'd still like to rephrase this in terms of generic horizontal sum. It's
a bit lame to have a special case of that just for popcount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238652
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Sat, 30 May 2015 10:30:02 +0000 (10:30 +0000)]
[ARMTargetParser] Move IAS arch ext parser. NFC
The plan was to move the whole table into the already existing ArchExtNames
but some fields depend on a table-generated file, and we don't yet have this
feature in the generic lib/Support side.
Once the minimum target-specific table-generated files are available in a
generic fashion to these libraries, we'll have to keep it in the ASM parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 09:46:16 +0000 (09:46 +0000)]
[x86] Split out the horizontal byte sum lowering component of the LUT
lowering into a helper function.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238650
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 30 May 2015 07:36:01 +0000 (07:36 +0000)]
[TableGen] Merge RecTy::typeIsConvertibleTo and RecTy::baseClassOf. NFC
typeIsConvertibleTo was just calling baseClassOf(this) on the argument passed to it, but there weren't different signatures for baseClassOf so passing 'this' didn't really do anything interesting. typeIsConvertibleTo could have just been a non-virtual method in RecTy. But since that would be kind of a silly method, I instead re-distributed the logic from baseClassOf into typeIsConvertibleTo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238648
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 30 May 2015 07:35:21 +0000 (07:35 +0000)]
Fix indentation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238647
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 30 May 2015 07:34:51 +0000 (07:34 +0000)]
[TableGen] Remove all the variations of RecTy::convertValue and just handle the conversions in convertInitializerTo directly. This saves a bunch of vtable entries. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238646
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 06:02:37 +0000 (06:02 +0000)]
[x86] Update the order of instructions after I switched to a bitcast
helper that skips creating a cast when it isn't necessary.
It's really somewhat concerning that this was caused by the the presence
of a no-op bitcast, but...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238642
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 30 May 2015 04:56:02 +0000 (04:56 +0000)]
[WinCOFF] Add support for the .safeseh directive
.safeseh adds an entry to the .sxdata section to register all the
appropriate functions which may handle an exception. This entry is not
a relocation to the symbol but instead the symbol table index of the
function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238641
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 04:23:13 +0000 (04:23 +0000)]
[x86] Replace the long spelling of getting a bitcast with the *much*
shorter one. NFC.
In addition to being much shorter to type and requiring fewer arguments,
this change saves over 30 lines from this one file, all wasted on total
boilerplate...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 04:19:57 +0000 (04:19 +0000)]
[x86] Replace the long spelling of getting a bitcast with the new short
spelling. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238639
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 04:14:10 +0000 (04:14 +0000)]
[sdag] Add the helper I most want to the DAG -- building a bitcast
around a value using its existing SDLoc.
Start using this in just one function to save omg lines of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238638
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 04:05:11 +0000 (04:05 +0000)]
[x86] Restore the bitcasts I removed when refactoring this to avoid
shifting vectors of bytes as x86 doesn't have direct support for that.
This removes a bunch of redundant masking in the generated code for SSE2
and SSE3.
In order to avoid the really significant code size growth this would
have triggered, I also factored the completely repeatative logic for
shifting and masking into two lambdas which in turn makes all of this
much easier to read IMO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238637
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 03:20:59 +0000 (03:20 +0000)]
[x86] Implement a faster vector population count based on the PSHUFB
in-register LUT technique.
Summary:
A description of this technique can be found here:
http://wm.ite.pl/articles/sse-popcount.html
The core of the idea is to use an in-register lookup table and the
PSHUFB instruction to compute the population count for the low and high
nibbles of each byte, and then to use horizontal sums to aggregate these
into vector population counts with wider element types.
On x86 there is an instruction that will directly compute the horizontal
sum for the low 8 and high 8 bytes, giving vNi64 popcount very easily.
Various tricks are used to get vNi32 and vNi16 from the vNi8 that the
LUT computes.
The base implemantion of this, and most of the work, was done by Bruno
in a follow up to D6531. See Bruno's detailed post there for lots of
timing information about these changes.
I have extended Bruno's patch in the following ways:
0) I committed the new tests with baseline sequences so this shows
a diff, and regenerated the tests using the update scripts.
1) Bruno had noticed and mentioned in IRC a redundant mask that
I removed.
2) I introduced a particular optimization for the i32 vector cases where
we use PSHL + PSADBW to compute the the low i32 popcounts, and PSHUFD
+ PSADBW to compute doubled high i32 popcounts. This takes advantage
of the fact that to line up the high i32 popcounts we have to shift
them anyways, and we can shift them by one fewer bit to effectively
divide the count by two. While the PSHUFD based horizontal add is no
faster, it doesn't require registers or load traffic the way a mask
would, and provides more ILP as it happens on different ports with
high throughput.
3) I did some code cleanups throughout to simplify the implementation
logic.
4) I refactored it to continue to use the parallel bitmath lowering when
SSSE3 is not available to preserve the performance of that version on
SSE2 targets where it is still much better than scalarizing as we'll
still do a bitmath implementation of popcount even in scalar code
there.
With #1 and #2 above, I analyzed the result in IACA for sandybridge,
ivybridge, and haswell. In every case I measured, the throughput is the
same or better using the LUT lowering, even v2i64 and v4i64, and even
compared with using the native popcnt instruction! The latency of the
LUT lowering is often higher than the latency of the scalarized popcnt
instruction sequence, but I think those latency measurements are deeply
misleading. Keeping the operation fully in the vector unit and having
many chances for increased throughput seems much more likely to win.
With this, we can lower every integer vector popcount implementation
using the LUT strategy if we have SSSE3 or better (and thus have
PSHUFB). I've updated the operation lowering to reflect this. This also
fixes an issue where we were scalarizing horribly some AVX lowerings.
Finally, there are some remaining cleanups. There is duplication between
the two techniques in how they perform the horizontal sum once the byte
population count is computed. I'm going to factor and merge those two in
a separate follow-up commit.
Differential Revision: http://reviews.llvm.org/D10084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238636
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 30 May 2015 03:20:55 +0000 (03:20 +0000)]
[x86] Restructure the parallel bitmath lowering of popcount into
a separate routine, generalize it to work for all the integer vector
sizes, and do general code cleanups.
This dramatically improves lowerings of byte and short element vector
popcount, but more importantly it will make the introduction of the
LUT-approach much cleaner.
The biggest cleanup I've done is to just force the legalizer to do the
bitcasting we need. We run these iteratively now and it makes the code
much simpler IMO. Other changes were minor, and mostly naming and
splitting things up in a way that makes it more clear what is going on.
The other significant change is to use a different final horizontal sum
approach. This is the same number of instructions as the old method, but
shifts left instead of right so that we can clear everything but the
final sum with a single shift right. This seems likely better than
a mask which will usually have to read the mask from memory. It is
certaily fewer u-ops. Also, this will be temporary. This and the LUT
approach share the need of horizontal adds to finish the computation,
and we have more clever approaches than this one that I'll switch over
to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238635
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 30 May 2015 01:25:56 +0000 (01:25 +0000)]
MC: Clean up MCExpr naming. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238634
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sat, 30 May 2015 00:17:20 +0000 (00:17 +0000)]
[BitcodeReader] Change an assert to a call to a call to Error()
It's reachable from user input.
Bug found with AFL fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238633
91177308-0d34-0410-b5e6-
96231b3b80d8
Fiona Glaser [Fri, 29 May 2015 23:37:22 +0000 (23:37 +0000)]
SelectionDAG: fix logic for promoting shift types
r238503 fixed the problem of too-small shift types by promoting them
during legalization, but the correct solution is to promote only the
operands that actually demand promotion.
This fixes a crash on an out-of-tree target caused by trying to
promote an operand that can't be promoted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238632
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 29 May 2015 22:57:46 +0000 (22:57 +0000)]
[WinEH] Adjust the 32-bit SEH prologue to better match reality
It turns out that _except_handler3 and _except_handler4 really use the
same stack allocation layout, at least today. They just make different
choices about encoding the LSDA.
This is in preparation for lowering the llvm.eh.exceptioninfo().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238627
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Fri, 29 May 2015 22:18:03 +0000 (22:18 +0000)]
[docs] fix the declarations of the llvm.nvvm.ptr.gen.to.* intrinsics
Summary:
These intrinsics should take a generic input address space and outputs a
non-generic address space.
Test Plan: no
Reviewers: jholewinski, eliben
Reviewed By: eliben
Subscribers: eliben, jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D10132
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238620
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 29 May 2015 21:58:11 +0000 (21:58 +0000)]
Disable FP elimination in funcs using 32-bit MSVC EH personalities
The value in 'ebp' acts as an implicit argument to the outlined
handlers, and is recovered with frameaddress(1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238619
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 21:45:01 +0000 (21:45 +0000)]
Remove getData.
This completes the mechanical part of merging MCSymbol and MCSymbolData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238617
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 29 May 2015 20:43:10 +0000 (20:43 +0000)]
Only add the EH state insertion pass on 32-bit Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238612
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 20:41:47 +0000 (20:41 +0000)]
Remove the MCSymbolData typedef.
The getData member function is next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238611
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 20:31:23 +0000 (20:31 +0000)]
Merge MCSymbol and MCSymbolData.
As a transition hack leave MCSymbolData as a typedef of MCSymbol. I will be
removing that in a second.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238609
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 29 May 2015 20:31:17 +0000 (20:31 +0000)]
[lib/Fuzzer] relax an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238608
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 20:21:02 +0000 (20:21 +0000)]
Rename getOrCreateSymbolData to registerSymbol and return void.
Another step in merging MCSymbol and MCSymbolData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238607
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 29 May 2015 19:43:39 +0000 (19:43 +0000)]
Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.
Call sites were found with the ASTMatcher + some semi-automated cleanup.
memberCallExpr(
argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
hasArgument(0, bindTemporaryExpr(
hasType(recordDecl(hasNonTrivialDestructor())),
has(constructExpr()))),
unless(isInTemplateInstantiation()))
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238602
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 19:07:51 +0000 (19:07 +0000)]
Move Flags from MCSymbolData to MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238598
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 19:04:38 +0000 (19:04 +0000)]
Fix build without asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238597
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 18:47:23 +0000 (18:47 +0000)]
Pass MCSymbols to the helper functions in MCELF.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238596
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 29 May 2015 18:34:41 +0000 (18:34 +0000)]
[CMake] Bug 23468 - LLVM_OPTIMIZED_TABLEGEN does not work with Visual Studio
Summary: Multi-configuration builds put their binaries into ${CMAKE_BINARY_DIR}/Release/bin/. The table-gen cross-compilation support needs to take that into account.
Reviewers: yaron.keren
Reviewed By: yaron.keren
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10102
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238592
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 18:31:17 +0000 (18:31 +0000)]
Use an explicitly defaulted constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238591
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 18:26:09 +0000 (18:26 +0000)]
Pass a MCSymbol to needsRelocateWithSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238589
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 29 May 2015 18:19:25 +0000 (18:19 +0000)]
MachineCopyPropagation: Remove the copies instead of using KILL instructions.
For some history here see the commit messages of r199797 and r169060.
The original intent was to fix cases like:
%EAX<def> = COPY %ECX<kill>, %RAX<imp-def>
%RCX<def> = COPY %RAX<kill>
where simply removing the copies would have RCX undefined as in terms of
machine operands only the ECX part of it is defined. The machine
verifier would complain about this so 169060 changed such COPY
instructions into KILL instructions so some super-register imp-defs
would be preserved. In r199797 it was finally decided to always do this
regardless of super-register defs.
But this is wrong, consider:
R1 = COPY R0
...
R0 = COPY R1
getting changed to:
R1 = KILL R0
...
R0 = KILL R1
It now looks like R0 dies at the first KILL and won't be alive until the
second KILL, while in reality R0 is alive and must not change in this
part of the program.
As this only happens after register allocation there is not much code
still performing liveness queries so the issue was not noticed. In fact
I didn't manage to create a testcase for this, without unrelated changes
I am working on at the moment.
The fix is simple: As of r223896 the MachineVerifier allows reads from
partially defined registers, so the whole transforming COPY->KILL thing
is not necessary anymore. This patch also changes a similar (but more
benign case as the def and src are the same register) case in the
VirtRegRewriter.
Differential Revision: http://reviews.llvm.org/D10117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238588
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Fri, 29 May 2015 18:14:55 +0000 (18:14 +0000)]
YAML traits need to be in the llvm::yaml namespace.
Hope this fixes the bits, eg:
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/27147
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238586
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Fri, 29 May 2015 17:56:28 +0000 (17:56 +0000)]
[YAMLIO] Make line-wrapping configurable and test it.
Summary:
We would wrap flow mappings and sequences when they go over a hardcoded 70
characters limit. Make the wrapping column configurable (and default to 70
co the change should be NFC for current users). Passing 0 allows to completely
suppress the wrapping which makes it easier to handle in tools like FileCheck.
Reviewers: bogner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10109
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238584
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 17:48:04 +0000 (17:48 +0000)]
Move common symbol related information from MCSectionData to MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238583
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 17:41:59 +0000 (17:41 +0000)]
Store MCSymbols in PendingLabels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238582
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 17:24:52 +0000 (17:24 +0000)]
Move SymbolSize from MCSymbolData to MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238580
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 29 May 2015 17:19:11 +0000 (17:19 +0000)]
Fix crash in MCExpr::print.
Symbols are no longer required to be named, but this leads to a crash here if an
unnamed symbol checks that its first character is '$'.
Change the code to first check for a name, then check its first character.
No test case i'm afraid as this is debugging code, but any test case with temp labels
and 'llc --debug --filetype=obj' would have crashed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238579
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Fri, 29 May 2015 17:13:25 +0000 (17:13 +0000)]
Add support for VSX FMA single-precision instructions to the PPC back end
This patch corresponds to review:
http://reviews.llvm.org/D9941
It adds the various FMA instructions introduced in the version 2.07 of
the ISA along with the testing for them. These are operations on single
precision scalar values in VSX registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238578
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Fri, 29 May 2015 17:05:41 +0000 (17:05 +0000)]
MIR Serialization: use correct line and column numbers for LLVM IR errors.
This commit translates the line and column numbers for LLVM IR
errors from the numbers in the YAML block scalar to the numbers
in the MIR file so that the MIRParser users can report LLVM IR
errors with the correct line and column numbers.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238576
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 29 May 2015 17:00:57 +0000 (17:00 +0000)]
[WinEH] Emit EH tables for __CxxFrameHandler3 on 32-bit x86
Small (really small!) C++ exception handling examples work on 32-bit x86
now.
This change disables the use of .seh_* directives in WinException when
CFI is not in use. It also uses absolute symbol references in the tables
instead of imagerel32 relocations.
Also fixes a cache invalidation bug in MMI personality classification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238575
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Fri, 29 May 2015 17:00:27 +0000 (17:00 +0000)]
[NVPTXFavorNonGenericAddrSpaces] recursively trace into GEP and BitCast
Summary:
This patch allows NVPTXFavorNonGenericAddrSpaces to remove addrspacecast
from longer chains consisting of GEPs and BitCasts. For example, it can
now optimize
%0 = addrspacecast [10 x float] addrspace(3)* @a to [10 x float]*
%1 = gep [10 x float]* %0, i64 0, i64 %i
%2 = bitcast float* %1 to i32*
%3 = load i32* %2 ; emits ld.u32
to
%0 = gep [10 x float] addrspace(3)* @a, i64 0, i64 %i
%1 = bitcast float addrspace(3)* %0 to i32 addrspace(3)*
%3 = load i32 addrspace(3)* %1 ; emits ld.shared.f32
Test Plan: @ld_int_from_global_float in access-non-generic.ll
Reviewers: broune, eliben, jholewinski, meheff
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D10074
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238574
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Fri, 29 May 2015 16:58:08 +0000 (16:58 +0000)]
[DependenceAnalysis] Extend unifySubscriptType for handling coupled subscript groups.
Summary:
In continuation to an earlier commit to DependenceAnalysis.cpp by jingyue (r222100), the type for all subscripts in a coupled group need to be the same since constraints from one subscript may be propagated to another during testing. During testing, new SCEVs may be created and the operands for these need to be the same.
This patch extends unifySubscriptType() to work on lists of subscript pairs, ensuring a common extended type for all of them.
Test Plan:
Added a test case to NonCanonicalizedSubscript.ll which causes dependence analysis to crash without this fix.
All regression tests pass.
Reviewers: spop, sebpop, jingyue
Reviewed By: jingyue
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238573
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 15:07:27 +0000 (15:07 +0000)]
Simplify now that symbols contain the correct section.
The complexity in here was because before r233995 variable symbols would report
the incorrect section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238559
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 29 May 2015 14:48:25 +0000 (14:48 +0000)]
[Objdump] Removing unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238557
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 29 May 2015 14:44:13 +0000 (14:44 +0000)]
[Hexagon] Disassembling, printing, and emitting instructions a whole-bundle at a time which is the semantic unit for Hexagon. Fixing tests to use the new format. Disabling tests in the direct object emission path for a followup patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238556
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 May 2015 14:20:40 +0000 (14:20 +0000)]
Fix ELFObjectWriter::isLocal for signature symbols.
And with that simplify the logic for inserting them in ExternalSymbolData or
LocalSymbolData.
No functionality change overall since the old code avoided the isLocal bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238555
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Fri, 29 May 2015 13:52:56 +0000 (13:52 +0000)]
[mips] Remove 2 unused variables in MipsTargetStreamer.cpp. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238554
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 29 May 2015 13:00:07 +0000 (13:00 +0000)]
Removing a switch statement that only contains a default; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238552
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 29 May 2015 05:51:32 +0000 (05:51 +0000)]
[TableGen] Remove convertValue functions for UnOpInit, BinOpInit, and TernOpInit as they weren't able to be called.
I don't think converting the inputs to the Ops was the right behavior anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238543
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 29 May 2015 02:59:59 +0000 (02:59 +0000)]
This should have been a reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238540
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 29 May 2015 02:56:46 +0000 (02:56 +0000)]
CodeGen: Use mop_iterator instead of MIOperands/ConstMIOperands
MIOperands/ConstMIOperands are classes iterating over the MachineOperand
of a MachineInstr, however MachineInstr::mop_iterator does the same
thing.
I assume these two iterators exist to have a uniform interface to
iterate over the operands of a machine instruction bundle and a single
machine instruction. However in practice I find it more confusing to have 2
different iterator classes, so this patch transforms (nearly all) the
code to use mop_iterators.
The only exception being MIOperands::anlayzePhysReg() and
MIOperands::analyzeVirtReg() still needing an equivalent, I leave that
as an exercise for the next patch.
Differential Revision: http://reviews.llvm.org/D9932
This version is slightly modified from the proposed revision in that it
introduces MachineInstr::getOperandNo to avoid the extra counting
variable in the few loops that previously used MIOperands::getOperandNo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238539
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 29 May 2015 01:40:00 +0000 (01:40 +0000)]
Add a test for the MachineCopyPropagation change landed in r238518.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238537
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 29 May 2015 01:03:37 +0000 (01:03 +0000)]
[TableGen][AsmMatcherEmitter] Only parse isolated tokens as registers.
Fixes PR23455, where, when TableGen generates the matcher from the
AsmString, it splits "cmp${cc}ss" into tokens, and the "ss" suffix
is recognized as the SS register.
I can't think of a situation where that's a feature, not a bug, hence:
when a token is "isolated", i.e., it is followed and preceded by
separators, it shouldn't be parsed as a register.
Differential Revision: http://reviews.llvm.org/D9844
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238536
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 29 May 2015 00:55:55 +0000 (00:55 +0000)]
[TableGen][AsmMatcherEmitter] Factor out AsmOperand creation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238534
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 29 May 2015 00:04:30 +0000 (00:04 +0000)]
[IR] fptrunc-of-fptrunc isn't an EliminableCastPair.
Double and single rounding can produce different results.
This is the IR counterpart to r228911.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238531
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 28 May 2015 23:20:35 +0000 (23:20 +0000)]
MachineFrameInfo: Simplify pristine register calculation.
About pristine regsiters:
Pristine registers "hold a value that is useless to the current
function, but that must be preserved - they are callee saved registers
that have not been saved." This concept saves compile time as it frees
the prologue/epilogue inserter from adding every such register to every
basic blocks live-in list.
However the current code in getPristineRegs is formulated in a
complicated way: Inside the function prologue and epilogue all callee
saves are considered pristine, while in the rest of the code only the
non-saved ones are considered pristine. This requires logic to
differentiate between prologue/epilogue and the rest and in the presence
of shrink-wrapping this even becomes complicated/expensive. It's also
unnecessary because the prologue epilogue inserters already mark
callee-save registers that are saved/restores properly in the respective
blocks in the prologue/epilogue (see updateLiveness() in
PrologueEpilogueInserter.cpp). So only declaring non-saved/restored
callee saved registers as pristine just works.
Differential Revision: http://reviews.llvm.org/D10101
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238524
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 28 May 2015 23:07:39 +0000 (23:07 +0000)]
Fix typos in variable/grammar names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238523
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 May 2015 22:47:01 +0000 (22:47 +0000)]
Rename Win64Exception.(cpp|h) to WinException.(cpp|h)
This is in preparation for reusing this for 32-bit x86 EH table
emission. Also updates the type name for consistency. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238521
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 28 May 2015 22:46:48 +0000 (22:46 +0000)]
[x86] Move the vector popcount tests into non-ISA files, and instead
organize them by the width of vector.
This makes it a lot easier to see that we're covering all of the vector
types but not doing so excessively. This also adds tests across the
spectrum of SSE versions in addition to the AVX versions.
If you're really tired of seeing the *massive* sprawl of scalarized code
for this, don't worry, I'm just about to land Bruno's patch that
dramatically improve the situation for SSSE3 and newer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238520
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Thu, 28 May 2015 22:41:12 +0000 (22:41 +0000)]
MIR Serialization: print and parse machine function names.
This commit introduces a serializable structure called
'llvm::yaml::MachineFunction' that stores the machine
function's name. This structure will mirror the machine
function's state in the future.
This commit prints machine functions as YAML documents
containing a YAML mapping that stores the state of a machine
function. This commit also parses the YAML documents
that contain the machine functions.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D9841
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238519
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 28 May 2015 22:38:40 +0000 (22:38 +0000)]
[MachineCopyPropagation] Fix a bug with undef handling when the value is actualy alive.
Test case will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238518
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 28 May 2015 22:18:34 +0000 (22:18 +0000)]
Fixing broken bots after r238505.
Need non-const iterator inserts too. These failures seem to be due to differences in the versions of libstdc++ on various operating systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238516
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 28 May 2015 22:12:27 +0000 (22:12 +0000)]
Add testcase for r238503.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238515
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 May 2015 22:00:24 +0000 (22:00 +0000)]
[WinEH] Start inserting state number stores for C++ EH
This moves all the state numbering code for C++ EH to WinEHPrepare so
that we can call it from the X86 state numbering IR pass that runs
before isel.
Now we just call the same state numbering machinery and insert a bunch
of stores. It also populates MachineModuleInfo with information about
the current function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238514
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 21:59:34 +0000 (21:59 +0000)]
Don't special case undefined symbol when deciding the symbol order.
ELF has no restrictions on where undefined symbols go relative to other defined
symbols. In fact, gas just sorts them together. Do the same.
This was there since r111174 probably just because the MachO writer has it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238513
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Thu, 28 May 2015 21:57:17 +0000 (21:57 +0000)]
Update documentation for llvm-profdata.
These options have been present for a while, but I had never updated the
documentation. Fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238511
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 28 May 2015 21:51:52 +0000 (21:51 +0000)]
Fixing the polly build.
I broke the polly build in r238505. This fixes the failure by adding non-const iterator erase methods to cl::list_storage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238509
91177308-0d34-0410-b5e6-
96231b3b80d8
Andy Ayers [Thu, 28 May 2015 21:49:50 +0000 (21:49 +0000)]
Revise test to run llc and llvm-mc separately.
Differential Revision: http://reviews.llvm.org/D10066
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238508
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Thu, 28 May 2015 21:49:07 +0000 (21:49 +0000)]
Enable exitValue rewrite only when the cost of expansion is low.
The patch evaluates the expansion cost of exitValue in indVarSimplify pass, and only does the rewriting when the expansion cost is low or loop can be deleted with the rewriting. It provides an option "-replexitval=" to control the default aggressiveness of the exitvalue rewriting. It also fixes some missing cases in SCEVExpander::isHighCostExpansionHelper to enhance the evaluation of SCEV expansion cost.
Differential Revision: http://reviews.llvm.org/D9800
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238507
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 21:36:02 +0000 (21:36 +0000)]
Remove a trivial forwarding function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238506
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 28 May 2015 21:31:22 +0000 (21:31 +0000)]
Re-landing "Refactoring cl::list_storage from "is a" to "has a" std::vector."
Originally landed r238485
MSVC resolves identifiers differently from Clang and GCC, this resulted in build bot failures. This pach re-lands r238485 and fixes the build failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238505
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 28 May 2015 21:29:59 +0000 (21:29 +0000)]
[SelectionDAG] Scalar shift amounts may require legalization
The shift amount may be too small to cope with promoted left hand side,
make sure to promote it as well.
This fixes PR23664.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238503
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 May 2015 21:23:53 +0000 (21:23 +0000)]
Remove debug prints from r238487
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238501
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 28 May 2015 20:59:08 +0000 (20:59 +0000)]
[llvm] Adding vdtor to fix warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238494
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 20:53:09 +0000 (20:53 +0000)]
Inline trivial method. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238492
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 28 May 2015 20:47:02 +0000 (20:47 +0000)]
Revert "Refactoring cl::list_storage from "is a" to "has a" std::vector."
This reverts commit
117715ca0613d3db144241499401f2ec5398f1d5.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238491
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 May 2015 20:44:28 +0000 (20:44 +0000)]
Disable x86 tail call optimizations that jump through GOT
For x86 targets, do not do sibling call optimization when materializing
the callee's address would require a GOT relocation. We can still do
tail calls to internal functions, hidden functions, and protected
functions, because they do not require this kind of relocation. It is
still possible to get GOT relocations when the user explicitly asks for
it with musttail or -tailcallopt, both of which are supposed to
guarantee TCO.
Based on a patch by Chih-hung Hsieh.
Reviewers: srhines, timmurray, danalbert, enh, void, nadav, rnk
Subscribers: joerg, davidxl, llvm-commits
Differential Revision: http://reviews.llvm.org/D9799
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238487
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 28 May 2015 20:38:12 +0000 (20:38 +0000)]
Refactoring cl::list_storage from "is a" to "has a" std::vector.
Summary: This isn't necessarily an ideal change, and I want to at least reduce the API surface area, but for the new API we really shouldn't be relying on cl::list being a std::vector.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238485
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 28 May 2015 20:30:32 +0000 (20:30 +0000)]
Revert r238427 - [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
It caused a smaller number of failures than the previous attempt at committing but still caused a couple on the llvm-linux-mips builder. Reverting while I investigate the remainder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238483
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 28 May 2015 20:25:42 +0000 (20:25 +0000)]
Object, ELF: Use error code instead of calling report_fatal_error()
Make createELFObjectFile() return object_error::parse_failed on
encountering invalid ELF file, instead of crashing the program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238481
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 20:25:29 +0000 (20:25 +0000)]
Remove structure field that can be computed just before use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238480
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 20:19:31 +0000 (20:19 +0000)]
Avoid warnings when building without asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238479
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 20:11:34 +0000 (20:11 +0000)]
Move these vectors to the only function where they are used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238477
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 28 May 2015 20:02:45 +0000 (20:02 +0000)]
Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM.
We were previously codegen'ing these as regular load/store operations and
hoping that the register allocator would allocate registers in ascending order
so that we could apply an LDM/STM combine after register allocation. According
to the commit that first introduced this code (r37179), we planned to teach
the register allocator to allocate the registers in ascending order. This
never got implemented, and up to now we've been stuck with very poor codegen.
A much simpler approach for achiveing better codegen is to create LDM/STM
instructions with identical sets of virtual registers, let the register
allocator pick arbitrary registers and order register lists when printing an
MCInst. This approach also avoids the need to repeatedly calculate offsets
which ultimately ought to be eliminated pre-RA in order to decrease register
pressure.
This is implemented by lowering the memcpy intrinsic to a series of SD-only
MCOPY pseudo-instructions which performs a memory copy using a given number
of registers. During SD->MI lowering, we lower MCOPY to LDM/STM. This is a
little unusual, but it avoids the need to encode register lists in the SD,
and we can take advantage of SD use lists to decide whether to use the _UPD
variant of the instructions.
Fixes PR9199.
Differential Revision: http://reviews.llvm.org/D9508
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238473
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 May 2015 20:02:05 +0000 (20:02 +0000)]
[WinEH] Remove debugging dump() call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238472
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 20:00:13 +0000 (20:00 +0000)]
Merge redundant loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238471
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 28 May 2015 19:56:34 +0000 (19:56 +0000)]
AsmPrinter: Stop exposing underlying DIE children list, NFC
Update `DIE` API to hide the implementation of `DIE::Children` so we can
swap it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238468
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 19:46:36 +0000 (19:46 +0000)]
Simplify LastLocalSymbolIndex computation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238465
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 19:43:20 +0000 (19:43 +0000)]
Use range loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238463
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 28 May 2015 19:43:06 +0000 (19:43 +0000)]
Add BranchProbabilityInfo::releaseMemory to clear the Weights field.
BranchProbabilityInfo was leaking 3MB of memory when running 'opt -O2 verify-uselistorder.lto.bc'. This was due to the Weights member not being cleared once the pass is no longer needed.
This adds the releaseMemory override to clear that field. The other fields are cleared at the end of runOnFunction so can stay there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238462
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 May 2015 19:29:15 +0000 (19:29 +0000)]
Remove temporary FileSymbolData. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238461
91177308-0d34-0410-b5e6-
96231b3b80d8