Page MenuHomePhabricator

dnsampaio (Diogo N. Sampaio)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 22 2017, 3:13 PM (121 w, 8 h)

Recent Activity

Today

dnsampaio updated the diff for D70183: Detect source location overflow due includes.
  • Fixed to return correct token
Fri, Jan 17, 11:11 AM · Restricted Project
dnsampaio updated the diff for D70183: Detect source location overflow due includes.

Created a early exit when a source location overflow is detected,
avoiding further processing or reaching other assert failures.
For that, it was required to create a 'Failure' kind for includes,
as well add return points along the callstack.

Fri, Jan 17, 10:51 AM · Restricted Project
dnsampaio created D72932: [ARM] Follow AACPS standard for volatile bit-fields access width.
Fri, Jan 17, 9:06 AM · Restricted Project

Tue, Jan 14

dnsampaio committed rGd94d079a6a5b: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP (authored by dnsampaio).
[ARM][Thumb2] Fix ADD/SUB invalid writes to SP
Tue, Jan 14, 3:50 AM
dnsampaio closed D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Tue, Jan 14, 3:50 AM · Restricted Project

Mon, Jan 13

dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
  • Fixed the destination register class when converting ADDrr to ADDri or ADDspImm. Added test
  • Fixed the number of arguments when converting t2SUBspImm to tSUBspi by adding a register at the end. Else, it would break llvm-mca that expects the number of operands to follow the table-gen, even when not used by the instruction.
Mon, Jan 13, 3:38 AM · Restricted Project
dnsampaio reopened D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Mon, Jan 13, 3:38 AM · Restricted Project

Fri, Jan 10

dnsampaio committed rGb1bb5ce96d34: Reverting, broke some bots. Need further investigation. (authored by dnsampaio).
Reverting, broke some bots. Need further investigation.
Fri, Jan 10, 5:47 AM
dnsampaio added a reverting change for rG8c12769f3046: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP: rGb1bb5ce96d34: Reverting, broke some bots. Need further investigation..
Fri, Jan 10, 5:47 AM
dnsampaio added a comment to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Looking into CodeGen/Thumb2/thumb2-mov.ll test failure.

Fri, Jan 10, 4:21 AM · Restricted Project
dnsampaio added a comment to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Looking into CodeGen/Thumb2/thumb2-mov.ll test failure.

Fri, Jan 10, 3:46 AM · Restricted Project
dnsampaio committed rG8c12769f3046: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP (authored by dnsampaio).
[ARM][Thumb2] Fix ADD/SUB invalid writes to SP
Fri, Jan 10, 3:34 AM
dnsampaio closed D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Fri, Jan 10, 3:34 AM · Restricted Project

Thu, Jan 9

dnsampaio added inline comments to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Thu, Jan 9, 1:49 AM · Restricted Project
dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Requested fixes

Thu, Jan 9, 1:49 AM · Restricted Project

Wed, Jan 8

dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Requested fixes:

Wed, Jan 8, 2:29 AM · Restricted Project

Tue, Jan 7

dnsampaio added inline comments to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Tue, Jan 7, 8:12 AM · Restricted Project

Mon, Jan 6

dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Removed dead/wrong tablegen t2InstSubst, defining a t2ADDri12 using t2_so_imm_neg instead of imm0_4095_neg

Mon, Jan 6, 5:49 AM · Restricted Project

Mon, Dec 30

dnsampaio abandoned D71557: [WIP] [ARM][Fix] Thumb2 add / sub aliases failing in multiple cases..
Mon, Dec 30, 10:23 AM · Restricted Project
dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
  • undo some clang-format-diff changes
Mon, Dec 30, 10:14 AM · Restricted Project
dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Added fixme to ARMLoadStoreOptimizer due negative offset

Added test-cases for all added (and fixed existing) thumb2 add/sub alias
Mon, Dec 30, 10:05 AM · Restricted Project
dnsampaio committed rGf33fd9648c44: [ARM][Thumb][FIX] Add unwinding information to t4 (authored by dnsampaio).
[ARM][Thumb][FIX] Add unwinding information to t4
Mon, Dec 30, 8:04 AM
dnsampaio closed D72000: [ARM][Thumb][FIX] Add unwinding information to t4.
Mon, Dec 30, 8:04 AM · Restricted Project
dnsampaio updated the diff for D72000: [ARM][Thumb][FIX] Add unwinding information to t4.

