Commit Graph

31986 Commits

Author SHA1 Message Date
Chandler Carruth
fe40a5a3de [PM] Fix a nasty bug in the new PM where we failed to properly
invalidation of analyses when merging SCCs.

While I've added a bunch of testing of this, it takes something much
more like the inliner to really trigger this as you need to have
partially-analyzed SCCs with updates at just the right time. So I've
added a direct test for this using the inliner and verifying the
domtree. Without the changes here, this test ends up finding a stale
dominator tree.

However, to handle this properly, we need to invalidate analyses
*before* merging the SCCs. After talking to Philip and Sanjoy about this
they convinced me this was the right approach. To do this, we need
a callback mechanism when merging SCCs so we can observe the cycle that
will be merged before the merge happens. This API update ended up being
surprisingly easy.

With this commit, the new PM passes the test-suite again. It hadn't
since MemorySSA was enabled for EarlyCSE as that also will find this bug
very quickly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307498 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-09 13:45:11 +00:00
Chandler Carruth
b86a95f1b6 [PM] Add unittesting of the call graph update logic with complex
dependencies between analyses.

This uncovers even more issues with the proxies and the splitting apart
of SCCs which are fixed in this patch. I discovered this while trying to
add more rigorous testing for a change I'm making to the call graph
update invalidation logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307497 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-09 13:16:55 +00:00
Chandler Carruth
79b7faac96 [PM] Teach PreservedAnalyses to have an allInSet static factory
function template to simplify building a quick object with a set marked
as preserved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307493 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-09 07:23:27 +00:00
Craig Topper
eb41f6a345 [IR] Add Type::isIntOrIntVectorTy(unsigned) similar to the existing isIntegerTy(unsigned), but also works for vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307492 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-09 07:04:03 +00:00
Craig Topper
1060082924 [IR] Make use of Type::isPtrOrPtrVectorTy/isIntOrIntVectorTy/isFPOrFPVectorTy to shorten code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307491 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-09 07:04:00 +00:00
Chandler Carruth
cc60d7b17d [ADT] Add a default constructor and a bool conversion to function_ref.
The internal representation has a natural way to handle this and it
seems nicer than having to wrap this in an optional (with its own
separate flag).

