Commit Graph

359881 Commits

Author SHA1 Message Date
Sanjay Patel a46cf40240 [DAGCombiner] convert if-chain in store merging to switch; NFC 2020-07-09 17:20:04 -04:00
Sanjay Patel b476e6a642 [DAGCombiner] add helper function for store merging of loaded values; NFC 2020-07-09 17:20:04 -04:00
Sanjay Patel f98a602c2e [DAGCombiner] add helper function for store merging of extracts; NFC 2020-07-09 17:20:03 -04:00
Sanjay Patel 8d74cb01b7 [DAGCombiner] add helper function for store merging of constants; NFC 2020-07-09 17:20:03 -04:00
Sanjay Patel 6890e2a17b [DAGCombiner] add helper function to manage list of consecutive stores; NFC 2020-07-09 17:20:03 -04:00
Nikita Popov c0308fd154 [PredicateInfo] Print RenamedOp (NFC)
Make it easier to debug renaming issues.
2020-07-09 23:14:24 +02:00
Roman Lebedev c2a61ef388
Revert "[CallGraph] Ignore callback uses"
This likely has broken test/Transforms/Attributor/IPConstantProp/ tests.
http://45.33.8.238/linux/22502/step_12.txt

This reverts commit 205dc0922d.
2020-07-10 00:02:07 +03:00
Eric Christopher 98eec7700c Temporarily Revert "Fix [-Werror,-Wsign-compare] warnings arising from subsection symbols patch."
as it's causing build errors with another clang so I'll need to approach
this differently.

This reverts commit c282708316.
2020-07-09 13:46:59 -07:00
Eric Christopher ce1e4853b5 Temporarily Revert "[PowerPC] Split s34imm into two types"
as it was failing in Release+Asserts mode with an assert.

This reverts commit bd20680311.
2020-07-09 13:36:32 -07:00
Fangrui Song c025bdf25a Revert D83013 "[LPM] Port CGProfilePass from NPM to LPM"
This reverts commit c92a8c0a0f.

It breaks builds and has unaddressed review comments.
2020-07-09 13:34:04 -07:00
Giorgis Georgakoudis 205dc0922d [CallGraph] Ignore callback uses
Summary:
Ignore callback uses when adding a callback function
in the CallGraph. Callback functions are typically
created when outlining, e.g. for OpenMP, so they have
internal scope and linkage. They should not be added
to the ExternalCallingNode since they are only callable
by the specified caller function at creation time.

A CGSCC pass, such as OpenMPOpt, may need to update
the CallGraph by adding a new outlined callback function.
Without ignoring callback uses, adding breaks CGSCC
pass restrictions and results to a broken CallGraph.

Reviewers: jdoerfert

Subscribers: hiraditya, sstefan1, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83370
2020-07-09 13:13:46 -07:00
Roman Lebedev 03640ee0fa
[llvm-reduce] Reducing attributes
Summary:
This handles all three places where attributes could currently be - `GlobalVariable`, `Function` and `CallBase`.
For last two, it correctly handles all three possible attribute locations (return value, arguments and function itself)

There was a previous attempt at it D73853,
which was committed in rGfc62b36a000681c01e993242b583c5ec4ab48a3c,
but then reverted all the way back in rGb12176d2aafa0ccb2585aa218fc3b454ba84f2a9
due to some (osx?) test failures.

Reviewers: nickdesaulniers, dblaikie, diegotf, george.burgess.iv, jdoerfert, Tyker, arsenm

Reviewed By: nickdesaulniers

Subscribers: wdng, MaskRay, arsenm, llvm-commits, mgorny

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83351
2020-07-09 23:10:43 +03:00
Roman Lebedev 6b824415a2
[NFC][llvm-reduce] Purify for_each usage in Operand Bundles into range-based for loop
Summary:
As per lengthy/heated disscussion in D83351,
and CodingStandards D83431.

Reviewers: dblaikie, nickdesaulniers

Reviewed By: nickdesaulniers

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83434
2020-07-09 23:10:43 +03:00
Roman Lebedev d8bf5e8048
[NFCI][llvm-reduce] OperandBundleCounter: drop pointless constructor
Reviewers: nickdesaulniers, dblaikie