Added test

Mon, Dec 30, 7:45 AM · Restricted Project
dnsampaio created D72000: [ARM][Thumb][FIX] Add unwinding information to t4.
Mon, Dec 30, 6:20 AM · Restricted Project
dnsampaio added inline comments to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Mon, Dec 30, 3:21 AM · Restricted Project
dnsampaio committed rG8232497c313e: [ARM][THUMB2] Allow emitting T3 types of add and sub (authored by dnsampaio).
[ARM][THUMB2] Allow emitting T3 types of add and sub
Mon, Dec 30, 3:09 AM
dnsampaio closed D71361: [ARM][THUMB2] Allow emitting T3 types of add and sub.
Mon, Dec 30, 3:09 AM · Restricted Project

Dec 16 2019

dnsampaio added a parent revision for D71557: [WIP] [ARM][Fix] Thumb2 add / sub aliases failing in multiple cases.: D71361: [ARM][THUMB2] Allow emitting T3 types of add and sub.
Dec 16 2019, 9:39 AM · Restricted Project
dnsampaio added a child revision for D71361: [ARM][THUMB2] Allow emitting T3 types of add and sub: D71557: [WIP] [ARM][Fix] Thumb2 add / sub aliases failing in multiple cases..
Dec 16 2019, 9:39 AM · Restricted Project
dnsampaio created D71557: [WIP] [ARM][Fix] Thumb2 add / sub aliases failing in multiple cases..
Dec 16 2019, 9:39 AM · Restricted Project
dnsampaio updated the diff for D71361: [ARM][THUMB2] Allow emitting T3 types of add and sub.
  • Fix existing test
Dec 16 2019, 6:33 AM · Restricted Project
dnsampaio updated the diff for D71361: [ARM][THUMB2] Allow emitting T3 types of add and sub.

Added mir test.
Moved assert before T1 test.

Dec 16 2019, 6:14 AM · Restricted Project

Dec 11 2019

dnsampaio retitled D71361: [ARM][THUMB2] Allow emitting T3 types of add and sub from [THUMB] Allow thumb2 emit T3 type add and sub to [ARM][THUMB2] Allow emitting T3 types of add and sub.
Dec 11 2019, 8:27 AM · Restricted Project
dnsampaio created D71361: [ARM][THUMB2] Allow emitting T3 types of add and sub.
Dec 11 2019, 8:09 AM · Restricted Project
dnsampaio committed rGee219345881b: [ARM][NFC] Change test to use CHECK-NEXT (authored by dnsampaio).
[ARM][NFC] Change test to use CHECK-NEXT
Dec 11 2019, 6:27 AM

Dec 10 2019

dnsampaio added inline comments to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Dec 10 2019, 4:12 AM · Restricted Project

Dec 9 2019

dnsampaio added inline comments to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Dec 9 2019, 9:37 AM · Restricted Project
dnsampaio added inline comments to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Dec 9 2019, 7:57 AM · Restricted Project

Dec 2 2019

dnsampaio added a comment to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

This looks like multiple bug-fixes in one patch, could they be split up?

Dec 2 2019, 11:11 AM · Restricted Project

Nov 29 2019

dnsampaio added a comment to D70183: Detect source location overflow due includes.

Just wondering, I don't fully understand why is that important from the point I do a return FileID();. The critical error has already been inserted to the error list. clang shall either die due an assert in debug, or with a nice message in release. Unless clang is all broken, and the error message would be corrupted, which I don't believe is the case.

Nov 29 2019, 6:49 AM · Restricted Project

Nov 28 2019

dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Returned tests of invalid sub sp

