<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/llvm/test/Verifier, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2020-01-24T18:38:40+00:00</updated>
<entry>
<title>Add function attribute "patchable-function-prefix" to support -fpatchable-function-entry=N,M where M&gt;0</title>
<updated>2020-01-24T18:38:40+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-20T22:57:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=bf04730dee1b74c8e7661c671484eff93c1f5a77'/>
<id>urn:sha1:bf04730dee1b74c8e7661c671484eff93c1f5a77</id>
<content type='text'>
Similar to the function attribute `prefix` (prefix data),
"patchable-function-prefix" inserts data (M NOPs) before the function
entry label.

-fpatchable-function-entry=2,1 (1 NOP before entry, 1 NOP after entry)
will look like:

```
  .type	foo,@function
.Ltmp0:               # @foo
  nop
foo:
.Lfunc_begin0:
  # optional `bti c` (AArch64 Branch Target Identification) or
  # `endbr64` (Intel Indirect Branch Tracking)
  nop

  .section  __patchable_function_entries,"awo",@progbits,get,unique,0
  .p2align  3
  .quad .Ltmp0
```

-fpatchable-function-entry=N,0 + -mbranch-protection=bti/-fcf-protection=branch has two reasonable
placements (https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01185.html):

```
(a)         (b)

func:       func:
.Ltmp0:     bti c
  bti c     .Ltmp0:
  nop       nop
```

(a) needs no additional code. If the consensus is to go for (b), we will
need more code in AArch64BranchTargets.cpp / X86IndirectBranchTracking.cpp .

Differential Revision: https://reviews.llvm.org/D73070

(cherry picked from commit 22467e259507f5ead2a87d989251b4c951a587e4)
</content>
</entry>
<entry>
<title>[AArch64] Add function attribute "patchable-function-entry" to add NOPs at function entry</title>
<updated>2020-01-10T17:55:51+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-03T08:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=4d1e23e3b3cd7c72a8b24dc5acb7e13c58a8de37'/>
<id>urn:sha1:4d1e23e3b3cd7c72a8b24dc5acb7e13c58a8de37</id>
<content type='text'>
The Linux kernel uses -fpatchable-function-entry to implement DYNAMIC_FTRACE_WITH_REGS
for arm64 and parisc. GCC 8 implemented
-fpatchable-function-entry, which can be seen as a generalized form of
-mnop-mcount. The N,M form (function entry points before the Mth NOP) is
currently only used by parisc.

This patch adds N,0 support to AArch64 codegen. N is represented as the
function attribute "patchable-function-entry". We will use a different
function attribute for M, if we decide to implement it.

The patch reuses the existing patchable-function pass, and
TargetOpcode::PATCHABLE_FUNCTION_ENTER which is currently used by XRay.

When the integrated assembler is used, __patchable_function_entries will
be created for each text section with the SHF_LINK_ORDER flag to prevent
--gc-sections (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93197) and
COMDAT (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93195) issues.

Retrospectively, __patchable_function_entries should use a PC-relative
relocation type to avoid the SHF_WRITE flag and dynamic relocations.

"patchable-function-entry"'s interaction with Branch Target
Identification is still unclear (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92424 for GCC discussions).

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D72215
</content>
</entry>
<entry>
<title>Verifier: Check frame-pointer attribute values</title>
<updated>2019-12-11T14:23:49+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2019-12-10T11:12:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=49d731b5e0ec643ed47dc49c4cffcf974e5af5ad'/>
<id>urn:sha1:49d731b5e0ec643ed47dc49c4cffcf974e5af5ad</id>
<content type='text'>
There are a few places that check specific string attributes have
particular values, and assert if they are something else. The verifier
should catch these kinds of cases.
</content>
</entry>
<entry>
<title>[DebugInfo] Add a DW_OP_LLVM_entry_value operation</title>
<updated>2019-10-15T11:31:21+00:00</updated>
<author>
<name>David Stenberg</name>
<email>david.stenberg@ericsson.com</email>
</author>
<published>2019-10-15T11:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1ae2d9a2bdce054560104f428e92eaef736e5c7f'/>
<id>urn:sha1:1ae2d9a2bdce054560104f428e92eaef736e5c7f</id>
<content type='text'>
Summary:
Internally in LLVM's metadata we use DW_OP_entry_value operations with
the same semantics as DWARF; that is, its operand specifies the number
of bytes that the entry value covers.