Reviewed By: nickdesaulniers

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83435
2020-07-09 23:10:42 +03:00
Roman Lebedev 29a9dd5bfe
[Docs] CodingStandards: for_each is discouraged
Summary:
As per disscussion in D83351, using `for_each` is potentially confusing,
at least in regards to inconsistent style (there's less than 100 `for_each`
usages in LLVM, but ~100.000 `for` range-based loops

Therefore, it should be avoided.

Reviewers: dblaikie, nickdesaulniers

Reviewed By: dblaikie, nickdesaulniers

Subscribers: hubert.reinterpretcast, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83431
2020-07-09 23:10:42 +03:00
Roman Lebedev caa423eef0
Revert "[InstCombine] Lower infinite combine loop detection thresholds"
And just after 3 days, we have a hit in `InstCombiner::mergeStoreIntoSuccessor()`:
https://bugs.llvm.org/show_bug.cgi?id=46661

To be recommitted once that is addressed.

This reverts commit cd7f8051ac.
2020-07-09 23:10:42 +03:00
Petr Hosek 53e38c85a8 [CMake][Fuchsia] Support for building with MSVC
This change adds the necessary flags for building the full Fuchsia
toolchain on Windows with MSVC.

Differential Revision: https://reviews.llvm.org/D73810
2020-07-09 13:07:12 -07:00
Zequan Wu c92a8c0a0f [LPM] Port CGProfilePass from NPM to LPM
Reviewers: hans, chandlerc!, asbirlea, nikic

Reviewed By: hans, nikic

Subscribers: steven_wu, dexonsmith, nikic, echristo, void, zhizhouy, cfe-commits, aeubanks, MaskRay, jvesely, nhaehnle, hiraditya, kerbowa, llvm-commits

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D83013
2020-07-09 13:03:42 -07:00
Christopher Tetreault ff5b9a7b3b [SVE] Remove calls to VectorType::getNumElements from CodeGen
Reviewers: efriedma, fpetrogalli, sdesmalen, RKSimon, arsenm

Reviewed By: RKSimon

Subscribers: wdng, tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82210
2020-07-09 12:43:36 -07:00
Craig Topper 469da663f2 [InstSimplify] Re-enable select ?, undef, X -> X transform when X is provably not poison
Follow up from the transform being removed in D83360. If X is probably not poison, then the transform is safe.

Still plan to remove or adjust the code from ConstantFolding after this.

Differential Revision: https://reviews.llvm.org/D83440
2020-07-09 12:21:03 -07:00
Louis Dionne 389b67b809 [libc++] Get rid of the %{libcxx_src_root} substitution
This reduces the set of substitutions required to run the test suite.
2020-07-09 15:17:47 -04:00
David Tenty 25ec96d91a [Clang][Driver] Recognize the AIX OBJECT_MODE environment setting
Summary:
AIX uses an environment variable called OBJECT_MODE to indicate to
utilities in the toolchain whether they should be operating in 32-bit or
64-bit mode. This patch makes the clang driver recognize the current
OBJECT_MODE setting when we are operating with an AIX target and adds a
custom diagnostic for invalid settings.

For more details about OBJECT_MODE on AIX see:

https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.3/com.ibm.xlc1313.aix.doc/compiler_ref/tusetenv1.html
https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.3/com.ibm.xlc1313.aix.doc/compiler_ref/opt_3264.html

Reviewers: stevewan, hubert.reinterpretcast, ShuhongL, jasonliu

Reviewed By: hubert.reinterpretcast, jasonliu

Subscribers: jasonliu, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82476
2020-07-09 15:15:30 -04:00
Jeremy Bruestle 2ede891875 [MLIR] IR changes to add yield semantics for affine.if and affine.parallel
Reviewed By: bondhugula, flaub

Differential Revision: https://reviews.llvm.org/D82600
2020-07-09 12:12:42 -07:00
Jan Korous e81f9cd213 [AST][test] Add regression test forPointerExprEvaluator::VisitCXXNewExpr
This assert was failing:
assert(CAT && "unexpected type for array initializer");

until this patch landed:
9a7eda1bec
PR45350: Handle unsized array CXXConstructExprs in constant evaluation
2020-07-09 12:11:08 -07:00
Kyungwoo Lee 7af27b65b3 [NFC][AArch64] Refactor getArgumentPopSize
Differential Revision: https://reviews.llvm.org/D83456
2020-07-09 11:58:15 -07:00
Jonas Devlieghere 10aa9e19fa [LLDB/Reproducers] Add flag to avoid installing the signal handler.
There are bugs where you don't want the signal handler to trigger, most
notably when that will cause another crash. Examples of this are lldb
running out of memory or a bug in the reproducer generation code. This
adds an escape hatch trough a (developer oriented) flag to not install
the signal handler.

rdar://problem/65149595

Differential revision: https://reviews.llvm.org/D83496
2020-07-09 11:50:45 -07:00
Jonas Devlieghere 84557c18b3 [lldb/Reproducers] Rename developer-oriented reproducer flags.
This is a preparatory rename of the developer facing reproducer flags.

reproducer-skip-version-check -> reproducer-no-version-check
reproducer-auto-generate      -> reproducer-generate-on-quit
2020-07-09 11:50:45 -07:00
Puyan Lotfi 7e169cec74 [NFC][test] Adding fastcc test case for promoted 16-bit integer bitcasts.
The following: https://reviews.llvm.org/D82552

fixed an assert in the SelectionDag ISel legalizer for some CCs on armv7.

I noticed that this fix also fixes the assert when using fastcc, so I am
adding a fastcc regression test here.

Differential Revision: https://reviews.llvm.org/D82443
2020-07-09 11:38:49 -07:00
cchen 2da9572a9b [OPENMP50] extend array section for stride (Parsing/Sema/AST)
Reviewers: ABataev, jdoerfert

Reviewed By: ABataev

Subscribers: yaxunl, guansong, arphaman, sstefan1, cfe-commits, sandoval, dreachem

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82800
2020-07-09 13:28:51 -05:00
Louis Dionne cfb3675410 [libc++] The enable_experimental Lit feature should be False by default
This preserves existing behavior before f5f58f1f73.
2020-07-09 14:21:24 -04:00
Eric Christopher c282708316 Fix [-Werror,-Wsign-compare] warnings arising from subsection symbols patch. 2020-07-09 11:14:00 -07:00
Craig Topper 122b0640fc [InstSimplify] Don't fold vectors of partial undef in SimplifySelectInst if the non-undef element value might produce poison
We can't fold to the non-undef value unless we know it isn't poison. So check each element with isGuaranteedNotToBeUndefOrPoison. This currently rules out all constant expressions.

Differential Revision: https://reviews.llvm.org/D83442
2020-07-09 11:01:12 -07:00
Louis Dionne f5f58f1f73 [libc++] Move the enable_experimental Lit param to the DSL 2020-07-09 14:00:05 -04:00
Craig Topper 918e653186 [X86] Immediately call LowerShift from lowerBuildVectorToBitOp.
If we don't immediately lower the vector shift, the splat
constant vector we created may get turned into a constant pool
load before we get around to lowering the shift. This makes it
a lot more difficult to create a shift by constant. Sometimes we
fail to see through the constant pool at all and end up trying
to lower as if it was a variable shift. This requires custom
handling and may create an unsupported vselect on pre-sse-4.1
targets. Since we're after LegalizeVectorOps we are unable to
legalize the unsupported vselect as that code is in LegalizeVectorOps
rather than LegalizeDAG.

So calling LowerShift immediately ensures that we get see the
splat constant.

Fixes PR46527.

Differential Revision: https://reviews.llvm.org/D83455
2020-07-09 10:51:29 -07:00
David Blaikie 8769611f0a Remove unnecessary 'rm' in llvm-reduce tests
These were initially added to cleanup some transient/leftover files in
r372054. Now that's all cleaned up, these are no longer needed.
2020-07-09 10:49:11 -07:00
Hiroshi Yamauchi 2c1a9006dd [PGO][PGSO] Add profile guided size optimization to X86 ISel Lowering. 2020-07-09 10:43:45 -07:00
Craig Topper 3e75912005 [X86] Directly emit X86ISD::BLENDV instead of VSELECT in a few places that were emitting sign bit tests.
Technically a VSELECT expects a vector of all 1s or 0s elements
for its condition. But we aren't guaranteeing that the sign bit
and the non sign bits match in these locations. So we should use
BLENDV which is more relaxed.

Differential Revision: https://reviews.llvm.org/D83447
2020-07-09 10:40:09 -07:00
Stefan Pintilie 6f7727db47 [PowerPC] Fix test case from beb52b12cb
Forgot to add the REQUIRES ppc line to the test.
2020-07-09 12:39:24 -05:00
Louis Dionne b785396525 [libc++] Clean up some outdated documentation about running libc++ tests
The documentation is still awfully outdated, but it's a bit better at least.
2020-07-09 13:39:00 -04:00
Vedant Kumar f8f259ce4a [lldb/Function] Reflow doxygen comments for member variables, NFC
As suggested in the review for https://reviews.llvm.org/D83359.
2020-07-09 10:37:09 -07:00
Vedant Kumar 6cfc90b9b7 [Function] Lock the function when parsing call site info
Summary:
DWARF-parsing methods in SymbolFileDWARF which update module state
typically take the module lock. ParseCallEdgesInFunction doesn't do
this, but higher-level locking within lldb::Function (which owns the
storage for parsed call edges) is necessary.

The lack of locking could explain some as-of-yet unreproducible crashes
which occur in Function::GetTailCallingEdges(). In these crashes, the
`m_call_edges` vector is non-empty but contains a nullptr, which
shouldn't be possible. (If this vector is non-empty, it _must_ contain a
non-null unique_ptr.)

