Commit Graph

290156 Commits

Author SHA1 Message Date
Yaxun Liu 8a60e5db70 Call CreateTempMemWithoutCast for ActiveFlag
Introduced CreateMemTempWithoutCast and CreateTemporaryAllocaWithoutCast to emit alloca
without casting to default addr space.

ActiveFlag is a temporary variable emitted for clean up. It is defined as AllocaInst* type and there is
a cast to AlllocaInst in SetActiveFlag. An alloca casted to generic pointer causes assertion in
SetActiveFlag.

Since there is only load/store of ActiveFlag, it is safe to use the original alloca, therefore use
CreateMemTempWithoutCast is called.

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

llvm-svn: 332982
2018-05-22 14:36:26 +00:00
Clement Courbet 488ebfb732 [llvm-exegesis] Update doc to mention that the output is in html.
llvm-svn: 332980
2018-05-22 13:36:29 +00:00
Clement Courbet 17d3c257b9 [llvm-exegesis] Analysis output uses HTML.
Summary: This makes the report much more readable.

Reviewers: gchatelet

Subscribers: tschuett, mgrang, craig.topper, RKSimon, llvm-commits

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

llvm-svn: 332979
2018-05-22 13:31:29 +00:00
Ilya Biryukov 50a7969d6e [clangd] Fix a typo. NFC
llvm-svn: 332978
2018-05-22 13:29:37 +00:00
Aleksandar Beserminji a5f755186a [mips] Merge MipsLongBranch and MipsHazardSchedule passes
MipsLongBranchPass and MipsHazardSchedule passes are joined to one pass
because of mutual conflict. When MipsHazardSchedule inserts 'nop's, it
potentially breaks some jumps, so they have to be expanded to long
branches. When some branch is expanded to long branch, it potentially
creates a hazard situation, which should be fixed by adding nops.
New pass is called MipsBranchExpansion, it combines these two passes,
and runs them alternately until one of them reports no changes were made.

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

llvm-svn: 332977
2018-05-22 13:24:38 +00:00
Ilya Biryukov 06a485d390 [clangd] Remove ignored Preamble::CanReuse call from completion
Summary:
Now that the clients who relied on stats for files from preamble are
gone.

Reviewers: ioeric, sammccall

Reviewed By: ioeric

Subscribers: klimek, MaskRay, jkorous, cfe-commits

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

llvm-svn: 332976
2018-05-22 13:10:09 +00:00
Brock Wyma 8557ec5d64 [CodeView] Enable debugging of captured variables within C++ lambdas
This change will help Visual Studio resolve forward references to C++ lambda
routines used by captured variables.

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

llvm-svn: 332975
2018-05-22 12:41:19 +00:00
Krasimir Georgiev 067ec70d4f [clang-format] Add a test case for crash
llvm-svn: 332974
2018-05-22 11:44:03 +00:00
Amara Emerson f528bcc32a Revert "CodeGen, Driver: Start using direct split dwarf emission in clang."
This reverts commit r332885 as it broke several greendragon buildbots.

llvm-svn: 332973
2018-05-22 11:18:58 +00:00
Amara Emerson b6aa52a1c4 Revert "Fix another make_unique ambiguity."
This reverts commit r332906 as a dependency to revert r332885.

llvm-svn: 332972
2018-05-22 11:18:49 +00:00
Amara Emerson 9505fe5356 Revert "Add missing x86-registered-target."
This reverts commit r332911, as a dependency to revert r332885.

llvm-svn: 332971
2018-05-22 11:18:43 +00:00
Simon Dardis 437153bb80 [mips] Correct the predicates of the cache and pref instructions
Reviewers: atanasyan, abeserminji, smaksimovic

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

llvm-svn: 332970
2018-05-22 10:55:05 +00:00
Simon Pilgrim 4162d77744 [TTI] Add uniform/non-uniform constant Pow2 detection to TargetTransformInfo::getInstructionThroughput
This enables us to detect more fast path sdiv cases under cost analysis.

This patch also enables us to handle non-uniform-constant pow2 cases for X86 SDIV costs.

Found while working on D46276

Future patches can then extend the vectorizers to more fully support non-uniform pow2 cases.

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

llvm-svn: 332969
2018-05-22 10:40:09 +00:00
Martin Probst 7ebad4ea81 clang-format: [JS] do not wrap before any `is`.
Summary:
`is` type annotations can occur at any nesting level. For example:

    function x() {
      return function y(): a is B { ... };
    }

