Skip to content

Commit e29fb18

Browse files
author
Jenkins
committed
SWDEV-179954 - OpenCL/LC - Merge branch amd-master into amd-common
Change-Id: Id6a4d78722aaa0ae35c754c22e5a5ae2854610bf
2 parents f4b2516 + 24a2914 commit e29fb18

File tree

239 files changed

+10713
-4877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+10713
-4877
lines changed

README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ documentation setup.
1515

1616
If you are writing a package for LLVM, see docs/Packaging.rst for our
1717
suggestions.
18+

docs/FAQ.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@ Frequently Asked Questions (FAQ)
99
License
1010
=======
1111

12-
Does the University of Illinois Open Source License really qualify as an "open source" license?
13-
-----------------------------------------------------------------------------------------------
14-
Yes, the license is `certified
15-
<http://www.opensource.org/licenses/UoI-NCSA.php>`_ by the Open Source
16-
Initiative (OSI).
17-
18-
1912
Can I modify LLVM source code and redistribute the modified source?
2013
-------------------------------------------------------------------
2114
Yes. The modified source distribution must retain the copyright notice and
22-
follow the three bulleted conditions listed in the `LLVM license
15+
follow the conditions listed in the `LLVM license
2316
<http://llvm.org/svn/llvm-project/llvm/trunk/LICENSE.TXT>`_.
2417

2518

@@ -41,10 +34,12 @@ the STL.
4134
How portable is the LLVM source code?
4235
-------------------------------------
4336
The LLVM source code should be portable to most modern Unix-like operating
44-
systems. Most of the code is written in standard C++ with operating system
37+
systems. LLVM has also excellent support on Windows systems.
38+
Most of the code is written in standard C++ with operating system
4539
services abstracted to a support library. The tools required to build and
4640
test LLVM have been ported to a plethora of platforms.
4741

42+
4843
What API do I use to store a value to one of the virtual registers in LLVM IR's SSA representation?
4944
---------------------------------------------------------------------------------------------------
5045

include/llvm/CodeGen/MIRYamlMapping.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ struct ScalarEnumerationTraits<TargetStackID::Value> {
314314
static void enumeration(yaml::IO &IO, TargetStackID::Value &ID) {
315315
IO.enumCase(ID, "default", TargetStackID::Default);
316316
IO.enumCase(ID, "sgpr-spill", TargetStackID::SGPRSpill);
317+
IO.enumCase(ID, "sve-vec", TargetStackID::SVEVector);
317318
IO.enumCase(ID, "noalloc", TargetStackID::NoAlloc);
318319
}
319320
};

include/llvm/CodeGen/TargetFrameLowering.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace TargetStackID {
2828
enum Value {
2929
Default = 0,
3030
SGPRSpill = 1,
31+
SVEVector = 2,
3132
NoAlloc = 255
3233
};
3334
}