At the time of emitting entry values we don't know the emitted size of
the DWARF expression that the entry value will cover. Currently the size
is hardcoded to 1 in DIExpression, and other values causes the verifier
to fail. As the size is 1, that effectively means that we can only have
valid entry values for registers that can be encoded in one byte, which
are the registers with DWARF numbers 0 to 31 (as they can be encoded as
single-byte DW_OP_reg0..DW_OP_reg31 rather than a multi-byte
DW_OP_regx). It is a bit confusing, but it seems like llvm-dwarfdump
will print an operation "correctly", even if the byte size is less than
that, which may make it seem that we emit correct DWARF for registers
with DWARF numbers &gt; 31. If you instead use readelf for such cases, it
will interpret the number of specified bytes as a DWARF expression. This
seems like a limitation in llvm-dwarfdump.

As suggested in D66746, a way forward would be to add an internal
variant of DW_OP_entry_value, DW_OP_LLVM_entry_value, whose operand
instead specifies the number of operations that the entry value covers,
and we then translate that into the byte size at the time of emission.

In this patch that internal operation is added. This patch keeps the
limitation that a entry value can only be applied to simple register
locations, but it will fix the issue with the size operand being
incorrect for DWARF numbers &gt; 31.

Reviewers: aprantl, vsk, djtodoro, NikolaPrica

Reviewed By: aprantl

Subscribers: jyknight, fedor.sergeev, hiraditya, llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D67492

llvm-svn: 374881
</content>
</entry>
<entry>
<title>[FPEnv] Strict FP tests should use the requisite function attributes.</title>
<updated>2019-10-04T17:03:46+00:00</updated>
<author>
<name>Kevin P. Neal</name>
<email>kevin.neal@sas.com</email>
</author>
<published>2019-10-04T17:03:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=68b805212134ae16769e38af7da4861bb8b809dd'/>
<id>urn:sha1:68b805212134ae16769e38af7da4861bb8b809dd</id>
<content type='text'>
A set of function attributes is required in any function that uses constrained
floating point intrinsics. None of our tests use these attributes.

This patch fixes this.

These tests have been tested against the IR verifier changes in D68233.

Reviewed by:	andrew.w.kaylor, cameron.mcinally, uweigand
Approved by:	andrew.w.kaylor
Differential Revision:	https://reviews.llvm.org/D67925

llvm-svn: 373761
</content>
</entry>
<entry>
<title>[Verifier] add invariant check for callbr</title>
<updated>2019-09-25T22:28:27+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2019-09-25T22:28:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=93d87260f1f7b5ec6775fe88891e47a57e6392d6'/>
<id>urn:sha1:93d87260f1f7b5ec6775fe88891e47a57e6392d6</id>
<content type='text'>
Summary:
The list of indirect labels should ALWAYS have their blockaddresses as
argument operands to the callbr (but not necessarily the other way
around).  Add an invariant that checks this.

The verifier catches a bad test case that was added recently in r368478.
I think that was a simple mistake, and the test was made less strict in
regards to the precise addresses (as those weren't specifically the
point of the test).

This invariant will be used to find a reported bug.

Link: https://www.spinics.net/lists/arm-kernel/msg753473.html
Link: https://github.com/ClangBuiltLinux/linux/issues/649

Reviewers: craig.topper, void, chandlerc

Reviewed By: void

Subscribers: ychen, lebedev.ri, javed.absar, kristof.beyls, hiraditya, llvm-commits, srhines

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67196

