OSDN Git Service

android-x86/external-llvm.git
5 years agoWorkaround PPC backend bug in test for r346322.
James Y Knight [Wed, 7 Nov 2018 17:01:47 +0000 (17:01 +0000)]
Workaround PPC backend bug in test for r346322.

It seems that the PPC backend croaks when lowering a call to a
function with an argument of type [2 x i32].

Just modify the type slightly to avoid this -- I wasn't actually
intending to stress test the backend...

llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6172: llvm::SDValue llvm::PPCTargetLowering::LowerCall_64SVR4(...): Assertion `(!HasParameterArea || NumBytesActuallyUsed == ArgOffset) && "mismatch in size of parameter area"' failed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346334 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-exegesis] Remove superfluous move.
Clement Courbet [Wed, 7 Nov 2018 16:52:50 +0000 (16:52 +0000)]
[llvm-exegesis] Remove superfluous move.

/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
    return std::move(Error);
           ^
/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: note: remove std::move call here
    return std::move(Error);
           ^~~~~~~~~~     ~

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346333 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix ignorded type qualifier warning [NFC]
Serge Guelton [Wed, 7 Nov 2018 16:17:30 +0000 (16:17 +0000)]
Fix ignorded type qualifier warning [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346332 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] propagate FMF for fcmp+fabs folds
Sanjay Patel [Wed, 7 Nov 2018 16:15:01 +0000 (16:15 +0000)]
[InstCombine] propagate FMF for fcmp+fabs folds

By morphing the instruction rather than deleting and creating a new one,
we retain fast-math-flags and potentially other metadata (profile info?).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346331 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-exegesis] Correclty handle all X86 memory encoding formats.
Clement Courbet [Wed, 7 Nov 2018 16:14:55 +0000 (16:14 +0000)]
[llvm-exegesis] Correclty handle all X86 memory encoding formats.

Summary:
Add unit tests to check the support for each supported format to avoid
regressions such as the one in PR36906.

Reviewers: gchatelet

Subscribers: tschuett, lebedev.ri, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346330 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-exegesis] Increasing wrapping limit.
Clement Courbet [Wed, 7 Nov 2018 15:46:45 +0000 (15:46 +0000)]
[llvm-exegesis] Increasing wrapping limit.

Summary: Fixes PR39097.

Reviewers: gchatelet

Subscribers: llvm-commits, tschuett

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346328 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] peek through fabs() when checking isnan()
Sanjay Patel [Wed, 7 Nov 2018 15:44:26 +0000 (15:44 +0000)]
[InstCombine] peek through fabs() when checking isnan()

That should be the end of the missing cases for this fold.
See earlier patches in this series:
rL346321
rL346324

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346327 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add tests for isnan(fabs(X)); NFC
Sanjay Patel [Wed, 7 Nov 2018 15:36:23 +0000 (15:36 +0000)]
[InstCombine] add tests for isnan(fabs(X)); NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346325 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add folds for fcmp Pred fabs(X), 0.0
Sanjay Patel [Wed, 7 Nov 2018 15:33:03 +0000 (15:33 +0000)]
[InstCombine] add folds for fcmp Pred fabs(X), 0.0

Similar to rL346321, we had folds for the ordered
versions of these compares already, so add the
unordered siblings for completeness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346324 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add tests for more fcmp+fabs preds; NFC
Sanjay Patel [Wed, 7 Nov 2018 15:27:02 +0000 (15:27 +0000)]
[InstCombine] add tests for more fcmp+fabs preds; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346323 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd support for llvm.is.constant intrinsic (PR4898)
James Y Knight [Wed, 7 Nov 2018 15:24:12 +0000 (15:24 +0000)]
Add support for llvm.is.constant intrinsic (PR4898)

This adds the llvm-side support for post-inlining evaluation of the
__builtin_constant_p GCC intrinsic.

Also fixed SCCPSolver::visitCallSite to not blow up when seeing a call
to a function where canConstantFoldTo returns true, and one of the
arguments is a struct.

Updated from patch initially by Janusz Sobczak.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346322 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add fold for fabs(X) u< 0.0
Sanjay Patel [Wed, 7 Nov 2018 15:11:32 +0000 (15:11 +0000)]
[InstCombine] add fold for fabs(X) u< 0.0

The sibling fold for 'oge' --> 'ord' was already here,
but this half was missing.

The result of fabs() must be positive or nan, so asking
if the result is negative or nan is the same as asking
if the result is nan.

This is another step towards fixing:
https://bugs.llvm.org/show_bug.cgi?id=39475

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346321 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add test for fcmp+fabs; NFC
Sanjay Patel [Wed, 7 Nov 2018 15:01:09 +0000 (15:01 +0000)]
[InstCombine] add test for fcmp+fabs; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346320 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix unit tests after patch https://reviews.llvm.org/rL346313
Calixte Denizet [Wed, 7 Nov 2018 14:46:26 +0000 (14:46 +0000)]
Fix unit tests after patch https://reviews.llvm.org/rL346313

Summary: Tests are broken so fix them.

Reviewers: marco-c

Reviewed By: marco-c

Subscribers: sylvestre.ledru, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346318 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add FMF to fcmp to show failure to propagate; NFC
Sanjay Patel [Wed, 7 Nov 2018 14:44:09 +0000 (14:44 +0000)]
[InstCombine] add FMF to fcmp to show failure to propagate; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346317 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agofix typos aggressively; NFC
Sanjay Patel [Wed, 7 Nov 2018 14:35:36 +0000 (14:35 +0000)]
fix typos aggressively; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346316 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] do not shrink switch conditions to illegal types (PR29009)
Sanjay Patel [Wed, 7 Nov 2018 14:12:41 +0000 (14:12 +0000)]
[InstCombine] do not shrink switch conditions to illegal types (PR29009)

This patch makes shrinking switch conditions less aggressive which was introduced by:
rL274233

Note that we have 2 new bugs to track potential follow-ups that might have solved PR29009
in different ways:
https://bugs.llvm.org/show_bug.cgi?id=39569
https://bugs.llvm.org/show_bug.cgi?id=39578

Patch by:
@dendibakh (Denis Bakhvalov)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346315 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[GCOV] Flush counters before to avoid counting the execution before fork twice and...
Calixte Denizet [Wed, 7 Nov 2018 13:49:17 +0000 (13:49 +0000)]
[GCOV] Flush counters before to avoid counting the execution before fork twice and for exec** functions we must flush before the call

Summary:
This is replacement for patch in https://reviews.llvm.org/D49460.
When we fork, the counters are duplicate as they're and so the values are finally wrong when writing gcda for parent and child.
So just before to fork, we flush the counters and so the parent and the child have new counters set to zero.
For exec** functions, we need to flush before the call to have some data.

Reviewers: vsk, davidxl, marco-c

Reviewed By: marco-c

Subscribers: llvm-commits, sylvestre.ledru, marco-c

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346313 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][FixupLEA] Avoid checking target features for every single processed instruction...
Andrea Di Biagio [Wed, 7 Nov 2018 12:26:00 +0000 (12:26 +0000)]
[X86][FixupLEA] Avoid checking target features for every single processed instruction. NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346309 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[XRay] Clean up more std::copy(...)'s
Dean Michael Berris [Wed, 7 Nov 2018 11:52:22 +0000 (11:52 +0000)]
[XRay] Clean up more std::copy(...)'s

Update a couple more places to use conversion from StringRef to string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346306 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MIPS GlobalISel] Set operand order for G_MERGE and G_UNMERGE
Petar Avramovic [Wed, 7 Nov 2018 11:45:43 +0000 (11:45 +0000)]
[MIPS GlobalISel] Set operand order for G_MERGE and G_UNMERGE

Set operands order for G_MERGE_VALUES and G_UNMERGE_VALUES so
that least significant bits always go first, regardless of endianness.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346305 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[XRay] Use explicit string conversion
Dean Michael Berris [Wed, 7 Nov 2018 11:44:00 +0000 (11:44 +0000)]
[XRay] Use explicit string conversion

Instead of using std::copy(...), use a conversion to string instead from
StringRef to std::string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346304 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoIntroduce bug life cycle documentation.
Kristof Beyls [Wed, 7 Nov 2018 08:49:36 +0000 (08:49 +0000)]
Introduce bug life cycle documentation.

Document what is expected during:
* triaging
* actively working on a bug
* closing/resolving

Also document how we maintain:
* product/component breakdown
* default-cc lists per component

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346299 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRegAllocFast: Leave unassigned virtreg entries in map
Matthias Braun [Wed, 7 Nov 2018 06:57:03 +0000 (06:57 +0000)]
RegAllocFast: Leave unassigned virtreg entries in map

Set `LiveReg::PhysReg` to zero when freeing a register instead of
removing it from the entry from `LiveRegMap`. This way no iterators get
invalidated and we can avoid passing around and updating iterators all
over the place.

This does not change any allocator decisions. It is not completely NFC
because the arbitrary iteration order through `LiveRegMap` in
`spillAll()` changes so we may get a different order in those spill
sequences (the amount of spills does not change).

This is in preparation of https://reviews.llvm.org/D52010.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346298 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRegAllocFast: Further cleanups; NFC
Matthias Braun [Wed, 7 Nov 2018 06:57:02 +0000 (06:57 +0000)]
RegAllocFast: Further cleanups; NFC

This is in preparation of https://reviews.llvm.org/D52010.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346297 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRegAllocFast: Refactor PhysRegState usage; NFC
Matthias Braun [Wed, 7 Nov 2018 06:57:00 +0000 (06:57 +0000)]
RegAllocFast: Refactor PhysRegState usage; NFC

This is in preparation of https://reviews.llvm.org/D52010.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346296 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Add missing test case, some test renaming
Max Kazantsev [Wed, 7 Nov 2018 05:58:10 +0000 (05:58 +0000)]
[NFC] Add missing test case, some test renaming

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346295 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[XRay] Use TSC delta encoding for custom/typed events
Dean Michael Berris [Wed, 7 Nov 2018 04:37:42 +0000 (04:37 +0000)]
[XRay] Use TSC delta encoding for custom/typed events

Summary:
This change updates the version number for FDR logs to 5, and update the
trace processing to support changes in the custom event records.

In the runtime, since we're already writing down the record preamble to
handle CPU migrations and TSC wraparound, we can use the same TSC delta
encoding in the custom event and typed event records that we use in
function event records. We do the same change to typed events (which
were unsupported before this change in the trace processing) which now
show up in the trace.

Future changes should increase our testing coverage to make custom and
typed events as first class entities in the FDR mode log processing
tools.

This change is also a good example of how we end up supporting new
record types in the FDR mode implementation. This shows the places where
new record types are added and supported.

Depends on D54139.

Reviewers: mboerger

Subscribers: hiraditya, arphaman, jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346293 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-strip] Check "strip" with StringRef::contains instead of ends_with
Fangrui Song [Wed, 7 Nov 2018 03:02:11 +0000 (03:02 +0000)]
[llvm-strip] Check "strip" with StringRef::contains instead of ends_with

Summary: If argv[0] is version suffixed, e.g. llvm-strip-7, this will still work.

Reviewers: rupprecht, jhenderson, alexshap, jakehehrlich

Reviewed By: rupprecht

Subscribers: alexshap, jakehehrlich, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346292 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Update more test cases after FixFunctionBitcasts
Heejin Ahn [Wed, 7 Nov 2018 02:26:03 +0000 (02:26 +0000)]
[WebAssembly] Update more test cases after FixFunctionBitcasts

These test updates were missing from rL346286.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346291 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[cmake] Fix typo. NFC
Shoaib Meenai [Wed, 7 Nov 2018 02:22:59 +0000 (02:22 +0000)]
[cmake] Fix typo. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346290 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRegAllocFast: Factor spill/reload creation into their own functions; NFC
Matthias Braun [Wed, 7 Nov 2018 02:04:12 +0000 (02:04 +0000)]
RegAllocFast: Factor spill/reload creation into their own functions; NFC

This is in preparation of https://reviews.llvm.org/D52010.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346289 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRegAllocFast: Cleanups; NFC
Matthias Braun [Wed, 7 Nov 2018 02:04:11 +0000 (02:04 +0000)]
RegAllocFast: Cleanups; NFC

This is in preparation of https://reviews.llvm.org/D52010.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346288 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRegAllocFast: Rename statistic from NumCopies to NumCoalesced
Matthias Braun [Wed, 7 Nov 2018 02:04:07 +0000 (02:04 +0000)]
RegAllocFast: Rename statistic from NumCopies to NumCoalesced

The metric does not return the number of remaining (or inserted) copies
but the number of copies that were coalesced. Pick a more descriptive
name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346287 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Update test cases after FixFunctionBitcasts
Heejin Ahn [Wed, 7 Nov 2018 01:58:50 +0000 (01:58 +0000)]
[WebAssembly] Update test cases after FixFunctionBitcasts

Summary:
This updates generated binaries and corresponding test cases up to date
after applying FixFunctionBitcasts pass.

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346286 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[IR] add optional parameter for copying IR flags to compare instructions
Sanjay Patel [Wed, 7 Nov 2018 00:00:42 +0000 (00:00 +0000)]
[IR] add optional parameter for copying IR flags to compare instructions

As shown, this is used to eliminate redundant code in InstCombine,
and there are more cases where we should be using this pattern, but
we're currently unintentionally dropping flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346282 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Windows] Simplify WindowsSupport.h
Reid Kleckner [Tue, 6 Nov 2018 23:39:59 +0000 (23:39 +0000)]
[Windows] Simplify WindowsSupport.h

Sink Windows version detection code from WindowsSupport.h to Path.inc.
These functions don't need to be inlined. I randomly picked Process.inc
for the Windows version helpers, since that's the most related file.

Sink MakeErrMsg to Program.inc since it's the main client.

Move those functions into the llvm namespace, and delete the scoped
handle copy and assignment operators.

Reviewers: zturner, aganea

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346280 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FileCheck] Try to fix windows bots broken by r346272
Joel E. Denny [Tue, 6 Nov 2018 22:42:10 +0000 (22:42 +0000)]
[FileCheck] Try to fix windows bots broken by r346272

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346277 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MachineOutliner][NFC] Remove OccurrenceCount from SuffixTreeNode
Jessica Paquette [Tue, 6 Nov 2018 22:23:13 +0000 (22:23 +0000)]
[MachineOutliner][NFC] Remove OccurrenceCount from SuffixTreeNode

After changing the way we find candidates in r346269, this is no longer used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346275 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MachineOutliner][NFC] Remove IsInTree from SuffixTreeNode
Jessica Paquette [Tue, 6 Nov 2018 22:21:11 +0000 (22:21 +0000)]
[MachineOutliner][NFC] Remove IsInTree from SuffixTreeNode

After changing the way we find repeated substrings in r346269, this
field is no longer used by anything, so it can be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346274 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[PATCH] [AArch64] Refactor helper functions (NFC)
Evandro Menezes [Tue, 6 Nov 2018 22:17:14 +0000 (22:17 +0000)]
[PATCH] [AArch64] Refactor helper functions (NFC)

Refactor helper functions in AArch64InstrInfo to be static methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346273 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FileCheck] Parse command-line options from FILECHECK_OPTS
Joel E. Denny [Tue, 6 Nov 2018 22:07:03 +0000 (22:07 +0000)]
[FileCheck] Parse command-line options from FILECHECK_OPTS

This feature makes it easy to tune FileCheck diagnostic output when
running the test suite via ninja, a bot, or an IDE.  For example:

```
$ FILECHECK_OPTS='-color -v -dump-input-on-failure' \
  LIT_FILTER='OpenMP/for_codegen.cpp' ninja check-clang \
  | less -R