include/llvm/IR/IRBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ class IRBuilder : public IRBuilderBase, public Inserter {
16491649
StoreInst *CreateAlignedStore(Value *Val, Value *Ptr, unsigned Align,
16501650
bool isVolatile = false) {
16511651
StoreInst *SI = CreateStore(Val, Ptr, isVolatile);
1652-
SI->setAlignment(Align);
1652+
SI->setAlignment(MaybeAlign(Align));
16531653
return SI;
16541654
}
16551655

include/llvm/IR/Instructions.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,6 @@ class StoreInst : public Instruction {
374374
return 0;
375375
}
376376

377-
// FIXME: Remove once migration to Align is over.
378-
void setAlignment(unsigned Align);
379377
void setAlignment(MaybeAlign Align);
380378

381379
/// Returns the ordering constraint of this store instruction.

include/llvm/IR/IntrinsicsAMDGPU.td

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,10 @@ class AMDGPURawBufferLoad<LLVMType data_ty = llvm_any_ty> : Intrinsic <
899899
[llvm_v4i32_ty, // rsrc(SGPR)
900900
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
901901
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
902-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
902+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
903+
// bit 1 = slc,
904+
// bit 2 = dlc on gfx10+),
905+
// swizzled buffer (bit 3 = swz))
903906
[IntrReadMem, ImmArg<3>], "", [SDNPMemOperand]>,
904907
AMDGPURsrcIntrinsic<0>;
905908
def int_amdgcn_raw_buffer_load_format : AMDGPURawBufferLoad<llvm_anyfloat_ty>;
@@ -911,7 +914,10 @@ class AMDGPUStructBufferLoad<LLVMType data_ty = llvm_any_ty> : Intrinsic <
911914
llvm_i32_ty, // vindex(VGPR)
912915
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
913916
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
914-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
917+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
918+
// bit 1 = slc,
919+
// bit 2 = dlc on gfx10+),
920+
// swizzled buffer (bit 3 = swz))
915921
[IntrReadMem, ImmArg<4>], "", [SDNPMemOperand]>,
916922
AMDGPURsrcIntrinsic<0>;
917923
def int_amdgcn_struct_buffer_load_format : AMDGPUStructBufferLoad<llvm_anyfloat_ty>;
@@ -923,7 +929,10 @@ class AMDGPURawBufferStore<LLVMType data_ty = llvm_any_ty> : Intrinsic <
923929
llvm_v4i32_ty, // rsrc(SGPR)
924930
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
925931
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
926-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
932+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
933+
// bit 1 = slc,
934+
// bit 2 = dlc on gfx10+),
935+
// swizzled buffer (bit 3 = swz))
927936
[IntrWriteMem, ImmArg<4>], "", [SDNPMemOperand]>,
928937
AMDGPURsrcIntrinsic<1>;
929938
def int_amdgcn_raw_buffer_store_format : AMDGPURawBufferStore<llvm_anyfloat_ty>;
@@ -936,7 +945,10 @@ class AMDGPUStructBufferStore<LLVMType data_ty = llvm_any_ty> : Intrinsic <
936945
llvm_i32_ty, // vindex(VGPR)
937946
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
938947
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
939-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
948+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
949+
// bit 1 = slc,
950+
// bit 2 = dlc on gfx10+),
951+
// swizzled buffer (bit 3 = swz))
940952
[IntrWriteMem, ImmArg<5>], "", [SDNPMemOperand]>,
941953
AMDGPURsrcIntrinsic<1>;
942954
def int_amdgcn_struct_buffer_store_format : AMDGPUStructBufferStore<llvm_anyfloat_ty>;
@@ -1050,7 +1062,10 @@ def int_amdgcn_raw_tbuffer_load : Intrinsic <
10501062
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
10511063
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
10521064
llvm_i32_ty, // format(imm; bits 3..0 = dfmt, bits 6..4 = nfmt)
1053-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
1065+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
1066+
// bit 1 = slc,
1067+
// bit 2 = dlc on gfx10+),
1068+
// swizzled buffer (bit 3 = swz))
10541069
[IntrReadMem, ImmArg<3>, ImmArg<4>], "", [SDNPMemOperand]>,
10551070
AMDGPURsrcIntrinsic<0>;
10561071

@@ -1061,7 +1076,10 @@ def int_amdgcn_raw_tbuffer_store : Intrinsic <
10611076
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
10621077
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
10631078
llvm_i32_ty, // format(imm; bits 3..0 = dfmt, bits 6..4 = nfmt)
1064-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
1079+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
1080+
// bit 1 = slc,
1081+
// bit 2 = dlc on gfx10+),
1082+
// swizzled buffer (bit 3 = swz))
10651083
[IntrWriteMem, ImmArg<4>, ImmArg<5>], "", [SDNPMemOperand]>,
10661084
AMDGPURsrcIntrinsic<1>;
10671085

@@ -1072,7 +1090,10 @@ def int_amdgcn_struct_tbuffer_load : Intrinsic <
10721090
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
10731091
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
10741092
llvm_i32_ty, // format(imm; bits 3..0 = dfmt, bits 6..4 = nfmt)
1075-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
1093+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
1094+
// bit 1 = slc,
1095+
// bit 2 = dlc on gfx10+),
1096+
// swizzled buffer (bit 3 = swz))
10761097
[IntrReadMem, ImmArg<4>, ImmArg<5>], "", [SDNPMemOperand]>,
10771098
AMDGPURsrcIntrinsic<0>;
10781099

@@ -1084,7 +1105,10 @@ def int_amdgcn_struct_tbuffer_store : Intrinsic <
10841105
llvm_i32_ty, // offset(VGPR/imm, included in bounds checking and swizzling)
10851106
llvm_i32_ty, // soffset(SGPR/imm, excluded from bounds checking and swizzling)
10861107
llvm_i32_ty, // format(imm; bits 3..0 = dfmt, bits 6..4 = nfmt)
1087-
llvm_i32_ty], // cachepolicy(imm; bit 0 = glc, bit 1 = slc, bit 2 = dlc on gfx10+)
1108+
llvm_i32_ty], // auxiliary data (imm, cachepolicy (bit 0 = glc,
1109+
// bit 1 = slc,
1110+
// bit 2 = dlc on gfx10+),
1111+
// swizzled buffer (bit 3 = swz))
10881112
[IntrWriteMem, ImmArg<5>, ImmArg<6>], "", [SDNPMemOperand]>,
10891113
AMDGPURsrcIntrinsic<1>;
10901114

