Skip to content

Commit db2b27d

Browse files
committed
SWDEV-179954 - OpenCL/LC - Merge branch amd-master into amd-common
Change-Id: I664689dd8f05e22e60fa1a57a82a6c6a6b2c011a
2 parents eeaa354 + bd58ea0 commit db2b27d

File tree

309 files changed

+11270
-1254
lines changed

Some content is hidden

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

309 files changed

+11270
-1254
lines changed

docs/CommandGuide/FileCheck.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -576,14 +576,14 @@ the need for consecutive registers to be used.
576576
The syntax to check a numeric expression constraint is
577577
``[[#<NUMVAR><op><offset>]]`` where:
578578

579-
*``<NUMVAR>`` is the name of a numeric variable defined on the command line.
579+
* ``<NUMVAR>`` is the name of a numeric variable defined on the command line.
580580

581-
*``<op>`` is an optional numeric operation to perform on the value of
582-
``<NUMVAR>``. Currently supported numeric operations are ``+`` and ``-``.
581+
* ``<op>`` is an optional numeric operation to perform on the value of
582+
``<NUMVAR>``. Currently supported numeric operations are ``+`` and ``-``.
583583

584-
*``<offset>`` is the immediate value that constitutes the second operand of
585-
the numeric operation <op>. It must be present if ``<op>`` is present,
586-
absent otherwise.
584+
* ``<offset>`` is the immediate value that constitutes the second operand of
585+
the numeric operation <op>. It must be present if ``<op>`` is present,
586+
absent otherwise.
587587

588588
For example:
589589

docs/LangRef.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6482,12 +6482,12 @@ The '``llvm.global_ctors``' Global Variable
64826482
@llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()* @ctor, i8* @data }]
64836483

64846484
The ``@llvm.global_ctors`` array contains a list of constructor
6485-
functions, priorities, and an optional associated global or function.
6485+
functions, priorities, and an associated global or function.
64866486
The functions referenced by this array will be called in ascending order
64876487
of priority (i.e. lowest first) when the module is loaded. The order of
64886488
functions with the same priority is not defined.
64896489

6490-
If the third field is present, non-null, and points to a global variable
6490+
If the third field is non-null, and points to a global variable
64916491
or function, the initializer function will only run if the associated
64926492
data from the current module is not discarded.
64936493

@@ -6502,12 +6502,12 @@ The '``llvm.global_dtors``' Global Variable
65026502
@llvm.global_dtors = appending global [1 x %0] [%0 { i32 65535, void ()* @dtor, i8* @data }]
65036503

65046504
The ``@llvm.global_dtors`` array contains a list of destructor
6505-
functions, priorities, and an optional associated global or function.
6505+
functions, priorities, and an associated global or function.
65066506
The functions referenced by this array will be called in descending
65076507
order of priority (i.e. highest first) when the module is unloaded. The
65086508
order of functions with the same priority is not defined.
65096509

6510-
If the third field is present, non-null, and points to a global variable
6510+
If the third field is non-null, and points to a global variable
65116511
or function, the destructor function will only run if the associated
65126512
data from the current module is not discarded.
65136513