This may address rdar://55622443 and rdar://65119458.

Reviewers: jasonmolenda, friss, jingham

Subscribers: aprantl, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D83359
2020-07-09 10:37:09 -07:00
Florian Hahn 0b72b9d07f [ValueLattice] Simplify canTrackGlobalVariableInterprocedurally (NFC).
using all_of and checking for valid users in the lambda seems more
straight forward. Also adds a comment explaining what we are checking.
2020-07-09 18:33:09 +01:00
Daniel Grumberg fccd29ddde Merge TableGen files used for clang options
Summary:
Putting all the options in the same file is needed so they can be
ordered based on the dependencies between them.

Reviewers: Bigcheese, jdoerfert

Subscribers: dexonsmith, sstefan1, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82574
2020-07-09 18:28:51 +01:00
Louis Dionne 4598a3c784 [libc++] Move the long_tests Lit feature to the DSL 2020-07-09 13:25:27 -04:00
Louis Dionne c1a83c30e1 [libc++] Move the stdlib Lit parameter to the DSL 2020-07-09 13:23:11 -04:00
Louis Dionne 6a8ed4a8ff [libc++] Fix test failure in C++03 mode 2020-07-09 13:05:22 -04:00
Hiroshi Yamauchi 06fc125d8c [PGO][PGSO] Add profile guided size optimization tests to X86 ISel Lowering. 2020-07-09 09:56:01 -07:00
Sergej Jaskiewicz 8372d50508 [compiler-rt] [test] Allow expanding lit substitutions recursively
Summary:
This allows using lit substitutions in the `COMPILER_RT_EMULATOR` variable.