include/llvm/ObjectYAML/ELFYAML.h

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ struct Section {
137137
StackSizes,
138138
SymtabShndxSection,
139139
Symver,
140-
MipsABIFlags
140+
MipsABIFlags,
141+
Addrsig
141142
};
142143
SectionKind Kind;
143144
StringRef Name;
@@ -256,6 +257,26 @@ struct VerneedSection : Section {
256257
}
257258
};
258259

260+
struct AddrsigSymbol {
261+
AddrsigSymbol(StringRef N) : Name(N), Index(None) {}
262+
AddrsigSymbol(llvm::yaml::Hex32 Ndx) : Name(None), Index(Ndx) {}
263+
AddrsigSymbol() : Name(None), Index(None) {}
264+
265+
Optional<StringRef> Name;
266+
Optional<llvm::yaml::Hex32> Index;
267+
};
268+
269+
struct AddrsigSection : Section {
270+
Optional<yaml::BinaryRef> Content;
271+
Optional<llvm::yaml::Hex64> Size;
272+
Optional<std::vector<AddrsigSymbol>> Symbols;
273+
274+
AddrsigSection() : Section(SectionKind::Addrsig) {}
275+
static bool classof(const Section *S) {
276+
return S->Kind == SectionKind::Addrsig;
277+
}
278+
};
279+
259280
struct SymverSection : Section {
260281
std::vector<uint16_t> Entries;
261282

@@ -362,6 +383,7 @@ struct Object {
362383
} // end namespace ELFYAML
363384
} // end namespace llvm
364385

386+
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::AddrsigSymbol)
365387
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::StackSizeEntry)
366388
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::DynamicEntry)
367389
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::ProgramHeader)
@@ -518,6 +540,10 @@ template <> struct MappingTraits<ELFYAML::VernauxEntry> {
518540
static void mapping(IO &IO, ELFYAML::VernauxEntry &E);
519541
};
520542

543+
template <> struct MappingTraits<ELFYAML::AddrsigSymbol> {
544+
static void mapping(IO &IO, ELFYAML::AddrsigSymbol &Sym);
545+
};
546+
521547
template <> struct MappingTraits<ELFYAML::Relocation> {
522548
static void mapping(IO &IO, ELFYAML::Relocation &Rel);
523549
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//===- Combine.td - Combine rule definitions ---------------*- tablegen -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// Declare GlobalISel combine rules and provide mechanisms to opt-out.
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
// Declares a combiner helper class
14+
class GICombinerHelper<string classname> {
15+
// The class name to use in the generated output.
16+
string Classname = classname;
17+
}

include/llvm/Transforms/Utils/SimplifyLibCalls.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ class LibCallSimplifier {
181181
Value *optimizeMemSet(CallInst *CI, IRBuilder<> &B);
182182
Value *optimizeRealloc(CallInst *CI, IRBuilder<> &B);
183183
Value *optimizeWcslen(CallInst *CI, IRBuilder<> &B);
184+
Value *optimizeBCopy(CallInst *CI, IRBuilder<> &B);
184185
// Wrapper for all String/Memory Library Call Optimizations
185186
Value *optimizeStringMemoryLibCall(CallInst *CI, IRBuilder<> &B);
186187

0 commit comments

Comments
 (0)