- Jul 22, 2020
-
-
David Green authored
-
Pavel Labath authored
Summary: registerSharedLibrariesWithTarget was setting the library path environment variable to the process build directory, but the function is also accepting libraries in other directories (in which case they won't be found automatically). This patch makes the function set the path variable correctly for these libraries too. This enables us to remove the code for setting the path variable in TestWeakSymbols.py, which was working only accidentally -- it was relying on the fact that launch_info.SetEnvironmentEntries(..., append=True) would not overwrite the path variable it has set, but that is going to change with D83306. Reviewers: davide, jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D83552
-
Stefan Pintilie authored
When the compiler generates a GOT indirect load it must generate two loads. One that loads the address of the element from the GOT and a second to load the actual element based on the address just loaded from the GOT. However, the linker can optimize these two loads into one load if it knows that it is safe to do so. The compiler can tell the linker that the optimization is safe by using the R_PPC64_PCREL_OPT relocation. This patch extends the .reloc directive to allow the following setup pld 3, vec@got@pcrel(0), 1 .Lpcrel1=.-8 ... More instructions possible here ... .reloc .Lpcrel1,R_PPC64_PCREL_OPT,.-.Lpcrel1 lwa 3, 4(3) Reviewers: nemanjai, lei, hfinkel, sfertile, efriedma, tstellar, grosbach, MaskRay Reviewed By: nemanjai, MaskRay Differential Revision: https://reviews.llvm.org/D79625 -
Kadir Cetinkaya authored
Summary: This was resulting in macros coming from preambles vanishing when user have opened the source header. For example: ``` // test.h: #define X ``` and ``` // test.cc #include "test.h ^ ``` If user only opens test.cc, we'll get `X` as a completion candidate, since it is indexed as part of the preamble. But if the user opens test.h afterwards we would index it as part of the main file and lose the symbol (as new index shard for test.h will override the existing one in dynamic index). Also we were not setting origins for macros correctly, this patch also fixes it. Fixes https://github.com/clangd/clangd/issues/461 Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D84297
-
Simon Wallis authored
Summary: [Thumb] set code alignment for 16-bit load from constant pool LLVM miscompiles this code when compiling for a target with v8.2-A FP16 and the Thumb ISA at -O0: extern void bar(__fp16 P5); int main() { __fp16 P5 = 1.96875; bar(P5); } The code section containing main has 2 byte alignment. It needs to have 4 byte alignment, because the load literal instruction has an offset from the load address with the low 2 bits zeroed. I do not include a test case in this check-in. llc and llvm-mc do not exhibit this bug. They do not set code section alignment in the same manner as clang. Reviewers: dnsampaio Reviewed By: dnsampaio Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D84169 -
Sjoerd Meijer authored
Pass LowerMatrixIntrinsics wasn't running yet running under the new pass manager, and this adds LowerMatrixIntrinsics to the pipeline (to the same place as where it is running in the old PM). Differential Revision: https://reviews.llvm.org/D84180
-
Max Kazantsev authored
This assert was added to verify assumption that GEP's SCEV will be of pointer type, basing on fact that it should be a SCEVAddExpr with (at least) last operand being pointer. Two notes: - GEP's SCEV does not have to be a SCEVAddExpr after all simplifications; - In current state, GEP's SCEV does not have to have at least one pointer operands (all of them can become int during the transforms). However, we might want to be at a point where it is true. We are currently removing this assert and will try to enumerate the cases where "is pointer" notion might be lost during the transforms. When all of them are fixed, we can return it. Differential Revision: https://reviews.llvm.org/D84294 Reviewed By: lebedev.ri
-
Petar Avramovic authored
Range that f16 can represent fits into i32. Lower as f16->i32->i64 instead of f16->f32->i64 since f32->i64 has long expansion. Differential Revision: https://reviews.llvm.org/D84166
-
David Spickett authored
Summary: This fixes Bugzilla #46616 in which it was reported that "tbb [pc, r0]" was marked as SoftFail (aka unpredictable) incorrectly. Expected behaviour is: * ARMv8 is required to use sp as rn or rm (tbb/tbh only have a Thumb encoding so using Arm mode is not an option) * If rm is the pc then the instruction is always unpredictable Some of this was implemented already and this fixes the rest. Added tests cover the new and pre-existing handling. Reviewers: ostannard Reviewed By: ostannard Subscribers: kristof.beyls, hiraditya, danielkiss, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D84227
-
Luboš Luňák authored
Using -fmodules-* options for PCHs is a bit confusing, so add -fpch-* variants. Having extra options also makes it simple to do a configure check for the feature. Also document the options in the release notes. Differential Revision: https://reviews.llvm.org/D83623
-
Luboš Luňák authored
This way should be the same like with a.pcm for modules. An alternative way is 'clang++ -c empty.cpp -include-pch a.pch -o a.o -Xclang -building-pch-with-obj', which is what clang-cl's /Yc does internally. Differential Revision: https://reviews.llvm.org/D83716
-
Haojian Wu authored
If an expression is contains-error and its type is unknown (dependent), we don't treat it as a null pointer constant. Fix a recovery-ast crash on C. Differential Revision: https://reviews.llvm.org/D84222
-
Haojian Wu authored
refactoring.
-
Raphael Isemann authored
This was originally reverted because the Linux bots were red after this landed, but it seems that was actually caused by a different commit. I double checked that this works on Linux, so let's reland this on Linux. Summary: FormattersContainer stores LLDB's formatters. It's implemented as a templated map-like data structures that supports any kind of value type and only allows ConstString and RegularExpression as the key types. The keys are used for matching type names (e.g., the ConstString key `std::vector` matches the type with the same name while RegularExpression keys match any type where the RegularExpression instance matches). The fact that a single FormattersContainer can only match either by string comparison or regex matching (depending on the KeyType) causes us to always have two FormatterContainer instances in all the formatting code. This also leads to us having every type name matching logic in LLDB twice. For example, TypeCategory has to implement every method twice (one string matching one, one regex matching one). This patch changes FormattersContainer to instead have a single `TypeMatcher` key that wraps the logic for string-based and regex-based type matching and is now the only possible KeyType for the FormattersContainer. This means that a single FormattersContainer can now match types with both regex and string comparison. To summarize the changes in this patch: * Remove all the `*_Impl` methods from `FormattersContainer` * Instead call the FormatMap functions from `FormattersContainer` with a `TypeMatcher` type that does the respective matching. * Replace `ConstString` with `TypeMatcher` in the few places that directly interact with `FormattersContainer`. I'm working on some follow up patches that I split up because they deserve their own review: * Unify FormatMap and FormattersContainer (they are nearly identical now). * Delete the duplicated half of all the type matching code that can now use one interface. * Propagate TypeMatcher through all the formatter code interfaces instead of always offering two functions for everything. There is one ugly design part that I couldn't get rid of yet and that is that we have to support getting back the string used to construct a `TypeMatcher` later on. The reason for this is that LLDB only supports referencing existing type matchers by just typing their respective input string again (without even supplying if it's a regex or not). Reviewers: davide, mib Reviewed By: mib Subscribers: mgorny, JDevlieghere Differential Revision: https://reviews.llvm.org/D84151
-
Haruki Imai authored
AllocOp is updated in normalizeMemref(AllocOp allocOp), but, when the AllocOp has `alignment` attribute, it was ignored and updated AllocOp does not have `alignment` attribute. This patch fixes it. Differential Revision: https://reviews.llvm.org/D83656
-
Roman Lebedev authored
-
Max Kazantsev authored
We do not thread blocks with convergent calls, but this check was missing when we decide to insert PR Phis into it (which we only do for threading). Differential Revision: https://reviews.llvm.org/D83936 Reviewed By: nikic
-
Kai Luo authored
Current powerpc backend generates wrong code sequence if stack pointer has to realign if `-fstack-clash-protection` enabled. When probing dynamic stack allocation, current `PREPARE_PROBED_ALLOCA` takes `NegSizeReg` as input and returns `FinalStackPtr`. `FinalStackPtr=StackPtr+ActualNegSize` is calculated correctly, however code following `PREPARE_PROBED_ALLOCA` still uses value of `NegSizeReg`, which does not contain `ActualNegSize` if `MaxAlign > TargetAlign`, to calculate loop trip count and residual number of bytes. This patch is part of fix of https://bugs.llvm.org/show_bug.cgi?id=46759. Differential Revision: https://reviews.llvm.org/D84152
-
Kai Luo authored
Current powerpc backend generates wrong code sequence if stack pointer has to realign if -fstack-clash-protection enabled. When probing in prologue, backend should generate a subtraction instruction rather than a `stux` instruction to realign the stack pointer. This patch is part of fix of https://bugs.llvm.org/show_bug.cgi?id=46759. Differential Revision: https://reviews.llvm.org/D84218
-
Jonas Devlieghere authored
-
Kang Zhang authored
Summary: In the function `PPCInstrInfo::PredicateInstruction()`, we will replace non-Predicate Instructions to Predicate Instruction. But we forget add the new implicit operands the new Predicate Instruction needed. This patch is to fix this. Reviewed By: jsji, efriedma Differential Revision: https://reviews.llvm.org/D82390
-
Pushpinder Singh authored
Summary: This was missed when default version was upgraded to 5.0 (part of D81098) Reviewers: saiislam, ABataev, jdoerfert Reviewed By: saiislam Subscribers: yaxunl, guansong, sstefan1, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D84221
-
David Blaikie authored
-
Xing GUO authored
This patch makes the length field of compilation units optional (0 by default).
-
David Blaikie authored
Reapply 49e5f603 which had been reverted in c9433291. Originally reverted because I hadn't updated it in quite a while when I got around to committing it, so there were a bunch of missing changes to new code since I'd written the patch. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D76646
-
Xing GUO authored
It's better to use yaml::Hex64 as length in the compilation unit.
-
Zequan Wu authored
-
peter klausler authored
When FORMAT control reaches the final parenthesis and data items remain, we advance a record and revert to the beginning of the FORMAT for further items. But when the FORMAT contains any nested parenthesized group of editing descriptors, possibly repeated, reversion must be to the beginning of the last such top-level parenthesized group, including its repetition count. Reviewed By: sscalpone, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D84281
-
peter klausler authored
The prescanner looks for implicit continuation lines when there are unclosed parentheses at the end of a line, so that source preprocessing macro references with arguments that span lines are recognized. The condition that determines this implicit continuation has been put into a predicate member function and corrected to apply only when the following line is source (not a preprocessing directive, comment, &c.). Fixes bugzilla #46768. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84280
-
peter klausler authored
Add SetConvert() to the OPEN statement's runtime API. Add ByteswapOption() to the main program's runtime API. Check a $FORT_CONVERT environment variable, too, for a swapping specifier. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84284
-
peter klausler authored
Leading zero digits after the decimal mark were being dropped. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84282
-
Zequan Wu authored
-
peter klausler authored
In fixed form source, complain when a label digit appears outside the label field & when a non-digit appears in the label field. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84283
-
Chen Zheng authored
store (load float*) can be optimized to store(load i32*) in InstCombine pass. Add store (load float*) to isProfitableToHoist to make sure we don't break the opt in InstCombine pass. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D82341
-
Brian Cain authored
If virtualenv is not available, we can look for py3's venv instead. We only use this particular env for installing and running the test suite.
-
Logan Smith authored
-
Logan Smith authored
-
Zequan Wu authored
Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757. Add comment to skipped regions so we don't track execution count for lines containing only comments. Differential Revision: https://reviews.llvm.org/D84208
-
Juneyoung Lee authored
.. in isGuaranteedNotToBeUndefOrPoison. This caused early exit of isGuaranteedNotToBeUndefOrPoison, making it return imprecise result. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D84251
-
Wang, Pengfei authored
Sometimes we also want to avoid merging inline assembly. This patch add the nomerge function attribute to inline assembly. Reviewed By: zequanwu Differential Revision: https://reviews.llvm.org/D84225
-