Nov 28 2019, 8:41 AM · Restricted Project
dnsampaio added inline comments to D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Nov 28 2019, 8:31 AM · Restricted Project
dnsampaio retitled D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP from [ARM][WIP] Fix thumb2 ADD SUB invalid writes to SP to [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Nov 28 2019, 8:29 AM · Restricted Project
dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Re-inserted missing t2SUBri disassemble

Nov 28 2019, 8:05 AM · Restricted Project
dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Cleared some bits
Added bug test

Nov 28 2019, 7:40 AM · Restricted Project
dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Fixed adr.w decoding

Nov 28 2019, 2:29 AM · Restricted Project

Nov 26 2019

dnsampaio updated the diff for D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.

Refactored emitT2RegPlusImmediate

Nov 26 2019, 7:48 AM · Restricted Project

Nov 25 2019

dnsampaio created D70680: [ARM][Thumb2] Fix ADD/SUB invalid writes to SP.
Nov 25 2019, 9:57 AM · Restricted Project

Nov 19 2019

dnsampaio added a comment to D70183: Detect source location overflow due includes.

Git diff 979ae80af7ec49624b932954d22cb91900f17121 did not send a test as well. Feel free to send me a reasonable sized reproducer, the one I have is about 36MB. Don't think it will be that well received.

Nov 19 2019, 8:15 AM · Restricted Project
dnsampaio added inline comments to D70183: Detect source location overflow due includes.
Nov 19 2019, 6:30 AM · Restricted Project
dnsampaio added a comment to D70183: Detect source location overflow due includes.

Yes. It does return a non-valid FileID, and in builds without assert you get the expected error message.

Nov 19 2019, 5:53 AM · Restricted Project
dnsampaio added a comment to D70183: Detect source location overflow due includes.

Ping

Nov 19 2019, 3:29 AM · Restricted Project

Nov 14 2019

dnsampaio added inline comments to D70183: Detect source location overflow due includes.
Nov 14 2019, 2:34 AM · Restricted Project
dnsampaio updated the diff for D70183: Detect source location overflow due includes.
  • Return an invalid FileID instead of exiting.
Nov 14 2019, 2:33 AM · Restricted Project

Nov 13 2019

dnsampaio added inline comments to D70183: Detect source location overflow due includes.
Nov 13 2019, 8:39 AM · Restricted Project
dnsampaio updated the diff for D70183: Detect source location overflow due includes.
  • Add ", DefaultFatal";
Nov 13 2019, 8:39 AM · Restricted Project
dnsampaio added inline comments to D70183: Detect source location overflow due includes.
Nov 13 2019, 7:49 AM · Restricted Project
dnsampaio created D70183: Detect source location overflow due includes.
Nov 13 2019, 7:49 AM · Restricted Project

Nov 4 2019

dnsampaio committed rG3169f0129a68: [FIX] Removed duplicated v4f16 and v8f16 declarations (authored by dnsampaio).
[FIX] Removed duplicated v4f16 and v8f16 declarations
Nov 4 2019, 3:35 AM
dnsampaio closed D69795: [FIX] Removed duplicated v4f16 and v8f16 declarations.
Nov 4 2019, 3:35 AM · Restricted Project
dnsampaio created D69795: [FIX] Removed duplicated v4f16 and v8f16 declarations.
Nov 4 2019, 2:43 AM · Restricted Project
dnsampaio added a comment to D60720: [ARM] Add v4f16 and v8f16 types to the CallingConv.

Thanks @RKSimon, will remove the 8 duplicates.

Nov 4 2019, 2:22 AM · Restricted Project

Oct 17 2019

dnsampaio accepted D68940: [AArch64] Adding support for PMMIR_EL1 register.

LGTM. Could wait a day before committing in case anyone else has a say.

Oct 17 2019, 5:44 AM · Restricted Project

Oct 16 2019

dnsampaio added a comment to D68940: [AArch64] Adding support for PMMIR_EL1 register.

Hi,
this seems mostly good, perhaps just missing a disassembler test, such as in llvm/test/MC/Disassembler/AArch64/armv8.4a-mpam.txt?

Oct 16 2019, 8:18 AM · Restricted Project

Oct 14 2019

dnsampaio committed rG2cb43b45713d: [ARM] Preserve fpu behaviour for '-crypto' (authored by dnsampaio).
[ARM] Preserve fpu behaviour for '-crypto'
Oct 14 2019, 9:29 AM
dnsampaio closed D67608: [ARM] Preserve fpu behaviour for '-crypto'.
Oct 14 2019, 9:29 AM · Restricted Project
dnsampaio committed rL374785: [ARM] Preserve fpu behaviour for '-crypto'.
[ARM] Preserve fpu behaviour for '-crypto'
Oct 14 2019, 9:29 AM

Oct 10 2019

dnsampaio updated the diff for D67608: [ARM] Preserve fpu behaviour for '-crypto'.

Attending review request:

Oct 10 2019, 6:00 AM · Restricted Project

Sep 16 2019

dnsampaio created D67608: [ARM] Preserve fpu behaviour for '-crypto'.
Sep 16 2019, 2:05 AM · Restricted Project

Sep 13 2019

dnsampaio added a comment to D67399: [ARM] Follow AACPS standard for volatile bitfields.

Indeed our main concern is regarding the access widths of loads. As mentioned by @rjmccall, most volatile bitfields are used to perform memory mapped I/O, and some hardware only support them with a specific access width.
The spurious load I am more than glad to leave it disable behind a command flag, so it will only appear if the user requests it. See that volatile accesses might have side effects, and for example, an I/O read counter holding an odd number could define that the data is still being processed.

Sep 13 2019, 2:09 AM · Restricted Project

Sep 11 2019

dnsampaio added a reviewer for D67399: [ARM] Follow AACPS standard for volatile bitfields: eli.friedman.
Sep 11 2019, 9:41 AM · Restricted Project
dnsampaio committed rG73ec745793ac: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature (authored by dnsampaio).
[ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature
Sep 11 2019, 2:07 AM
dnsampaio committed rL371597: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.
[ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature
Sep 11 2019, 2:05 AM
dnsampaio closed D66018: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.
Sep 11 2019, 2:05 AM · Restricted Project, Restricted Project
dnsampaio added a comment to D67399: [ARM] Follow AACPS standard for volatile bitfields.

Hi @jfb. In a example such as:

struct { int a : 1; int b : 16; } S;
extern int expensive_computaion(int v);
void foo(volatile S* s){
  s->b = expensive_computation(s->b);
}

There is no guarantee that s->a is not modified during a expensive computation, so it must be obtained just before writing the s->b value, as a and b share the same memory position. This is already done by llvm. Indeed, the exact output would be

define void @foo(%struct.S* %S) local_unnamed_addr #0 {
entry:
  %0 = bitcast %struct.S* %S to i32*
  %bf.load = load volatile i32, i32* %0, align 4
  %bf.shl = shl i32 %bf.load, 15
  %bf.ashr = ashr i32 %bf.shl, 16
  %call = tail call i32 @expensive_computation(i32 %bf.ashr) #2
  %bf.load1 = load volatile i32, i32* %0, align 4 ; <<<== Here it obtains the value to s->a to restore it.
  %bf.value = shl i32 %call, 1
  %bf.shl2 = and i32 %bf.value, 131070
  %bf.clear = and i32 %bf.load1, -131071
  %bf.set = or i32 %bf.clear, %bf.shl2
  store volatile i32 %bf.set, i32* %0, align 4
  ret void
}
Sep 11 2019, 1:56 AM · Restricted Project

Sep 10 2019

dnsampaio added a comment to D67399: [ARM] Follow AACPS standard for volatile bitfields.

@ostannard might prove me wrong, but according to the AACPS:

When a volatile bit-field is written, and its container does not overlap with any non-bit-field member, its
container must be read exactly once and written exactly once using the access width appropriate to the
type of the container. The two accesses are not atomic.

This rule does not define that the load is done if required. It states that it will be read once. It even gives the example that an increment will always perform two reads and one write, bitwidth agnostic. It writes just after:

Note: Note the volatile access rules apply even when the width and alignment of the bit-field imply that
the access could be achieved more efficiently using a narrower type. For a write operation the read must
always occur even if the entire contents of the container will be replaced.

The rationale is to provide a uniform behavior for volatile bitfields independent of their width (as far they do not overlap with non-bitfields).

Sep 10 2019, 8:23 AM · Restricted Project
dnsampaio added a comment to D67399: [ARM] Follow AACPS standard for volatile bitfields.

This patch could hack clang to generate an extra load. However, my knowledge in the clang code base is not extensive. How could we ensure that the width of loads and stores are the size of the container, and that they don't overlap non-bitfields?

Sep 10 2019, 7:51 AM · Restricted Project
dnsampaio created D67399: [ARM] Follow AACPS standard for volatile bitfields.
Sep 10 2019, 7:46 AM · Restricted Project

Sep 9 2019

dnsampaio committed rG3c8644666c49: [NFC] Add aacps bitfields access test (authored by dnsampaio).
[NFC] Add aacps bitfields access test
Sep 9 2019, 8:40 AM
dnsampaio committed rL371410: [NFC] Add aacps bitfields access test.
[NFC] Add aacps bitfields access test
Sep 9 2019, 8:39 AM

Sep 3 2019

dnsampaio accepted D66018: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.

LGTM. Thanks. Will commit for you as requested soon.

Sep 3 2019, 5:24 AM · Restricted Project, Restricted Project
dnsampaio committed rL370723: Request commit access for dnsampaio.
Request commit access for dnsampaio
Sep 3 2019, 2:38 AM
dnsampaio committed rG7a65f5ebee3f: [ARM NEON] Avoid duplicated decarations (authored by dnsampaio).
[ARM NEON] Avoid duplicated decarations
Sep 3 2019, 2:17 AM
dnsampaio committed rL370716: [ARM NEON] Avoid duplicated decarations.
[ARM NEON] Avoid duplicated decarations
Sep 3 2019, 2:16 AM
dnsampaio closed D66588: [ARM NEON] Avoid duplicated decarations.
Sep 3 2019, 2:16 AM · Restricted Project, Restricted Project
dnsampaio updated the diff for D66588: [ARM NEON] Avoid duplicated decarations.
  • Fix comment
Sep 3 2019, 2:06 AM · Restricted Project, Restricted Project

Sep 2 2019

dnsampaio added a comment to D66018: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.

Hi, I do agree that giving the user a warning that the argument is ignored is the best solution. If you wouldn't mind adding it to this patch, that would be great. Thanks.

Sep 2 2019, 1:07 AM · Restricted Project, Restricted Project

Aug 30 2019

dnsampaio requested changes to D66018: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.

clang -### -target arm-arm-none-eabit -march=armv8-m.main+crypto did not show +sha2 or +aes. After the patch it does.
I believe that is not expected, as in ARM.td crypto is not applied for any M profile. And Arm®v8-M Architecture Reference Manual does not reference these extensions neither.

Aug 30 2019, 8:46 AM · Restricted Project, Restricted Project
dnsampaio added a reviewer for D66588: [ARM NEON] Avoid duplicated decarations: labrinea.
Aug 30 2019, 3:26 AM · Restricted Project, Restricted Project

Aug 29 2019

dnsampaio accepted D66018: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.

LGTM. One optional nit as it is not related with this patch anymore.

Aug 29 2019, 6:11 AM · Restricted Project, Restricted Project

Aug 28 2019

dnsampaio updated the diff for D66588: [ARM NEON] Avoid duplicated decarations.
  • Avoid appending __noswap_ to intrinsics that are BigEndianSafe
  • Moved to monorepo
Aug 28 2019, 3:13 AM · Restricted Project, Restricted Project

Aug 27 2019

dnsampaio planned changes to D66588: [ARM NEON] Avoid duplicated decarations.

Breaks the header. Needs to avoid generating calls to functions with predicated __noswap when it is BigEndianSafe.

Aug 27 2019, 5:15 AM · Restricted Project, Restricted Project

Aug 23 2019

dnsampaio updated the summary of D66588: [ARM NEON] Avoid duplicated decarations.
Aug 23 2019, 4:07 AM · Restricted Project, Restricted Project
dnsampaio updated the diff for D66588: [ARM NEON] Avoid duplicated decarations.
  • Consider BigEndianSafe intrinsics that all inputs and outputs are scalar or single element vectors
Aug 23 2019, 4:07 AM · Restricted Project, Restricted Project

Aug 22 2019

dnsampaio created D66588: [ARM NEON] Avoid duplicated decarations.
Aug 22 2019, 6:25 AM · Restricted Project, Restricted Project
dnsampaio added a comment to D66018: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.

Hi @krisb,
thanks for looking into this, and sorry for the delay, was out for a week.

Aug 22 2019, 3:41 AM · Restricted Project, Restricted Project

Aug 14 2019

dnsampaio added inline comments to D66018: [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature.
Aug 14 2019, 6:29 AM · Restricted Project, Restricted Project
dnsampaio added a comment to D63152: [FIX] Forces shrink wrapping to consider any memory access as aliasing with the stack.

Is there any fix patch proposed to track/fix the regression? @dnsampaio

Aug 14 2019, 3:59 AM · Restricted Project

Aug 8 2019

dnsampaio committed rGdd591977e0fe: [FIX][NFC] Update clang sema test (authored by dnsampaio).
[FIX][NFC] Update clang sema test
Aug 8 2019, 7:47 AM