(For reference, the ability to expand substitutions recursively has been introduced in https://reviews.llvm.org/D76178.)

Reviewers: phosek, compnerd

Reviewed By: compnerd

Subscribers: dberris, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D83489
2020-07-09 19:49:18 +03:00
Louis Dionne 6f69318c72 [runtimes] Allow passing Lit parameters through CMake
This allows passing parameters to the test suites without using
LLVM_LIT_ARGS. The problem is that we sometimes want to set some
Lit arguments on the CMake command line, but the Lit parameters in
a CMake cache file. If the only knob to do that is LLVM_LIT_ARGS,
the command-line entry overrides the cache one, and the parameters
set by the cache are ignored.

This fixes a current issue with the build bots that they completely
ignore the 'std' param set by Lit, because other Lit arguments are
provided via LLVM_LIT_ARGS on the CMake command-line.
2020-07-09 12:45:00 -04:00
Sergej Jaskiewicz 5ab446cfe5 [compiler-rt] [test] Use the parent process env as base env in tests
Summary:
Right now the lit config builds up an environment that the tests will be run in. However, it does it from scratch instead of adding new variables to the parent process environment. This may (and does) result in strange behavior when running tests with an executor (i. e. with the `COMPILER_RT_EMULATOR` CMake variable set to something), since the executor may need some of the parent process's environment variables.

Here this is fixed.

Reviewers: compnerd, phosek

Reviewed By: compnerd

Subscribers: dberris, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D83486
2020-07-09 19:44:35 +03:00