Breaking before the `is` above breaks TypeScript parsing the code. This
change prevents the wrap.

Reviewers: krasimir

Subscribers: klimek, cfe-commits

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

llvm-svn: 332968
2018-05-22 10:39:07 +00:00
Hans Wennborg 2cfcc01b22 LangRef.rst: the "\01" prefix applies not just to variables
llvm-svn: 332967
2018-05-22 10:14:07 +00:00
David Chisnall 48a7afa5a1 [objc-gnustep2] Use unsigned char to avoid potential UB in isalnum.
Suggested by Gabor Buella.

llvm-svn: 332966
2018-05-22 10:13:17 +00:00
David Chisnall 45d0a2650e [objc-gnu] Fix test.
The test was implicitly capturing the local filesystem layout.

Patch by Hans Wennborg!

llvm-svn: 332965
2018-05-22 10:13:14 +00:00
David Chisnall 88e754f57d [objc-gnustep2] Use isalnum instead of a less efficient and nonportable equivalent.
Patch by Hans Wennborg!

llvm-svn: 332964
2018-05-22 10:13:11 +00:00
David Chisnall 404bbcbdcb Revert "Revert r332955 "GNUstep Objective-C ABI version 2""
llvm-svn: 332963
2018-05-22 10:13:06 +00:00
Gabor Buella e96c488aa7 [x86] NFC Add some more shuffle-vs-trunc tests
These are related to: https://reviews.llvm.org/D46957

llvm-svn: 332962
2018-05-22 09:47:42 +00:00
Krasimir Georgiev f163bdc07e [clang-format] Fix crash in getLengthToMatchingParen
Summary:
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8212

Reviewers: bkramer

Subscribers: klimek, cfe-commits

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

llvm-svn: 332961
2018-05-22 09:46:55 +00:00
Karl-Johan Karlsson 11d68a619e [LowerSwitch] Fixed faulty PHI node update
Summary:
When lowerswitch merge several cases into a new default block it's not
updating the PHI nodes accordingly. The code that update the PHI nodes
for the default edge only update the first entry and do not remove the
remaining ones, to make sure the number of entries match the number of
predecessors.

This is easily fixed by replacing the code that update the PHI node with
the already existing utility function for updating PHI nodes.

Reviewers: hans, reames, arsenm

Reviewed By: arsenm

Subscribers: wdng, llvm-commits

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

llvm-svn: 332960
2018-05-22 08:46:48 +00:00
Eric Liu cf377a1434 [clangd] Correctly handle IWYU prama with verbatim #include header.
llvm-svn: 332959
2018-05-22 08:33:30 +00:00
Bjorn Pettersson fecef6be9e [LoopVersioning] Don't modify the list that we iterate over in addPHINodes
Summary:
In LoopVersioning::addPHINodes we need to iterate over all
users for a value "Inst", and if the user is outside of the
VersionedLoop we should replace the use of "Inst" by using
the value "PN" instead.

Replacing the use of "Inst" for a user of "Inst" also means
that Inst->users() is modified. So it is not safe to do the
replace while iterating over Inst->users() as we used to do.
This patch splits the task into two steps. First we iterate
over Inst->users() to find all users that should be updated.
Those users are saved into a local data structure on the stack.
And then, in the second step, we do the actual updates. This
time iterating over the local data structure.

Reviewers: mzolotukhin, anemet

Reviewed By: mzolotukhin

Subscribers: llvm-commits

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

llvm-svn: 332958
2018-05-22 08:33:02 +00:00
Bjorn Pettersson 844663353d Revert r332955 "GNUstep Objective-C ABI version 2"
Reverted due to buildbot failures.
Seems like isnumber() is some Apple addition to cctype.

llvm-svn: 332957
2018-05-22 08:16:45 +00:00
Stanislav Mekhanoshin 0e132dca53 [AMDGPU] Optimze old value of v_mov_b32_dpp
We can eliminate old value if bound_ctrl = 1 and row_mask = bank_mask = 0xf.
This is alternative implementation working with the intrinsic in InstCombine.
Original review for past-ISel optimization: D46570.

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

llvm-svn: 332956
2018-05-22 08:04:33 +00:00
David Chisnall 7c6cd52698 Add cctype include.
This appears to leak in already on libc++ platforms, but is breaking on
some other targets.

