- Apr 08, 2021
-
-
Jonas Hahnfeld authored
When using the large code model with FastISel (for example via clang -O0 which adds the optnone attribute), FP constants could still be materialized using adrp + ldr. Unconditionally enable the existing path for MachO to materialize the constant in code. For testing, restore literal_pools_float.ll to exercise the constant pool and add two optnone-functions that return a float and a double, respectively. Consolidate fpimm.ll and add a new fast-isel-fpimm.ll to check the code paths taken with FastISel. Differential Revision: https://reviews.llvm.org/D99607
-
Arthur Eubanks authored
This reverts commit 9583a3f2. This wasn't NFC as initially thought. Needed for D99707.
-
Abhina Sreeskantharajan authored
Since we have created a new OF_TextWithCRLF flag, we no longer need to worry about OF_Text flag turning on CRLF translation. I can remove this workaround I added to globally open all ToolOutputFiles as binary on Windows. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D100034
-
Aaron Ballman authored
Just because an attribute is a statement attribute doesn't mean it's not also a declaration attribute. In Clang, there are not currently any DeclOrStmtAttr attributes that require mutual exclusion checking, but downstream clients discovered this issue.
-
Vy Nguyen authored
- use "empty()" instead of "size()" - refactor the re-export code so it doesn't create a new vector every time. Differential Revision: https://reviews.llvm.org/D100019
-
Jordan Rupprecht authored
An empty history entry can happen by entering the expression evaluator an immediately hitting enter: ``` $ lldb (lldb) e Enter expressions, then terminate with an empty line to evaluate: 1: <hit enter> ``` The next time the user enters the expression evaluator, if they hit the up arrow to load the previous expression, lldb crashes. This patch treats empty history sessions as a single expression of zero length, instead of an empty list of expressions. Fixes http://llvm.org/PR49845. Differential Revision: https://reviews.llvm.org/D100048
-
Craig Topper authored
This can't use our normal strategy of splatting the scalar and using a .vv operation instead of .vx. Instead this patch bitcasts the vector to the equivalent SEW=32 vector and inserts the scalar parts using two vslide1up/down. We do that unmasked and apply the mask separately at the end with a vmerge. For vslide1up there maybe some other options here like getting i64 into element 0 and using vslideup.vi with this vector as vd and the original source as vs1. Masking would still need to be done afterwards. That idea doesn't work for vslide1down. We need to slidedown and then insert a single scalar at vl-1 which we could do with a vslideup, but that assumes vl > 0 which I don't think we can assume. The i32 double slide1down implemented here is the best I could come up with and I just made vslide1up consistent. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D99910
-
Aaron En Ye Shi authored
The ROCm installation directory may be another directory, llvm/ inside the build directory. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D100045
-
Craig Topper authored
This allows FoldConstantArithmetic to handle SPLAT_VECTOR in addition to BUILD_VECTOR. This allows it to support scalable vectors. I'm also allowing fixed length SPLAT_VECTOR which is used by some targets, but I'm not familiar enough to write tests for those targets. I had to block this function from running on CONCAT_VECTORS to avoid calling getNode for a CONCAT_VECTORS of 2 scalars. This can happen because the 2 operand getNode calls this function for any opcode. Previously we were protected because CONCAT_VECTORs of BUILD_VECTOR is folded to a larger BUILD_VECTOR before that call. But it's not always possible to fold a CONCAT_VECTORS of SPLAT_VECTORs, and we don't even try. This fixes PR49781 where DAG combine thought constant folding should be possible, but FoldConstantArithmetic couldn't do it. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D99682
-
Craig Topper authored
-Make sure of the CreateShl/LShr/AShr methods that take a uint64_t instead of creating a ConstantInt for 1 ourselves. -Use Builder.getInt1 or ConstantInt::getBool instead of a conditional. -Pull out repeated calls to getType.
-
Aart Bik authored
Some sparse matrices operate on integral values (in contrast with the common f32 and f64 values). This CL expands the compiler and runtime support to deal with several common type combinations. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D99999
-
Dimitry Andric authored
As D99834 was meant specifically for FreeBSD, which still uses the older non-trivial std::pair copy constructors, test for `__FreeBSD__` instead of relying on a macro which is an internal detail of libc++. Noted by Louis Dionne.
-
Roman Lebedev authored
All of the code that handles general constant here (other than the more restrictive APInt-dealing code) expects that it is an immediate, because otherwise we won't actually fold the constants, and increase instruction count. And it isn't obvious why we'd be okay with increasing the number of constant expressions, those still will have to be run.. But after 2829094a this could also cause endless combine loops. So actually properly restrict this code to immediates.
-
Mark de Wever authored
The document has the following updates: - Rename 'feature test' to 'feature-test', the latter is the spelling used in the Standard. - Add information how an ABI list can be downloaded from Buildkite. Differential Revision: https://reviews.llvm.org/D99290
-
Sanjay Patel authored
This fixes the examples from D99674 and https://llvm.org/PR49878 The matchers succeed on partial undef/poison vector constants, but the transform creates a full 'not' (-1) constant, so it would undo a demanded vector elements change triggered by the extractelement. Differential Revision: https://reviews.llvm.org/D100044
-
Christopher Di Bella authored
Also adjusts C++20 status paper to indicate full concepts support. Depends on D96477, D99817. Differential Revision: https://reviews.llvm.org/D99805
-
Christopher Di Bella authored
* `std::predicate` * `std::relation` * `std::equivalence_relation` * `std::strict_weak_order` Implements parts of: - P0898R3 Standard Library Concepts - P1754 Rename concepts to standard_case for C++20, while we still can Differential Revision: https://reviews.llvm.org/D96477 -
Jez Ng authored
We had been giving them a string index of zero, which actually corresponds to a string with a single space due to {D89639}. This was far from obvious in the old test because llvm-nm doesn't quote the symbol names, making the empty string look identical to a string of a single space. `dsymutil -s` quotes its strings, so I've changed the test accordingly. Fixes llvm.org/PR48714. Thanks @clayborg for the tips! Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D100003 -
Jez Ng authored
Reviewed By: #lld-macho, gkm Differential Revision: https://reviews.llvm.org/D99813
-
- Apr 07, 2021
-
-
wlei authored
We see a regression related to low probe factor(0.01) which prevents some callsites being promoted in ICPPass and later cause the missing inline in CGSCC inliner. The root cause is due to redundant(the second) multiplication of the probe factor and this change try to fix it. `Sum` does multiply a factor right after findCallSamples but later when using as the parameter in setProbeDistributionFactor, it multiplies one again. This change could get ~2% perf back on mcf benchmark. In mcf, previously the corresponding factor is 1 and it's the recent feature introducing the <1 factor then trigger this bug. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D99787
-
Simon Pilgrim authored
This used to work before rG77d625f8, but we now merge the shuffles across the fadd resulting in a hadd that requires a lane crossing post shuffle, which we don't permit on AVX1 targets
-
Nicolas Vasilache authored
This allows downstream projects to build python extensions using the same macros as MLIR. Differential Revision: https://reviews.llvm.org/D100040
-
Abhina Sreeskantharajan authored
This patch sets tablegen files as text. It should have no effect on Windows after this patch landed https://reviews.llvm.org/rG82b3e28e836d2f5c8cfd6e1047b93c088522365a. Reviewed By: anirudhp Differential Revision: https://reviews.llvm.org/D100036
-
Jacques Pienaar authored
-
Sander de Smalen authored
After D98856 these tests will by default break (fatal_error) if any of the wrong interfaces are used, so there's no longer a need to have a RUN line that checks for a warning message emitted by the compiler.
-
Sam Clegg authored
Use report_fatal_error here since this is an internal error, and not something the user can/should be trying to fix. Also distinguish between the symbol being missing and the symbol having the wrong type. We have a failure internally where the symbol is missing. Currently trying to reduce the test case to something we can attach to an llvm bug. Differential Revision: https://reviews.llvm.org/D99960
-
Sebastian Neubauer authored
The struct is used for both, callee and caller-save registers now. The frame index is not set for entrypoints, as we do not need to save the registers then. Update the struct name to reflect that. Differential Revision: https://reviews.llvm.org/D99722
-
Jingu Kang authored
Differential Revision: https://reviews.llvm.org/D100033
-
Nico Weber authored
This reverts commit 6951b723. Breaks several bots, see comments on https://reviews.llvm.org/D99409
-
Simon Pilgrim authored
Extend D94856 to handle 'and', 'or' and 'xor' instructions as well We still fail on many i8/i16 cases as the test and the logic-op are performed on different widths
-
Alexey Bataev authored
No need to lookup through and/or try to vectorize operands of the CmpInst instructions during attempts to find/vectorize min/max reductions. Compiler implements postanalysis of the CmpInsts so we can skip extra attempts in tryToVectorizeHorReductionOrInstOperands and save compile time. Differential Revision: https://reviews.llvm.org/D99950
-
Andrzej Warzynski authored
The -fdebug-dump-provenance flag is meant to be used with needProvenanceRangeToCharBlockMappings set to true. This way, extra mapping is generated that allows e.g. IDEs to retrieve symbol's scope (offset into cooked character stream) based on symbol's source code location. This patch makes sure that this option is set when using -fdebug-dump-provenance. With this patch, the implementation of -fdebug-dump-provenance in `flang-new -fc1` becomes consistent with `f18`. The corresponding LIT test is updated so that it can be shared with `f18`. I refined it a bit so that: * it becomes a frontend-only test * it's stricter about the expected output Differential Revision: https://reviews.llvm.org/D98847
-
Jay Foad authored
-
Andrzej Warzynski authored
This patch adds support for the `-cpp` and `-nocpp` flags. The implemented semantics match f18 (i.e. the "throwaway" driver), but are different to gfortran. In Flang the preprocessor is always run. Instead, `-cpp/-nocpp` are used to control whether predefined and command-line preprocessor macro definitions are enabled or not. In practice this is sufficient to model gfortran`s `-cpp/-nocpp`. In the absence of `-cpp/-nocpp`, the driver will use the extension of the input file to decide whether to include the standard macro predefinitions. gfortran's documentation [1] was used to decide which file extension to use for this. The logic mentioned above was added in FrontendAction::BeginSourceFile. That's relatively late in the driver set-up, but this roughly where the name of the input file becomes available. The logic for deciding between fixed and free form works in a similar way and was also moved to FrontendAction::BeginSourceFile for consistency (and to reduce code-duplication). The `-cpp/-nocpp` flags are respected also when the input is read from stdin. This is different to: * gfortran (behaves as if `-cpp` was used) * f18 (behaves as if `-nocpp` was used) Starting with this patch, file extensions are significant and some test files had to be renamed to reflect that. Where possible, preprocessor tests were updated so that they can be shared between `f18` and `flang-new`. This was implemented on top of adding new test for `-cpp/-nocpp`. [1] https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D99292
-
oToToT authored
D97493 separate target creation out to a single function `CompilerInstance::createTarget`. However, it would overwrite AuxTarget even if it has been set. As @kadircet recommended in D98128, this patch check the existence of AuxTarget and not overwrite it when it has been set. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D100024
-
Sanjay Patel authored
The swap of the operands can affect later transforms that are expecting a constant as operand 1. I don't think we can trigger a bug with the current code, but I hit that problem while drafting a new transform for min/max intrinsics.
-
Sanjay Patel authored
-
Matthias Springer authored
Also factors out out-of-bounds mask generation from vector.transfer_read/write into a new MaterializeTransferMask pattern. Differential Revision: https://reviews.llvm.org/D100001
-
Simon Pilgrim authored
D94856 covered the BMI cases where we had existing tests, this adds missing AND/OR/XOR test cases
-
Florian Hahn authored
Extend test coverage by checking various standard versions with -f[no-]finite-loops. Suggested as part of D96418.
-