Commit Graph

3363 Commits

Author SHA1 Message Date
Chandler Carruth
3c0d60785c Re-sort #include lines for unittests. This uses a slightly modified
clang-format (https://reviews.llvm.org/D33932) to keep primary headers
at the top and handle new utility headers like 'gmock' consistently with
other utility headers.

No other change was made. I did no manual edits, all of this is
clang-format.

This should allow other changes to have more clear and focused diffs,
and is especially motivated by moving some headers into more focused
libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 11:06:56 +00:00
Chandler Carruth
8e7e3e824c Fix an unused variable warning in non-asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304778 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 07:49:34 +00:00
Xin Tong
801b4cef3c Add a dominanance check interface that uses caching for instructions within same basic block.
Summary:
This problem stems from the fact that instructions are allocated using new
in LLVM, i.e. there is no relationship that can be derived by just looking
at the pointer value.

This interface dispatches to appropriate dominance check given 2 instructions,
i.e. in case the instructions are in the same basic block, ordered basicblock
(with instruction numbering and caching) are used. Otherwise, dominator tree
is used.

This is a preparation patch for https://reviews.llvm.org/D32720

Reviewers: dberlin, hfinkel, davide

Subscribers: davide, mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D33380

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 02:34:41 +00:00
Matthias Braun
2144c5262f CodeGen: Refactor MIR parsing
When parsing .mir files immediately construct the MachineFunctions and
put them into MachineModuleInfo.

This allows us to get rid of the delayed construction (and delayed error
reporting) through the MachineFunctionInitialzier interface.

Differential Revision: https://reviews.llvm.org/D33809

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304758 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 00:44:35 +00:00
Adam Nemet
8008a8a954 Handle non-unique edges in edge-dominance
This removes a quadratic behavior in assert-enabled builds.

GVN propagates the equivalence from a condition into the blocks guarded by the
condition.  E.g. for 'if (a == 7) { ... }', 'a' will be replaced in the block
with 7.  It does this by replacing all the uses of 'a' that are dominated by
the true edge.

For a switch with N cases and U uses of the value, this will mean N * U calls
to 'dominates'.  Asserting isSingleEdge in 'dominates' make this N^2 * U
because this function checks for the uniqueness of the edge. I.e. traverses
each edge between the SwitchInst's block and the cases.

The change removes the assert and makes 'dominates' works correctly in the
presence of non-unique edges.

This brings build time down by an order of magnitude for an input that has
~10k cases in a switch statement.

Differential Revision: https://reviews.llvm.org/D33584

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304721 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 16:27:09 +00:00
Frederich Munch
908f18379e Close DynamicLibraries in reverse order they were opened.
Summary: Matches C++ destruction ordering better and fixes possible problems of loaded libraries having inter-dependencies.

Reviewers: efriedma, v.g.vassilev, chapuni

Reviewed By: efriedma

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D33652

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304720 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 16:26:58 +00:00
Craig Topper
843f0af293 [ConstantRange] Add another truncate unittest for wrapped set staying a wrapped set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304695 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 23:07:53 +00:00
Craig Topper
014d3cb804 [ConstantRange] Add a few more truncate unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304694 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 23:03:54 +00:00
Craig Topper
e6cc2d00d9 [ConstantRange] Add missing result check to the ConstantRange::truncate test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304693 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 23:03:52 +00:00
Galina Kistanova
4572d38118 Fixed warning: must specify at least one argument for '...' parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304677 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 05:31:03 +00:00
Galina Kistanova
34d05a52b5 Fixed warning: must specify at least one argument for '...' parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304676 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 05:30:26 +00:00
Saleem Abdulrasool
61a5551f88 ADT: handle special case of ARM environment for SUSE
SUSE treats "gnueabi" as "gnueabihf" so make sure that we normalise the
environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304670 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 22:31:06 +00:00
Zachary Turner
a5be24d937 [PDB] Fix use after free.
Previously MappedBlockStream owned its own BumpPtrAllocator that
it would allocate from when a read crossed a block boundary.  This
way it could still return the user a contiguous buffer of the
requested size.  However, It's not uncommon to open a stream, read
some stuff, close it, and then save the information for later.
After all, since the entire file is mapped into memory, the data
should always be available as long as the file is open.

Of course, the exception to this is when the data isn't *in* the
file, but rather in some buffer that we temporarily allocated to
present this contiguous view.  And this buffer would get destroyed
as soon as the strema was closed.

The fix here is to force the user to specify the allocator, this
way it can provide an allocator that has whatever lifetime it
chooses.

Differential Revision: https://reviews.llvm.org/D33858

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304623 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 00:33:35 +00:00
David Blaikie
29e59c38ab Tidy up a bit of r304516, use SmallVector::assign rather than for loop
This might give a few better opportunities to optimize these to memcpy
rather than loops - also a few minor cleanups (StringRef-izing,
templating (to avoid std::function indirection), etc).

The SmallVector::assign(iter, iter) could be improved with the use of
SFINAE, but the (iter, iter) ctor and append(iter, iter) need it to and
don't have it - so, workaround it for now rather than bothering with the
added complexity.

(also, as noted in the added FIXME, these assign ops could potentially
be optimized better at least for non-trivially-copyable types)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304566 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 17:24:26 +00:00
Benjamin Kramer
2118193ddf [OrderedBasicBlock] Return false for comesBefore(A, A)
So far it would return true for the first uncached query, then cached
queries return false.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304545 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 13:10:31 +00:00
Keno Fischer
6437c35ae0 Reapply "[Cloning] Take another pass at properly cloning debug info"
This was rL304226, reverted in 304228 due to a clang assertion failure
on the build bots. That problem should have been addressed by clang
commit rL304470.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304488 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-01 23:02:12 +00:00
Kristof Beyls
f2c10d746a Make mcpu=generic the default for armv7-a and armv8-a.
As discussed in
http://lists.llvm.org/pipermail/llvm-dev/2017-May/113525.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304390 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-01 07:31:43 +00:00
Vedant Kumar
b527f09766 Avoid a UB pointer overflow in the ArrayRef unit test
The intent of the test is to check that array lengths greater than
UINT_MAX work properly. Change the test to stress that scenario, without
triggering pointer overflow UB.

Caught by a WIP pointer overflow checker in clang.

Differential Revision: https://reviews.llvm.org/D33149

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304353 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31 21:47:52 +00:00
Reid Kleckner
3db1299db9 Fix assertion when merging multiple empty AttributeLists
Patch by Nicholas Wilson!

Differential Revision: https://reviews.llvm.org/D33627

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304300 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31 14:24:06 +00:00
Keno Fischer
26b413581c Revert "[Cloning] Take another pass at properly cloning debug info"
At least one build bot is complaining. Will investigate after lunch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304228 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30 18:56:26 +00:00
Keno Fischer
e34d6c6de7 [Cloning] Take another pass at properly cloning debug info
Summary:
In rL302576, DISubprograms gained the constraint that a !dbg attachments to functions must
have a 1:1 mapping to DISubprograms. As part of that change, the function cloning support
was adjusted to attempt to enforce this invariant during cloning. However, there
were several problems with the implementation. Part of these were fixed in rL304079.
However, there was a more fundamental problem with these changes, namely that it
bypasses the matadata value map, causing the cloned metadata to be a mix of metadata
pointing to the new suprogram (where manual code was added to fix those up) and the
old suprogram (where this was not the case). This mismatch could cause a number of
different assertion failures in the DWARF emitter. Some of these are given at
https://github.com/JuliaLang/julia/issues/22069, but some others have been observed
as well. Attempt to rectify this by partially reverting the manual DI metadata fixup,
and instead using the standard value map approach. To retain the desired semantics
of not duplicating the compilation unit and inlined subprograms, explicitly freeze
these in the value map.

Reviewers: dblaikie, aprantl, GorNishanov, echristo

Reviewed By: aprantl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33655

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30 18:28:30 +00:00
Galina Kistanova
c927ec6baf Reverted r303602, as it will be fixed in gtest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304184 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30 03:17:10 +00:00
Benjamin Kramer
e005fa57be [ManagedStatic] Avoid putting function pointers in template args.
This is super awkward, but GCC doesn't let us have template visible when
an argument is an inline function and -fvisibility-inlines-hidden is
used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304175 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-29 20:56:27 +00:00
Benjamin Kramer
bcabbd57dc Don't destroy ManagedStatics in a unit test.
Turns out this is very hostile towards other unit tests running in the
same process, it unregisters all flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304165 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-29 17:25:37 +00:00
Benjamin Kramer
107c8c925e Try to work around MSVC being buggy. Attempt #1.
error C2971: 'llvm::ManagedStatic': template parameter 'Creator': 'CreateDefaultTimerGroup': a variable with non-static storage duration cannot be used as a non-type argument

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-29 14:28:04 +00:00
Benjamin Kramer
10f535273f [ManagedStatic] Add a way to pass custom creators/deleters.
Also add a test case verifying that nested ManagedStatics work correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304155 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-29 14:05:26 +00:00
Galina Kistanova
74cf5860af Reverted r304083 as it seems there is a desire to address this in the googletest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-28 05:50:22 +00:00
Galina Kistanova
3eda9f25f3 Added braces to address gcc warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-28 03:50:52 +00:00
George Rimar
b5ac7008b1 Recommit "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"
With fix of uninitialized variable.

Original commit message:

This change is intended to use for LLD in D33183. 
Problem we have in LLD when building .gdb_index is that we need to know section which address range belongs to.

Previously it was solved on LLD side by providing fake section addresses with use of llvm::LoadedObjectInfo
interface. We assigned file offsets as addressed. Then after obtaining ranges lists, for each range we had to find section ID's.
That not only was slow, but also complicated implementation and was the reason of incorrect behavior when
sections share the same offsets, like D33176 shows.

This patch makes DWARF parsers to return section index as well. That solves problem mentioned above.

Differential revision: https://reviews.llvm.org/D33184

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304078 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-27 18:10:23 +00:00
Gor Nishanov
fda9bcb09b ScalarEvolution unit test: fix typo that breaks check-all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-27 05:24:30 +00:00
Adam Nemet
ad7d2c0d6e Rearrange Dom unittest to accommodate multiple tests
I've taken the approach from the LoopInfo test:

* Rather than running in the pass manager just build the analyses manually
* Split out the common parts (makeLLVMModule, runWithDomTree) into helpers

Differential Revision: https://reviews.llvm.org/D33617

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304061 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-27 04:05:52 +00:00
Adam Nemet
bfb2ddf65c clang-format DomTree unittest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-27 04:05:50 +00:00
Keno Fischer
65ac22c1e2 [SCEVExpander] Try harder to avoid introducing inttoptr
Summary:
This fixes introduction of an incorrect inttoptr/ptrtoint pair in
the included test case which makes use of non-integral pointers. I
suspect there are more cases like this left, but this takes care of
the one I was seeing at the moment.

Reviewers: sanjoy

Subscribers: mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D33129

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304058 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-27 03:22:55 +00:00
Vitaly Buka
b3b1987549 allow_user_segv_handler was already removed
New default behavior matches previous allow_user_segv_handler=1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304032 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 20:50:49 +00:00
George Rimar
4eca9e6cb9 Revert r304002 "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"
Revert it again. Now another bot unhappy: http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/8750


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304011 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 17:36:23 +00:00
Roger Ferrer Ibanez
b6924f0922 Revert "Export the required symbol from DynamicLibraryTests"
This breaks sanitizer-x86_64-linux-fast buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304005 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 17:08:49 +00:00
George Rimar
843d71cda9 [DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC
This change is intended to use for LLD in D33183. 
Problem we have in LLD when building .gdb_index is that we need to know section which address range belongs to.

Previously it was solved on LLD side by providing fake section addresses with use of llvm::LoadedObjectInfo
interface. We assigned file offsets as addressed. Then after obtaining ranges lists, for each range we had to find section ID's.
That not only was slow, but also complicated implementation and was the reason of incorrect behavior when
sections share the same offsets, like D33176 shows.

This patch makes DWARF parsers to return section index as well. That solves problem mentioned above.

Differential revision: https://reviews.llvm.org/D33184

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304002 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 16:26:18 +00:00
George Rimar
4e545dfae8 Revert "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"
Broked BB again:

TEST 'LLVM :: DebugInfo/X86/dbg-value-regmask-clobber.ll' FAILED
...
LLVM ERROR: Section was outside of section table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303984 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 13:20:09 +00:00
George Rimar
88aeae664a Recommit r303978 "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"
With fix of test compilation.

Initial commit message:

This change is intended to use for LLD in D33183. 
Problem we have in LLD when building .gdb_index is that we need to know section 
which address range belongs to.

Previously it was solved on LLD side by providing fake section addresses
with use of llvm::LoadedObjectInfo interface. We assigned file offsets as addressed.
Then after obtaining ranges lists, for each range we had to find section ID's.
That not only was slow, but also complicated implementation and was the reason 
of incorrect behavior when
sections share the same offsets, like D33176 shows.

This patch makes DWARF parsers to return section index as well. 
That solves problem mentioned above.

Differential revision: https://reviews.llvm.org/D33184


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303983 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 13:13:50 +00:00
Roger Ferrer Ibanez
e10b16c5df Export the required symbol from DynamicLibraryTests
Running unittests/Support/DynamicLibrary/DynamicLibraryTests fails when LLVM is
configured with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON, because the test's version
script only contains symbols extracted from the static libraries, that the test
links with, but not those from the main object/executable itself. The patch
explicitly exports the one symbol needed by the test.

This change fixes https://bugs.llvm.org/show_bug.cgi?id=32893

Patch authored by Momchil Velikov.

Differential Revision: https://reviews.llvm.org/D33490




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303979 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 12:51:12 +00:00
Daniel Jasper
0559b4fa45 Remove unnecessary double-assignment triggering -Wsequence-point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303974 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 12:07:12 +00:00
Chandler Carruth
a1a0cf0a7b [IR] Add an iterator and range accessor for the PHI nodes of a basic
block.

This allows writing much more natural and readable range based for loops
directly over the PHI nodes. It also takes advantage of the same tricks
for terminating the sequence as the hand coded versions.

I've replaced one example of this mostly to showcase the difference and
I've added a unit test to make sure the facilities really work the way
they're intended. I want to use this inside of SimpleLoopUnswitch but it
seems generally nice.

Differential Revision: https://reviews.llvm.org/D33533

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26 03:10:00 +00:00
Zachary Turner
f061f6ca68 [CV Type Merging] Find nested type indices faster.
Merging two type streams is one of the most time consuming
parts of generating a PDB, and as such it needs to be as
fast as possible.  The visitor abstractions used for interoperating
nicely with many different types of inputs and outputs have
been used widely and help greatly for testability and implementing
tools, but the abstractions build up and get in the way of
performance.

This patch removes all of the visitation stuff from the type
stream merger, essentially re-inventing the leaf / member switch
and loop, but at a very low level.  This allows us many other
optimizations, such as not actually deserializing *any* records
(even member records which don't describe their own length), as
the operation of "figure out how long this record is" is somewhat
faster than "figure out how long this record *and* get all its
fields out".  Furthermore, whereas before we had to deserialize,
re-write type indices, then re-serialize, now we don't have to
do any of those 3 steps.  We just find out where the type indices
are and pull them directly out of the byte stream and re-write
them.

This is worth a 50-60% performance increase.  On top of all other
optimizations that have been applied this week, I now get the
following numbers when linking lld.exe and lld.pdb

MSVC: 25.67s
Before This Patch: 18.59s
After This Patch: 8.92s

So this is a huge performance win.

Differential Revision: https://reviews.llvm.org/D33564

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 23:36:16 +00:00
Zachary Turner
63d6d7548d Fix a bug in MappedBlockStream.
It was using the number of blocks of the entire PDB file as the number
of blocks of each stream that was created.  This was only an issue in
the readLongestContiguousChunk function, which  was never called prior.
This bug surfaced when I updated an algorithm to use this function and
the algorithm broke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303916 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 21:12:00 +00:00
Vitaly Buka
fee7735cee Revert "Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests""
This dependents on r303729 which was reverted.

This reverts commit r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303796 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 19:11:12 +00:00
Vitaly Buka
f0fdd6463d Prevent UBSan report in CrashRecovery tests
Reverted by mistake with r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303785 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 18:11:57 +00:00
Vitaly Buka
bd571bcd53 Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests"
It's not needed after r303729.

This reverts commit r303311.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303783 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:58:09 +00:00
Galina Kistanova
b3d3623b91 Cosmetic. Added braces to address gcc warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-23 05:00:10 +00:00
Xin Tong
a9ee0160e6 Revert "Add pthread_self function prototype and make it speculatable."
This reverts commit 143d7445b5.

Build breaking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303496 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-21 00:37:55 +00:00
Xin Tong
143d7445b5 Add pthread_self function prototype and make it speculatable.
Summary: This allows pthread_self to be pulled out of a loop by LICM.

Reviewers: hfinkel, arsenm, davide

Reviewed By: davide

Subscribers: davide, wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D32782

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303495 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-20 22:40:25 +00:00