[llvm-branch-commits] [llvm] a19ff10 - Bump forgotten version nbr in llvm/docs/conf.py
Author: Hans Wennborg Date: 2020-08-05T17:12:51+02:00 New Revision: a19ff10e6d74468505815123647ee89a42683b5f URL: https://github.com/llvm/llvm-project/commit/a19ff10e6d74468505815123647ee89a42683b5f DIFF: https://github.com/llvm/llvm-project/commit/a19ff10e6d74468505815123647ee89a42683b5f.diff LOG: Bump forgotten version nbr in llvm/docs/conf.py Added: Modified: llvm/docs/conf.py Removed: diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py index aed5e06b6f50..a13eb63a632b 100644 --- a/llvm/docs/conf.py +++ b/llvm/docs/conf.py @@ -66,9 +66,9 @@ # built documents. # # The short version. -version = '10' +version = '11' # The full version, including alpha/beta/rc tags. -release = '10' +release = '11' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] 145694f - [llvm] Add RISCVTargetParser.def to the module map
Author: Jonas Devlieghere
Date: 2020-08-05T17:32:25+02:00
New Revision: 145694f1ba6688c5c79466490e13e2c3236914d6
URL:
https://github.com/llvm/llvm-project/commit/145694f1ba6688c5c79466490e13e2c3236914d6
DIFF:
https://github.com/llvm/llvm-project/commit/145694f1ba6688c5c79466490e13e2c3236914d6.diff
LOG: [llvm] Add RISCVTargetParser.def to the module map
This fixes the modules build.
(cherry picked from commit 1b3c25e7b61f44b80788f8758f0d7f0b013135b5)
Added:
Modified:
llvm/include/llvm/module.modulemap
Removed:
diff --git a/llvm/include/llvm/module.modulemap
b/llvm/include/llvm/module.modulemap
index b262311a96a0..778a17c8aeee 100644
--- a/llvm/include/llvm/module.modulemap
+++ b/llvm/include/llvm/module.modulemap
@@ -388,7 +388,7 @@ module LLVM_Utils {
umbrella "Support"
module * { export * }
-
+
// Exclude this; it should only be used on Windows.
exclude header "Support/Windows/WindowsSupport.h"
@@ -397,8 +397,9 @@ module LLVM_Utils {
exclude header "Support/Solaris/sys/regset.h"
// These are intended for textual inclusion.
-textual header "Support/ARMTargetParser.def"
textual header "Support/AArch64TargetParser.def"
+textual header "Support/ARMTargetParser.def"
+textual header "Support/RISCVTargetParser.def"
textual header "Support/TargetOpcodes.def"
textual header "Support/X86TargetParser.def"
}
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [openmp] 280653d - [OpenMP] support build on msys2/mingw with clang or gcc
Author: Adrian Pop Date: 2020-08-05T19:34:41+02:00 New Revision: 280653d2ea4a40f2968b3f4662aa7c6d254c6cb9 URL: https://github.com/llvm/llvm-project/commit/280653d2ea4a40f2968b3f4662aa7c6d254c6cb9 DIFF: https://github.com/llvm/llvm-project/commit/280653d2ea4a40f2968b3f4662aa7c6d254c6cb9.diff LOG: [OpenMP] support build on msys2/mingw with clang or gcc RTM Adaptive Locks are supported on msys2/mingw for clang and gcc. Differential Revision: https://reviews.llvm.org/D81776 (cherry picked from commit bf2aa74e51997ee190f3b34dd26a1b564e59e267) Added: Modified: openmp/runtime/src/kmp_lock.cpp Removed: diff --git a/openmp/runtime/src/kmp_lock.cpp b/openmp/runtime/src/kmp_lock.cpp index 8bf7ef2deb71..775693253db2 100644 --- a/openmp/runtime/src/kmp_lock.cpp +++ b/openmp/runtime/src/kmp_lock.cpp @@ -1706,7 +1706,8 @@ static void __kmp_set_queuing_lock_flags(kmp_queuing_lock_t *lck, #if (KMP_COMPILER_ICC && __INTEL_COMPILER >= 1300) || \ (KMP_COMPILER_MSVC && _MSC_VER >= 1700) || \ -(KMP_COMPILER_CLANG && KMP_MSVC_COMPAT) +(KMP_COMPILER_CLANG && (KMP_MSVC_COMPAT || __MINGW32__)) || \ +(KMP_COMPILER_GCC && __MINGW32__) #include #define SOFT_ABORT_MASK (_XABORT_RETRY | _XABORT_CONFLICT | _XABORT_EXPLICIT) ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [openmp] d11e173 - [OpenMP] Don't use MSVC workaround with MinGW
Author: AndreyChurbanov Date: 2020-08-05T19:36:59+02:00 New Revision: d11e17309414b91c2e7dfc611f098041a62de201 URL: https://github.com/llvm/llvm-project/commit/d11e17309414b91c2e7dfc611f098041a62de201 DIFF: https://github.com/llvm/llvm-project/commit/d11e17309414b91c2e7dfc611f098041a62de201.diff LOG: [OpenMP] Don't use MSVC workaround with MinGW Patch by [email protected] Differential Revision: https://reviews.llvm.org/D85210 (cherry picked from commit 4a04bc8995639e1d333790518e4d42e0961f740e) Added: Modified: openmp/runtime/cmake/LibompExports.cmake openmp/runtime/cmake/LibompMicroTests.cmake openmp/runtime/src/CMakeLists.txt Removed: diff --git a/openmp/runtime/cmake/LibompExports.cmake b/openmp/runtime/cmake/LibompExports.cmake index f98de2631b83..44fb97631b28 100644 --- a/openmp/runtime/cmake/LibompExports.cmake +++ b/openmp/runtime/cmake/LibompExports.cmake @@ -83,11 +83,11 @@ add_custom_command(TARGET omp POST_BUILD # Copy Windows import library into exports/ directory post build if(WIN32) - get_target_property(LIBOMPIMP_OUTPUT_DIRECTORY ompimp ARCHIVE_OUTPUT_DIRECTORY) + get_target_property(LIBOMPIMP_OUTPUT_DIRECTORY ${LIBOMP_IMP_LIB_TARGET} ARCHIVE_OUTPUT_DIRECTORY) if(NOT LIBOMPIMP_OUTPUT_DIRECTORY) set(LIBOMPIMP_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endif() - add_custom_command(TARGET ompimp POST_BUILD + add_custom_command(TARGET ${LIBOMP_IMP_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBOMP_EXPORTS_LIB_DIR} COMMAND ${CMAKE_COMMAND} -E copy ${LIBOMPIMP_OUTPUT_DIRECTORY}/${LIBOMP_IMP_LIB_FILE} ${LIBOMP_EXPORTS_LIB_DIR} ) diff --git a/openmp/runtime/cmake/LibompMicroTests.cmake b/openmp/runtime/cmake/LibompMicroTests.cmake index dc44e2c1e2fc..1ca3412edc8e 100644 --- a/openmp/runtime/cmake/LibompMicroTests.cmake +++ b/openmp/runtime/cmake/LibompMicroTests.cmake @@ -40,7 +40,7 @@ # get library location if(WIN32) get_target_property(LIBOMP_OUTPUT_DIRECTORY omp RUNTIME_OUTPUT_DIRECTORY) - get_target_property(LIBOMPIMP_OUTPUT_DIRECTORY ompimp ARCHIVE_OUTPUT_DIRECTORY) + get_target_property(LIBOMPIMP_OUTPUT_DIRECTORY ${LIBOMP_IMP_LIB_TARGET} ARCHIVE_OUTPUT_DIRECTORY) if(NOT LIBOMPIMP_OUTPUT_DIRECTORY) set(LIBOMPIMP_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endif() diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index 1211441876eb..81275c0483dd 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -202,21 +202,27 @@ if(WIN32) IMPORT_PREFIX "" IMPORT_SUFFIX "" # control generated import library name when building omp ARCHIVE_OUTPUT_NAME ${LIBOMP_GENERATED_IMP_LIB_FILENAME} ) - # Get generated import library from creating omp - get_target_property(LIBOMP_IMPORT_LIB_DIRECTORY omp ARCHIVE_OUTPUT_DIRECTORY) - if(LIBOMP_IMPORT_LIB_DIRECTORY) -set(LIBOMP_GENERATED_IMP_LIB ${LIBOMP_IMPORT_LIB_DIRECTORY}/${LIBOMP_GENERATED_IMP_LIB_FILENAME}) + + if(MSVC) +# Get generated import library from creating omp +get_target_property(LIBOMP_IMPORT_LIB_DIRECTORY omp ARCHIVE_OUTPUT_DIRECTORY) +if(LIBOMP_IMPORT_LIB_DIRECTORY) + set(LIBOMP_GENERATED_IMP_LIB ${LIBOMP_IMPORT_LIB_DIRECTORY}/${LIBOMP_GENERATED_IMP_LIB_FILENAME}) +else() + set(LIBOMP_GENERATED_IMP_LIB ${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_GENERATED_IMP_LIB_FILENAME}) +endif() +set_source_files_properties(${LIBOMP_GENERATED_IMP_LIB} PROPERTIES GENERATED TRUE EXTERNAL_OBJECT TRUE) +# Create new import library that is just the previously created one + kmp_import.cpp +add_library(ompimp STATIC ${LIBOMP_GENERATED_IMP_LIB} kmp_import.cpp) +set_target_properties(ompimp PROPERTIES + PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}" + LINKER_LANGUAGE C +) +add_dependencies(ompimp omp) # ensure generated import library is created first +set(LIBOMP_IMP_LIB_TARGET ompimp) else() -set(LIBOMP_GENERATED_IMP_LIB ${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_GENERATED_IMP_LIB_FILENAME}) +set(LIBOMP_IMP_LIB_TARGET omp) endif() - set_source_files_properties(${LIBOMP_GENERATED_IMP_LIB} PROPERTIES GENERATED TRUE EXTERNAL_OBJECT TRUE) - # Create new import library that is just the previously created one + kmp_import.cpp - add_library(ompimp STATIC ${LIBOMP_GENERATED_IMP_LIB} kmp_import.cpp) - set_target_properties(ompimp PROPERTIES -PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}" -LINKER_LANGUAGE C - ) - add_dependencies(ompimp omp) # ensure generated import library is created first # Create def file to designate exported functions libomp_get_gdflags(LIBOMP_GDFLAGS) # generate-def.pl flags (Windows only) @@ -290,7 +296,7 @@ else() endif() if(WIN32) install(TARGETS omp RUNTIME DESTINATION bin) - install(TARGETS ompimp ARCHIVE DESTINATION "${OPENMP_INSTALL_LI
[llvm-branch-commits] [llvm] 4c1f394 - RuntimeDyldELF: report_fatal_error instead of asserting for unimplemented relocations (PR46816)
Author: Hans Wennborg
Date: 2020-08-05T19:39:11+02:00
New Revision: 4c1f394c69fec616d73af1f333154eba0a95590f
URL:
https://github.com/llvm/llvm-project/commit/4c1f394c69fec616d73af1f333154eba0a95590f
DIFF:
https://github.com/llvm/llvm-project/commit/4c1f394c69fec616d73af1f333154eba0a95590f.diff
LOG: RuntimeDyldELF: report_fatal_error instead of asserting for unimplemented
relocations (PR46816)
This fixes the ExecutionEngine/MCJIT/stubs-sm-pic.ll test in no-asserts
builds which is set to XFAIL on some platforms like 32-bit x86. More
importantly, we probably don't want to silently error in these cases.
Differential revision: https://reviews.llvm.org/D84390
(cherry picked from commit 6a3b07a4bf14be32569550f2e9814d8797d27d31)
Added:
Modified:
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Removed:
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 7c39ddc8b1da..7ed8a718ed3c 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -269,7 +269,7 @@ void RuntimeDyldELF::resolveX86_64Relocation(const
SectionEntry &Section,
uint64_t SymOffset) {
switch (Type) {
default:
-llvm_unreachable("Relocation type not implemented yet!");
+report_fatal_error("Relocation type not implemented yet!");
break;
case ELF::R_X86_64_NONE:
break;
@@ -359,7 +359,7 @@ void RuntimeDyldELF::resolveX86Relocation(const
SectionEntry &Section,
default:
// There are other relocation types, but it appears these are the
// only ones currently used by the LLVM ELF object writer
-llvm_unreachable("Relocation type not implemented yet!");
+report_fatal_error("Relocation type not implemented yet!");
break;
}
}
@@ -382,7 +382,7 @@ void RuntimeDyldELF::resolveAArch64Relocation(const
SectionEntry &Section,
switch (Type) {
default:
-llvm_unreachable("Relocation type not implemented yet!");
+report_fatal_error("Relocation type not implemented yet!");
break;
case ELF::R_AARCH64_ABS16: {
uint64_t Result = Value + Addend;
@@ -721,7 +721,7 @@ void RuntimeDyldELF::resolvePPC32Relocation(const
SectionEntry &Section,
uint8_t *LocalAddress = Section.getAddressWithOffset(Offset);
switch (Type) {
default:
-llvm_unreachable("Relocation type not implemented yet!");
+report_fatal_error("Relocation type not implemented yet!");
break;
case ELF::R_PPC_ADDR16_LO:
writeInt16BE(LocalAddress, applyPPClo(Value + Addend));
@@ -741,7 +741,7 @@ void RuntimeDyldELF::resolvePPC64Relocation(const
SectionEntry &Section,
uint8_t *LocalAddress = Section.getAddressWithOffset(Offset);
switch (Type) {
default:
-llvm_unreachable("Relocation type not implemented yet!");
+report_fatal_error("Relocation type not implemented yet!");
break;
case ELF::R_PPC64_ADDR16:
writeInt16BE(LocalAddress, applyPPClo(Value + Addend));
@@ -835,7 +835,7 @@ void RuntimeDyldELF::resolveSystemZRelocation(const
SectionEntry &Section,
uint8_t *LocalAddress = Section.getAddressWithOffset(Offset);
switch (Type) {
default:
-llvm_unreachable("Relocation type not implemented yet!");
+report_fatal_error("Relocation type not implemented yet!");
break;
case ELF::R_390_PC16DBL:
case ELF::R_390_PLT16DBL: {
@@ -890,7 +890,7 @@ void RuntimeDyldELF::resolveBPFRelocation(const
SectionEntry &Section,
switch (Type) {
default:
-llvm_unreachable("Relocation type not implemented yet!");
+report_fatal_error("Relocation type not implemented yet!");
break;
case ELF::R_BPF_NONE:
break;
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [compiler-rt] a862618 - [compiler-rt] [profile] fix profile generate for mingw x86_64
Author: Peiyuan Song
Date: 2020-08-05T19:53:00+02:00
New Revision: a862618aab2551540e175dff3a6a1d1d7c4b4a29
URL:
https://github.com/llvm/llvm-project/commit/a862618aab2551540e175dff3a6a1d1d7c4b4a29
DIFF:
https://github.com/llvm/llvm-project/commit/a862618aab2551540e175dff3a6a1d1d7c4b4a29.diff
LOG: [compiler-rt] [profile] fix profile generate for mingw x86_64
Differential Revision: https://reviews.llvm.org/D84757
(cherry picked from commit 14c1b4017422cbf374086ea4c4fa74e16fb56779)
Added:
Modified:
compiler-rt/lib/profile/CMakeLists.txt
compiler-rt/lib/profile/InstrProfilingPort.h
Removed:
diff --git a/compiler-rt/lib/profile/CMakeLists.txt
b/compiler-rt/lib/profile/CMakeLists.txt
index ece674b2daa1..29c6c02f2d03 100644
--- a/compiler-rt/lib/profile/CMakeLists.txt
+++ b/compiler-rt/lib/profile/CMakeLists.txt
@@ -1,11 +1,11 @@
CHECK_CXX_SOURCE_COMPILES("
-#ifdef _MSC_VER
-#include /* Workaround for PR19898. */
+#ifdef _WIN32
+#include /* Workaround for PR19898. */
#include
#endif
int main() {
-#ifdef _MSC_VER
+#ifdef _WIN32
volatile LONG val = 1;
MemoryBarrier();
InterlockedCompareExchange(&val, 0, 1);
diff --git a/compiler-rt/lib/profile/InstrProfilingPort.h
b/compiler-rt/lib/profile/InstrProfilingPort.h
index 20cf5d660c6a..4493dd512ff0 100644
--- a/compiler-rt/lib/profile/InstrProfilingPort.h
+++ b/compiler-rt/lib/profile/InstrProfilingPort.h
@@ -53,9 +53,9 @@
#endif
#if COMPILER_RT_HAS_ATOMICS == 1
-#ifdef _MSC_VER
+#ifdef _WIN32
#include
-#if _MSC_VER < 1900
+#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
#if defined(_WIN64)
@@ -73,7 +73,7 @@
(DomType *)InterlockedExchangeAdd((LONG volatile *)&PtrVar,
\
(LONG)sizeof(DomType) * PtrIncr)
#endif
-#else /* !defined(_MSC_VER) */
+#else /* !defined(_WIN32) */
#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV)
\
__sync_bool_compare_and_swap(Ptr, OldV, NewV)
#define COMPILER_RT_PTR_FETCH_ADD(DomType, PtrVar, PtrIncr)
\
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] 0835988 - [llvm-rc] Allow string table values split into multiple string literals
Author: Martin Storsjö
Date: 2020-08-05T19:59:38+02:00
New Revision: 0835988de17ef8ea70ac790d3d99fea832fcc3e6
URL:
https://github.com/llvm/llvm-project/commit/0835988de17ef8ea70ac790d3d99fea832fcc3e6
DIFF:
https://github.com/llvm/llvm-project/commit/0835988de17ef8ea70ac790d3d99fea832fcc3e6.diff
LOG: [llvm-rc] Allow string table values split into multiple string literals
This can practically easily be a product of combining strings with
macros in resource files.
This fixes https://github.com/mstorsjo/llvm-mingw/issues/140.
As string literals within llvm-rc are handled as StringRefs, each
referencing an uninterpreted slice of the input file, with actual
interpretation of the input string (codepage handling, unescaping etc)
done only right before writing them out to disk, it's hard to
concatenate them other than just bundling them up in a vector,
without rearchitecting a large part of llvm-rc.
This matches how the same already is supported in VersionInfoValue,
with a std::vector Values.
MS rc.exe only supports concatenated string literals in version info
values (already supported), string tables (implemented in this patch)
and user data resources (easily implemented in a separate patch, but
hasn't been requested by any end user yet), while GNU windres supports
string immediates split into multiple strings anywhere (e.g. like
(100 ICON "myicon" ".ico"). Not sure if concatenation in other
statements actually is used in the wild though, in resource files
normally built by GNU windres.
Differential Revision: https://reviews.llvm.org/D85183
(cherry picked from commit b989fcbae6f179ad887d19ceef83ace1c00b87cc)
Added:
Modified:
llvm/test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
llvm/tools/llvm-rc/ResourceFileWriter.cpp
llvm/tools/llvm-rc/ResourceFileWriter.h
llvm/tools/llvm-rc/ResourceScriptParser.cpp
llvm/tools/llvm-rc/ResourceScriptStmt.cpp
llvm/tools/llvm-rc/ResourceScriptStmt.h
Removed:
diff --git a/llvm/test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
b/llvm/test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
index afda2f3af63d..7c929bb4a326 100644
--- a/llvm/test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
+++ b/llvm/test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
@@ -13,8 +13,8 @@ STRINGTABLE {
STRINGTABLE
VERSION 100
LANGUAGE 4, 7 {
- 16 "hello"
- 17 "world"
+ 16 "hel" "lo"
+ 17 "wor" L"ld"
}
STRINGTABLE
diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.cpp
b/llvm/tools/llvm-rc/ResourceFileWriter.cpp
index d8d401412486..09b078c94cd2 100644
--- a/llvm/tools/llvm-rc/ResourceFileWriter.cpp
+++ b/llvm/tools/llvm-rc/ResourceFileWriter.cpp
@@ -1246,7 +1246,8 @@ Error ResourceFileWriter::visitStringTableBundle(const
RCResource *Res) {
}
Error ResourceFileWriter::insertStringIntoBundle(
-StringTableInfo::Bundle &Bundle, uint16_t StringID, StringRef String) {
+StringTableInfo::Bundle &Bundle, uint16_t StringID,
+const std::vector &String) {
uint16_t StringLoc = StringID & 15;
if (Bundle.Data[StringLoc])
return createError("Multiple STRINGTABLE strings located under ID " +
@@ -1261,13 +1262,15 @@ Error
ResourceFileWriter::writeStringTableBundleBody(const RCResource *Base) {
// The string format is a tiny bit
diff erent here. We
// first output the size of the string, and then the string itself
// (which is not null-terminated).
-bool IsLongString;
SmallVector Data;
-RETURN_IF_ERROR(processString(Res->Bundle.Data[ID].getValueOr(StringRef()),
- NullHandlingMethod::CutAtDoubleNull,
- IsLongString, Data, Params.CodePage));
-if (AppendNull && Res->Bundle.Data[ID])
- Data.push_back('\0');
+if (Res->Bundle.Data[ID]) {
+ bool IsLongString;
+ for (StringRef S : *Res->Bundle.Data[ID])
+RETURN_IF_ERROR(processString(S, NullHandlingMethod::CutAtDoubleNull,
+ IsLongString, Data, Params.CodePage));
+ if (AppendNull)
+Data.push_back('\0');
+}
RETURN_IF_ERROR(
checkNumberFits(Data.size(), "STRINGTABLE string size"));
writeInt(Data.size());
diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.h
b/llvm/tools/llvm-rc/ResourceFileWriter.h
index 673830601e86..d545a7a9cab1 100644
--- a/llvm/tools/llvm-rc/ResourceFileWriter.h
+++ b/llvm/tools/llvm-rc/ResourceFileWriter.h
@@ -103,7 +103,7 @@ class ResourceFileWriter : public Visitor {
using BundleKey = std::pair;
// Each bundle is in fact an array of 16 strings.
struct Bundle {
- std::array, 16> Data;
+ std::array>, 16> Data;
ObjectInfo DeclTimeInfo;
uint16_t MemoryFlags;
Bundle(const ObjectInfo &Info, uint16_t Flags)
@@ -157,7 +157,8 @@ class ResourceFileWriter : public Visitor {
Error visitStringTableBundle(const RCResource *);
Error writeStringTableBundl
[llvm-branch-commits] [clang-tools-extra] 0b617eb - [clang-tidy] Fix regression in RenamerClangTidy
Author: Nathan James
Date: 2020-08-05T20:03:25+02:00
New Revision: 0b617ebb82e11d6e146d4ef71effb0f4db3c1439
URL:
https://github.com/llvm/llvm-project/commit/0b617ebb82e11d6e146d4ef71effb0f4db3c1439
DIFF:
https://github.com/llvm/llvm-project/commit/0b617ebb82e11d6e146d4ef71effb0f4db3c1439.diff
LOG: [clang-tidy] Fix regression in RenamerClangTidy
See bug https://bugs.llvm.org/show_bug.cgi\?id\=46976
(cherry picked from commit 7c4782ce91d66a8447a851362b99bb86a42b7c08)
Added:
Modified:
clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp
Removed:
diff --git a/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
b/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
index 040378d980f1..2d67ca4a1618 100644
--- a/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
+++ b/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
@@ -157,6 +157,9 @@ void RenamerClangTidyCheck::addUsage(
RenamerClangTidyCheck::NamingCheckFailure &Failure =
NamingCheckFailures[Decl];
+ if (!Failure.RawUsageLocs.insert(FixLocation.getRawEncoding()).second)
+return;
+
if (!Failure.ShouldFix())
return;
@@ -165,8 +168,6 @@ void RenamerClangTidyCheck::addUsage(
if (!utils::rangeCanBeFixed(Range, SourceMgr))
Failure.FixStatus = RenamerClangTidyCheck::ShouldFixStatus::InsideMacro;
-
- Failure.RawUsageLocs.insert(FixLocation.getRawEncoding());
}
void RenamerClangTidyCheck::addUsage(const NamedDecl *Decl, SourceRange Range,
diff --git
a/clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp
b/clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp
index 24c1c4270dec..fed362bbecde 100644
---
a/clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp
+++
b/clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp
@@ -578,3 +578,8 @@ void Foo() {
#undef M1
#undef DUP
} // namespace scratchspace
+
+template
+auto GetRes(type_t& Param) -> decltype(Param.res());
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: invalid case style for parameter
'Param'
+// CHECK-FIXES: auto GetRes(type_t& a_param) -> decltype(a_param.res());
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] 3cab818 - [PowerPC] fixupIsDeadOrKill start and end in different block fixing
Author: Chen Zheng
Date: 2020-08-05T20:12:38+02:00
New Revision: 3cab8184f32067464f3ab6bdfd6e123ddd38ef0f
URL:
https://github.com/llvm/llvm-project/commit/3cab8184f32067464f3ab6bdfd6e123ddd38ef0f
DIFF:
https://github.com/llvm/llvm-project/commit/3cab8184f32067464f3ab6bdfd6e123ddd38ef0f.diff
LOG: [PowerPC] fixupIsDeadOrKill start and end in different block fixing
In fixupIsDeadOrKill, we assume StartMI and EndMI not exist in same
basic block, so we add an assertion in that function. This is wrong
before RA, as before RA the true definition may exist in another
block through copy like instructions.
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D83365
(cherry picked from commit 36f9fe2d3493717dbc6866d96b2e989839ce1a4c)
Added:
llvm/test/CodeGen/PowerPC/fixup-kill-dead-flag-crash.mir
Modified:
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.h
Removed:
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
index 11c97210ead9..9a4c57fedac2 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -2655,6 +2655,15 @@ const unsigned
*PPCInstrInfo::getLoadOpcodesForSpillArray() const {
void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr &StartMI, MachineInstr
&EndMI,
unsigned RegNo) const {
+ // Conservatively clear kill flag for the register if the instructions are in
+ //
diff erent basic blocks and in SSA form, because the kill flag may no longer
+ // be right. There is no need to bother with dead flags since defs with no
+ // uses will be handled by DCE.
+ MachineRegisterInfo &MRI = StartMI.getParent()->getParent()->getRegInfo();
+ if (MRI.isSSA() && (StartMI.getParent() != EndMI.getParent())) {
+MRI.clearKillFlags(RegNo);
+return;
+ }
// Instructions between [StartMI, EndMI] should be in same basic block.
assert((StartMI.getParent() == EndMI.getParent()) &&
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.h
b/llvm/lib/Target/PowerPC/PPCInstrInfo.h
index d98597f48340..43973c627fcf 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.h
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.h
@@ -565,14 +565,18 @@ class PPCInstrInfo : public PPCGenInstrInfo {
int64_t OffsetImm) const;
/// Fixup killed/dead flag for register \p RegNo between instructions [\p
- /// StartMI, \p EndMI]. Some PostRA transformations may violate register
- /// killed/dead flags semantics, this function can be called to fix up.
Before
- /// calling this function,
+ /// StartMI, \p EndMI]. Some pre-RA or post-RA transformations may violate
+ /// register killed/dead flags semantics, this function can be called to fix
+ /// up. Before calling this function,
/// 1. Ensure that \p RegNo liveness is killed after instruction \p EndMI.
/// 2. Ensure that there is no new definition between (\p StartMI, \p EndMI)
///and possible definition for \p RegNo is \p StartMI or \p EndMI.
- /// 3. Ensure that all instructions between [\p StartMI, \p EndMI] are in
same
- ///basic block.
+ /// 3. We can do accurate fixup for the case when all instructions between
+ ///[\p StartMI, \p EndMI] are in same basic block.
+ /// 4. For the case when \p StartMI and \p EndMI are not in same basic block,
+ ///we conservatively clear kill flag for all uses of \p RegNo for pre-RA
+ ///and for post-RA, we give an assertion as without reaching definition
+ ///analysis post-RA, \p StartMI and \p EndMI are hard to keep right.
void fixupIsDeadOrKill(MachineInstr &StartMI, MachineInstr &EndMI,
unsigned RegNo) const;
void replaceInstrWithLI(MachineInstr &MI, const LoadImmediateInfo &LII)
const;
diff --git a/llvm/test/CodeGen/PowerPC/fixup-kill-dead-flag-crash.mir
b/llvm/test/CodeGen/PowerPC/fixup-kill-dead-flag-crash.mir
new file mode 100644
index ..be2671fa9b5d
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/fixup-kill-dead-flag-crash.mir
@@ -0,0 +1,21 @@
+# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs
-start-before ppc-mi-peepholes \
+# RUN: -stop-after ppc-mi-peepholes %s -o - | FileCheck %s
+
+---
+name: test
+#CHECK : name : test
+tracksRegLiveness: true
+body: |
+ bb.0.entry:
+liveins: $x3
+%0:g8rc = COPY $x3
+%1:gprc = COPY %0.sub_32:g8rc
+%2:g8rc = LI8 63
+
+ bb.1:
+%3:gprc = COPY %2.sub_32:g8rc
+; CHECK: %4:gprc = LI 0
+%4:gprc = XORI killed %3:gprc, 63
+STW killed %4:gprc, %4:gprc, 100
+BLR8 implicit $lr8, implicit $rm
+...
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
