Commit Graph

27543 Commits

Author SHA1 Message Date
Richard Smith
85bfb07553 Add a (size, value) constructor to TinyPtrVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269711 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 21:57:47 +00:00
Richard Smith
80bf9f5105 Add missing TinyPtrVector functionality: reverse iterators and conversion of
TinyPtrVector<T*> to ArrayRef<const T*>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 21:45:58 +00:00
Vedant Kumar
ce4aff93aa Revert "Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269694. MSVC says:

error C2086: 'char llvm::ProfErrorInfoBase<enum llvm::instrprof_error>::ID' : redefinition

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 21:03:38 +00:00
Vedant Kumar
515ee3e025 Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Changes since the initial commit:
- Address undefined-var-template warning.
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.

Differential Revision: http://reviews.llvm.org/D19901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:49:39 +00:00
Xinliang David Li
addf109ca6 sync up common profile header /nfc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:34:39 +00:00
Adam Nemet
095bb7d545 [LAA] Comment couldPreventStoreLoadForward. NFC
Also s/Cycles/Iters/ in NumCyclesForStoreLoadThroughMemory to make it
clear that this is not about clock cycles but loop cycles/iterations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 16:57:47 +00:00
Xinliang David Li
61ce277483 [PM] Port indirect call promotion pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269660 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 16:31:07 +00:00
Renato Golin
3b0d377ef8 [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Reapplied after fixing the LLDB build that was broken due to the new
DiagnosticSeverity in LLVMContext.h, and fixed an UB in the new change.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269655 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 14:28:02 +00:00
Craig Topper
ef1f2996c1 [AVX512] Fix mask argument type for insertf32x4/inserti32x4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 21:24:45 +00:00
Craig Topper
d175e89cb6 [AVX512] Change 512-bit insertf32x4/inserti32x4 builtin name to match gcc.
Clang doesn't currently use this builtin. Will fix that soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269609 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 20:09:34 +00:00
Xinliang David Li
e74197bd25 [profile] Header file cleanup /NFC
Remove runtime specific decls from the common header.
This change also syncs up InstrProfData.inc between
llvm and compiler_rt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 20:06:11 +00:00
Xinliang David Li
17b42bdb89 Rename pass name to prepare to new PM porting /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 01:04:24 +00:00
Mehdi Amini
9b61d154fc Revert "Revert "Revert 220932.": "Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex""
This reverts commit r269577.
Broke NetBSD, waiting for Kamil to investigate

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269584 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 23:44:21 +00:00
Davide Italiano
d1aa4ea020 [PM] Refactor cross-registration of AM into an helper.
Requested by: Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269582 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 23:21:50 +00:00
Craig Topper
b776ae7788 [AVX512] Make the permd intrinsics take a 32-bit immediate to match the software spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 21:13:20 +00:00
Mehdi Amini
e750cc1694 Revert "Revert 220932.": "Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex"
This reverts commit r221331 and reinstate r220932 as discussed in D19271.
Original commit message was:

This patch adds an llvm_call_once which is a wrapper around
std::call_once on platforms where it is available and devoid
of bugs. The patch also migrates the ManagedStatic mutex to
be allocated using llvm_call_once.

These changes are philosophically equivalent to the changes
added in r219638, which were reverted due to a hang on Win32
which was the result of a bug in the Windows implementation
of std::call_once.

Differential Revision: http://reviews.llvm.org/D5922

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 20:55:52 +00:00
Renato Golin
7e38263edc Revert "[llc] New diagnostic handler"
This reverts commit r269563. Even though now it passes all LLDB bots
after a local fix, there's a new buildbot it fails with tests that we
hadn't seen locally:

http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/15647

Adding those tests to the list to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 14:37:11 +00:00
Renato Golin
2c05d88b8d [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Reapplied after fixing the LLDB build that was broken due to the new
DiagnosticSeverity in LLVMContext.h.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269563 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 13:15:22 +00:00
NAKAMURA Takumi
b363ec418a llvm/Support/MachO.h: Fix warnings. [-Wpedantic]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269555 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 08:00:11 +00:00
Chandler Carruth
2e531af53a Revert "Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""
This reverts commit r269491. It triggers warnings with Clang, breaking
builds for -Werror users including several build bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 05:26:26 +00:00
Mehdi Amini
5787524256 Remove unwanted fprintf debug
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269536 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 04:41:14 +00:00
Craig Topper
597f8663a5 Revert r269534 "Silence a -Wundefined-var-template build warning." The bots didn't like that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269535 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 03:59:25 +00:00
Craig Topper
4d9e38884a Silence a -Wundefined-var-template build warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269534 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 03:48:43 +00:00
Craig Topper
59cfb9caf5 [AVX512] Fix types for pshufd intrinsics. The immediate is the second argument and the mask is the 4th argument. Also move the 128/256 tests to the right test file.
Prior to this the immediate was a strange 16-bits and the 512-bit intrinsic couldn't receive the full 16 mask bits it needs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269526 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 00:47:18 +00:00
Reid Kleckner
fed38e2afb [codeview] Add type stream merging prototype
Summary:
This code is intended to be used as part of LLD's PDB writing. Until
that exists, this is exposed via llvm-readobj for testing purposes.

Type stream merging uses the following algorithm:

- Begin with a new empty stream, and a new empty hash table that maps
  from type record contents to new type index.
- For each new type stream, maintain a map from source type index to
  destination type index.
- For each record, copy it and rewrite its type indices to be valid in
  the destination type stream.
- If the new type record is not already present in the destination
  stream hash table, append it to the destination type stream, assign it
  the next type index, and update the two hash tables.
- If the type record already exists in the destination stream, discard
  it and update the type index map to forward the source type index to
  the existing destination type index.

Reviewers: zturner, ruiu

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D20122

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 00:02:53 +00:00
Chris Bieneman
5909d726a2 [MachO] More missing swapStruct implementations
Added swapStruct for ident_command, fvmlib and fvmlib_command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269514 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 23:01:22 +00:00
Chris Bieneman
9511418ec3 [MachO] Filling in some structs I missed in r269499
I missed the fvmlib_command and the sub_framework_command, as well as a few uses of the dylib_command, dylinker_command, and linkedit_data_command.

This should now be a pretty complete listing. The only case I'm not sure about is LC_PREPAGE which doesn't seem to be referenced directly anywhere in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 23:01:19 +00:00
Davide Italiano
743098991d [PM] Port LowerAtomic to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269511 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 22:52:35 +00:00
Chandler Carruth
36666742ca Another attempt to fix MSVC by explicitly disabling the conversion
operator when the value type can't be initialized from the argument
type. Testing with the online MSVC compiler is finally happy with this,
let's see if the build bot will tolerate it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269501 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 22:20:43 +00:00
Chris Bieneman
11a29c9055 [MachO] Adding a few missing swapStruct functions
MachO.h was missing the swapStruct functions for a few load command structures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269499 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 22:12:44 +00:00
Chris Bieneman
10b676718d [MachO] Adding struct field to MachO.def
This provides a mapping from load command names to the data structures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 22:12:41 +00:00
Vedant Kumar
db1d476217 Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.

Differential Revision: http://reviews.llvm.org/D19901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269491 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 21:50:56 +00:00
Michael Zolotukhin
2463a66c88 Revert "Revert "[Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the...""
This reverts commit r269395.

Try to reapply with a fix from chapuni.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 21:23:25 +00:00
Sanjay Patel
a7c234a4ff fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269485 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 21:23:08 +00:00
Rui Ueyama
2acb5f6a3a pdbdump: Print "Publics" stream.
Publics stream seems to contain information as to public symbols.
It actually contains a serialized hash table along with fixed-sized
headers. This patch is not complete. It scans only till the end of
the stream and dump the header information. I'll write code to
de-serialize the hash table later.

Reviewers: zturner

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D20256

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 21:21:53 +00:00
Vedant Kumar
8007bdd41f Revert "(HEAD -> master, origin/master, origin/HEAD) [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
This reverts commit r269462. It fails two llvm-profdata tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 20:09:39 +00:00
Vedant Kumar
5b34ed8191 [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Differential Revision: http://reviews.llvm.org/D19901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 20:01:27 +00:00
Reid Kleckner
ef598a795b [codeview] Align class and print names of types
Summary: This way we can get rid of one of the fields in the .def file.

Reviewers: llvm-commits

Subscribers: zturner

Differential Revision: http://reviews.llvm.org/D20251

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269461 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 19:37:07 +00:00
Jun Bum Lim
1bbd21ba14 Rename getLargestLegalIntTypeSize to getLargestLegalIntTypeSizeInBits(). NFC.
Summary: Rename DataLayout::getLargestLegalIntTypeSize to DataLayout::getLargestLegalIntTypeSizeInBits() to prevent similar mistakes  fixed in r269433.

Reviewers: joker.eph, mcrosier

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D20248

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 18:38:35 +00:00
Chris Bieneman
062cef56d2 [obj2yaml] [yaml2obj] Basic support for MachO::load_command
This patch adds basic support for MachO::load_command. Load command types and sizes are encoded in the YAML and expanded back into MachO.

The YAML doesn't yet support load command structs, that is coming next. In the meantime as a temporary measure when writing MachO files the load commands are padded with zeros so that the generated binary is valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269442 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 17:41:41 +00:00
Richard Smith
8e9af26fd7 Update module map for r269380.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269438 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 17:27:08 +00:00
Renato Golin
865778e04a Revert "[llc] New diagnostic handler"
This reverts commit r269428, as it breaks the LLDB build. We need to
understand how to change LLDB in the same way as LLC before landing this
again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269432 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 16:02:44 +00:00
Renato Golin
89ca6c01c0 [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 15:37:46 +00:00
Krzysztof Parzyszek
fca753e55b [MIB] Create a helper function getRegState to extract all register flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 13:01:19 +00:00
Chandler Carruth
701743f122 Yet another attempt to appease MSVC...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269409 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 11:39:37 +00:00
Chandler Carruth
8acd7e8ad1 Try to fix MSVC by explicitly providing copy and move constructors so it
doesn't try to use the converting constructor template for those
operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269406 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 10:55:23 +00:00
George Rimar
d772cfcb7a [Support/ELF] - Added few constants and structs relative to compressed sections.
Patch adds few constants and structs to support compressed sections.

SHF_COMPRESSED intersects with platform specific XCORE_SHF_CP_SECTION,
both has value of 0x800U.

Reference link:
http://www.sco.com/developers/gabi/latest/ch4.sheader.html

Differential revision: http://reviews.llvm.org/D20209

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269404 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 10:20:12 +00:00
Michael Zolotukhin
a934d5cb93 Revert "[Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the..."
This reverts commit r269388.

It caused some bots to fail, I'm reverting it until I investigate the
issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 06:32:25 +00:00
Chandler Carruth
b29c2901de [ADT] Add an 'llvm::seq' function which produces an iterator range over
a sequence of values.

It increments through the values in the half-open range: [Begin, End),
producing those values when indirecting the iterator. It should support
integers, iterators, and any other type providing these basic arithmetic
operations.

This came up in the C++ standards committee meeting, and it seemed like
a useful construct that LLVM might want as well, and I wanted to
understand how easily we could solve it. I suspect this can be used to
write simpler counting loops even in LLVM along the lines of:

  for (int i : seq(0, v.size())) {
    ...
  };

As part of this, I had to fix the lack of a proxy object returned from
the operator[] in our iterator facade.

Differential Revision: http://reviews.llvm.org/D17870

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 03:57:50 +00:00
Michael Zolotukhin
a538be3ab1 [Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the...
Summary:
...loop after the last iteration.

This is really hard to do correctly. The core problem is that we need to
model liveness through the induction PHIs from iteration to iteration in
order to get the correct results, and we need to correctly de-duplicate
the common subgraphs of instructions feeding some subset of the
induction PHIs. All of this can be driven either from a side effect at
some iteration or from the loop values used after the loop finishes.

This patch implements this by storing the forward-propagating analysis
of each instruction in a cache to recall whether it was free and whether
it has become live and thus counted toward the total unroll cost. Then,
at each sink for a value in the loop, we recursively walk back through
every value that feeds the sink, including looping back through the
iterations as needed, until we have marked the entire input graph as
live. Because we cache this, we never visit instructions more than twice
-- once when we analyze them and put them into the cache, and once when
we count their cost towards the unrolled loop. Also, because the cache
is only two bits and because we are dealing with relatively small
iteration counts, we can store all of this very densely in memory to
avoid this from becoming an excessively slow analysis.

The code here is still pretty gross. I would appreciate suggestions
about better ways to factor or split this up, I've stared too long at
the algorithmic side to really have a good sense of what the design
should probably look at.

Also, it might seem like we should do all of this bottom-up, but I think
that is a red herring. Specifically, the simplification power is *much*
greater working top-down. We can forward propagate very effectively,
even across strange and interesting recurrances around the backedge.
Because we use data to propagate, this doesn't cause a state space
explosion. Doing this level of constant folding, etc, would be very
expensive to do bottom-up because it wouldn't be until the last moment
that you could collapse everything. The current solution is essentially
a top-down simplification with a bottom-up cost accounting which seems
to get the best of both worlds. It makes the simplification incremental
and powerful while leaving everything dead until we *know* it is needed.

Finally, a core property of this approach is its *monotonicity*. At all
times, the current UnrolledCost is a conservatively low estimate. This
ensures that we will never early-exit from the analysis due to exceeding
a threshold when if we had continued, the cost would have gone back
below the threshold. These kinds of bugs can cause incredibly hard to
track down random changes to behavior.

We could use a techinque similar (but much simpler) within the inliner
as well to avoid considering speculated code in the inline cost.

Reviewers: chandlerc

Subscribers: sanjoy, mzolotukhin, llvm-commits

Differential Revision: http://reviews.llvm.org/D11758

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 01:42:39 +00:00
Xinliang David Li
a4cc7ae52a Remove runtime specific code from common header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 00:23:49 +00:00
Reid Kleckner
30e317fc1e [codeview] Try to handle errors better in record iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 23:26:23 +00:00
Chris Bieneman
78a47bd1b4 [MachO] Extract MachO load command enums into a def file
Having the MachO enums in a def file instead of inline will allow us to write utilities and encoding/decoding methods for load commands without having to write a lot of mechanically repeated code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 23:18:31 +00:00
Reid Kleckner
2eea1812c8 [codeview] Fix dumping VFTables, stop when we see LF_PAD*
Also stop visiting type records when we encounter an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 22:46:41 +00:00
Chandler Carruth
b6b8f76650 [PM] Port of the DepndenceAnalysis to the new PM.
Ported DA to the new PM by splitting the former DependenceAnalysis Pass
into a DependenceInfo result type and DependenceAnalysisWrapperPass type
and adding a new PM-style DependenceAnalysis analysis pass returning the
DependenceInfo.

Patch by Philip Pfaffe, most of the review by Justin.

Differential Revision: http://reviews.llvm.org/D18834

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 22:19:39 +00:00
Tom Stellard
c37b54dfc5 Revert "LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()"
This reverts commit r269016 and also the follow-up commit r269020.

This patch caused PR27705.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 20:27:40 +00:00
Chris Bieneman
d6f6aaf5e7 [yaml2macho] Handle mach_header_64 reserved field
I've added the reserved field as an "optional" in YAML, but I've added asserts in the yaml2macho code to enforce that the field is present in mach_header_64, but not in mach_header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269320 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 18:21:09 +00:00
Zachary Turner
c86d47d6a3 Get rid of CVLeafTypes.def and combine with TypeRecords.def
This merges the functionality of the macros in `CVLeafTypes.def` and the
macros in `TypeRecords.def` into a single set of macros.

Differential Revision: http://reviews.llvm.org/D20190
Reviewed By: rnk, amccarth

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 17:45:51 +00:00
Zachary Turner
4f4637e6d1 Make CodeView record serialization more generic.
This introduces a variadic template and some helper macros to
safely and correctly deserialize many types of common record
fields while maintaining error checking.

Differential Revision: http://reviews.llvm.org/D20183
Reviewed By: rnk, amccarth

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269315 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 17:45:44 +00:00
Chris Bieneman
dfa9a6bd95 [obj2yaml] Include all mach_header fields in yaml
Since we want to be able to use yaml to describe degenerate object files as well as valid ones, we need to be explicit of some fields in your yaml definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 17:44:43 +00:00
Chris Bieneman
7455ed8edf [ObjectYAML] Support Thin MachO headers to YAML
This patch adds support to ObjectYAML for serializing mach_header structs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 16:04:16 +00:00
Xinliang David Li
b7f191181c [profile] profile writing cleanup
Do not precompute value counts for all sites. This 
eliminates one more use of dynamic allocation 
in profiler writer.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269253 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 23:21:12 +00:00
Xinliang David Li
b723fcf640 cleanup: do not recompute size for preallocated buffer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269238 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:17:10 +00:00
Justin Bogner
e819b3304b SDAG: Add a helper to replace and remove a node during ISel
It's very common to want to replace a node and then remove it since
it's dead, especially as we port backends from the SDNode *Select API
to the void Select one. This helper makes this sequence a bit less
verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:13:17 +00:00
Sanjay Patel
678ba5a117 fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 20:10:33 +00:00
Vedant Kumar
6d6b3df09a [ProfileData] Use SoftInstrProfErrors to count soft errors, NFC
Differential Revision: http://reviews.llvm.org/D20082

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 19:42:19 +00:00
Rafael Espindola
e973d3f2ce Return a StringRef from getSection.
This is similar to how getName is handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 18:21:59 +00:00
Zachary Turner
f76064565f Refactor CodeView type records to use common code.
Differential Revision: http://reviews.llvm.org/D20138
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:47:35 +00:00
Filipe Cabecinhas
3e915294ae [NFC] Remove some dead code:
DbgInfoIntrinsic::StripCast() is dead since r79977
The only function that creates Comdat objects seems to be in Module, and always creates them using the default constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 16:38:40 +00:00
Artur Pilipenko
f20a7ef4cf NFC. Introduce Value::isPointerDereferenceable
Extract a part of isDereferenceableAndAlignedPointer functionality to Value:
    
Reviewed By: hfinkel, sanjoy
    
Differential Revision: http://reviews.llvm.org/D17611


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 14:43:28 +00:00
Rafael Espindola
06d92089dd Refactor duplicated check for valid declaration linkage. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 13:51:39 +00:00
Rafael Espindola
4ff35c4e0f Delete mayBeOverridden.
It is the same as isInterposable which seems to be the preferred name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269150 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 01:26:06 +00:00
Easwaran Raman
d56f6d6de3 Revert r269131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:26:04 +00:00
Justin Bogner
182dac04e5 SDAG: Make SelectCodeCommon return void
This means SelectCode unconditionally returns nullptr now. I'll follow
up with a change to make that return void as well, but it seems best
to keep that one very mechanical.

This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:58:26 +00:00
Easwaran Raman
79f2742cf7 Reapply r266477 and r266488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:03:23 +00:00
Xinliang David Li
e052ee9da4 [PM]: port IR based profUse pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269129 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:59:52 +00:00
Peter Collingbourne
2b9c136346 Cloning: Clean up the interface to the CloneFunction function.
Remove the ModuleLevelChanges argument, and the ability to create new
subprograms for cloned functions. The latter was added without review in
r203662, but it has no in-tree clients (all non-test callers pass false
for ModuleLevelChanges [1], so it isn't reachable outside of tests). It
also isn't clear that adding a duplicate subprogram to the compile unit is
always the right thing to do when cloning a function within a module. If
this functionality comes back it should be accompanied with a more concrete
use case.

Furthermore, all in-tree clients add the returned function to the module.
Since that's pretty much the only sensible thing you can do with the function,
just do that in CloneFunction.

[1] http://llvm-cs.pcc.me.uk/lib/Transforms/Utils/CloneFunction.cpp/rCloneFunction

Differential Revision: http://reviews.llvm.org/D18628

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 20:23:24 +00:00
Peter Collingbourne
aa07a976c3 Re-apply r269081 and r269082 with a fix for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 18:07:21 +00:00
Peter Collingbourne
b6f6e4455c Revert r269081 and r269082 while I try to find the right incantation to fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269091 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 17:54:43 +00:00
Peter Collingbourne
e7feafb873 Use doxygen style comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269082 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 17:35:30 +00:00
Peter Collingbourne
190db6acaa WholeProgramDevirt: Move logic for finding devirtualizable call sites to Analysis.
The plan is to eventually make this logic simpler, however I expect it to
be a little tricky for the foreseeable future (at least until we're rid of
pointee types), so move it here so that it can be reused to build a summary
index for devirtualization.

Differential Revision: http://reviews.llvm.org/D20005

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 17:34:21 +00:00
Marcin Koscielnicki
9100579a4f [PR27599] [SystemZ] [SelectionDAG] Fix extension of atomic cmpxchg result.
Currently, SelectionDAG assumes 8/16-bit cmpxchg returns either a sign
extended result, or a zero extended result.  SystemZ takes a third
option by returning junk in the high bits (rotated contents of the other
bytes in the memory word).  In that case, don't use Assert*ext, and
zero-extend the result ourselves if a comparison is needed.

Differential Revision: http://reviews.llvm.org/D19800

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 16:49:04 +00:00
Teresa Johnson
4b05ce2d0d [ThinLTO] Add option to emit imports files for distributed backends
Summary:
Add support for emission of plaintext lists of the imported files for
each distributed backend compilation. Used for distributed build file
staging.

Invoked with new gold-plugin thinlto-emit-imports-files option, which is
only valid with thinlto-index-only (i.e. for distributed builds), or
from llvm-lto with new -thinlto-action=emitimports value.

Depends on D19556.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D19636

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 15:54:09 +00:00
Teresa Johnson
27af205ce1 Restore "[ThinLTO] Emit individual index files for distributed backends"
This restores commit r268627:
    Summary:
    When launching ThinLTO backends in a distributed build (currently
    supported in gold via the thinlto-index-only plugin option), emit
    an individual index file for each backend process as described here:
    http://lists.llvm.org/pipermail/llvm-dev/2016-April/098272.html

    ...

    Differential Revision: http://reviews.llvm.org/D19556

Address msan failures by avoiding std::prev on map.end(), the
theory is that this is causing issues due to some known UB problems
in __tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269059 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 13:48:23 +00:00
Daniel Sanders
dd9958f08f Clarify the difference between ISD::BITCAST and the bitcast instruction from LLVM-IR.
Subscribers: llvm-commits, hfinkel

Differential Revision: http://reviews.llvm.org/D16464

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269031 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 09:01:54 +00:00
Jonas Paulsson
32db7c31b2 [foldMemoryOperand()] Pass LiveIntervals to enable liveness check.
SystemZ (and probably other targets as well) can fold a memory operand
by changing the opcode into a new instruction that as a side-effect
also clobbers the CC-reg.

In order to do this, liveness of that reg must first be checked. When
LIS is passed, getRegUnit() can be called on it and the right
LiveRange is computed on demand.

Reviewed by Matthias Braun.
http://reviews.llvm.org/D19861

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 08:09:37 +00:00
Elena Demikhovsky
b6e58d8bd0 [LoopVectorize] Handling induction variable with non-constant step.
Allow vectorization when the step is a loop-invariant variable.
This is the loop example that is getting vectorized after the patch:

 int int_inc;
 int bar(int init, int *restrict A, int N) {

  int x = init;
  for (int i=0;i<N;i++){
    A[i] = x;
    x += int_inc;
  }
  return x;
 }

"x" is an induction variable with *loop-invariant* step.
But it is not a primary induction. Primary induction variable with non-constant step is not handled yet.

Differential Revision: http://reviews.llvm.org/D19258



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 07:33:35 +00:00
Denis Zobnin
f459cb2831 [LAA] Rename "isStridedPtr" with "getPtrStride". NFC.
Changing misleading function name was approved in http://reviews.llvm.org/D17268.
Patch by Roman Shirokiy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 05:55:16 +00:00
Matthias Braun
e607e01664 LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()
We now use LiveRangeCalc::extendToUses() instead of a specially designed
algorithm in constructMainRangeFromSubranges():
- The original motivation for constructMainRangeFromSubranges() were
  differences between the main liverange and subranges because of hidden
  dead definitions. This case however cannot happen anymore with the
  DetectDeadLaneMasks pass in place.
- It simplifies the code.
- This fixes a longstanding bug where we did not properly create new SSA
  values on merging control flow (the MachineVerifier missed most of
  these cases).
- Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and
  LiveRangeCalc to better match the implementation/available helper
  functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 04:51:14 +00:00
Matthias Braun
6a6190de10 CodeGen: Move TargetPassConfig from Passes.h to an own header; NFC
Many files include Passes.h but only a fraction needs to know about the
TargetPassConfig class. Move it into an own header. Also rename
Passes.cpp to TargetPassConfig.cpp while we are at it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269011 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 03:21:59 +00:00
Matthias Braun
bbeb3ea1ff llc: Rework -run-pass option
We now construct a custom pass pipeline instead of injecting
start-before/stop-after into the default pipeline construction. This
allows to specify any pass known to the pass registry. Previously
specifying indirectly added analysis passes or passes not added to the
pipeline add all would not be added and we would silently do nothing.

This also restricts the -run-pass option to cases with .mir input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 01:32:44 +00:00
Matthias Braun
bf765dfe21 LLVMTargetMachine: Add functions to create MIModuleInfo/MIFunction; NFC
Add convenience function to create MachineModuleInfo and
MachineFunctionAnalysis passes and add them to a pass manager.

Despite factoring out some shared code in
LiveIntervalTest/LLVMTargetMachine this will be used by my upcoming llc
change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 01:32:40 +00:00
Evgeniy Stepanov
d3d318a084 Don't inline functions with different SafeStack attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 00:33:07 +00:00
Sanjoy Das
cbda428c36 [SCEV] Use guards to prove predicates
We can use calls to @llvm.experimental.guard to prove predicates,
relying on the fact that in all locations domianted by a call to
@llvm.experimental.guard the predicate it is guarding is known to be
true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268997 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 00:31:49 +00:00
Justin Lebar
e598f97f6c [nvvm] Mark ldu and ldg intrinsics as IntrArgMemOnly.
Summary:
Previously these intrinsics were marked as can-read any memory address.
Now they're marked as reading only the pointer they're passed.

Reviewers: rnk

Subscribers: jholewinski, llvm-commits, tra

Differential Revision: http://reviews.llvm.org/D20080

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268996 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 00:31:25 +00:00
Justin Lebar
493ba428f1 [NVVM] Add comments to NVVM intrinsics listing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 00:31:20 +00:00
Eugene Zelenko
3d09da3538 Fix some Clang-tidy modernize-deprecated-headers and Include What You Use warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D20042


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268989 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 23:11:38 +00:00
Xinliang David Li
05e004f012 Cleanup followup of r268710 - [PM] port IR based PGO prof-gen pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268974 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 21:37:12 +00:00
Adrian Prantl
f68fb38629 Separate the Verifier into an analysis and a transformation pass and
allow the transformation to strip invalid debug info.

This patch separates the Verifier into an analysis and a transformation
pass, with the transformation pass optionally stripping malformed
debug info.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

http://reviews.llvm.org/D19988
rdar://problem/25818489

This reapplies r268937 without modifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268966 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 19:57:29 +00:00
Adrian Prantl
b6708cf087 Allow the LTO code generator to strip invalid debug info from the input.
This patch introduces a new option -lto-strip-invalid-debug-info, which
drops malformed debug info from the input.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

rdar://problem/25818489
http://reviews.llvm.org/D19987

This reapplies 268936 with a test case fix for Linux (-exported-symbol foo)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268965 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 19:57:15 +00:00
Benjamin Kramer
6bb23fcbb9 Unbreak the non-windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268943 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 18:05:28 +00:00
Zachary Turner
a95bc25b20 [pdb] Parse the module info stream for each module.
Differential Revision: http://reviews.llvm.org/D20026
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:45:21 +00:00
Zachary Turner
5c1193559a Make TypeIterator generic so it can iterate symbols too.
Reviewed By: amccarth
Differential Revision: http://reviews.llvm.org/D20038

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:44:58 +00:00
Adrian Prantl
cfd85505ad Revert "Allow the LTO code generator to strip invalid debug info from the input."
This reverts commit 268936 while investigating buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268940 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:43:30 +00:00
Adrian Prantl
0a3572607f Revert "Separate the Verifier into an analysis and a transformation pass and"
This reverts commit 268937 while investigating build bot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268939 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:43:24 +00:00
Adrian Prantl
6d99a3d56e Separate the Verifier into an analysis and a transformation pass and
allow the transformation to strip invalid debug info.

This patch separates the Verifier into an analysis and a transformation
pass, with the transformation pass optionally stripping malformed
debug info.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

http://reviews.llvm.org/D19988
rdar://problem/25818489

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:37:42 +00:00
Adrian Prantl
9860b93e07 Allow the LTO code generator to strip invalid debug info from the input.
This patch introduces a new option -lto-strip-invalid-debug-info, which
drops malformed debug info from the input.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

rdar://problem/25818489
http://reviews.llvm.org/D19987

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:37:33 +00:00
Sanjay Patel
98959b5434 [TargetLowering] make helper function for SetCC + and optimizations (NFC)
After looking at D19087 again, it occurred to me that we can do better. If we consolidate
the valueHasExactlyOneBitSet() transforms, we won't incur extra overhead from calling it a
2nd time, and we can shrink SimplifySetCC() a bit. No functional change intended.

Differential Revision: http://reviews.llvm.org/D20050



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268932 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 16:42:50 +00:00
Rafael Espindola
0c06716f89 Fix bug where temporary file would be left behind every time an archive was updated.
When updating an existing archive, llvm-ar opens the old archive into a
`MemoryBuffer`, does its thing, and writes the results to a temporary
file. That file is then renamed to the original archive filename, thus
replacing it with the updated contents. However, on Windows at least,
what would happen is that the `MemoryBuffer` for the old archive would
actually be an mmap'ed view of the file, so when it came time to do the
rename via Win32's `ReplaceFile`, it would succeed but would be unable
to fully replace the file since there would still be a handle open on
it; instead, the old version got renamed to a random temporary name and
left behind.

Patch by Cameron!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268916 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 13:31:11 +00:00
Craig Topper
63eccc2eca [AVX512] Fix up types for arguments of int_x86_avx512_mask_cvtsd2ss_round and int_x86_avx512_mask_cvtss2sd_round. Only the argument being converted should be a different type. The other 2 argument should have the same type as the result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 05:34:12 +00:00
Mehdi Amini
437f2fc22e ThinLTOCodeGenerator: ignore 0 values for the cache settings.
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268890 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 05:16:30 +00:00
Bruno Cardoso Lopes
2b1f6c23bc [Bitcode] Fix an unsigned integer overflow while parsing bitcode wrapper header
Specially crafted bitcode wrapper headers can cause unsigned interger
overflow and lead to crashes when wrapping around. Fix the offset check
and avoid such scenarios.

Writing a testcase for this would involve editing the binary to generate
values that trigger the overflow, since this would never happen while
generating the bitcode in regular compilation flows, so there's
currently no feasible way add one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-08 21:27:39 +00:00
Sanjay Patel
2f183e0a89 [x86, BMI] add TLI hook for 'andn' and use it to simplify comparisons
For the sake of minimalism, this patch is x86 only, but I think that at least
PPC, ARM, AArch64, and Sparc probably want to do this too.

We might want to generalize the hook and pattern recognition for a target like
PPC that has a full assortment of negated logic ops (orc, nand).

Note that http://reviews.llvm.org/D18842 will cause this transform to trigger
more often.

For reference, this relates to:
https://llvm.org/bugs/show_bug.cgi?id=27105
https://llvm.org/bugs/show_bug.cgi?id=27202
https://llvm.org/bugs/show_bug.cgi?id=27203
https://llvm.org/bugs/show_bug.cgi?id=27328

Differential Revision: http://reviews.llvm.org/D19087



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268858 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-07 15:03:40 +00:00
NAKAMURA Takumi
074a68d30b ErrorInfoBase::message(): Don't use raw_string_ostream's buffer, Msg, before closing. Use raw_string_ostream::str() to flush the buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268856 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-07 08:43:11 +00:00
Xinliang David Li
f05d4a7577 [PM] code refactoring -- preparation for new PM porting /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-07 05:39:12 +00:00
Lang Hames
c14b8e9703 [Orc] Rename OrcArchitectureSupport to OrcABISupport and add Win32 ABI support.
This enables lazy JITing on Windows x86-64.

Patch by David. Thanks David!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-07 03:36:38 +00:00
Zachary Turner
b7d84117e3 Make llvm-pdbdump print CV type records
This reuses the CVTypeDumper from libcodeview to dump full
information about type records within a PDB file.

Differential Revision: http://reviews.llvm.org/D20022
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 22:15:42 +00:00
Zachary Turner
fdb6da3015 Port DebugInfoPDB over to using llvm::Error.
Differential Revision: http://reviews.llvm.org/D19940
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 20:51:57 +00:00
Kevin Enderby
eaa1f084ce Change GenericBinaryError to no longer include a FileName, which is then not
part of the error message.

As the caller is the one that needs to add the name of where the "object file"
comes from to the error message as the object file could be in an archive, or
coming from a slice of a Mach-O universal file or a buffer created by a JIT.

In the cases of a Mach-O universal file the architecture name may or may not
also need to be printed which is up to the tool code.  For example if the tool
code is only selecting the host architecture slice then that architecture name
is never printed.

This patch is the change to the libObject code and there will be follow on
commits for changes to the code for each tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 20:16:28 +00:00
Daniel Sanders
134705a273 [mips] Correct the ordering of HI/LO pairs in the relocation table.
Summary:
There seems to have been a misunderstanding as to the meaning of 'offset' in
the rules laid down by our ABI. The previous code believed that 'offset' meant
the offset within the section that the relocation is applied to. However, it
should have meant the offset from the symbol used in the relocation expression.

This patch adds two fields to ELFRelocationEntry and uses them to correct the
order of relocations for MIPS. These fields contain:
* The original symbol before shouldRelocateWithSymbol() is considered. This
  ensures that R_MIPS_GOT16 is able to correctly distinguish between local and
  external symbols, allowing us to tell whether %got() requires a matching
  %lo() or not (local symbols require one, external symbols don't). It also
  prevents confusing cases where the fuzzy matching rules cause things like
  %hi(foo)/%lo(foo+3) and %hi(bar)/%lo(bar+1) to swap their %lo()'s.
* The original offset before shouldRelocateWithSymbol() is considered. The
  existing Addend field is always zero when the object uses in place addends
  (because it's already moved it to the encoding) but MIPS needs to use the
  original offset to ensure that the linker correctly calculates the carry-in
  bit for %hi() and %got().

IAS ensures that unmatchable %hi()/%got() relocations are placed at the end of
the table to ensure that the linker rejects the table (we're unable to report
such errors directly). The alternatives to this risk accidental matching
against inappropriate relocations which may silently compute incorrect values
due to an incorrect carry bit between the %lo() and %hi()/%got().

Reviewers: sdardis

Subscribers: dsanders, sdardis, rafael, llvm-commits

Differential Revision: http://reviews.llvm.org/D19718


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 13:49:25 +00:00
Sam Kolton
f117ec1a64 [TableGen] AsmMatcher: support for default values for optional operands
Summary:
This change allows to specify "DefaultMethod" for optional operand (IsOptional = 1) in AsmOperandClass that return default value for operand. This is used in convertToMCInst to set default values in MCInst.
Previously if you wanted to set default value for operand you had to create custom converter method. With this change it is possible to use standard converters even when optional operands presented.

Reviewers: tstellarAMD, ab, craig.topper

Subscribers: jyknight, dsanders, arsenm, nhaustov, llvm-commits

Differential Revision: http://reviews.llvm.org/D18242

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 11:31:17 +00:00
Silviu Baranga
9e112408b2 Attempt to fix the modules builder by declaring SCEV in LoopUtils.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268720 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 09:37:14 +00:00
Nikolay Haustov
ac1dd296bc AMDGPU/SI: Add amdgpu_kernel calling convention. Part 1.
Summary:
This will be used for AMDGPU_HSA_KERNEL symbol type in output ELF.

Also, in the future unused non-kernels may be optimized.

For now, also accept SPIR_KERNEL for HCC frontend.

Also, add bitcode compatibility tests for missing calling conventions
except AVR_BUILTIN which doesn't have parse code.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, joker.eph, llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268717 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 09:07:29 +00:00
Mehdi Amini
d4ecd0d79c ThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper function
This test was crashing, and currently it breaks bootstrapping clang with debuginfo

Differential Revision: http://reviews.llvm.org/D20008

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268715 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 08:25:33 +00:00
Xinliang David Li
ea2fb7d1dd [PM] port IR based PGO prof-gen pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 05:49:19 +00:00
Xinliang David Li
ccd9cbbd34 [profile] Remove another unneeded field in raw profile reader
DataValueSize is now removed. The change is consolidated
with previous raw version bump.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 02:13:00 +00:00
Xinliang David Li
de6dd3b952 document version change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268702 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 01:41:24 +00:00
Rui Ueyama
ecc2a1e20c Make StringTableBuilder to cache hash values.
This change seems to speed up LLD a bit if it has a lot of mergeable
sections. The number is below. It's not too bad for a small patch.

Time to link Clang (debug build):

w/o patch 6.3696 seconds
w/patch   6.2746 seconds (-1.5%)

Differential Revision: http://reviews.llvm.org/D19933

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268698 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 00:51:58 +00:00
Justin Bogner
9ed38db20e SDAG: Rename Select->SelectImpl and repurpose Select as returning void
This is a step towards removing the rampant undefined behaviour in
SelectionDAG, which is a part of llvm.org/PR26808.

We rename SelectionDAGISel::Select to SelectImpl and update targets to
match, and then change Select to return void and consolidate the
sketchy behaviour we're trying to get away from there.

Next, we'll update backends to implement `void Select(...)` instead of
SelectImpl and eventually drop the base Select implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 23:19:08 +00:00
Justin Bogner
5f2e6ee2b7 SDAG: Remove OPC_MarkGlueResults and associated logic. NFC
This opcode never happens in practice, and yet the logic we have in
place to handle it would be undefined behaviour if we ever executed
it. Remove it rather than trying to refactor code that's never
reached.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 22:37:45 +00:00
Eugene Zelenko
8e8ab733c6 Fix some Clang-tidy readability-simplify-boolean-expr and Include What You Use warnings.
Differential revision: reviews.llvm.org/D19946


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 21:35:47 +00:00
Xinliang David Li
da713ca23f [PM] port Branch Frequency Analaysis pass to new PM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 21:13:27 +00:00
Davide Italiano
2d1483c124 [PM] Port Interprocedural SCCP to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 21:05:36 +00:00
Reid Kleckner
02f474a115 [codeview] Improve some comments
This FIXME was already fixed, and these LF_* enum names were
inconsistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 20:58:46 +00:00
Dehao Chen
d025c697a5 Revert http://reviews.llvm.org/D19926 as it breaks tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 20:47:53 +00:00
Reid Kleckner
8cff4d52c4 Remove unnecessary anonymous namespace from a header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 20:30:48 +00:00
Dehao Chen
8200288f55 Simplify CFG before assigning discriminator.
Summary: We need to clean up CFG before assigning discriminator to minimize the impact of optimization on debug info.

Reviewers: davidxl, dblaikie, dnovillo

Subscribers: dnovillo, danielcdh, llvm-commits

Differential Revision: http://reviews.llvm.org/D19926

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 20:18:49 +00:00
Mehdi Amini
3c3e5086f2 Degrade assertions to a warning in LTOCodeGenerator for preserved linkonce
The assertions were assuming that the linker will not ask to preserve
a global that is internal or available_externally, as it does not
really make sense. In practice this break the bootstrap of clang,
I degrade to a warning for now.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268671 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 20:05:33 +00:00
Chris Bieneman
6a6b44f90f Remove LLVM_ENABLE_TIMESTAMPS
Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.

The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled.

With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic.

See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html

Reviewers: bogner, silvas, rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D19892

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 19:57:03 +00:00
Xinliang David Li
8fa402e863 [profile] Remove unneeded field in raw profile reader
Differential Revision: http://reviews.llvm.org/D19956


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 19:41:18 +00:00
Vitaly Buka
eb80fa1253 Revert "[ThinLTO] Emit individual index files for distributed backends"
MemorySanitizer: use-of-uninitialized-value in lib/Bitcode/Writer/BitcodeWriter.cpp:364:70
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/12544/steps/check-llvm%20msan/logs/stdio

This reverts commit 0c4a898ea5.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268660 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 18:31:00 +00:00
Matthias Braun
d170aeaa5b MachineFunction: Add a const modifier to print() parameter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 18:14:43 +00:00
Kevin Enderby
00e8fc511c Clean up the specific error message for a malformed Mach-O files with bad segment
load commands.

The existing test case in test/Object/macho-invalid.test for
macho-invalid-too-small-segment-load-command has a cmdsize of 55, while
being too small also it is not a multiple of 4.  So when that check is added
this test case will produce a different error. So I constructed a new test case
that will trigger the intended error.

I also changed the error message to be consistent with the other malformed Mach-O
file error messages which prints the load command index.  I also removed both
object_error::macho_load_segment_too_small and
object_error::macho_load_segment_too_many_sections from Object/Error.h
as they are not needed and can just use object_error::parse_failed and let the
error message string distinguish the specific error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268652 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 17:43:35 +00:00
Krzysztof Parzyszek
341096adc6 [Hexagon] Handle operand type differences for A2_tfrpi
The instruction A2_tfrpi has a 64-bit operand, while the corresponding
intrinsic takes a 32-bit value. The actual value has only 8 significant
bits, so the difference is only in the type used to represent it.
In order to map the intrinsic to the instruction, the operand needs to
be extended to the correct type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268635 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 15:29:47 +00:00
Silviu Baranga
debb790c77 [LV] Identify more induction PHIs by coercing expressions to AddRecExprs
Summary:
Some PHIs can have expressions that are not AddRecExprs due to the presence
of sext/zext instructions. In order to prevent the Loop Vectorizer from
bailing out when encountering these PHIs, we now coerce the SCEV
expressions to AddRecExprs using SCEV predicates (when possible).

We only do this when the alternative would be to not vectorize.

Reviewers: mzolotukhin, anemet

Subscribers: mssimpso, sanjoy, mzolotukhin, llvm-commits

Differential Revision: http://reviews.llvm.org/D17153

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268633 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 15:20:39 +00:00
Teresa Johnson
0c4a898ea5 [ThinLTO] Emit individual index files for distributed backends
Summary:
When launching ThinLTO backends in a distributed build (currently
supported in gold via the thinlto-index-only plugin option), emit
an individual index file for each backend process as described here:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098272.html

The individual index file encodes the summary and module information
required for implementing the importing/exporting decisions made
for a given module in the thin link step.
This is in place of the current mechanism that uses the combined index
to make importing decisions in each back end independently. It is an
enabler for doing global summary based optimizations in the thin link
step (which will be recorded in the individual index files), and reduces
the size of the index that must be sent to each backend process, and
the amount of work to scan it in the backends.

Rather than create entirely new ModuleSummaryIndex structures (and all
the included unique_ptrs) for each backend index file, a map is created
to record all of the GUID and summary pointers needed for a particular
index file. The IndexBitcodeWriter walks this map instead of the full
index (hiding the details of managing the appropriate summary iteration
in a new iterator subclass). This is more efficient than walking the
entire combined index and filtering out just the needed summaries during
each backend bitcode index write.

Depends on D19481.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D19556

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 13:44:56 +00:00
Marcin Koscielnicki
d11ea2f4ad [X86] Extend some Linux special cases to cover kFreeBSD.
Both Linux and kFreeBSD use glibc, so follow similiar code paths.
Add isTargetGlibc to check for this, and use it instead of isTargetLinux
in a few places.

Fixes PR22248 for kFreeBSD.

Differential Revision: http://reviews.llvm.org/D19104

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268624 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 11:35:51 +00:00
Xinliang David Li
007644ba3f [Profile] Raw profile header clean up
Remove dead ValueDataBegin field in raw header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 04:07:30 +00:00
Xinliang David Li
454f7fa94d [PM] Port Branch Probability Analysis pass to the new pass manager.
Differential Revision: http://reviews.llvm.org/D19839


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268601 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 02:59:57 +00:00
Davide Italiano
e44aed739e [PM] Port EliminateAvailableExternally pass to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268599 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 02:37:32 +00:00