- Feb 27, 2019
-
-
Dmitry Preobrazhensky authored
[AMDGPU][MC][GFX8+] Added syntactic sugar for 'vgpr index' operand of instructions s_set_gpr_idx_on and s_set_gpr_idx_mode See bug 39331: https://bugs.llvm.org/show_bug.cgi?id=39331 Reviewers: artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D58288 llvm-svn: 354969
-
Hans Wennborg authored
llvm-svn: 354968
-
Eric Liu authored
Summary: Suppose `clangd::` is unresolved in the following example. Currently, we simply use "clangd::" as the query scope. We can do better by combining with accessible scopes in the context. The query scopes can be `{clangd::, clang::clangd::}`. ``` namespace clang { clangd::^ } ``` Reviewers: ilya-biryukov, sammccall, hokein, kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58448 llvm-svn: 354963
-
George Rimar authored
This is https://bugs.llvm.org/show_bug.cgi?id=40818 Removing a section that is used by relocation is an error we did not report. The patch fixes that. Differential revision: https://reviews.llvm.org/D58625 llvm-svn: 354962
-
Simon Pilgrim authored
Thanks to @echristo for spotting this. llvm-svn: 354961
-
James Henderson authored
llvm-readobj's error messages were broken for bad archive members. This patch fixes them, and also adds testing for archive and thin archive handling within llvm-readobj. Reviewed by: rupprecht, grimar, higuoxing Differential Revision: https://reviews.llvm.org/D58681 llvm-svn: 354960
-
George Rimar authored
This patch removes the precompiled binary from inputs, replacing it with a YAML. And teaches LLD to report a section name in case of such error. Differential revision: https://reviews.llvm.org/D58670 llvm-svn: 354959
-
Simon Pilgrim authored
llvm-svn: 354958
-
Ilya Biryukov authored
Reviewers: kadircet, gribozavr Reviewed By: kadircet, gribozavr Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58683 llvm-svn: 354957
-
Fangrui Song authored
The test will be added by D58677. llvm-svn: 354955
-
Yonghong Song authored
Currently, the LLVM will print an error like Unsupported relocation: try to compile with -O2 or above, or check your static variable usage if user defines more than one static variables in a single ELF section (e.g., .bss or .data). There is ongoing effort to support static and global variables in libbpf and kernel. This patch removed the assertion so user programs with static variables won't fail compilation. The static variable in-section offset is written to the "imm" field of the corresponding to-be-relocated bpf instruction. Below is an example to show how the application (e.g., libbpf) can relate variable to relocations. -bash-4.4$ cat g1.c static volatile long a = 2; static volatile int b = 3; int test() { return a + b; } -bash-4.4$ clang -target bpf -O2 -c g1.c -bash-4.4$ llvm-readelf -r g1.o Relocation section '.rel.text' at offset 0x158 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name 0000000000000000 0000000400000001 R_BPF_64_64 0000000000000000 .data 0000000000000018 0000000400000001 R_BPF_64_64 0000000000000000 .data -bash-4.4$ llvm-readelf -s g1.o Symbol table '.symtab' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS g1.c 2: 0000000000000000 8 OBJECT LOCAL DEFAULT 4 a 3: 0000000000000008 4 OBJECT LOCAL DEFAULT 4 b 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 5: 0000000000000000 64 FUNC GLOBAL DEFAULT 2 test -bash-4.4$ llvm-objdump -d g1.o g1.o: file format ELF64-BPF Disassembly of section .text: 0000000000000000 test: 0: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll 2: 79 11 00 00 00 00 00 00 r1 = *(u64 *)(r1 + 0) 3: 18 02 00 00 08 00 00 00 00 00 00 00 00 00 00 00 r2 = 8 ll 5: 61 20 00 00 00 00 00 00 r0 = *(u32 *)(r2 + 0) 6: 0f 10 00 00 00 00 00 00 r0 += r1 7: 95 00 00 00 00 00 00 00 exit -bash-4.4$ . from symbol table, static variable "a" is in section #4, offset 0. . from symbol table, static variable "b" is in section #4, offset 8. . the first relocation is against symbol #4: 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 and in-section offset 0 (see llvm-objdump result) . the second relocation is against symbol #4: 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 and in-section offset 8 (see llvm-objdump result) . therefore, the first relocation is for variable "a", and the second relocation is for variable "b". Acked-by:
Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Yonghong Song <yhs@fb.com> llvm-svn: 354954
-
Vlad Tsyrklevich authored
This reverts commit r354930, it was causing UBSan failures. llvm-svn: 354953
-
Marshall Clow authored
In the review of D58642, Louis asked: 'Is there a reason for making this inline? Templates are already inline by default'. I told him that I didn't want to change the one call (ssize) that I was adding, but would come back later and clean them all (data/empty/begin/end/cbegin/cend/rbegin/rend/crbegin/crend/size/ssize) up later. Now it is later. Remove the unnecessary 'inline' modifiers from all these calls. llvm-svn: 354952
-
Saleem Abdulrasool authored
Some platforms, e.g. Windows, support backtraces but don't have BACKTRACE. Checking for BACKTRACE prevents Windows from having backtraces. Patch by Jason Mittertreiner! llvm-svn: 354951
-
Marshall Clow authored
Implement the second part of P1227R2 - Signed ssize() functions. Reviewed as https://reviews.llvm.org/D58642 llvm-svn: 354950
-
Jan Korous authored
Patch by Nicholas Allegra Differential Revision: https://reviews.llvm.org/D58089 llvm-svn: 354949
-
Yaxun Liu authored
Add .stub to kernel stub function name so that it is different from kernel name in device code. This is necessary to let debugger find correct symbol for kernel. Differential Revision: https://reviews.llvm.org/D58518 llvm-svn: 354948
-
Julian Lettner authored
llvm-svn: 354947
-
Volodymyr Sapsai authored
llvm-svn: 354946
-
Heejin Ahn authored
Summary: When creating `ScopeTops` info for `try` ~ `catch` ~ `end_try`, we should create not only `end_try` -> `try` mapping but also `catch` -> `try` mapping as well. If this is not created, `block` and `end_block` markers later added may span across an existing `catch`, resulting in the incorrect code like: ``` try block --| (X) catch | end_block --| end_try ``` Reviewers: dschuff Subscribers: sunfish, sbc100, jgravelle-google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58605 llvm-svn: 354945
-
Marshall Clow authored
llvm-svn: 354944
-
Louis Dionne authored
PR14074 was fixed in r165884, but no tests were added. llvm-svn: 354943
-
Volodymyr Sapsai authored
Currently the symbol for MSPropertyDecl has kind `SymbolKind::Unknown` which can trip up various indexing tools. rdar://problem/46764224 Reviewers: akyrtzi, benlangmuir, jkorous Reviewed By: jkorous Subscribers: dexonsmith, cfe-commits, jkorous, jdoerfert, arphaman Differential Revision: https://reviews.llvm.org/D57628 llvm-svn: 354942
-
Jonas Devlieghere authored
DWARFFormValues can be created from a data extractor or by passing its value directly. Until now this was done by member functions that modified an existing object's internal state. This patch replaces a subset of these methods with static method that return a new DWARFFormValue. llvm-svn: 354941
-
Louis Dionne authored
Those tests fail when linking against a new dylib but running against macosx10.7. I believe this is caused by a duplicate definition of the RTTI for exception classes in libc++.dylib and libc++abi.dylib, but this matter still needs some investigation. This issue was not caught previously because all the tests always linked against the same dylib used for running (because LIT made it impossible to do otherwise before r349171). rdar://problem/46809586 llvm-svn: 354940
-
Heejin Ahn authored
Summary: This removes unnecessary instructions after TRY marker placement. There are two cases: - `end`/`end_block` can be removed if they overlap with `try`/`end_try` and they have the same return types. - `br` right before `catch` that branches to after `end_try` can be deleted. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58591 llvm-svn: 354939
-
Alex Langford authored
Summary: This behavior was originally added in rL252264 (git commit 76a7f365da) in order to be extra careful with handling platforms like watchos and tvos. However, as far as triples go, those two (and others) are treated as OSes and not environments, so that should not really apply here. Additionally, this behavior is incorrect and can lead to incorrect ArchSpecs. Because android is specified as an environment and not an OS, not propogating the environment can lead to modules and targets being misidentified. Differential Revision: https://reviews.llvm.org/D58664 llvm-svn: 354938
-
Joerg Sonnenberger authored
The current constraint logic is both too lax and too strict. It fails for input outside the [INT_MIN..INT_MAX] range, but it also implicitly accepts 0 as value when it should not. Adjust logic to handle both correctly. Differential Revision: https://reviews.llvm.org/D58649 llvm-svn: 354937
-
Marshall Clow authored
First part of P1227R2 - change span over to use 'size_t' instead of 'ptrdiff_t'. Reviewed as https://reviews.llvm.org/D58639. llvm-svn: 354936
-
Jonas Paulsson authored
Since there is no "Load-and-Test-High" instruction, the 32 bit load of a register to be compared with 0 can only be implemented with LT if the virtual GRX32 register ends up in a low part (GR32 register). This patch detects these cases and passes the GR32 registers (low parts) as (soft) hints in getRegAllocationHints(). Review: Ulrich Weigand. llvm-svn: 354935
-
Saleem Abdulrasool authored
Highlight the `swiftself` attribute on parameters. llvm-svn: 354934
-
Alex Langford authored
Summary: These functions should always return the opposite of the `Triple{Environment,OS,Vendor}WasSpecified` functions. Unspecified unknown is the same as unspecified, which is why one set of functions should give us what we want. It's possible to have specified unknown, which is why we can't just rely on checking the enum values of vendor/os/environment. We must also ensure that the names of these are empty and not "unknown". Differential Revision: https://reviews.llvm.org/D58653 llvm-svn: 354933
-
Louis Dionne authored
llvm-svn: 354932
-
- Feb 26, 2019
-
-
Vedant Kumar authored
Splitting can make sanitizer errors harder to understand, as the trapping instruction may not be in the function where the bug was detected. rdar://48142697 llvm-svn: 354931
-
Rong Xu authored
Current PGO profile counts are not context sensitive. The branch probabilities for the inlined functions are kept the same for all call-sites, and they might be very different from the actual branch probabilities. These suboptimal profiles can greatly affect some downstream optimizations, in particular for the machine basic block placement optimization. In this patch, we propose to have a post-inline PGO instrumentation/use pass, which we called Context Sensitive PGO (CSPGO). For the users who want the best possible performance, they can perform a second round of PGO instrument/use on the top of the regular PGO. They will have two sets of profile counts. The first pass profile will be manly for inline, indirect-call promotion, and CGSCC simplification pass optimizations. The second pass profile is for post-inline optimizations and code-gen optimizations. A typical usage: // Regular PGO instrumentation and generate pass1 profile. > clang -O2 -fprofile-generate source.c -o gen > ./gen > llvm-profdata merge default.*profraw -o pass1.profdata // CSPGO instrumentation. > clang -O2 -fprofile-use=pass1.profdata -fcs-profile-generate -o gen2 > ./gen2 // Merge two sets of profiles > llvm-profdata merge default.*profraw pass1.profdata -o profile.profdata // Use the combined profile. Pass manager will invoke two PGO use passes. > clang -O2 -fprofile-use=profile.profdata -o use This change touches many components in the compiler. The reviewed patch (D54175) will committed in phrases. Differential Revision: https://reviews.llvm.org/D54175 llvm-svn: 354930
-
Yaxun Liu authored
MSVC header files using vectorcall to differentiate overloaded functions, which causes failure for AMDGPU target. This is because clang does not check function calling convention based on function target. This patch checks calling convention using the proper target info. Differential Revision: https://reviews.llvm.org/D57716 llvm-svn: 354929
-
Alexey Bataev authored
statements. If the assembler instruction is not generated and the delayed diagnostic is emitted, we may end up with extra warning message for variables used in the asm statement. Since the asm statement is not built, the variables may be left non-referenced and it may produce a warning about a use of the non-initialized variables. llvm-svn: 354928
-
Craig Topper authored
For 'cascadelake' this is adding a 'avx512vnni' feature check to the 0x55 skylake-avx512 model check. These CPUs use the same model number and only differ in the stepping number. But the feature flag is simpler than collecting all the stepping numbers. For 'znver2' this is just syncing with LLVM's Host.cpp. llvm-svn: 354927
-
Stanislav Mekhanoshin authored
SITargetLowering::reassociateScalarOps() does not touch constants so that DAGCombiner::ReassociateOps() does not revert the combine. However a global address is not a ConstantSDNode. Switched to the method used by DAGCombiner::ReassociateOps() itself to detect constants. Differential Revision: https://reviews.llvm.org/D58695 llvm-svn: 354926
-
Alexey Bataev authored
If the OpenMP device is NVPTX and va_arg is used, delay emission of the error for va_arg unless it is used in the device code. llvm-svn: 354925
-