llvm-svn: 332955
2018-05-22 07:22:50 +00:00
Matt Arsenault 1349a04ef5 AMDGPU: Make v2i16/v2f16 legal on VI
This usually results in better code. Fixes using
inline asm with short2, and also fixes having a different
ABI for function parameters between VI and gfx9.

Partially cleans up the mess used for lowering of the d16
operations. Making v4f16 legal will help clean this up more,
but this requires additional work.

llvm-svn: 332953
2018-05-22 06:32:10 +00:00
Fangrui Song bfd08534b0 [ELF] Simplify. NFC
llvm-svn: 332952
2018-05-22 06:28:00 +00:00
Fangrui Song 8d3fcb45e6 CommandFlags.def -> CommandFlags.inc, leftover after r329840
llvm-svn: 332951
2018-05-22 06:12:23 +00:00
David Chisnall 79356eefc0 GNUstep Objective-C ABI version 2
Summary:
This includes initial support for the (hopefully final) updated Objective-C ABI, developed here:

https://github.com/davidchisnall/clang-gnustep-abi-2

It also includes some cleanups and refactoring from older GNU ABIs.

The current version is ELF only, other formats to follow.

Reviewers: rjmccall, DHowett-MSFT

Reviewed By: rjmccall

Subscribers: smeenai, cfe-commits

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

llvm-svn: 332950
2018-05-22 06:09:23 +00:00
Dan Gohman b81848272d [WebAssembly] Fix fast-isel lowering illegal argument and return types.
For both argument and return types, promote illegal types like i24 to i32,
and if a type can't be easily promoted, clear out the signature before
bailing out, so avoid leaving it in a partially complete state.

Fixes PR37546.

llvm-svn: 332947
2018-05-22 04:58:36 +00:00
Roman Tereshin 19da667599 [GlobalISel][InstructionSelect] Removing redundant num operands and nested def operands checks, perf patch 2
This patch continues a series of patches that decrease time spent by
GlobalISel in its InstructionSelect pass by roughly 60% for -O0 builds
for large inputs as measured on sqlite3-amalgamation
(http://sqlite.org/download.html) targeting AArch64.

This commit specifically removes number of operands checks that are
redundant if the instruction's opcode already guarantees that number
of operands (or more), and also avoids any kind of checks on a def
operand of a nested instruction as everything about it was already
checked at its use.

The expected performance implication is about 3% off InstructionSelect
comparing to the baseline (before the series of patches)

This patch also contains a bit of NFC changes required for further
patches in the series.

Every commit planned shares the same Phabricator Review.

Reviewers: qcolombet, dsanders, bogner, aemerson, javed.absar

Reviewed By: qcolombet

Subscribers: rovka, llvm-commits, kristof.beyls

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

llvm-svn: 332945
2018-05-22 04:31:50 +00:00
Petr Hosek 4ca5af0721 [CMake] Silence unused variable warning in compiler check
This is breaking the compiler check.

llvm-svn: 332936
2018-05-22 02:53:32 +00:00
Rui Ueyama 0dd56dcdd4 Handle --plugin-opt= options as alias options.
Previously, we had a loop to iterate over options starting with
`--plugin-opt=` and parse them by hand. But we can make OptTable
do that job for us.

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

llvm-svn: 332935
2018-05-22 02:53:11 +00:00
Marshall Clow acd629cd3c Missed the tests for the deduction guides for prority_queue
llvm-svn: 332931
2018-05-22 02:19:38 +00:00
Tom Stellard 44b30b4537 AMDGPU: Remove #include "MCTargetDesc/AMDGPUMCTargetDesc.h" from common headers
Summary:
MCTargetDesc/AMDGPUMCTargetDesc.h contains enums for all the instuction
and register defintions, which are huge so we only want to include
them where needed.

This will also make it easier if we want to split the R600 and GCN
definitions into separate tablegenerated files.

I was unable to remove AMDGPUMCTargetDesc.h from SIMachineFunctionInfo.h
because it uses some enums from the header to initialize default values
for the SIMachineFunction class, so I ended up having to remove includes of
SIMachineFunctionInfo.h from headers too.

Reviewers: arsenm, nhaehnle

Reviewed By: nhaehnle

Subscribers: MatzeB, kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, javed.absar, llvm-commits

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

llvm-svn: 332930
2018-05-22 02:03:23 +00:00
Craig Topper d97a95ae2c [X86] Prevent inclusion of __wmmintrin_aes.h and __wmmintrin_pclmul.h without including wmmintrin.h
llvm-svn: 332929
2018-05-22 02:02:13 +00:00
Marshall Clow 5b8b8b5dce Deduction guides for the container adaptors - queue, stack, and priority_queue
llvm-svn: 332927
2018-05-22 01:57:53 +00:00
Peter Collingbourne 2d3eaeb2d4 MC: Remove dead code. NFCI.
This code appears to have been copied from the mach-o streamer. It has
no effect in ELF because indirect symbols are specific to mach-o.

llvm-svn: 332926
2018-05-22 01:20:46 +00:00
Paul Semel 31a212d694 Revert "[llvm-objcopy] Add --strip-unneeded option"
There is a use after free I didn't see. Need to investigate.

This reverts commit f7624abeb1f0d012309baf2e78cf2499fbfe5e5f.

llvm-svn: 332925
2018-05-22 01:04:36 +00:00
Petr Hosek f6dda7cb44 [CMake] Use a different source depending on C++ support
When using system C++ library, assume we have a working C++ compiler and
try to compile a complete C++ program. When using in tree C++ library,
only check the C compiler since the C++ library likely won't have been
built yet at time of running the check.

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

llvm-svn: 332924
2018-05-22 01:01:56 +00:00
Petr Hosek 0681d9e6d9 [CMake] Pass Clang defaults to runtimes builds
This enables the use of Clang default options from runtimes CMake files.

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

llvm-svn: 332923
2018-05-22 00:43:04 +00:00
Jim Ingham a435d73349 Work around some odd instruction single-step behavior on macOS.
We've seen some cases on macOS where you go to instruction single
step (over a breakpoint), and single step returns but the instruction
hasn't been executed (and the pc hasn't moved.)  The ThreadPlanStepOverBreakpoint
used to handle this case by accident, but the patches to handle two adjacent
breakpoints broke that accident.