This also matches how std::function works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-09 06:12:56 +00:00
Yuka Takahashi
fb5cc8884b [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified
Summary:
We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`.

Another idea for this implementation is to make --autocomplete a cc1
option and handle it in clang Frontend, by porting --autocomplete
handler from Driver to Frontend, so that we can handle Driver options
and CC1 options in unified manner.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307479 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-08 17:48:59 +00:00
Eric Beckmann
b618c820b0 Revert "Revert "Revert "Revert "Switch external cvtres.exe for llvm's own resource library.""""
This reverts commit 147f45ff24456aea59575fa4ac16c8fa554df46a.

Revert "Revert "Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""""

This reverts commit 61a90a67ed54a1f0dfeab457b65abffa129569e4.

The patches were intially reverted because they were causing a failure
on CrWinClangLLD.  Unfortunately, this was done haphazardly and didn't
compile, so the revert was reverted again quickly to fix this.  One that
was done, the revert of the revert was itself reverted.  This allowed me
to finally fix the actual bug in r307452.  This patch re-enables the
code path that had originally been causing the bug, now that it (should)
be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307460 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-08 03:06:10 +00:00
Eric Beckmann
ec7b3bff58 Add name offset flags, for parity with cvtres.exe.
Summary:
The original cvtres.exe sets the high bit when an identifier offset
points to a string.  Even though this is not mentioned in the spec, and
in fact does not seem to cause errors with most cases, for some reason
this causes a failure in Chromium where the new resource file is not
verified as a new version.  This patch sets this high bit flag, and also
adds a test case to check that the output of our library is always
identical to original cvtres.

Reviewers: zturner, ruiu

Subscribers: llvm-commits, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307452 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 23:23:53 +00:00
Dehao Chen
b1f864a947 Increase the import-threshold for crtical functions.
Summary: For interative sample-pgo, if a hot call site is inlined in the profiling binary, we should inline it in before profile annotation in the backend. Before that, the compile phase first collects all GUIDs that needs to be imported and creates virtual "hot" call edge in the summary. However, "hot" is not good enough to guarantee the callsites get inlined. This patch introduces "critical" call edge, and assign much higher importing threshold for those edges.

Reviewers: tejohnson

Reviewed By: tejohnson

Subscribers: sanjoy, mehdi_amini, llvm-commits, eraman

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 21:01:00 +00:00
Dehao Chen
59bf0ba318 Add sample PGO support to ThinLTO new pass manager.
Summary:
For SamplePGO + ThinLTO, because profile annotation is done twice at both PrepareForThinLTO pipeline and backend compiler, the following changes are needed at the PrepareForThinLTO phase to ensure the IR is not changed dramatically. Otherwise the profile annotation will be inaccurate in the backend compiler.

* disable hot-caller heuristic
* disable loop unrolling
* disable indirect call promotion

This will unblock the new PM testing for sample PGO (tools/clang/test/CodeGen/pgo-sample-thinlto-summary.c), which will be covered in another cfe patch.

Reviewers: chandlerc, tejohnson, davidxl

Reviewed By: tejohnson

Subscribers: sanjoy, mehdi_amini, Prazek, inglorion, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307437 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 20:53:10 +00:00
Craig Topper
9fec2431ce [PatternMatch] Implemenet m_SignMask using Constant::isMinSignedValue instead of doing splat detection and analyzing the resulting APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307433 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 19:56:23 +00:00
Craig Topper
7383d9c9fd [PatternMatch] Implement m_AnyZero using Constant::isZeroValue instead of ORing together isNullValue and isNegativeZeroValue. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307432 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 19:56:21 +00:00
Craig Topper
caa219e9a8 [PatternMatch] Implement m_One and m_AllOnes using Constant::isOneValue/isAllOnesValue instead of doing our own splat detection and checking the resulting APInt.
Should result in less compiled code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307431 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 19:56:20 +00:00
Craig Topper
8614bf0c87 [APInt] Add a fastpath for the single word case of isOneValue to match isNullValue, isAllOnesValue, etc. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307430 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 19:56:18 +00:00
Quentin Colombet
b8caa0933a [RegAllocFast] Add the proper initialize method to use the .mir infrastructure
NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307427 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 19:25:42 +00:00
Zachary Turner
b85b70f834 Fix some differences between lld and MSVC generated PDBs.
A couple of things were different about our generated PDBs.

1) We were outputting the wrong Version on the PDB Stream.
   The version we were setting was newer than what MSVC is setting.
   It's not clear what the implications are, but we change LLD
   to use PdbImplVC70, as MSVC does.
2) For the optional debug stream indices in the DBI Stream, we
   were outputting 0 to mean "the stream is not present".  MSVC
   outputs uint16_t(-1), which is the "correct" way to specify
   that a stream is not present.  So we fix that as well.
3) We were setting the PDB Stream signature to 0.  This is supposed
   to be the result of calling time(nullptr).  Although this leads
   to non-deterministic builds, a better way to solve that is by
   having a command line option explicitly for generating a
   reproducible build, and have the default behavior of lld-link
   match the default behavior of link.

To test this, I'm making use of the new and improved `pdb diff`
sub command.  To make it suitable for writing tests against, I had
to modify the diff subcommand slightly to print less verbose output.
Previously it would always print | <column> | <value1> | <value2> |
which is quite verbose, and the values are fragile.  All we really
want to know is "did we produce the same value as link?"  So I added
command line options to print a single character representing the
result status (different, identical, equivalent), and another to
hide the value display.  Note that just inspecting the diff output
used to write the test, you can see some things that are obviously
wrong.  That is just reflective of the fact that this is the state
of affairs today, not that we're asserting that this is "correct".
We can use this as a starting point to discover differences, fix
them, and update the test.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307422 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 18:45:56 +00:00
Zachary Turner
3324d0bf04 [llvm-pdbutil] Improve diff mode.
We're getting to the point that some MS tools (e.g. DIA) can recognize
our PDBs but others (e.g. link.exe) cannot. I think the way forward is
to improve our tooling to help us find differences more easily. For
example, if we can compile the same program with clang-cl and cl and
have a tool tell us all the places where the PDBs differ, this could
tell us what we're doing wrong. It's tricky though, because there are a
lot of "benign" differences in a PDB. For example, if the string table
in one PDB consists of "foo" followed by "bar" and in the other PDB it
consists of "bar" followed by "foo", this is not necessarily a critical
difference, as long as the uses of these strings also refer to the
correct location. On the other hand, if the second PDB doesn't even
contain the string "foo" at all, this is a critical difference.

diff mode has been in llvm-pdbutil for quite a while, but because of the
above challenge along with some others, it's been hard to make it
useful. I think this patch addresses that. It looks for all the same
things, but it now prints the output in tabular format (carefully
formatted and aligned into tables and fields), and it highlights
critical differences in red, non-critical differences in yellow, and
identical fields in green.  This makes it easy to spot the places we
differ, and the general concept of outputting arbitrary fields in
tabular format can be extended to provide analysis into many of the
different types of information that show up in a PDB.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307421 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 18:45:37 +00:00
Daniel Jasper
9889fe2290 Fix uninitalized memory access introduced in r307350.
Found by MSAN :).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307383 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:23:13 +00:00
Rafael Espindola
ef8ed10be5 Reduce code duplication.
By addding a mapNameToDWARFSection we only need to check section names
in one place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307359 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 05:36:53 +00:00
Zachary Turner
5974613ee5 [PDB] Teach libpdb to write DBI Stream ECNames.
Based strictly on the name, this seems to have something to do
width edit & continue.  The goal of this patch has nothing to do
with supporting edit and continue though.  msvc link.exe writes
very basic information into this area even when *not* compiling
with support for E&C, and so the goal here is to bring lld-link
to parity.  Since we cannot know what assumptions standard tools
make about the content of PDB files, we need to be as close as
possible.

This ECNames data structure is a standard PDB string hash table.
link.exe puts a single string into this hash table, which is the
full path to the PDB file on disk.  It then references this string
from the module descriptor for the compiler generated `* Linker *`
module.

With this patch, lld-link will generate the exact same sequence of
bytes as MSVC link for this subsection for a given object file
input (as reported by `llvm-pdbutil bytes -ec`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 05:04:36 +00:00
Lang Hames
7df94ee855 [Orc] Add missing return value (left out in r307350).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307354 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 03:22:57 +00:00
Matthias Braun
192187283c RegisterScavenging: Fix PR33687
When scavenging for a use in instruction MI, we will reload after
that instruction and hence cannot spill uses/defs of this instruction.

This fixes http://llvm.org/PR33687

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307352 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 03:02:18 +00:00
Matthias Braun
a819fad865 LiveRegUnits: Rename accumulateBackward()->accumulate()
Contrary to the stepForward()/stepBackward() method accumulate() doesn't
have a direction as defs, uses and clobbers all have the same effect.

Also improve the documentation comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307351 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 03:02:17 +00:00
Lang Hames
a81793582b [ORC] Errorize the ORC APIs.
This patch updates the ORC layers and utilities to return and propagate
llvm::Errors where appropriate. This is necessary to allow ORC to safely handle
error cases in cross-process and remote JITing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307350 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 02:59:13 +00:00
Sam Clegg
20bde08716 [WebAssembly] Support weak defined symbols
Model weakly defined symbols as symbols that are both
exports and imported and marked as weak. Local references
to the symbols refer to the import but the linker can
resolve this to the weak export if not strong symbol
is found at link time.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307348 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 02:01:29 +00:00
Sean Fertile
471398ffea Extend memcpy expansion in Transform/Utils to handle wider operand types.
Adds loop expansions for known-size and unknown-sized memcpy calls, allowing the
target to provide the operand types through TTI callbacks. The default values
for the TTI callbacks use int8 operand types and matches the existing behaviour
if they aren't overridden by the target.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307346 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 02:00:06 +00:00
Wei Mi
8e52a552c3 [ConstHoisting] choose to hoist when frequency is the same.
The patch is to adjust the strategy of frequency based consthoisting:
Previously when the candidate block has the same frequency with the existing
blocks containing a const, it will not hoist the const to the candidate block.
For that case, now we change the strategy to hoist the const if only existing
blocks have more than one block member. This is helpful for reducing code size.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307328 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 22:32:27 +00:00
Lang Hames
513399718a [ORC] Add missing <memory> include for shared_ptr.
Accidentally left out of r307319.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307322 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 22:02:49 +00:00
Lang Hames
0125881b40 [ORC] Update GlobalMappingLayer::addModuleSet to addModule.
This layer was accidentally left out of r306166.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307319 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 21:33:48 +00:00
Chad Rosier
91054ccf0a [ValueTracking] Support icmps fed by 'and' and 'or'.
This patch adds support for handling some forms of ands and ors in
ValueTracking's isImpliedCondition API.

PR33611
https://reviews.llvm.org/D34901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307304 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 20:00:25 +00:00
Aditya Nandakumar
3c86b1705b [GISel]: Enhance the MachineIRBuilder API
Allows the MachineIRBuilder APIs to directly create registers (based on
LLT or TargetRegisterClass) as well as accept MachineInstrBuilders
and implicitly converts to register(with getOperand(0).getReg()).

Eg usage:
LLT s32 = LLT::scalar(32);
auto C32 = Builder.buildConstant(s32, 32);
auto Tmp = Builder.buildInstr(TargetOpcode::G_SUB, s32, C32,
OtherReg);
auto Tmp2 = Builder.buildInstr(Opcode, DstReg,
Builder.buildConstant(s32, 31)); ....

Only a few methods added for now.

Reviewed by Tim

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307302 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 19:40:07 +00:00
David Blaikie
450ef2ab9d Prototype: Reduce llvm-profdata merge memory usage further
The InstrProfWriter already stores the name and hash of the record in
the nested maps it uses for lookup while merging - this data is
duplicated in the value within the maps.

Refactor the InstrProfRecord to use a nested struct for the counters
themselves so that InstrProfWriter can use this nested struct alone
without the name or hash duplicated there.

This work is incomplete, but enough to demonstrate the value (around a
50% decrease in memory usage for a large test case (10GB -> 5GB)).
Though most of that decrease is probably from removing the
SoftInstrProfError as well, but I haven't implemented a replacement for
it yet. (it needs to go with the counters, because the operations on the
counters - merging, etc, are where the failures are - unlike the
name/hash which are totally unused by those counter-related operations
and thus easy to split out)

Ongoing discussion about removing SoftInstrProfError as a field of the
InstrProfRecord is happening on the thread that added it - including
the possibility of moving back towards an earlier version of that
proposed patch that passed SoftInstrProfError through the various APIs,
rather than as a member of InstrProfRecord.

Reviewers: davidxl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307298 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 19:00:12 +00:00
Mandeep Singh Grang
812570f6d4 [llvm] Separate out reverse iteration flag into its own header
Summary: This will ease out adding reverse iteration flags to other containers by simply including the header.

Reviewers: mehdi_amini, dexonsmith, davide, dblaikie

Reviewed By: dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307297 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 18:52:16 +00:00
Craig Topper
6dbd34d261 [Constants] If we already have a ConstantInt*, prefer to use isZero/isOne/isMinusOne instead of isNullValue/isOneValue/isAllOnesValue inherited from Constant. NFCI
Going through the Constant methods requires redetermining that the Constant is a ConstantInt and then calling isZero/isOne/isMinusOne.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307292 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 18:39:47 +00:00
Reid Kleckner
8657a6b195 [PDB] Fill in "Parent" and "End" fields of scope-like symbol records
Summary:
There are a variety of records that open scopes: function scopes, block
scopes, and inlined call site scopes. These symbol records contain
Parent and End fields with the offsets of other symbol records. The End
field contains the offset of the matching S_END or S_INLINESITE_END
record. The Parent field contains the offset of the parent record, or 0
if this is a top-level scope (i.e. a function).

With this change, `llvm-pdbutil pretty -all` no longer crashes on PDBs
produced by LLD. I haven't tried a real debugger yet.

Reviewers: zturner, ruiu

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 16:39:32 +00:00
George Rimar
bd98e1b2fd [DWARF] - Provide default implementation for getSectionLoadAddress() method of LoadedObjectInfo
It is a bit unconvinent that client should implement this method
even if not use it. Patch provides default implementation.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307242 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 08:46:01 +00:00
Daniel Sanders
2e93b3845f [globalisel][tablegen] Import rules containing intrinsic_wo_chain.
Summary:
As of this patch, 1018 out of 3938 rules are currently imported.

Depends on D32275

Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar

Reviewed By: qcolombet

Subscribers: dberris, igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307240 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 08:12:20 +00:00
Eric Beckmann
b9f4c5114f Revert "Revert "Revert "Switch external cvtres.exe for llvm's own resource library."""
This reverts commit ae21ee0b6cacbc1efaf4d42502e71da2f0eb45c3.

The initial revert was done in order to prevent ongoing errors on
chromium bots such as CrWinClangLLD.  However, this was done haphazardly
and I didn't realize there were test and compilation failures, so this
revert was reverted.  Now that those have been fixed, we can revert the
revert of the revert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 23:46:06 +00:00
Eric Beckmann
4f70e7e8d8 Revert "Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file."""
This reverts commit 5fecbbbe5049665d86834cf69d8f75db4f392308.

The initial revert was done in order to prevent ongoing errors on
chromium bots such as CrWinClangLLD.  However, this was done haphazardly
and I didn't realize there were test and compilation failures, so this
revert was reverted.  Now that those have been fixed, we can revert the
revert of the revert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 23:45:50 +00:00
Craig Topper
4065b5e398 [IR] Use CmpInst::isIntPredicate()/isFPPredicate in some asserts instead of doing the equivalent range check. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307210 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 22:09:00 +00:00
Vadim Chugunov
a671f7f9d2 Fix libcall expansion creating DAG nodes with invalid type post type legalization.
If we are lowering a libcall after legalization, we'll split the return type into a pair of legal values.

Patch by Jatin Bhateja and Eli Friedman.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307207 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 22:01:49 +00:00
Sam Clegg
640fb6d894 [WebAssembly] Fix types for address taken functions
Differential Revision: https://reviews.llvm.org/D34966

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307198 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 20:25:08 +00:00
Sam Clegg
a6a29d93c8 [WebAssembly] MC: Don't generate extra types for weak alias
Previously we were generating a void(void) function type
for a weak alias.  Update the weak-alias test case to
catch this.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307194 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 20:09:26 +00:00
Eric Beckmann
045760e434 Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""
This reverts commit 8c8dce3b8f15d6ebaefc35ce88f15a85c8cdbd6e.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307191 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 19:04:48 +00:00
Eric Beckmann
1efceea97e Revert "Revert "Switch external cvtres.exe for llvm's own resource library.""
This reverts commit 165e578e47f1cd38191120aad23a9020fb5476dd.

Forgot to run tests on this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307190 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 19:04:33 +00:00
Eric Beckmann
9b6f55389e Revert "Switch external cvtres.exe for llvm's own resource library."
This reverts commit 600d52c278e123dd08bee24c1f00932b55add8de.

This patch still seems to break CrWinClangLLD, reverting until I can
find root problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307189 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 18:59:16 +00:00
Eric Beckmann
7cacca2b9b Revert "Replace trivial use of external rc.exe by writing our own .res file."
This patch still seems to break CrWinClangLLD, reverting this once more
until I can discover root problem.

This reverts commit 3dbbc8ce43be50ffde2b1c655c6d3a25796fe78b.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307188 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 18:59:01 +00:00
Daniel Sanders
38fe5d7dca [globalisel][tablegen] Fix another unused variable warning introduced by r307159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307168 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 15:34:16 +00:00
David Blaikie
4a35644b43 DebugInfo: Generalize LoadedObjectInfoHelper from RuntimeDyld
Make it usable by any class derived (even indirectly) from
LoadedObjectInfo by allowing a custom base class to be specified and
perfect forwarding to the ctor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307166 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 15:23:56 +00:00