```

Reviewed By: probinson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346272 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MachineOutliner][NFC] Add findRepeatedSubstrings to SuffixTree, kill LeafVector
Jessica Paquette [Tue, 6 Nov 2018 21:46:41 +0000 (21:46 +0000)]
[MachineOutliner][NFC] Add findRepeatedSubstrings to SuffixTree, kill LeafVector

Instead of iterating over the leaves to find repeated substrings, and walking
collecting leaf children when we don't necessarily need them, let's just
calculate what we need and iterate over that.

By doing this, we don't have to save every leaf. It's easier to read the code
too and understand what's going on.

The goal here, at the end of the day, is to set up to allow us to do something
like

for (RepeatedSubstring &RS : ST) {
 ... do stuff with RS ...
}

Which would let us perform the cost model stuff and the repeated substring
query at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346269 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSilence deprecation warning for GetVersionEx with clang-cl
Reid Kleckner [Tue, 6 Nov 2018 21:40:32 +0000 (21:40 +0000)]
Silence deprecation warning for GetVersionEx with clang-cl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346268 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU: Add an option -disable-promote-alloca-to-lds
Yaxun Liu [Tue, 6 Nov 2018 21:28:17 +0000 (21:28 +0000)]
AMDGPU: Add an option -disable-promote-alloca-to-lds

Add this option for debugging and providing workaround.

By default it is off so no behavior change in backend.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346267 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/Docs: Fix the processor table
Konstantin Zhuravlyov [Tue, 6 Nov 2018 20:23:53 +0000 (20:23 +0000)]
AMDGPU/Docs: Fix the processor table

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346263 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ThinLTO] Split NotEligibleToImport into legality and inlinability flags
Teresa Johnson [Tue, 6 Nov 2018 19:41:35 +0000 (19:41 +0000)]
[ThinLTO] Split NotEligibleToImport into legality and inlinability flags

Summary:
The NotEligibleToImport flag on the GlobalValueSummary was set if it
isn't legal to import (e.g. because it references unpromotable locals)
and when it can't be inlined (in which case importing is pointless).

I split out the inlinable piece into a separate flag on the
FunctionSummary (doesn't make sense for aliases or global variables),
because in the future we may want to import for reasons other than
inlining.

Reviewers: davidxl

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, arphaman, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346261 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add custom promotion of v2i8/v2i16 fp_to_sint to avoid over promotion to v2i64...
Craig Topper [Tue, 6 Nov 2018 19:24:21 +0000 (19:24 +0000)]
[X86] Add custom promotion of v2i8/v2i16 fp_to_sint to avoid over promotion to v2i64 which would force scalarization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346259 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[CodeExtractor] Do not extract calls to eh_typeid_for (PR39545)
Vedant Kumar [Tue, 6 Nov 2018 19:06:08 +0000 (19:06 +0000)]
[CodeExtractor] Do not extract calls to eh_typeid_for (PR39545)

The lowering for a call to eh_typeid_for changes when it's moved from
one function to another.

There are several proposals for fixing this issue in llvm.org/PR39545.
Until some solution is in place, do not allow CodeExtractor to extract
calls to eh_typeid_for, as that results in serious miscompilations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346256 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[CodeExtractor] Erase use-without-def debug intrinsics in parent func
Vedant Kumar [Tue, 6 Nov 2018 19:05:53 +0000 (19:05 +0000)]
[CodeExtractor] Erase use-without-def debug intrinsics in parent func

When CodeExtractor moves instructions to a new function, debug
intrinsics referring to those instructions within the parent function
become invalid.

This results in the same verifier failure which motivated r344545, about
function-local metadata being used in the wrong function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346255 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoLivePhysRegs/IfConversion: Change some types from unsigned to MCPhysReg; NFC
Matthias Braun [Tue, 6 Nov 2018 19:00:11 +0000 (19:00 +0000)]
LivePhysRegs/IfConversion: Change some types from unsigned to MCPhysReg; NFC

Change the type in a couple of lists and sets that only store physical
registers from unsigned to MCPhysRegs. The later is only 16bits and
saves us a bit of memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346254 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][GlobalISel] Simplify and autogenerate the legalizer tests
Volkan Keles [Tue, 6 Nov 2018 18:59:18 +0000 (18:59 +0000)]
[AArch64][GlobalISel] Simplify and autogenerate the legalizer tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346253 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[utils] Update SmallVector lldb formatter for r337514
Justin Bogner [Tue, 6 Nov 2018 18:52:30 +0000 (18:52 +0000)]
[utils] Update SmallVector lldb formatter for r337514

SmallVector was changed to store a begin and a size rather than a
begin and an end a while back. Update the formatter to look at the
correct members.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346252 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReland r346166: [GlobalISel] Refactor the artifact combiner a bit by using MIPatternMatch
Volkan Keles [Tue, 6 Nov 2018 18:31:25 +0000 (18:31 +0000)]
Reland r346166: [GlobalISel] Refactor the artifact combiner a bit by using MIPatternMatch

It was causing a crash because we were trying to get the definition
of a target register. Fixed the issue by adding a check and added
a test case for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346251 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoDisable calls to *_finite and other glibc-only functions on Musl.
Eli Friedman [Tue, 6 Nov 2018 18:23:32 +0000 (18:23 +0000)]
Disable calls to *_finite and other glibc-only functions on Musl.

Non-GNU environments don't have __finite_*, so treat them as
unavailable.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346250 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Add shared memory support to limits field
Derek Schuff [Tue, 6 Nov 2018 17:27:25 +0000 (17:27 +0000)]
[WebAssembly] Add shared memory support to limits field

Support the IS_SHARED bit in the memory limits flag word.
The compiler does not create object files with memory definitions,
but the field is used by the linker.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346246 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] allow vector types for fcmp+fpext fold
Sanjay Patel [Tue, 6 Nov 2018 17:20:20 +0000 (17:20 +0000)]
[InstCombine] allow vector types for fcmp+fpext fold

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346245 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add vector test for fcmp+fpext; NFC
Sanjay Patel [Tue, 6 Nov 2018 17:06:58 +0000 (17:06 +0000)]
[InstCombine] add vector test for fcmp+fpext; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346243 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] propagate fast-math-flags when folding fcmp+fpext, part 2
Sanjay Patel [Tue, 6 Nov 2018 16:45:27 +0000 (16:45 +0000)]
[InstCombine] propagate fast-math-flags when folding fcmp+fpext, part 2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346242 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] rearrange code for fcmp+fpext; NFCI
Sanjay Patel [Tue, 6 Nov 2018 16:37:35 +0000 (16:37 +0000)]
[InstCombine] rearrange code for fcmp+fpext; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346241 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] propagate fast-math-flags when folding fcmp+fpext
Sanjay Patel [Tue, 6 Nov 2018 16:23:03 +0000 (16:23 +0000)]
[InstCombine] propagate fast-math-flags when folding fcmp+fpext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346240 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] adjust tests to show dropping FMF; NFC
Sanjay Patel [Tue, 6 Nov 2018 16:07:39 +0000 (16:07 +0000)]
[InstCombine] adjust tests to show dropping FMF; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346239 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] propagate fast-math-flags when folding fcmp+fneg, part 2
Sanjay Patel [Tue, 6 Nov 2018 15:58:57 +0000 (15:58 +0000)]
[InstCombine] propagate fast-math-flags when folding fcmp+fneg, part 2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346238 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[benchmark] Disable exceptions in Microsoft STL
Elizabeth Andrews [Tue, 6 Nov 2018 15:57:59 +0000 (15:57 +0000)]
[benchmark] Disable exceptions in Microsoft STL

This patch disables exceptions in Microsoft STL when exception
handling is not enabled in Benchmark project. It fixes Windows
builds that were failing due to C4530 warnings thrown by MS STL.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346237 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] adjust tests to show dropping FMF; NFC
Sanjay Patel [Tue, 6 Nov 2018 15:57:52 +0000 (15:57 +0000)]
[InstCombine] adjust tests to show dropping FMF; NFC

Also, remove some stale FIXME comments ( rL346234 ).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346236 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] reduce code; NFC
Sanjay Patel [Tue, 6 Nov 2018 15:53:58 +0000 (15:53 +0000)]
[InstCombine] reduce code; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346235 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] propagate fast-math-flags when folding fcmp+fneg
Sanjay Patel [Tue, 6 Nov 2018 15:49:45 +0000 (15:49 +0000)]
[InstCombine] propagate fast-math-flags when folding fcmp+fneg

This is another part of solving PR39475:
https://bugs.llvm.org/show_bug.cgi?id=39475

This might be enough to fix that particular issue, but as noted
with the FIXME, we're still dropping FMF on other folds around here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346234 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add tests for FMF propagation failure; NFC
Sanjay Patel [Tue, 6 Nov 2018 15:21:44 +0000 (15:21 +0000)]
[InstCombine] add tests for FMF propagation failure; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346232 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[mips] Support sigrie instruction
Simon Atanasyan [Tue, 6 Nov 2018 14:37:24 +0000 (14:37 +0000)]
[mips] Support sigrie instruction

The `sigrie` instruction signals a Reserved Instruction Exception.
This patch adds support for assembling / disassembling the instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346230 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-exegesis] Ignore X86 pseudo instructions.
Clement Courbet [Tue, 6 Nov 2018 14:11:58 +0000 (14:11 +0000)]
[llvm-exegesis] Ignore X86 pseudo instructions.

Summary: They do not lower to actual MCInsts and have no scheduling info.

Reviewers: gchatelet

Subscribers: llvm-commits, tschuett

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346227 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][NFC] Fix comment.
Clement Courbet [Tue, 6 Nov 2018 13:48:56 +0000 (13:48 +0000)]
[X86][NFC] Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346226 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] Ensure nested shifts are in range (OSS-Fuzz #9880)
Simon Pilgrim [Tue, 6 Nov 2018 11:28:22 +0000 (11:28 +0000)]
[InstCombine] Ensure nested shifts are in range (OSS-Fuzz #9880)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346225 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Support] Fix `warning: unknown pragma ignored` for mingw target
Martin Storsjo [Tue, 6 Nov 2018 09:08:20 +0000 (09:08 +0000)]
[Support] Fix `warning: unknown pragma ignored` for mingw target

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346218 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Turn collectTransitivePredecessors into a static function
Max Kazantsev [Tue, 6 Nov 2018 09:07:03 +0000 (09:07 +0000)]
[NFC] Turn collectTransitivePredecessors into a static function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346217 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[XRay] Update XRayRecord to support Custom/Typed Events
Dean Michael Berris [Tue, 6 Nov 2018 08:51:37 +0000 (08:51 +0000)]
[XRay] Update XRayRecord to support Custom/Typed Events

Summary:
This change cuts across LLVM and compiler-rt to add support for
rendering custom events in the XRayRecord type, to allow for including
user-provided annotations in the output YAML (as raw bytes).

This work enables us to add custom event and typed event records into
the `llvm::xray::Trace` type for user-provided events. This can then be
programmatically handled through the C++ API and can be included in some
of the tooling as well. For now we support printing the raw data we
encounter in the custom events in the converted output.

Future work will allow us to start interpreting these custom and typed
events through a yet-to-be-defined API for extending the trace analysis
library.

Reviewers: mboerger

Subscribers: hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346214 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LICM] Remove too conservative IsMustExecute variable
Max Kazantsev [Tue, 6 Nov 2018 04:17:40 +0000 (04:17 +0000)]
[LICM] Remove too conservative IsMustExecute variable

LICM relies on variable `MustExecute` which is conservatively set to `false`
in all non-headers. It is used when we decide whether or not we want to hoist
an instruction or a guard.

For the guards, it might be too conservative to use this variable, we can
instead use a more precise logic from LoopSafetyInfo. Currently it is only NFC
because `IsMemoryNotModified` is also conservatively set to `false` for all
non-headers, and we cannot hoist guards from non-header blocks. However once we
give up using `IsMemoryNotModified` and use a smarter check instead, this will
allow us to hoist guards from all mustexecute non-header blocks.

Differential Revision: https://reviews.llvm.org/D50888
Reveiwed By: fedor.sergeev

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346204 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAArch64: Cleanup CCMP code; NFC
Matthias Braun [Tue, 6 Nov 2018 03:15:22 +0000 (03:15 +0000)]
AArch64: Cleanup CCMP code; NFC

Cleanup CCMP pattern matching code in preparation for review/bugfix:
- Rename `isConjunctionDisjunctionTree()` to `canEmitConjunction()`
  (it won't accept arbitrary disjunctions and is really about whether we
   can transform the subtree into a conjunction that we can emit).
- Rename `emitConjunctionDisjunctionTree()` to `emitConjunction()`

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346203 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoIt's a test commit, which is my first commit and also add my name to CREDITS.TXT
Zi Xuan Wu [Tue, 6 Nov 2018 03:07:03 +0000 (03:07 +0000)]
It's a test commit, which is my first commit and also add my name to CREDITS.TXT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346202 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LICM] Use ICFLoopSafetyInfo in LICM
Max Kazantsev [Tue, 6 Nov 2018 02:44:49 +0000 (02:44 +0000)]
[LICM] Use ICFLoopSafetyInfo in LICM

This patch makes LICM use `ICFLoopSafetyInfo` that is a smarter version
of LoopSafetyInfo that leverages power of Implicit Control Flow Tracking
to keep track of throwing instructions and give less pessimistic answers
to queries related to throws.

The ICFLoopSafetyInfo itself has been introduced in rL344601. This patch
enables it in LICM only.

Differential Revision: https://reviews.llvm.org/D50377
Reviewed By: apilipenko

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346201 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Add motivating test case for revert in rL346198
Max Kazantsev [Tue, 6 Nov 2018 02:12:44 +0000 (02:12 +0000)]
[NFC] Add motivating test case for revert in rL346198

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346199 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[IndVars] Smart hard uses detection"
Max Kazantsev [Tue, 6 Nov 2018 02:02:05 +0000 (02:02 +0000)]
Revert "[IndVars] Smart hard uses detection"

This reverts commit 2f425e9c7946b9d74e64ebbfa33c1caa36914402.

It seems that the check that we still should do the transform if we
know the result is constant is missing in this code. So the logic that
has been deleted by this change is still sometimes accidentally useful.
I revert the change to see what can be done about it. The motivating
case is the following:

@Y = global [400 x i16] zeroinitializer, align 1

define i16 @foo() {
entry:
  br label %for.body

for.body:                                         ; preds = %entry, %for.body
  %i = phi i16 [ 0, %entry ], [ %inc, %for.body ]

  %arrayidx = getelementptr inbounds [400 x i16], [400 x i16]* @Y, i16 0, i16 %i
  store i16 0, i16* %arrayidx, align 1
  %inc = add nuw nsw i16 %i, 1
  %cmp = icmp ult i16 %inc, 400
  br i1 %cmp, label %for.body, label %for.end

for.end:                                          ; preds = %for.body
  %inc.lcssa = phi i16 [ %inc, %for.body ]
  ret i16 %inc.lcssa
}

We should be able to figure out that the result is constant, but the patch
breaks it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346198 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LLVM-C] Fix Windows Build of Core
Robert Widmann [Tue, 6 Nov 2018 01:54:12 +0000 (01:54 +0000)]
[LLVM-C] Fix Windows Build of Core

strndup doesn't exist outside of GNU-land and modern macOSes.  Use
strdup instead as c_str() is guaranteed to be NUL-terminated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346197 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LLVM-C] Improve Intrinsics Bindings
Robert Widmann [Tue, 6 Nov 2018 01:38:14 +0000 (01:38 +0000)]
[LLVM-C] Improve Intrinsics Bindings

Summary:
Improve the intrinsic bindings with operations for

- Retrieving and automatically inserting the declaration of an intrinsic by ID
- Retrieving the name of a non-overloaded intrinsic by ID
- Retrieving the name of an overloaded intrinsic by ID and overloaded parameter types

Improve the echo test to copy non-overloaded intrinsics by ID.

Reviewers: whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346195 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Autogenerate complete checks. NFC
Craig Topper [Tue, 6 Nov 2018 00:31:27 +0000 (00:31 +0000)]
[X86] Autogenerate complete checks. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346188 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[WebAssembly] Fixup `main` signature by default"
Sam Clegg [Tue, 6 Nov 2018 00:31:02 +0000 (00:31 +0000)]
Revert "[WebAssembly] Fixup `main` signature by default"

This reverts rL345880.  It caused some test failures on the
webassembly waterfall.  e.g. binaryen2.test_mainenv fails due
the fact that `envp` ends up being undef rather than 0.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346187 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSpecify REQUIRES: default_triple in two debuginfo tests
Justin Bogner [Tue, 6 Nov 2018 00:16:32 +0000 (00:16 +0000)]
Specify REQUIRES: default_triple in two debuginfo tests

These were failing when specifying LLVM_DEFAULT_TARGET_TRIPLE=''

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346185 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTargetMachine: Move lib/CodeGen specific callbacks to LLVMTargetMachine; NFC
Matthias Braun [Mon, 5 Nov 2018 23:49:15 +0000 (23:49 +0000)]
TargetMachine: Move lib/CodeGen specific callbacks to LLVMTargetMachine; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346184 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMachineFunction: Store more specific reference to LLVMTargetMachine; NFC
Matthias Braun [Mon, 5 Nov 2018 23:49:14 +0000 (23:49 +0000)]
MachineFunction: Store more specific reference to LLVMTargetMachine; NFC

MachineFunction can only be used in code using lib/CodeGen, hence we
can keep a more specific reference to LLVMTargetMachine rather than just
TargetMachine around.

Do the same for references in ScheduleDAG and RegUsageInfoCollector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346183 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoMachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC
Matthias Braun [Mon, 5 Nov 2018 23:49:13 +0000 (23:49 +0000)]
MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC

MachineModuleInfo can only be used in code using lib/CodeGen, hence we
can keep a more specific reference to LLVMTargetMachine rather than just
TargetMachine around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346182 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DWARF] Support types CU list in .gdb_index dumping
Fangrui Song [Mon, 5 Nov 2018 23:27:53 +0000 (23:27 +0000)]
[DWARF] Support types CU list in .gdb_index dumping

Some executables have non-empty types CU list and -gdb-index would report "<error reporting>" before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346181 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[TargetLowering] Change TargetLoweringBase::getPreferredVectorAction to take an MVT...
Craig Topper [Mon, 5 Nov 2018 23:26:13 +0000 (23:26 +0000)]
[TargetLowering] Change TargetLoweringBase::getPreferredVectorAction to take an MVT instead of an EVT. NFC

The main caller of this already has an MVT and several targets called getSimpleVT inside without checking isSimple. This makes the simpleness explicit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346180 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU: Add sram-ecc feature
Konstantin Zhuravlyov [Mon, 5 Nov 2018 22:44:19 +0000 (22:44 +0000)]
AMDGPU: Add sram-ecc feature

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346177 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[GlobalISel] Refactor the artifact combiner a bit by using MIPatternMatch"
Volkan Keles [Mon, 5 Nov 2018 22:25:01 +0000 (22:25 +0000)]
Revert "[GlobalISel] Refactor the artifact combiner a bit by using MIPatternMatch"

This reverts r346166 as it breaks
test-suite-verify-machineinstrs-aarch64-globalisel-O0-g.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346175 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Don't turn any_extend from a mask register into a sign_extend during lowering...
Craig Topper [Mon, 5 Nov 2018 22:08:17 +0000 (22:08 +0000)]
[X86] Don't turn any_extend from a mask register into a sign_extend during lowering. Add patterns to match any_extend during isel instead.

SimplifyDemandedBits can turn a sign_extend back into an any_extend and trigger an infinite loop. So instead legalize it the same way as a sign_extend, but preserve the opcode. Then just pattern match it the same as sign_extend during isel.

I don't have a reduced test case for such an infinite loop yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346170 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstSimplify] fold select (fcmp X, Y), X, Y
Sanjay Patel [Mon, 5 Nov 2018 21:51:39 +0000 (21:51 +0000)]
[InstSimplify] fold select (fcmp X, Y), X, Y

This is NFCI for InstCombine because it calls InstSimplify,
so I left the tests for this transform there. As noted in
the code comment, we can allow this fold more often by using
FMF and/or value tracking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346169 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstSimplify] add tests for select+fcmp; NFC
Sanjay Patel [Mon, 5 Nov 2018 21:42:01 +0000 (21:42 +0000)]
[InstSimplify] add tests for select+fcmp; NFC

These are translated from InstCombine's test file with the same name.
We should move the transform from InstCombine to InstSimplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346168 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[GlobalISel] Refactor the artifact combiner a bit by using MIPatternMatch
Volkan Keles [Mon, 5 Nov 2018 20:51:13 +0000 (20:51 +0000)]
[GlobalISel] Refactor the artifact combiner a bit by using MIPatternMatch

Reviewers: aditya_nandakumar

Reviewed By: aditya_nandakumar

Subscribers: rovka, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346166 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Regenerate test checks in preparation for a patch. NFC
Craig Topper [Mon, 5 Nov 2018 19:45:37 +0000 (19:45 +0000)]
[X86] Regenerate test checks in preparation for a patch. NFC

I'm preparing a patch to avoid creating critical edges in cmov expansion. Updating these tests to make the changes by the next patch easier to see.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346161 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[COFF][LLD] Add link support for Microsoft precompiled headers OBJs
Alexandre Ganea [Mon, 5 Nov 2018 19:20:47 +0000 (19:20 +0000)]
[COFF][LLD] Add link support for Microsoft precompiled headers OBJs

This change allows for link-time merging of debugging information from
Microsoft precompiled types OBJs compiled with cl.exe /Z7 /Yc and /Yu.

This fixes llvm.org/PR34278

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346154 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoOnly call FlushFileBuffers() when writing executables on Windows
Alexandre Ganea [Mon, 5 Nov 2018 19:14:10 +0000 (19:14 +0000)]
Only call FlushFileBuffers() when writing executables on Windows

This is a follow-up for "r325274: Call FlushFileBuffers on output files."

Previously, FlushFileBuffers() was called in all cases when writing a file. The objective was to go around a bug in the Windows kernel (as described here: https://randomascii.wordpress.com/2018/02/25/compiler-bug-linker-bug-windows-kernel-bug/). However that is required only when writing EXEs, any other file type doesn't need flushing.

This patch calls FlushFileBuffers() only for EXEs. In addition, we completly disable FlushFileBuffers() for known Windows 10 versions that do not exhibit the original kernel bug.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346152 91177308-0d34-0410-b5e6-96231b3b80d8