docs/MeetupGuidelines.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
=====================================
2+
How to start LLVM Social in your town
3+
=====================================
4+
5+
Here are several ideas you can take into account when designing your specific
6+
LLVM Social.
7+
8+
Before you start, it is essential to make sure that the meetup is as welcoming
9+
as any other event related to LLVM. Therefore you shall follow LLVM's
10+
`Code of Conduct <https://llvm.org/docs/CodeOfConduct.html>`_.
11+
12+
Other than that - your mileage may vary. Please adapt your social to what works
13+
best for your specific situation.
14+
15+
General suggestions
16+
-------------------
17+
18+
* We highly recommend that you join the official LLVM meetup organization. In
19+
addition to covering the cost of the meetup, all LLVM meetups are advertised
20+
together and easily found by potential attendees. Please contact
21+
[email protected] for more details.
22+
* Beware of cultural differences: what works well in one region may not work in
23+
other part of the world.
24+
* Do not be alone to organize the meetup. Try to work with a couple other
25+
organizers. This is more motivating as an organizer, and this makes the
26+
meetup more resilient over time.
27+
* Each event can have a different form such as a social event, or
28+
a hackathon/workshop, or a 'mini-conference' with one or more talks. You do
29+
not have to stick to one format forever.
30+
* Whatever format you choose, `LLVM Weekly <http://llvmweekly.org/>`_ is an
31+
excellent topic starter: go through the 3-4 recent LLVM Weekly posts and
32+
prepare a list of the most interesting/notable news and discuss them with the
33+
group.
34+
35+
Advertisement
36+
-------------
37+
38+
* Try to advertise via similar meetups/user groups
39+
* Advertise your meetup on the mailing lists (llvm-dev, cfe-dev, lldb-dev,
40+
...). Feel free to post to all of them, or at least to llvm-dev.
41+
But as these mailing lists have high traffic and some LLVM developers are not
42+
very active on them, you may reach more interested people using the mailing
43+
feature from meetup.com.
44+
* Advertise the meetup on Twitter and mention
45+
`@llvmweekly <http://twitter.com/llvmweekly>`_ and
46+
`@llvmorg <http://twitter.com/llvmorg>`_.
47+
* Announce the next meetup in advance, and remind in one week or so.
48+
49+
Tech talks
50+
----------
51+
52+
* It’s a great idea to have several talks scheduled for several upcoming
53+
meetups to get the ball rolling.
54+
* Keep looking for speakers far in advance, ideally you should have 2-3
55+
speakers ready in the pipeline.
56+
* Try to record the talks if possible. It adds visibility to the meetup and
57+
just a good idea in general. Any modern smartphone or tablet should work, but
58+
you can also get a camera. Though, it is recommended to get an external
59+
microphone for better sound.
60+
61+
Where to host the meetup?
62+
-------------------------
63+
64+
* Look around for bars/café with projectors.
65+
* Talk to tech companies in the area.
66+
* Some co-working spaces provide their facilities for non-profit (i.e., you do
67+
not charge attendees any fees) meetups.
68+
* Ask nearby universities or university departments.
69+
70+
How to pick the date?
71+
---------------------
72+
73+
* Make sure you do not clash with the similar meetups in the city (e.g.,
74+
C++ user groups).
75+
* Prefer not to have a meetup the same week when the other similar meetups
76+
happen (e.g., it’s not a good idea to have LLVM meetup on Thursday after
77+
C++ meetup on Wednesday).
78+
* Meetups on weekends may attract people who live far away from the city,
79+
but the people who live in the city may not attend.
80+
* Make a poll, but beware that not every responder will join (we had ~20 votes
81+
on the poll, while only ~8 people attended).
82+

docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ Changes to the LLVM IR
6262
parameter is required to be a simple constant. This annotation must
6363
be accurate to avoid possible miscompiles.
6464

65+
* The 2-field form of global variables ``@llvm.global_ctors`` and
66+
``@llvm.global_dtors`` has been deleted. The third field of their element
67+
type is now mandatory. Specify `i8* null` to migrate from the obsoleted
68+
2-field form.
6569

6670
Changes to the ARM Backend
6771
--------------------------

docs/index.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,21 @@ This channel has several bots.
565565
* clang-bot - A `geordi <http://www.eelis.net/geordi/>`_ instance running
566566
near-trunk clang instead of gcc.
567567

568+
Meetups and social events
569+
-------------------------
570+
571+
.. toctree::
572+
:hidden:
573+
574+
MeetupGuidelines
575+
576+
Besides developer `meetings and conferences <https://llvm.org/devmtg/>`_,
577+
there are several user groups called
578+
`LLVM Socials <https://www.meetup.com/pro/llvm/>`_. We greatly encourage you to
579+
join one in your city. Or start a new one if there is none:
580+
581+
:doc:`MeetupGuidelines`
582+
568583
Community wide proposals
569584
------------------------
570585