llvm-svn: 372923
</content>
</entry>
<entry>
<title>[Mips] Remove immarg test for intrinsics that no longer have an immarg after r372409.</title>
<updated>2019-09-20T18:52:49+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@intel.com</email>
</author>
<published>2019-09-20T18:52:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=c139d1e28109450085a11e3b2ec7d53c6a00c37b'/>
<id>urn:sha1:c139d1e28109450085a11e3b2ec7d53c6a00c37b</id>
<content type='text'>
llvm-svn: 372420
</content>
</entry>
<entry>
<title>Remove the obsolete BlockByRefStruct flag from LLVM IR</title>
<updated>2019-09-18T22:38:56+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2019-09-18T22:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=0779dffbd4a927d7bf9523482481248c51796907'/>
<id>urn:sha1:0779dffbd4a927d7bf9523482481248c51796907</id>
<content type='text'>
DIFlagBlockByRefStruct is an unused DIFlag that originally was used by
clang to express (Objective-)C block captures in debug info. For the
last year Clang has been emitting complex DIExpressions to describe
block captures instead, which makes all the code supporting this flag
redundant.

This patch removes the flag and all supporting "dead" code, so we can
reuse the bit for something else in the future.

Since this only affects debug info generated by Clang with the block
extension this mostly affects Apple platforms and I don't have any
bitcode compatibility concerns for removing this. The Verifier will
reject debug info that uses the bit and thus degrade gracefully when
LTO'ing older bitcode with a newer compiler.

rdar://problem/44304813

Differential Revision: https://reviews.llvm.org/D67453

llvm-svn: 372272
</content>
</entry>
<entry>
<title>[Intrinsic] Add the llvm.umul.fix.sat intrinsic</title>
<updated>2019-09-07T12:16:14+00:00</updated>
<author>
<name>Bjorn Pettersson</name>
<email>bjorn.a.pettersson@ericsson.com</email>
</author>
<published>2019-09-07T12:16:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=5e331e4ce85ad37dca45739846c2a801f06ab573'/>
<id>urn:sha1:5e331e4ce85ad37dca45739846c2a801f06ab573</id>
<content type='text'>
Summary:
Add an intrinsic that takes 2 unsigned integers with
the scale of them provided as the third argument and
performs fixed point multiplication on them. The
result is saturated and clamped between the largest and
smallest representable values of the first 2 operands.

This is a part of implementing fixed point arithmetic
in clang where some of the more complex operations
will be implemented as intrinsics.

Patch by: leonardchan, bjope

Reviewers: RKSimon, craig.topper, bevinh, leonardchan, lebedev.ri, spatel

Reviewed By: leonardchan

Subscribers: ychen, wuzish, nemanjai, MaskRay, jsji, jdoerfert, Ka-Ka, hiraditya, rjmccall, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D57836

llvm-svn: 371308
</content>
</entry>
<entry>
<title>[IntrinsicEmitter] Support scalable vectors in intrinsics</title>
<updated>2019-08-27T12:57:09+00:00</updated>
<author>
<name>Cullen Rhodes</name>
<email>cullen.rhodes@arm.com</email>
</author>
<published>2019-08-27T12:57:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=2ba5d64a80d0debaec396dbd512e59de9cc82e48'/>
<id>urn:sha1:2ba5d64a80d0debaec396dbd512e59de9cc82e48</id>
<content type='text'>
Summary:
This patch adds support for scalable vectors in intrinsics, enabling
intrinsics such as the following to be defined:

    declare &lt;vscale x 4 x i32&gt; @llvm.something.nxv4i32(&lt;vscale x 4 x i32&gt;)

Support for this is implemented by defining a new type descriptor for
scalable vectors and adding mangling support for scalable vector types
in the name mangling scheme used by 'any' types in intrinsic signatures.

Tests have been added for IRBuilder to test scalable vectors work as
expected when using intrinsics through this interface. This required
implementing an intrinsic that is explicitly defined with scalable
vectors, e.g.  LLVMType&lt;nxv4i32&gt;, an SVE floating-point convert
intrinsic was used for this.  The behaviour of the overloaded type
LLVMScalarOrSameVectorWidth with scalable vectors is tested using the
existing masked load intrinsic. Also added an .ll test to test the
Verifier catches a bad intrinsic argument when passing a fixed-width
predicate (mask) to the masked.load intrinsic where a scalable is
expected.

Patch by Paul Walker

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D65930

llvm-svn: 370053
</content>
</entry>
</feed>
