OSDN Git Service
Mauro Rossi [Sat, 28 Dec 2019 19:15:12 +0000 (20:15 +0100)]
android: add 'Restat: true' to tblgenRule definition (llvm90)
Based on suggestion by Colin Cross, to avoid unnecessary rebuild of llvm90
in case of *.inc generated sources older than llvm90-tblgen binary.
When llvm90-tblgen binary is compiled and for some reason the build is interrupted,
the generated *.inc files will have a timestamp older than llvm90-tblgen binary,
at this point all libLLVM* targets depending on the *.inc files are always rebuilt.
'NINJA_ARGS="-d explain" make iso_img' command revealed the cause of the problem:
ninja explain: output out/soong/.intermediates/external/llvm90/llvm90-gen-attributes/gen/llvm/IR/Attributes.inc
older than most recent input out/soong/host/linux-x86/bin/llvm90-tblgen (
1570914978 vs
1575285173)
ninja explain: out/soong/.intermediates/external/llvm90/llvm90-gen-attributes/gen/llvm/IR/Attributes.inc is dirty
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Chih-Wei Huang [Sat, 5 Oct 2019 12:36:03 +0000 (20:36 +0800)]
android: add CleanSpec.mk (llvm90)
Clean up older objects to rebuild everything.
Mauro Rossi [Sat, 5 Oct 2019 07:11:39 +0000 (09:11 +0200)]
DO NOT MERGE: android: translate soong build rules for libLLVM90
These changes are applied to build external/llvm90 project
and avoid conflicts with external/llvm project
Changes in mesa main Android.mk are required for libLLVM90
shared library dependency and cflag -DHAVE_LLVM=0x0900
The changelog is described by means of modules and variables
which needed to be renamed:
#rename the target shared library and all static libraries
find . -type f -name "*.bp" -exec sed -i 's/libLLVM/libLLVM90/g' {} +
#rename the boostrap and contextual build paths
find . -type f -name "*.bp" -exec sed -i 's/soong\-llvm/\soong-llvm90/g' {} +
find . -type f -name "*.go" -exec sed -i 's/android\/soong\/llvm/android\/soong\/llvm90/g' {} +
#rename force_build_llvm_components type and module name
find . -type f -name '*.bp' -exec sed -i 's/force_build_llvm_components/force_build_llvm90_components/g' {} +
find . -type f -name '*.go' -exec sed -i 's/force_build_llvm_components/force_build_llvm90_components/g' {} +
#rename all module that gave 'already defined' error
find . -type f -name '*.bp' -exec sed -i 's/llvm-aarch64-defaults/llvm90-aarch64-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-aarch64-headers/llvm90-aarch64-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-amdgpu-defaults/llvm90-amdgpu-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-amdgpu-headers/llvm90-amdgpu-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-arm-defaults/llvm90-arm-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-arm-headers/llvm90-arm-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-defaults/llvm90-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-defaults-no-generated-headers/llvm90-defaults-no-generated-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-aarch64/llvm90-gen-aarch64/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-amdgpu/llvm90-gen-amdgpu/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-r600/llvm90-gen-r600/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-arm/llvm90-gen-arm/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-attributes/llvm90-gen-attributes/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-core/llvm90-gen-core/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-intrinsics/llvm90-gen-intrinsics/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-libdriver/llvm90-gen-libdriver/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-mips/llvm90-gen-mips/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-revision/llvm90-gen-revision/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-x86/llvm90-gen-x86/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-headers/llvm90-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-headers-no-generated-headers/llvm90-headers-no-generated-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-lib-defaults/llvm90-lib-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-mips-defaults/llvm90-mips-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-mips-headers/llvm90-mips-headers/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-tblgen/llvm90-tblgen/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-x86-defaults/llvm90-x86-defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm-x86-headers/llvm90-x86-headers/g' {} +
#rename llvm-gen-instcombine module
find . -type f -name '*.bp' -exec sed -i 's/llvm-gen-instcombine/llvm90-gen-instcombine/g' {} +
#rename the binaries
find . -type f -name '*.bp' -exec sed -i 's/LLVMHello/LLVM90Hello/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/LLVMgold/LLVM90gold/g' {} +
#rename the TableGen binary module and variable in different files
find . -type f -name '*.go' -exec sed -i 's/LLVM TableGen/LLVM90 TableGen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm-tblgen/llvm90-tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvmTblgen/llvm90Tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/tblgenRule/tblgenRule90/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/llvm_tblgen/llvm90_tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm_tblgen/llvm90_tblgen/g' {} +
find . -type f -name 'tdtags' -exec sed -i 's/llvm-tblgen/llvm90-tblgen/g' {} +
#rename the include paths
find . -type f -name '*.bp' -exec sed -i 's/external\/llvm/external\/llvm90/g' {} +
find . -type f -name '*.go' -exec sed -i 's/external\/llvm/external\/llvm90/g' {} +
#rename package, registered types and llvm-config
find . -type f -name '*.go' -exec sed -i 's/package llvm/package llvm90/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm_tblgen/llvm90_tblgen/g' {} +
find . -type f -name '*.go' -exec sed -i 's/llvm_defaults/llvm90_defaults/g' {} +
find . -type f -name '*.bp' -exec sed -i 's/ llvm-config / llvm90-config /g' {} +
find . -type f -name '*.bp' -exec sed -i 's/"llvm-config"/"llvm90-config"/g' {} +
find . -type f -name '*.go' -exec sed -i 's/"llvm-config"/"llvm90-config"/g' {} +
Mauro Rossi [Sun, 3 Feb 2019 07:28:46 +0000 (08:28 +0100)]
android: update version in {config,llvm-config}.h headers
Version information is set to 9.0.0
Mauro Rossi [Sat, 5 Oct 2019 06:58:42 +0000 (08:58 +0200)]
android: Bitstream: add support for libLLVMBitstreamReader
To avoid following building errors:
external/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp:570: error: undefined reference to 'llvm::BitstreamCursor::ReadBlockInfoBlock(bool)'
external/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp:747: error: undefined reference to 'llvm::BitstreamCursor::EnterSubBlock(unsigned int, unsigned int*)'
...
external/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp:974: error: undefined reference to 'llvm::BitstreamCursor::skipRecord(unsigned int)'
external/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp:819: error: undefined reference to 'llvm::BitstreamCursor::ReadAbbrevRecord()'
external/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp:831: error: undefined reference to 'llvm::BitstreamCursor::readRecord(unsigned int, llvm::SmallVectorImpl<unsigned long long>&, llvm::StringRef*)'
...
external/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6402: error: undefined reference to 'llvm::BitstreamCursor::skipRecord(unsigned int)'
external/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6252: error: undefined reference to 'llvm::BitstreamCursor::EnterSubBlock(unsigned int, unsigned int*)'
external/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6278: error: undefined reference to 'llvm::BitstreamCursor::readRecord(unsigned int, llvm::SmallVectorImpl<unsigned long long>&, llvm::StringRef*)'
...
external/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3041: error: undefined reference to 'llvm::BitstreamCursor::ReadBlockInfoBlock(bool)'
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
Mauro Rossi [Sun, 22 Sep 2019 17:52:06 +0000 (19:52 +0200)]
android: Coroutines: add support for libLLVMCoroutines
Fixes the following building error with mesa 19.3 branch:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:137: error: undefined reference to 'LLVMAddCoroEarlyPass'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:138: error: undefined reference to 'LLVMAddCoroSplitPass'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:139: error: undefined reference to 'LLVMAddCoroElidePass'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:169: error: undefined reference to 'LLVMAddCoroCleanupPass'
clang.real: error: linker command failed with exit code 1 (use -v to see invocation)
Mauro Rossi [Fri, 20 Sep 2019 19:54:52 +0000 (21:54 +0200)]
android: AMDGPU: add support for Disassembler target
Necessary for the new Valve ACO compiler in mesa 19.3
LLVMInitializeAMDGPUDisassembler() function exposed conditionally
to FORCE_BUILD_AMDGPU macro definition in mesa src/amd/Android.compiler.mk
as per other AMDGPU targets
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Mauro Rossi [Sun, 21 Jul 2019 15:41:25 +0000 (17:41 +0200)]
Android: Fix soong building rules for llvm 9.0
The necessary static dependencies are added for Android blueprint build.
Changelog:
Build libLLVMJITLink static by adding lib/ExecutionEngine/JITLink/Android.bp
Build libLLVMRemarks static by adding lib/Remarks/Android.bp
Add libLLVMMIRParser, libLLVMJITLink and libLLVMRemarks dependencies in ./Android.bp
Fixes the following building errors at linking:
FAILED: out/soong/.intermediates/external/llvm/libLLVM/android_x86_core_shared/libLLVM.so
...
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
external/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:1005: error: undefined reference to 'llvm::parseNamedRegisterReference(llvm::PerFunctionMIParsingState&, unsigned int&, llvm::StringRef, llvm::SMDiagnostic&)'
...
external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1371: error: undefined reference to 'llvm::remarks::StringTable::serialize() const'
external/llvm/lib/IR/DiagnosticInfo.cpp:435: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
external/llvm/lib/IR/DiagnosticInfo.cpp:436: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
external/llvm/lib/IR/DiagnosticInfo.cpp:437: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
external/llvm/lib/IR/DiagnosticInfo.cpp:457: error: undefined reference to 'llvm::remarks::StringTable::add(llvm::StringRef)'
...
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:337: error: undefined reference to 'llvm::jitlink::jitLink(std::__1::unique_ptr<llvm::jitlink::JITLinkContext, std::__1::default_delete<llvm::jitlink::JITLinkContext> >)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:422: error: undefined reference to 'llvm::jitlink::createEHFrameRecorderPass(llvm::Triple const&, std::__1::function<void (unsigned long long)>)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:444: error: undefined reference to 'llvm::jitlink::registerEHFrameSection(void const*)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:457: error: undefined reference to 'llvm::jitlink::deregisterEHFrameSection(void const*)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:476: error: undefined reference to 'llvm::jitlink::deregisterEHFrameSection(void const*)'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:25: error: undefined reference to 'llvm::jitlink::JITLinkContext::~JITLinkContext()'
external/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:25: error: undefined reference to 'llvm::jitlink::JITLinkContext::~JITLinkContext()'
out/soong/.intermediates/external/llvm/lib/ExecutionEngine/Orc/libLLVMOrcJIT/android_x86_core_static/libLLVMOrcJIT.a(ObjectLinkingLayer.o):ObjectLinkingLayer.cpp:vtable for llvm::orc::ObjectLinkingLayerJITLinkContext: error: undefined reference to 'llvm::jitlink::JITLinkContext::shouldAddDefaultTargetPasses(llvm::Triple const&) const'
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Dan Willemsen [Thu, 22 Feb 2018 02:47:18 +0000 (18:47 -0800)]
Add SourceFileGenerator.GeneratedDeps()
To clean up unnecessary dependencies when using generated headers,
GeneratedDeps() should return a single file from every build entry.
GeneratedSourceFiles() used to be used from this, but now if you create
one build rule with multiple outputs, it's valid to only return a single
output file.
In this case, ModuleBuild is called once per source file, each
outputing a single output file, so all of them still need to be listed.
Bug:
73745773
Test: diff out/soong/build.ninja
Test: diff out/soong/Android-aosp_arm.mk
Test: rm -rf out; m
Change-Id: I073e3be7ecd9545f4002ad94d3da44f1a6652baa
Mauro Rossi [Sat, 23 Feb 2019 12:19:34 +0000 (13:19 +0100)]
android: utils: remove redundant Android.bp
To avoid build errors with pie-x86
Implemented via following commands:
rm utils/count/Android.bp
rm utils/FileCheck/Android.bp
rm utils/yaml-bench/Android.bp
rm utils/not/Android.bp
Mauro Rossi [Sat, 23 Feb 2019 12:16:35 +0000 (13:16 +0100)]
android: tools: remove redundant Android.bp
To avoid build errors in pie-x86 due to collision with external/llvm ones
Implemented via following commands:
cd tools
find . -type f -name 'Android.bp' -exec rm {} +
Mauro Rossi [Sun, 3 Feb 2019 08:16:44 +0000 (09:16 +0100)]
android: config.h: Add option to disable minidumps, default it to off
Porting of commit
7e4b0fae ("Add cmake option to disable minidumps, default it to off")
plus some other options that are to be set on (1) or off (0)
Fixes the following building error:
external/llvm80/lib/Support/Process.cpp:88:35:
error: use of undeclared identifier 'LLVM_ENABLE_CRASH_DUMPS'
static bool coreFilesPrevented = !LLVM_ENABLE_CRASH_DUMPS;
^
1 error generated.
Mauro Rossi [Sun, 3 Feb 2019 07:28:46 +0000 (08:28 +0100)]
android: update version in {config,llvm-config}.h headers
Version information is set to 8.0.0
Chih-Wei Huang [Wed, 12 Sep 2018 11:01:54 +0000 (19:01 +0800)]
Android: fix a possible building error
The .git/logs/HEAD doesn't always exist. In a new created repo, it may
cause the error:
error: external/llvm/Android.bp:157:1: module "llvm-gen-revision": source path external/llvm/.git/logs/HEAD does not exist
Use wildcard to avoid that.
Mauro Rossi [Sat, 8 Sep 2018 16:32:44 +0000 (18:32 +0200)]
android: Support: add genrule for VCSRevision.h header
Cmake build generates the header, in Android blueprint we need to add
a new "llvm-gen-revision" genrule to launch command script that will
generate "llvm/Support/VCSRevision.h" header.
For simplification the new genrule is added to "llvm-headers" library
which is already used to generate attributes and intrinsics headers.
Mesa python script git_sha1_gen.py is added to external/llvm top path,
with the only changes being the relative git_dir path at line 16 that
is changed from '..' to '.' and the content of generated header.
Mauro Rossi [Sat, 1 Sep 2018 16:36:23 +0000 (18:36 +0200)]
android: AMDGPU: Make getTgtMemIntrinsic table-driven for resource-based intrinsics
Reference:
e821893513
("AMDGPU: Make getTgtMemIntrinsic table-driven for resource-based intrinsics")
Mauro Rossi [Sat, 1 Sep 2018 15:52:18 +0000 (17:52 +0200)]
android: Add a Microsoft Demangler.
Reference:
42e40ea33e ("Add a Microsoft Demangler.")
Mauro Rossi [Sat, 1 Sep 2018 15:43:50 +0000 (17:43 +0200)]
android: [InstCombine] Introducing Aggressive Instruction Combine pass
Reference:
594d89a614
[InstCombine] Introducing Aggressive Instruction Combine pass (-aggressive-instcombine).
Mauro Rossi [Sat, 1 Sep 2018 15:24:18 +0000 (17:24 +0200)]
android: InstCombine: add support for InstCombineTable.inc TableGen rules
Reference:
commit
7f7cea5306
("InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded")
Mauro Rossi [Sat, 1 Sep 2018 16:27:47 +0000 (18:27 +0200)]
android: AMDGPU: Separate R600 and GCN TableGen files
Reference:
cba2181e77 ("AMDGPU: Separate R600 and GCN TableGen files")
Mauro Rossi [Sat, 1 Sep 2018 14:24:14 +0000 (16:24 +0200)]
android: [IR] Split Intrinsics.inc into enums and implementations
Reference:
af7c445 ("[IR] Split Intrinsics.inc into enums and implementations")
Mauro Rossi [Sat, 1 Sep 2018 14:10:24 +0000 (16:10 +0200)]
android: Rename {Attributes,Intrinsics}.gen to {Attributes,Intrinsics}.inc
Reference:
ea0775ec4a ("Rename Attributes.gen, Intrinsics.gen to Attributes.inc, Intrinsics.inc")
Mauro Rossi [Sat, 1 Sep 2018 11:25:45 +0000 (13:25 +0200)]
android: [ARM] Unify handling of M-Class system registers
Reference:
683224ecbd ("[ARM] Unify handling of M-Class system registers")
Mauro Rossi [Sat, 1 Sep 2018 02:03:27 +0000 (04:03 +0200)]
android: [mips][rtdyld] Move MIPS relocation resolution to a subclass
Reference:
2762dbad70
"[mips][rtdyld] Move MIPS relocation resolution to a subclass and implment N32 relocations"
Mauro Rossi [Sat, 1 Sep 2018 01:49:03 +0000 (03:49 +0200)]
android: [PM] Create a separate library for high-level pass management code.
Reference:
2349136630 ("[PM] Create a separate library for high-level pass management code.")
Mauro Rossi [Sat, 1 Sep 2018 01:24:26 +0000 (03:24 +0200)]
android: [MSF] add support for libLLVMDebugInfoMSF
Reference:
5e117855c3 ([msf] Resubmit "Rename Msf -> MSF".)
Mauro Rossi [Sat, 1 Sep 2018 01:22:37 +0000 (03:22 +0200)]
android: NFC: Rename (PDB) RawSession to NativeSession
Reference:
11e1d83ce5 ("NFC: Rename (PDB) RawSession to NativeSession")
Mauro Rossi [Sat, 1 Sep 2018 00:36:45 +0000 (02:36 +0200)]
android: Move Object format code to lib/BinaryFormat.
Reference:
19ca2b0f9d ("Move Object format code to lib/BinaryFormat.")
Mauro Rossi [Fri, 31 Aug 2018 23:48:08 +0000 (01:48 +0200)]
android: [X86][GlobalISel] Initial implementation , select G_ADD gpr, gpr
Reference:
8ae3570fa804
("[X86][GlobalISel] Initial implementation , select G_ADD gpr, gpr")
Mauro Rossi [Fri, 31 Aug 2018 23:45:32 +0000 (01:45 +0200)]
android: [X86][AVX512] Adding new LLVM TableGen for EVEX2VEX tables
Reference:
b59d8041db [X86][AVX512] Adding new LLVM TableGen backend which
generates the EVEX2VEX compressing tables.
Mauro Rossi [Fri, 31 Aug 2018 23:23:04 +0000 (01:23 +0200)]
android: [X86][GlobalISel] Add general-purpose Register Bank
Reference:
f4df3d44a5 ("[X86][GlobalISel] Add general-purpose Register Bank")
Mauro Rossi [Fri, 31 Aug 2018 23:11:05 +0000 (01:11 +0200)]
android: [ARM] GlobalISel: Use TableGen instruction selector
Reference:
33dd8eaf5d ("[ARM] GlobalISel: Use TableGen instruction selector")
Mauro Rossi [Fri, 31 Aug 2018 22:51:14 +0000 (00:51 +0200)]
android: [ARM] Tablegen-erate current Register Bank Information.
Reference:
e0fd89875d
("[globalisel][arm] Tablegen-erate current Register Bank Information.")
Mauro Rossi [Fri, 31 Aug 2018 22:47:29 +0000 (00:47 +0200)]
android: AMDGPU: Support using tablegened MC pseudo expansions
Reference:
5991ecc3e6 ("AMDGPU: Support using tablegened MC pseudo expansions")
Mauro Rossi [Fri, 31 Aug 2018 20:55:52 +0000 (22:55 +0200)]
android: IR: Rename the tablegen'd Attributes file to .gen
Reference:
e255157a48 ("IR: Rename the tablegen'd Attributes file to .gen")
Mauro Rossi [Sat, 25 Aug 2018 21:45:24 +0000 (23:45 +0200)]
android: Aarch64,AMDGPU: enable GlobalISel
Reference commits:
8097fcb40b ("[GlobalISel] Add basic Selector-emitter tblgen backend.")
ca24065b98 ("[globalisel] Tablegen-erate current Register Bank Information")
945c85d877 ("AMDGPU/GlobalISel: Add support for simple shaders")
Mauro Rossi [Sat, 25 Aug 2018 18:03:29 +0000 (20:03 +0200)]
android: add llvm/Config/abi-breaking.h header for host and device
Fixes the following building error:
external/llvm/include/llvm/Support/Error.h:21:10:
fatal error: 'llvm/Config/abi-breaking.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Mauro Rossi [Sat, 25 Aug 2018 17:59:34 +0000 (19:59 +0200)]
android: add llvm/Config/llvm-platform-config.h header
Fixes the following building error:
In file included from external/llvm70bp/lib/Support/LockFileManager.cpp:10:
In file included from external/llvm/include/llvm/Support/LockFileManager.h:12:
In file included from external/llvm/include/llvm/ADT/Optional.h:20:
In file included from external/llvm/include/llvm/Support/AlignOf.h:17:
In file included from external/llvm/include/llvm/Support/Compiler.h:18:
external/llvm/device/include/llvm/Config/llvm-config.h:98:10:
fatal error: 'llvm/Config/llvm-platform-config.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Mauro Rossi [Sat, 25 Aug 2018 14:50:30 +0000 (16:50 +0200)]
android: Moving libFuzzer from LLVM to compiler-rt.
Reference:
ec925a2578 ("Moving libFuzzer from LLVM to compiler-rt.")
Mauro Rossi [Sat, 25 Aug 2018 17:58:03 +0000 (19:58 +0200)]
android: Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI.
Reference:
a844915ce0 ("Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI.")
Mauro Rossi [Sat, 25 Aug 2018 11:23:34 +0000 (13:23 +0200)]
DO NOT MERGE: util: build only TableGen
Necessary to avoid collisions with external/llvm utils
Mauro Rossi [Sat, 25 Aug 2018 10:59:12 +0000 (12:59 +0200)]
DO NOT MERGE: android: avoid re-building tools
Necessary to avoid Android Build System targets conflicts with external/llvm
Mauro Rossi [Sat, 25 Aug 2018 10:50:12 +0000 (12:50 +0200)]
android: update version in {config,llvm-config}.h headers
Version information is set to 7.0.0
Mauro Rossi [Sat, 25 Aug 2018 10:44:44 +0000 (12:44 +0200)]
android: add soong building rules
Android.bp and building rules including Android specific .go files
are imported from oreo-x86 llvm 3.9 branch to the release_70 branch
cd ~/oreo-x86_kernel/external
git clone https://github.com/llvm-mirror/llvm llvm70
cd ~/oreo-x86_kernel/external/llvm70
git reset --hard
git fetch llvm-mirror release_70
git checkout FETCH_HEAD
git clean -dxf
cd ~/oreo-x86_kernel/external/llvm
find . -name 'Android.bp' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'Android.bp' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'llvm.go' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'llvm.go' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'tblgen.go' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'tblgen.go' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'android_test.sh' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'android_test.sh' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'AsmParsers.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'AsmParsers.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'AsmPrinters.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'AsmPrinters.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'Disassemblers.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'Disassemblers.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'Targets.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'Targets.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'config.h' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'config.h' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
find . -name 'llvm-config.h' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'llvm-config.h' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;
cd ~/oreo-x86_kernel/external/llvm70
Kai Nacke [Tue, 17 Sep 2019 19:16:16 +0000 (19:16 +0000)]
Add external project LDC to release notes.
LDC, the LLVM-based D compiler, is already ready for LLVM 9.0.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@372167
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 16 Sep 2019 09:11:39 +0000 (09:11 +0000)]
ReleaseNotes: known issue: PR40547
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371964
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 10 Sep 2019 07:31:55 +0000 (07:31 +0000)]
Merging r371434:
------------------------------------------------------------------------
r371434 | efriedma | 2019-09-09 20:29:27 +0200 (Mon, 09 Sep 2019) | 15 lines
[IfConversion] Correctly handle cases where analyzeBranch fails.
If analyzeBranch fails, on some targets, the out parameters point to
some blocks in the function. But we can't use that information, so make
sure to clear it out. (In some places in IfConversion, we assume that
any block with a TrueBB is analyzable.)
The change to the testcase makes it trigger a bug on builds without this
fix: IfConvertDiamond tries to perform a followup "merge" operation,
which isn't legal, and we somehow end up with a branch to a deleted MBB.
I'm not sure how this doesn't crash the compiler.
Differential Revision: https://reviews.llvm.org/D67306
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371490
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 9 Sep 2019 09:48:38 +0000 (09:48 +0000)]
Merging r370592:
------------------------------------------------------------------------
r370592 | rksimon | 2019-08-31 18:21:31 +0200 (Sat, 31 Aug 2019) | 3 lines
[X86] EltsFromConsecutiveLoads - Don't confuse elt count with vector element count (PR43170)
EltsFromConsecutiveLoads was assuming that the number of input elts was the same as the number of elements in the output vector type when creating a zeroing shuffle, causing an assert when subvectors were being combined instead of just scalars.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371382
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 9 Sep 2019 09:43:19 +0000 (09:43 +0000)]
Merging r371221 and r371224:
------------------------------------------------------------------------
r371221 | spatel | 2019-09-06 18:10:18 +0200 (Fri, 06 Sep 2019) | 3 lines
[SimplifyLibCalls] handle pow(x,-0.0) before it can assert (PR43233)
https://bugs.llvm.org/show_bug.cgi?id=43233
------------------------------------------------------------------------
------------------------------------------------------------------------
r371224 | jfb | 2019-09-06 18:26:59 +0200 (Fri, 06 Sep 2019) | 39 lines
[InstCombine] pow(x, +/- 0.0) -> 1.0
Summary:
This isn't an important optimization at all... We're already doing:
pow(x, 0.0) -> 1.0
My patch merely teaches instcombine that -0.0 does the same.
However, doing this fixes an AMAZING bug! Compile this program:
extern "C" double pow(double, double);
double boom(double base) {
return pow(base, -0.0);
}
With:
clang++ ~/Desktop/fast-math.cpp -ffast-math -O2 -S
And clang will crash with a signal. Wow, fast math is so fast it ICEs the
compiler! Arguably, the generated math is infinitely fast.
What's actually happening is that we recurse infinitely in getPow. In debug we
hit its assertion:
assert(Exp != 0 && "Incorrect exponent 0 not handled");
We avoid this entire mess if we instead recognize that an exponent of positive
and negative zero yield 1.0.
A separate commit, r371221, fixed the same problem. This only contains the added
tests.
<rdar://problem/
54598300>
Reviewers: scanon
Subscribers: hiraditya, jkorous, dexonsmith, ributzka, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67248
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371381
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 9 Sep 2019 09:36:49 +0000 (09:36 +0000)]
Merging r371305 and r371307:
------------------------------------------------------------------------
r371305 | nikic | 2019-09-07 14:03:48 +0200 (Sat, 07 Sep 2019) | 1 line
[X86] Add test for PR43230; NFC
------------------------------------------------------------------------
------------------------------------------------------------------------
r371307 | nikic | 2019-09-07 14:13:44 +0200 (Sat, 07 Sep 2019) | 9 lines
[X86] Fix pshuflw formation from repeated shuffle mask (PR43230)
Fix for https://bugs.llvm.org/show_bug.cgi?id=43230.
When creating PSHUFLW from a repeated shuffle mask, we have to apply
the checks to the repeated mask, not the original one. For the test
case from PR43230 the inspected part of the original mask is all undef.
Differential Revision: https://reviews.llvm.org/D67314
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371378
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 9 Sep 2019 09:08:44 +0000 (09:08 +0000)]
Merging r371111:
------------------------------------------------------------------------
r371111 | efriedma | 2019-09-05 22:02:38 +0200 (Thu, 05 Sep 2019) | 17 lines
[IfConversion] Fix diamond conversion with unanalyzable branches.
The code was incorrectly counting the number of identical instructions,
and therefore tried to predicate an instruction which should not have
been predicated. This could have various effects: a compiler crash,
an assembler failure, a miscompile, or just generating an extra,
unnecessary instruction.
Instead of depending on TargetInstrInfo::removeBranch, which only
works on analyzable branches, just remove all branch instructions.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43121 and
https://bugs.llvm.org/show_bug.cgi?id=41121 .
Differential Revision: https://reviews.llvm.org/D67203
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371377
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 9 Sep 2019 08:59:27 +0000 (08:59 +0000)]
Merging r371262:
------------------------------------------------------------------------
r371262 | nickdesaulniers | 2019-09-06 23:50:11 +0200 (Fri, 06 Sep 2019) | 45 lines
[IR] CallBrInst: scan+update arg list when indirect dest list changes
Summary:
There's an unspoken invariant of callbr that the list of BlockAddress
Constants in the "function args" list match the BasicBlocks in the
"other labels" list. (This invariant is being added to the LangRef in
https://reviews.llvm.org/D67196).
When modifying the any of the indirect destinations of a callbr
instruction (possible jump targets), we need to update the function
arguments if the argument is a BlockAddress whose BasicBlock refers to
the indirect destination BasicBlock being replaced. Otherwise, many
transforms that modify successors will end up violating that invariant.
A recent change to the arm64 Linux kernel exposed this bug, which
prevents the kernel from booting.
I considered maintaining a mapping from indirect destination BasicBlock
to argument operand BlockAddress, but this ends up being a one to
potentially many (though usually one) mapping. Also, the list of
arguments to a function (or more typically inline assembly) ends up
being less than 10. The implementation is significantly simpler to just
rescan the full list of arguments. Because of the one to potentially
many relationship, the full arg list must be scanned (we can't stop at
the first instance).
Thanks to the following folks that reported the issue and helped debug
it:
* Nathan Chancellor
* Will Deacon
* Andrew Murray
* Craig Topper
Link: https://bugs.llvm.org/show_bug.cgi?id=43222
Link: https://github.com/ClangBuiltLinux/linux/issues/649
Link: https://lists.infradead.org/pipermail/linux-arm-kernel/2019-September/678330.html
Reviewers: craig.topper, chandlerc
Reviewed By: craig.topper
Subscribers: void, javed.absar, kristof.beyls, hiraditya, llvm-commits, nathanchance, srhines
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67252
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371376
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 6 Sep 2019 08:17:47 +0000 (08:17 +0000)]
Merging r371088 and r371095:
------------------------------------------------------------------------
r371088 | spatel | 2019-09-05 18:58:18 +0200 (Thu, 05 Sep 2019) | 1 line
[x86] add test for horizontal math bug (PR43225); NFC
------------------------------------------------------------------------
------------------------------------------------------------------------
r371095 | spatel | 2019-09-05 19:28:17 +0200 (Thu, 05 Sep 2019) | 3 lines
[x86] fix horizontal math bug exposed by improved demanded elements analysis (PR43225)
https://bugs.llvm.org/show_bug.cgi?id=43225
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371178
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 5 Sep 2019 11:43:42 +0000 (11:43 +0000)]
Merging r370426:
------------------------------------------------------------------------
r370426 | maskray | 2019-08-30 04:20:49 +0200 (Fri, 30 Aug 2019) | 26 lines
[PPC32] Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO
Unlike ppc64, which has ADDISgotTprelHA+LDgotTprelL pairs,
ppc32 just uses LDgotTprelL32, so it does not make lots of sense to use
_LO without a paired _HA.
Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO to match GCC, and
get better linker relocation check. Note, R_PPC_GOT_TPREL16_{HA,LO}
don't have good linker support:
(a) lld does not support R_PPC_GOT_TPREL16_{HA,LO}.
(b) Top of tree ld.bfd does not support R_PPC_GOT_REL16_HA Initial-Exec -> Local-Exec relaxation:
// a.o
addis 3, 3, tsd_tls@got@tprel@ha
lwz 3, tsd_tls@got@tprel@l(3)
add 3, 3, tsd_tls@tls
// b.o
.section .tdata,"awT"; .globl tsd_tls; tsd_tls:
// ld/ld-new a.o b.o
internal error, aborting at ../../bfd/elf32-ppc.c:7952 in ppc_elf_relocate_section
Reviewed By: adalava
Differential Revision: https://reviews.llvm.org/D66925
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371059
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 5 Sep 2019 11:33:27 +0000 (11:33 +0000)]
Merging r371048:
------------------------------------------------------------------------
r371048 | jonpa | 2019-09-05 12:20:05 +0200 (Thu, 05 Sep 2019) | 7 lines
[SystemZ] Recognize INLINEASM_BR in backend
Handle the remaining cases also by handling asm goto in
SystemZInstrInfo::getBranchInfo().
Review: Ulrich Weigand
https://reviews.llvm.org/D67151
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371057
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 5 Sep 2019 10:50:25 +0000 (10:50 +0000)]
Merging r370430:
------------------------------------------------------------------------
r370430 | djg | 2019-08-30 06:33:22 +0200 (Fri, 30 Aug 2019) | 12 lines
[CodeGen] Fix lowering for returning the result of an extractvalue
When the number of return values exceeds the number of registers available,
SelectionDAGBuilder::visitRet transforms a function's return to use a
pointer to a buffer to hold return values. When the returned value is an
operator such as extractvalue, the value may have a non-zero result number.
Add that number to the indexing when obtaining the values to store.
This fixes https://bugs.llvm.org/show_bug.cgi?id=43132.
Differential Revision: https://reviews.llvm.org/D66978
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371053
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 5 Sep 2019 09:57:35 +0000 (09:57 +0000)]
Merging r370720 and r370721:
------------------------------------------------------------------------
r370720 | bjope | 2019-09-03 11:33:40 +0200 (Tue, 03 Sep 2019) | 13 lines
[LV] Precommit test case showing miscompile from PR43166. NFC
Summary: Precommit test case showing miscompile from PR43166.
Reviewers: fhahn, Ayal
Reviewed By: fhahn
Subscribers: rkruppe, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67072
------------------------------------------------------------------------
------------------------------------------------------------------------
r370721 | bjope | 2019-09-03 11:33:55 +0200 (Tue, 03 Sep 2019) | 20 lines
[LV] Fix miscompiles by adding non-header PHI nodes to AllowedExit
Summary:
Fold-tail currently supports reduction last-vector-value live-out's,
but has yet to support last-scalar-value live-outs, including
non-header phi's. As it relies on AllowedExit in order to detect
them and bail out we need to add the non-header PHI nodes to
AllowedExit, otherwise we end up with miscompiles.
Solves https://bugs.llvm.org/show_bug.cgi?id=43166
Reviewers: fhahn, Ayal
Reviewed By: fhahn, Ayal
Subscribers: anna, hiraditya, rkruppe, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67074
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371044
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 5 Sep 2019 09:54:36 +0000 (09:54 +0000)]
Merging r370753:
------------------------------------------------------------------------
r370753 | jonpa | 2019-09-03 15:31:22 +0200 (Tue, 03 Sep 2019) | 6 lines
[SystemZ] Recognize INLINEASM_BR in backend.
SystemZInstrInfo::analyzeBranch() needs to check for INLINEASM_BR
instructions, or it will crash.
Review: Ulrich Weigand
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371043
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 5 Sep 2019 09:51:30 +0000 (09:51 +0000)]
Merging r369310:
------------------------------------------------------------------------
r369310 | hubert.reinterpretcast | 2019-08-20 01:12:48 +0200 (Tue, 20 Aug 2019) | 24 lines
[cmake] Link in LLVMPasses due to dependency by LLVMOrcJIT; NFC
Summary:
rL367756 (
f5c40cb) increases the dependency of LLVMOrcJIT on LLVMPasses.
In particular, symbols defined in LLVMPasses that are referenced by the
destructor of `PassBuilder` are now referenced by LLVMOrcJIT through
`Speculation.cpp.o`.
We believe that referencing symbols defined in LLVMPasses in the
destructor of `PassBuilder` is valid, and that adding to the set of such
symbols is legitimate. To support such cases, this patch adds LLVMPasses
to the set of libraries being linked when linking in LLVMOrcJIT causes
such symbols from LLVMPasses to be referenced.
Reviewers: Whitney, anhtuyen, pree-jackie
Reviewed By: pree-jackie
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66441
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371042
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 30 Aug 2019 15:15:53 +0000 (15:15 +0000)]
index.rst: Remove non-release warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370477
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 30 Aug 2019 09:06:49 +0000 (09:06 +0000)]
Merging r370355:
------------------------------------------------------------------------
r370355 | joerg | 2019-08-29 15:22:30 +0200 (Thu, 29 Aug 2019) | 5 lines
Allow replaceAndRecursivelySimplify to list unsimplified visitees.
This is part of D65280 and split it to avoid ABI changes on the 9.0
release branch.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370447
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 30 Aug 2019 09:02:10 +0000 (09:02 +0000)]
Merging r370404:
------------------------------------------------------------------------
r370404 | rksimon | 2019-08-29 22:22:08 +0200 (Thu, 29 Aug 2019) | 3 lines
[X86][SSE] combinePMULDQ - pmuldq(x, 0) -> zero vector (PR43159)
ISD::isBuildVectorAllZeros permits undef elements to be present, which means we can't return it as a zero vector. PMULDQ/PMULUDQ is an extending multiply so a multiply by zero of the lower 32-bits should result in a zero 64-bit element.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370445
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 30 Aug 2019 07:34:24 +0000 (07:34 +0000)]
ReleaseNotes: pocl and TCE; by Pekka Jääskeläinen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370439
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 30 Aug 2019 07:27:12 +0000 (07:27 +0000)]
Merging r368164:
------------------------------------------------------------------------
r368164 | s.desmalen | 2019-08-07 14:41:38 +0200 (Wed, 07 Aug 2019) | 13 lines
[AArch64][WinCFI] Do not pair callee-save instructions in LoadStoreOptimizer
Prevent the LoadStoreOptimizer from pairing any load/store instructions with
instructions from the prologue/epilogue if the CFI information has encoded the
operations as separate instructions. This would otherwise lead to a mismatch
of the actual prologue size from the size as recorded in the Windows CFI.
Reviewers: efriedma, mstorsjo, ssijaric
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D65817
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370438
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 13:41:38 +0000 (13:41 +0000)]
ReleaseNotes: cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370357
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 13:23:59 +0000 (13:23 +0000)]
ReleaseNotes: remove in-progress warning and empty sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370356
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 13:03:14 +0000 (13:03 +0000)]
ReleaseNotes: matching wide stores (r362472)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370352
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 12:44:53 +0000 (12:44 +0000)]
ReleaseNotes: reduce the indent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370346
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 12:37:46 +0000 (12:37 +0000)]
ReleaseNotes: sinking of instructions without uses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370344
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 12:19:19 +0000 (12:19 +0000)]
ReleaseNotes: omitting range checks for switches with unreachable defaults
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370342
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 10:04:58 +0000 (10:04 +0000)]
ReleaseNotes from Sam Parker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370318
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 29 Aug 2019 08:58:14 +0000 (08:58 +0000)]
Merging r370271:
------------------------------------------------------------------------
r370271 | tstellar | 2019-08-29 00:59:04 +0200 (Thu, 29 Aug 2019) | 6 lines
[LLVM-C] Fix omission of INSTALL_WITH_TOOLCHAIN to llvm_add_library()
Due to a misstake with r365902 that tried to simplify the install with
toolchain logic LLVM-C.dll was no longer being installed.
Patch By: Jakob Bornecrantz
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370306
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 28 Aug 2019 13:58:21 +0000 (13:58 +0000)]
Merging r370204:
------------------------------------------------------------------------
r370204 | hans | 2019-08-28 15:55:10 +0200 (Wed, 28 Aug 2019) | 6 lines
[SelectionDAG] Don't generate libcalls for wide shifts on Windows (PR42711)
Neither libgcc or compiler-rt are usually used on Windows, so these
functions can't be called.
Differential revision: https://reviews.llvm.org/D66880
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370205
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 28 Aug 2019 09:55:07 +0000 (09:55 +0000)]
Merging r369886:
------------------------------------------------------------------------
r369886 | bjope | 2019-08-26 11:29:53 +0200 (Mon, 26 Aug 2019) | 23 lines
[LoopUnroll] Handle certain PHIs in full unrolling properly
Summary:
When reconstructing the CFG of the loop after unrolling,
LoopUnroll could in some cases remove the phi operands of
loop-carried values instead of preserving them, resulting
in undef phi values after loop unrolling.
When doing this reconstruction, avoid removing incoming
phi values for phis in the successor blocks if the successor
is the block we are jumping to anyway.
Patch-by: ebevhan
Reviewers: fhahn, efriedma
Reviewed By: fhahn
Subscribers: bjope, lebedev.ri, zzheng, dmgreen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66334
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370182
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 28 Aug 2019 09:25:24 +0000 (09:25 +0000)]
Merging r370176:
------------------------------------------------------------------------
r370176 | hans | 2019-08-28 11:21:56 +0200 (Wed, 28 Aug 2019) | 15 lines
[LLVM-C] Fix ByVal Attribute crashing
With the introduction of the typed byval attribute change there was no
way that the LLVM-C API could create the correct class Attribute. If a
program that uses the C API creates a ByVal attribute and annotates a
function with that attribute LLVM will crash when it assembles or write
that module containing the function out as bitcode.
This change is a minimal fix to at least allow code to work, this is
because the byval change is on the 9.0 and I don't want to introduce new
LLVM-C API this late in the release cycle.
By Jakob Bornecrantz!
Differential revision: https://reviews.llvm.org/D66144
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370178
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 28 Aug 2019 08:21:46 +0000 (08:21 +0000)]
ReleaseNotes: ORC note, by Lang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370167
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 27 Aug 2019 16:42:28 +0000 (16:42 +0000)]
ReleaseNotes: Zig
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370077
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 27 Aug 2019 16:26:35 +0000 (16:26 +0000)]
ReleaseNotes: RISCV
By Alex Bradbury!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370076
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 27 Aug 2019 14:36:51 +0000 (14:36 +0000)]
ReleaseNotes: PowerPC
By Lei Huang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370065
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 27 Aug 2019 14:30:02 +0000 (14:30 +0000)]
Merging r370036:
------------------------------------------------------------------------
r370036 | tnorthover | 2019-08-27 12:21:11 +0200 (Tue, 27 Aug 2019) | 8 lines
AArch64: avoid creating cycle in DAG for post-increment NEON ops.
Inserting a value into Visited has the effect of terminating a search for
predecessors if that node is seen. This is legitimate for the base address, and
acts as a slight performance optimization, but the vector-building node can be
paert of a legitimate cycle so we shouldn't stop searching there.
PR43056.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@370063
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 26 Aug 2019 14:47:37 +0000 (14:47 +0000)]
ReleaseNotes: ARM and AArch64
From Kristof!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369912
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 26 Aug 2019 12:31:37 +0000 (12:31 +0000)]
Merging r366447:
------------------------------------------------------------------------
r366447 | jdevlieghere | 2019-07-18 17:17:42 +0200 (Thu, 18 Jul 2019) | 19 lines
[CMake] Don't set Python_ADDITIONAL_VERSIONS
Until recently, Python_ADDITIONAL_VERSIONS was used to limit LLVM's
Python support to 2.7. Now that both LLVM and LLDB both support Python
3, there's no longer a need to put an arbitrary limit on this.
However, instead of removing the variable, r365692 expanded the list,
which has the (presumably unintentional) side-effect of expression
preference for Python 3.
Instead, as Michal proposed in the original code review, we should just
not set the list at all, and let CMake pick whatever Python interpreter
you have in your path.
This patch removes the Python_ADDITIONAL_VERSIONS variable in llvm,
clang and lld. I've also updated the docs with the default behavior and
how to force a different Python version to be used.
Differential revision: https://reviews.llvm.org/D64894
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369899
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Denisov [Fri, 23 Aug 2019 10:01:52 +0000 (10:01 +0000)]
Add Mull project to the release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369744
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 22 Aug 2019 15:52:41 +0000 (15:52 +0000)]
Merging r367580:
------------------------------------------------------------------------
r367580 | atanasyan | 2019-08-01 18:04:29 +0200 (Thu, 01 Aug 2019) | 18 lines
[mips] Fix lowering load/store instruction in PIC case
If an operand of the `lw/sw` instructions is a symbol, these instructions
incorrectly lowered using not-position-independent chain of commands.
For PIC code we should use `lw/addiu` instructions with the `R_MIPS_GOT16`
and `R_MIPS_LO16` relocations respectively. Instead of that LLVM generates
position dependent code with the `R_MIPS_HI16` and `R_MIPS_LO16`
relocations.
This patch provides a fix for the bug by handling PIC case separately in
the `MipsAsmParser::expandMemInst`. The main idea is to generate a chain
of PIC instructions to load a symbol address into a register and then
load the address content.
The fix is not optimal and does not fix all PIC-related problems. This
is a task for subsequent patches.
Differential Revision: https://reviews.llvm.org/D65524
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369663
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 22 Aug 2019 14:28:05 +0000 (14:28 +0000)]
Merging r369426 and r369443:
------------------------------------------------------------------------
r369426 | mstorsjo | 2019-08-20 20:58:05 +0200 (Tue, 20 Aug 2019) | 5 lines
[TargetMachine] Don't try to create COFFSTUB references on windows on non-COFF
This avoids spurious relocation types for windows/elf targets.
Differential Revision: https://reviews.llvm.org/D66401
------------------------------------------------------------------------
------------------------------------------------------------------------
r369443 | mstorsjo | 2019-08-20 22:58:02 +0200 (Tue, 20 Aug 2019) | 11 lines
[test] Fix tests when run on windows after SVN r369426. NFC.
When running tests on windows, invoking "llc -march=<arch>" will
implicitly use windows as the target os, making these tests misbehave
after this change.
Fix the issue by using more specific -mtriple values instead of plain
-march in these tests.
This should hopefully fix buildbot failures like
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/9816.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369654
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 22 Aug 2019 13:49:53 +0000 (13:49 +0000)]
Merging r369095:
------------------------------------------------------------------------
r369095 | lewis-revill | 2019-08-16 12:28:34 +0200 (Fri, 16 Aug 2019) | 11 lines
[RISCV] Lower inline asm constraint A for RISC-V
This allows arguments with the constraint A to be lowered to input nodes
for RISC-V, which implies a memory address stored in a register.
This patch adds the minimal amount of code required to get operands with
the right constraints to compile.
https://reviews.llvm.org/D54296
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369651
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2019 10:10:05 +0000 (10:10 +0000)]
Merging r367412 and r367429:
------------------------------------------------------------------------
r367412 | rksimon | 2019-07-31 13:35:01 +0200 (Wed, 31 Jul 2019) | 1 line
[X86][AVX] Add reduced test case for PR42833
------------------------------------------------------------------------
------------------------------------------------------------------------
r367429 | rksimon | 2019-07-31 14:55:39 +0200 (Wed, 31 Jul 2019) | 3 lines
[X86][AVX] Ensure chained subvector insertions are the same size (PR42833)
Before combining insert_subvector(insert_subvector(vec, sub0, c0), sub1, c1) patterns, ensure that the subvectors are all the same type. On AVX512 targets especially we might have a mixture of 128/256 subvector insertions.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369362
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2019 09:56:16 +0000 (09:56 +0000)]
Merging r369199:
------------------------------------------------------------------------
r369199 | yhs | 2019-08-18 00:12:00 +0200 (Sun, 18 Aug 2019) | 26 lines
[BPF] Fix bpf llvm-objdump issues.
Commit https://reviews.llvm.org/D57939 ("[DWARF] Refactor
RelocVisitor and fix computation of SHT_RELA-typed relocation entries)
made a change for relocation resolution when operating
on an object file.
The change unfortunately broke BPF as given SymbolValue (S) and
Addent (A), previously relocation is resolved to
S + A
and after the change, it is resolved to
S
This patch fixed the issue by resolving relocation correctly.
It looks not all relocation resolution reaches here and I did not
trace down exactly when. But I do find if the object file includes
codes in two different ELF sections than default ".text",
the above bug will be triggered.
This patch included a trivial two function source code to
demonstrate this issue. The relocation for .debug_loc is resolved
incorrectly due to this and llvm-objdump cannot display source
annotated assembly.
Differential Revision: https://reviews.llvm.org/D66372
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369359
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2019 09:52:26 +0000 (09:52 +0000)]
Merging r369084:
------------------------------------------------------------------------
r369084 | ctopper | 2019-08-16 06:47:44 +0200 (Fri, 16 Aug 2019) | 5 lines
[X86] Manually reimplement getTargetInsertSubreg in X86DAGToDAGISel::matchBitExtract so we can call insertDAGNode on the target constant.
This is needed to maintain the topological sort order.
Fixes PR42992.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369357
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2019 09:45:09 +0000 (09:45 +0000)]
Merging r369168:
------------------------------------------------------------------------
r369168 | spatel | 2019-08-17 01:10:34 +0200 (Sat, 17 Aug 2019) | 16 lines
[CodeGenPrepare] Fix use-after-free
If OptimizeExtractBits() encountered a shift instruction with no operands at all,
it would erase the instruction, but still return false.
This previously didn’t matter because its caller would always return after
processing the instruction, but https://reviews.llvm.org/D63233 changed the
function’s caller to fall through if it returned false, which would then cause
a use-after-free detectable by ASAN.
This change makes OptimizeExtractBits return true if it removes a shift
instruction with no users, terminating processing of the instruction.
Patch by: @brentdax (Brent Royal-Gordon)
Differential Revision: https://reviews.llvm.org/D66330
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369355
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2019 09:35:16 +0000 (09:35 +0000)]
Merging r369026:
------------------------------------------------------------------------
r369026 | jmorse | 2019-08-15 19:49:46 +0200 (Thu, 15 Aug 2019) | 17 lines
[DebugInfo] Avoid crash from dropped fragments in LiveDebugValues
This patch avoids a crash caused by DW_OP_LLVM_fragments being dropped
from DIExpressions by LiveDebugValues spill-restore code. The appearance
of a previously unseen fragment configuration confuses LDV, as documented
in PR42773, and reproduced by the test function this patch adds (Crashes
on a x86_64 debug build).
To avoid this, on spill restore, we now use fragment information from the
spilt-location-expression.
In addition, when spilling, we now don't spill any DBG_VALUE with a complex
expression, as it can't be safely restored and will definitely lead to an
incorrect variable location. The discussion of this is in D65368.
Differential Revision: https://reviews.llvm.org/D66284
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369354
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2019 07:45:44 +0000 (07:45 +0000)]
Merging r369097:
------------------------------------------------------------------------
r369097 | lewis-revill | 2019-08-16 14:00:56 +0200 (Fri, 16 Aug 2019) | 8 lines
[RISCV] Allow parsing of bare symbols with offsets
This patch allows symbols followed by an expression for an offset to be
parsed as bare symbols.
Differential Revision: https://reviews.llvm.org/D57332
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369338
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 20 Aug 2019 07:26:05 +0000 (07:26 +0000)]
Merging r369011:
------------------------------------------------------------------------
r369011 | bogner | 2019-08-15 17:36:13 +0200 (Thu, 15 Aug 2019) | 4 lines
[cmake] install_symlink should obey DESTDIR unconditionally
Setting DESTDIR was erroneously buried under a condition here - if
it's set it should always be used.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369335
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 16 Aug 2019 07:44:53 +0000 (07:44 +0000)]
Merging r367019:
------------------------------------------------------------------------
r367019 | chill | 2019-07-25 15:56:04 +0200 (Thu, 25 Jul 2019) | 10 lines
[AArch64][SVE] Allow explicit size specifier for predicate operand
... for the vector forms of `{SQ,UQ,}{INC,DEC}P` instructions. Also continue
supporting the exsting behaviour of not requiring an explicit size
specifier. The preferred disasembly is *with* the specifier.
This is implemented by redefining intruction forms to require vector predicates
with explicit size and adding aliases, which allow a predicate with no size.
Differential Revision: https://reviews.llvm.org/D65145
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369086
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 16 Aug 2019 07:18:49 +0000 (07:18 +0000)]
Merging r368873:
------------------------------------------------------------------------
r368873 | void | 2019-08-14 18:44:07 +0200 (Wed, 14 Aug 2019) | 15 lines
Ignore indirect branches from callbr.
Summary:
We can't speculate around indirect branches: indirectbr and invoke. The
callbr instruction needs to be included here.
Reviewers: nickdesaulniers, manojgupta, chandlerc
Reviewed By: chandlerc
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66200
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@369085
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 14 Aug 2019 13:14:17 +0000 (13:14 +0000)]
Merging r367084:
------------------------------------------------------------------------
r367084 | kongyi | 2019-07-26 07:17:14 +0200 (Fri, 26 Jul 2019) | 6 lines
Fix macOS build after r358716
COPYFILE_CLONE is only defined on newer macOS versions, using it without
check breaks build on systems running legacy OS and toolchain.
Differential Revision: https://reviews.llvm.org/D65317
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@368848
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 14 Aug 2019 12:59:17 +0000 (12:59 +0000)]
Merging r368300:
------------------------------------------------------------------------
r368300 | lenary | 2019-08-08 16:40:54 +0200 (Thu, 08 Aug 2019) | 18 lines
[RISCV] Minimal stack realignment support
Summary:
Currently the RISC-V backend does not realign the stack. This can be an issue even for the RV32I/RV64I ABIs (where the stack is 16-byte aligned), though is rare. It will be much more comment with RV32E (though the alignment requirements for common data types remain under-documented...).
This patch adds minimal support for stack realignment. It should cope with large realignments. It will error out if the stack needs realignment and variable sized objects are present.
It feels like a lot of the code like getFrameIndexReference and determineFrameLayout could be refactored somehow, as right now it feels fiddly and brittle. We also seem to allocate a lot more memory than GCC does for equivalent C code.
Reviewers: asb
Reviewed By: asb
Subscribers: wwei, jrtc27, s.egerton, MaskRay, Jim, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62007
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@368846
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 13 Aug 2019 12:08:26 +0000 (12:08 +0000)]
Merging r368478:
------------------------------------------------------------------------
r368478 | void | 2019-08-09 22:18:30 +0200 (Fri, 09 Aug 2019) | 16 lines
[CodeGen] Require a name for a block addr target
Summary:
A block address may be used in inline assembly. In which case it
requires a name so that the asm parser has something to parse. Creating
a name for every block address is a large hammer, but is necessary
because at the point when a temp symbol is created we don't necessarily
know if it's used in inline asm. This ensures that it exists regardless.
Reviewers: nickdesaulniers, craig.topper
Subscribers: nathanchance, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65352
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@368678
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 13 Aug 2019 12:07:33 +0000 (12:07 +0000)]
Merging r368477:
------------------------------------------------------------------------
r368477 | void | 2019-08-09 22:16:31 +0200 (Fri, 09 Aug 2019) | 22 lines
[MC] Don't recreate a label if it's already used
Summary:
This patch keeps track of MCSymbols created for blocks that were
referenced in inline asm. It prevents creating a new symbol which
doesn't refer to the block.
Inline asm may have a reference to a label. The asm parser however
doesn't recognize it as a label and tries to create a new symbol. The
result being that instead of the original symbol (e.g. ".Ltmp0") the
parser replaces it in the inline asm with the new one (e.g. ".Ltmp00")
without updating it in the symbol table. So the machine basic block
retains the "old" symbol (".Ltmp0"), but the inline asm uses the new one
(".Ltmp00").
Reviewers: nickdesaulniers, craig.topper
Subscribers: nathanchance, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65304
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@368676
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 13 Aug 2019 12:00:39 +0000 (12:00 +0000)]
Merging r368572:
------------------------------------------------------------------------
r368572 | lenary | 2019-08-12 15:51:00 +0200 (Mon, 12 Aug 2019) | 18 lines
[RISCV] Fix ICE in isDesirableToCommuteWithShift
Summary:
Ana Pazos reported a bug where we were not checking that an APInt would
fit into 64-bits before calling `getSExtValue()`. This caused asserts when
compiling large constants, such as i128s, as happens when compiling compiler-rt.
This patch adds a testcase and makes the callback less error-prone.
Reviewers: apazos, asb, luismarques
Reviewed By: luismarques
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66081
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@368674
91177308-0d34-0410-b5e6-
96231b3b80d8