This patch fixes the logic of ExplainsStop to explicitly handle the case where
the pc didn't move.  It also adds a WillPop that re-enables the breakpoint we
were stepping over.  We never want an unexpected path through the plan to
fool us into not doing that.

I have no idea how to make this bug happen.  It is very inconsistent when it
occurs IRL.  We really need a full MockProcess Plugin before we can start to write
tests for this sort of system hiccup.

<rdar://problem/38505726>

llvm-svn: 332922
2018-05-22 00:06:55 +00:00
Sanjay Patel 17a870f07c [DAG] fold FP binops with undef operands to NaN
This is the FP sibling of D43141 with the corresponding IR change in rL327212.

We can't propagate undef here because if a variable operand is a NaN, these 
binops must propagate NaN. Neither global nor node-level fast-math makes a 
difference. If we have 'nnan', I think later folds can turn the NaN into undef.

The tests in X86/fp-undef.ll are meant to be the definitive verification for 
these folds - everything reduces identically now.

The other test changes are collateral damage. They may need to be altered to
preserve their intent.

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

llvm-svn: 332920
2018-05-21 23:54:19 +00:00
Lang Hames 5cb2e30c98 [ORC] Make some more operations on VSO private. These should be done via a
MaterializationResponsibility instance.

llvm-svn: 332919
2018-05-21 23:46:29 +00:00
Lang Hames 373f4628a5 [LKH] Add a replacement RTDyldLayer.
llvm-svn: 332918
2018-05-21 23:45:40 +00:00
Roman Tereshin f1aa348b31 Reapply r332907 "[GlobalISel] Improving InstructionSelect's performance by reducing MatchTable..."
Apparently the compile time problem was caused by the fact that not
all compilers / STL implementations can automatically convert
std::unique_ptr<Derived> to std::unique_ptr<Base>. Fixed (hopefully)
by making sure it's std::unique_ptr<Derived>&& (rvalue ref) to
std::unique_ptr<Base> conversion instead.

llvm-svn: 332917
2018-05-21 23:28:51 +00:00
Craig Topper 358b094971 [X86] Remove 128/256-bit cvtdq2ps, cvtudq2ps, cvtqq2pd, cvtuqq2pd intrinsics.
These can all be implemented with sitofp/uitofp instructions.

llvm-svn: 332916
2018-05-21 23:15:00 +00:00
Paul Semel 040df77ed6 [llvm-objcopy] Add --strip-unneeded option
This option removes symbols that are not needed by relocations.

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

llvm-svn: 332915
2018-05-21 22:50:32 +00:00