include/llvm/ADT/Triple.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class Triple {
4949
armeb, // ARM (big endian): armeb
5050
aarch64, // AArch64 (little endian): aarch64
5151
aarch64_be, // AArch64 (big endian): aarch64_be
52+
aarch64_32, // AArch64 (little endian) ILP32: aarch64_32
5253
arc, // ARC: Synopsys ARC
5354
avr, // AVR: Atmel AVR microcontroller
5455
bpfel, // eBPF or extended BPF or 64-bit BPF (little endian)

include/llvm/Analysis/IVDescriptors.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,16 @@ class InductionDescriptor {
315315
/// not have the "fast-math" property. Such operation requires a relaxed FP
316316
/// mode.
317317
bool hasUnsafeAlgebra() {
318-
return InductionBinOp && !cast<FPMathOperator>(InductionBinOp)->isFast();
318+
return (IK == IK_FpInduction) && InductionBinOp &&
319+
!cast<FPMathOperator>(InductionBinOp)->isFast();
319320
}
320321

321322
/// Returns induction operator that does not have "fast-math" property
322323
/// and requires FP unsafe mode.
323324
Instruction *getUnsafeAlgebraInst() {
325+
if (IK != IK_FpInduction)
326+
return nullptr;
327+
324328
if (!InductionBinOp || cast<FPMathOperator>(InductionBinOp)->isFast())
325329
return nullptr;
326330
return InductionBinOp;

include/llvm/BinaryFormat/MachO.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,8 @@ inline void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align) {
14011401
enum : uint32_t {
14021402
// Capability bits used in the definition of cpu_type.
14031403
CPU_ARCH_MASK = 0xff000000, // Mask for architecture bits
1404-
CPU_ARCH_ABI64 = 0x01000000 // 64 bit ABI
1404+
CPU_ARCH_ABI64 = 0x01000000, // 64 bit ABI
1405+
CPU_ARCH_ABI64_32 = 0x02000000, // ILP32 ABI on 64-bit hardware
14051406
};
14061407

14071408
// Constants for the cputype field.
@@ -1414,6 +1415,7 @@ enum CPUType {
14141415
CPU_TYPE_MC98000 = 10, // Old Motorola PowerPC
14151416
CPU_TYPE_ARM = 12,
14161417
CPU_TYPE_ARM64 = CPU_TYPE_ARM | CPU_ARCH_ABI64,
1418+
CPU_TYPE_ARM64_32 = CPU_TYPE_ARM | CPU_ARCH_ABI64_32,
14171419
CPU_TYPE_SPARC = 14,
14181420
CPU_TYPE_POWERPC = 18,
14191421
CPU_TYPE_POWERPC64 = CPU_TYPE_POWERPC | CPU_ARCH_ABI64
@@ -1487,6 +1489,8 @@ enum CPUSubTypeARM64 {
14871489
CPU_SUBTYPE_ARM64E = 2,
14881490
};
14891491

1492+
enum CPUSubTypeARM64_32 { CPU_SUBTYPE_ARM64_32_V8 = 1 };
1493+
14901494
enum CPUSubTypeSPARC { CPU_SUBTYPE_SPARC_ALL = 0 };
14911495

14921496
enum CPUSubTypePowerPC {

include/llvm/IR/AutoUpgrade.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ namespace llvm {
4646
/// so that it can update all calls to the old function.
4747
void UpgradeCallsToIntrinsic(Function* F);
4848

49-
/// This checks for global variables which should be upgraded. It returns true
50-
/// if it requires upgrading.
51-
bool UpgradeGlobalVariable(GlobalVariable *GV);
49+
/// This checks for global variables which should be upgraded. It it requires
50+
/// upgrading, returns a pointer to the upgraded variable.
51+
GlobalVariable *UpgradeGlobalVariable(GlobalVariable *GV);
5252

5353
/// This checks for module flags which should be upgraded. It returns true if
5454
/// module is modified.

include/llvm/IR/IntrinsicsARM.td

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,18 @@ def int_arm_crc32w : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
332332
def int_arm_crc32cw : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
333333
[IntrNoMem]>;
334334

335+
//===----------------------------------------------------------------------===//
336+
// CMSE
337+
338+
def int_arm_cmse_tt : GCCBuiltin<"__builtin_arm_cmse_TT">,
339+
Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
340+
def int_arm_cmse_ttt : GCCBuiltin<"__builtin_arm_cmse_TTT">,
341+
Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
342+
def int_arm_cmse_tta : GCCBuiltin<"__builtin_arm_cmse_TTA">,
343+
Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
344+
def int_arm_cmse_ttat : GCCBuiltin<"__builtin_arm_cmse_TTAT">,
345+
Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
346+
335347
//===----------------------------------------------------------------------===//
336348
// HINT
337349

0 commit comments

Comments
 (0)