Page MenuHomePhabricator
Feed Advanced Search

Yesterday

wangleiat added a comment to D134707: [RISCV] Remove some unused var decl. NFC.

@reames Could you help me commit the changes?

Thu, Sep 29, 8:38 PM · Restricted Project, Restricted Project

Wed, Sep 28

wangleiat updated the diff for D134710: [LoongArch] Set correct encodings for DWARF exception handling.

Address @xen0n's comments

Wed, Sep 28, 6:58 PM · Restricted Project, Restricted Project
wangleiat added a comment to D134710: [LoongArch] Set correct encodings for DWARF exception handling.

LGTM but I haven't cross-checked with gcc.

https://gcc.gnu.org/git?p=gcc.git;a=blob;f=gcc/config/loongarch/loongarch.h#l1133:

#ifdef HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
  (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4)
#else
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
  (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_absptr)
#endif

The ifdef is just for old GNU assemblers, we don't need to care about it because normally LLVM doesn't use an external assembler.

Wed, Sep 28, 6:56 PM · Restricted Project, Restricted Project

Tue, Sep 27

wangleiat requested review of D134715: [LoongArch] Produce a R_LARCH_32_PCREL relocation.
Tue, Sep 27, 1:12 AM · Restricted Project, Restricted Project
wangleiat requested review of D134713: [LoongArch] Add codegen support of GlobalTLSAddress lowering.
Tue, Sep 27, 12:57 AM · Restricted Project, Restricted Project
wangleiat requested review of D134712: [LoongArch] Override TargetSubtargetInfo::getSelectionDAGInfo.
Tue, Sep 27, 12:55 AM · Restricted Project, Restricted Project
wangleiat requested review of D134710: [LoongArch] Set correct encodings for DWARF exception handling.
Tue, Sep 27, 12:53 AM · Restricted Project, Restricted Project
wangleiat requested review of D134709: [LoongArch] Specify registers used in DWARF exception handling.
Tue, Sep 27, 12:43 AM · Restricted Project, Restricted Project
wangleiat requested review of D134708: [LoongArch] Add some comments for expand pseudo-inst pass. NFC.
Tue, Sep 27, 12:40 AM · Restricted Project, Restricted Project
wangleiat requested review of D134707: [RISCV] Remove some unused var decl. NFC.
Tue, Sep 27, 12:26 AM · Restricted Project, Restricted Project

Thu, Sep 22

wangleiat requested review of D134431: [LoongArch] Lower BlockAddress/JumpTable.
Thu, Sep 22, 5:41 AM · Restricted Project, Restricted Project

Fri, Sep 2

wangleiat updated the diff for D132818: [LoongArch] Fixup value adjustment in applyFixup.

Fix [[@LINE]] what was missed.

Fri, Sep 2, 1:27 AM · Restricted Project, Restricted Project
wangleiat requested review of D133187: [LoongArch][test] Replace bashism `|&` to `2>&1 |` (NFC).
Fri, Sep 2, 12:03 AM · Restricted Project, Restricted Project

Thu, Sep 1

wangleiat updated the diff for D132818: [LoongArch] Fixup value adjustment in applyFixup.

Address @MaskRay's comments.

Thu, Sep 1, 11:39 PM · Restricted Project, Restricted Project
wangleiat added a comment to D132818: [LoongArch] Fixup value adjustment in applyFixup.

Thanks for all the comments, I will fix them. :)

Thu, Sep 1, 11:37 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D132633: [LoongArch] Add more fixups and relocations.

Address @MaskRay's comments.

Thu, Sep 1, 11:31 PM · Restricted Project, Restricted Project
wangleiat added inline comments to D132633: [LoongArch] Add more fixups and relocations.
Thu, Sep 1, 11:14 PM · Restricted Project, Restricted Project

Aug 31 2022

wangleiat updated the diff for D132818: [LoongArch] Fixup value adjustment in applyFixup.

rebase.

Aug 31 2022, 6:00 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D132633: [LoongArch] Add more fixups and relocations.

Move FirstLiteralRelocationKind+Type fixups to LoongArchFixupKinds.h.

Aug 31 2022, 5:59 AM · Restricted Project, Restricted Project
wangleiat added inline comments to D132633: [LoongArch] Add more fixups and relocations.
Aug 31 2022, 5:48 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D132818: [LoongArch] Fixup value adjustment in applyFixup.

rebase

Aug 31 2022, 2:55 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D132633: [LoongArch] Add more fixups and relocations.

Small modification: extract FirstLiteralRelocationKind

Aug 31 2022, 2:54 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D132818: [LoongArch] Fixup value adjustment in applyFixup.

Address @MaskRay's comment.

Aug 31 2022, 1:15 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D132633: [LoongArch] Add more fixups and relocations.

Address @MaskRay's comment in D132818.

Aug 31 2022, 1:14 AM · Restricted Project, Restricted Project
wangleiat added a comment to D132818: [LoongArch] Fixup value adjustment in applyFixup.

Can some use FirstLiteralRelocationKind + ... instead?

Aug 31 2022, 12:23 AM · Restricted Project, Restricted Project

Aug 30 2022

wangleiat updated the diff for D132818: [LoongArch] Fixup value adjustment in applyFixup.

Address @xen0n's comments.

Aug 30 2022, 9:08 PM · Restricted Project, Restricted Project
wangleiat added inline comments to D132818: [LoongArch] Fixup value adjustment in applyFixup.
Aug 30 2022, 8:23 PM · Restricted Project, Restricted Project

Aug 28 2022

wangleiat requested review of D132818: [LoongArch] Fixup value adjustment in applyFixup.
Aug 28 2022, 8:03 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D132633: [LoongArch] Add more fixups and relocations.

rebase

Aug 28 2022, 7:59 PM · Restricted Project, Restricted Project
wangleiat added a comment to D132323: [LoongArch] Port over minimal applyFixup from RISCV.

Is it possible to add a unit tests for this?

Aug 28 2022, 7:36 PM · Restricted Project, Restricted Project

Aug 25 2022

wangleiat added a comment to D132633: [LoongArch] Add more fixups and relocations.

So it seems we're restricting the applicable instructions for each fixup kind, for example even if both lu12i.w and lu32i.d take a 20-bit signed immediate, the xxx64_LO20 fixups still cannot be used with lu12i.w and the xxx_HI20 ones cannot be used with lu32i.d.

Is this the same behavior as in binutils? I don't know if this is an artificial limitation to assembly expressiveness, but since I know the reloc types are deliberately designed with effectively only the linker implementation in mind, this might as well just be expected. I didn't find any other major problem though...

Aug 25 2022, 1:11 AM · Restricted Project, Restricted Project

Aug 24 2022

wangleiat requested review of D132633: [LoongArch] Add more fixups and relocations.
Aug 24 2022, 10:20 PM · Restricted Project, Restricted Project
wangleiat accepted D132323: [LoongArch] Port over minimal applyFixup from RISCV.

LGTM

Aug 24 2022, 1:25 AM · Restricted Project, Restricted Project
wangleiat accepted D132019: [Object] Support LoongArch in RelocationResolver.

LGTM

Aug 24 2022, 1:22 AM · Restricted Project, Restricted Project

Aug 21 2022

wangleiat requested review of D132346: [LoongArch][test] Regenerate loongarch_generated_funcs.test checks.
Aug 21 2022, 9:54 PM · Restricted Project, Restricted Project

Aug 18 2022

wangleiat updated the diff for D132119: [MC][LoongArch] Make .reloc support arbitrary relocation types.

Address @xen0n's comment.

Aug 18 2022, 6:23 PM · Restricted Project, Restricted Project
wangleiat requested review of D132119: [MC][LoongArch] Make .reloc support arbitrary relocation types.
Aug 18 2022, 2:39 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D132108: [LoongArch] Add some fixups and relocations.

test case change larch to loongarch

Aug 18 2022, 2:34 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D132108: [LoongArch] Add some fixups and relocations.

Address @xen0n's comment.

Aug 18 2022, 2:30 AM · Restricted Project, Restricted Project
wangleiat requested review of D132108: [LoongArch] Add some fixups and relocations.
Aug 18 2022, 12:34 AM · Restricted Project, Restricted Project

Aug 17 2022

wangleiat added inline comments to D132012: [LoongArch] Add support for llvm.eh.dwarf.cfa.
Aug 17 2022, 12:51 AM · Restricted Project, Restricted Project

Aug 9 2022

wangleiat requested review of D131491: [LoongArch] Override TargetLowering::isOffsetFoldingLegal().
Aug 9 2022, 6:06 AM · Restricted Project, Restricted Project

Aug 8 2022

wangleiat added inline comments to D131380: [LoongArch] Support register-register-addressed GPR loads/stores.
Aug 8 2022, 2:42 AM · Restricted Project, Restricted Project

Aug 7 2022

wangleiat updated the diff for D131316: [LoongArch] Implement branch analysis.

Address @barannikov88's comments.

Aug 7 2022, 11:22 PM · Restricted Project, Restricted Project
wangleiat added a comment to D131316: [LoongArch] Implement branch analysis.

Just passed by, you can ignore my comments.

Aug 7 2022, 11:16 PM · Restricted Project, Restricted Project

Aug 6 2022

wangleiat requested review of D131316: [LoongArch] Implement branch analysis.
Aug 6 2022, 1:41 AM · Restricted Project, Restricted Project

Aug 4 2022

wangleiat added inline comments to D130250: [LoongArch] Support for varargs.
Aug 4 2022, 8:06 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D130250: [LoongArch] Support for varargs.

Typo fix.

Aug 4 2022, 8:05 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D130249: [LoongArch] Implement more of the ABI.

Address @xen0n's comment, Thanks.

Aug 4 2022, 8:03 PM · Restricted Project, Restricted Project

Jul 31 2022

wangleiat retitled D130249: [LoongArch] Implement more of the ABI from [LoongArch] Improve the calling convention to [LoongArch] Implement more of the ABI.
Jul 31 2022, 11:59 PM · Restricted Project, Restricted Project
wangleiat added a comment to D130250: [LoongArch] Support for varargs.

The test cases seem sane enough (after some hard thought). Anyway let's wait for someone more professional than me to take a look ;-)

Jul 31 2022, 11:57 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D130250: [LoongArch] Support for varargs.

Address @xen0n's comments.

Jul 31 2022, 11:56 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D130249: [LoongArch] Implement more of the ABI.

Address @xen0n's comments.

Jul 31 2022, 11:49 PM · Restricted Project, Restricted Project
wangleiat added a comment to D130249: [LoongArch] Implement more of the ABI.

Thank you very much for your comments and I will revise these.

Jul 31 2022, 11:47 PM · Restricted Project, Restricted Project
wangleiat added a comment to D130250: [LoongArch] Support for varargs.

polite ping

Jul 31 2022, 9:02 PM · Restricted Project, Restricted Project
wangleiat added a comment to D130249: [LoongArch] Implement more of the ABI.

polite ping

Jul 31 2022, 9:02 PM · Restricted Project, Restricted Project

Jul 25 2022

wangleiat updated the diff for D130250: [LoongArch] Support for varargs.

rebase

Jul 25 2022, 6:01 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D130249: [LoongArch] Implement more of the ABI.

rebase

Jul 25 2022, 6:00 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D130248: [LoongArch] Offset folding for frameindex.

Address @barannikov88's comment.

Jul 25 2022, 6:00 AM · Restricted Project, Restricted Project
wangleiat updated the diff for D130247: [LoongArch] Refactor insertDivByZeroTrap.

Address @MaskRay's comments.

Jul 25 2022, 5:45 AM · Restricted Project, Restricted Project
wangleiat added a comment to D130248: [LoongArch] Offset folding for frameindex.

Do you know why csky/hexagon need isOrEquivalentToAdd while other targets can produce efficient code without isOrEquivalentToAdd ?

Other targets just do that manually in *ISelDAGToDAG.cpp file. E.g. X86:

case ISD::OR:
  // We want to look through a transform in InstCombine and DAGCombiner that
  // turns 'add' into 'or', so we can treat this 'or' exactly like an 'add'.
  // Example: (or (and x, 1), (shl y, 3)) --> (add (and x, 1), (shl y, 3))
  // An 'lea' can then be used to match the shift (multiply) and add:
  // and $1, %esi
  // lea (%rsi, %rdi, 8), %rax
  if (CurDAG->haveNoCommonBitsSet(N.getOperand(0), N.getOperand(1)) &&
      !matchAdd(N, AM, Depth))
    return false;
  break;

ARM:

// Determine whether an ISD::OR's operands are suitable to turn the operation
// into an addition, which often has more compact encodings.
bool ARMDAGToDAGISel::SelectAddLikeOr(SDNode *Parent, SDValue N, SDValue &Out) {
  assert(Parent->getOpcode() == ISD::OR && "unexpected parent");
  Out = N;
  return CurDAG->haveNoCommonBitsSet(N, Parent->getOperand(1));
}
Jul 25 2022, 5:37 AM · Restricted Project, Restricted Project
wangleiat added a comment to D130247: [LoongArch] Refactor insertDivByZeroTrap.

Ensure non-terminators don't follow terminators.

Ensure the non-terminator BREAK doesn't follow the terminator BNEZ.

Jul 25 2022, 5:34 AM · Restricted Project, Restricted Project

Jul 21 2022

wangleiat accepted D129977: [LoongArch] Support load/store of dso_local PIC global values.

Thanks!

load-store.ll has UB due to out-of-bounds load/store. Fix the UB in the variable
test and add an array test. Note: PIC array index is currently wrong.

Spelling mistakes? Is NONPIC?

I pick NOPIC because -fno-pic is usually used to refer the position-dependent codegen. NOPIC should be fine.

The wrong array index is due to constant folding with GlobalAddress when isDSOLocal().
The interface function of the common layer is TargetLowering::isOffsetFoldingLegal.

Thanks!

Jul 21 2022, 7:30 PM · Restricted Project, Restricted Project
wangleiat requested review of D130250: [LoongArch] Support for varargs.
Jul 21 2022, 4:43 AM · Restricted Project, Restricted Project
wangleiat requested review of D130249: [LoongArch] Implement more of the ABI.
Jul 21 2022, 4:40 AM · Restricted Project, Restricted Project
wangleiat requested review of D130248: [LoongArch] Offset folding for frameindex.
Jul 21 2022, 4:25 AM · Restricted Project, Restricted Project
wangleiat requested review of D130247: [LoongArch] Refactor insertDivByZeroTrap.
Jul 21 2022, 4:23 AM · Restricted Project, Restricted Project

Jul 17 2022

wangleiat added a comment to D129977: [LoongArch] Support load/store of dso_local PIC global values.

Thanks!

load-store.ll has UB due to out-of-bounds load/store. Fix the UB in the variable
test and add an array test. Note: PIC array index is currently wrong.

Spelling mistakes? Is NONPIC?

I pick NOPIC because -fno-pic is usually used to refer the position-dependent codegen. NOPIC should be fine.

Jul 17 2022, 11:06 PM · Restricted Project, Restricted Project
wangleiat added a comment to D129977: [LoongArch] Support load/store of dso_local PIC global values.

load-store.ll has UB due to out-of-bounds load/store. Fix the UB in the variable
test and add an array test. Note: PIC array index is currently wrong.

Jul 17 2022, 7:23 PM · Restricted Project, Restricted Project

Jul 3 2022

wangleiat added inline comments to D128432: [LoongArch] Implement prologue/epilogue insertion.
Jul 3 2022, 8:34 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128432: [LoongArch] Implement prologue/epilogue insertion.

Add missing semicolon.

Jul 3 2022, 8:28 PM · Restricted Project, Restricted Project
wangleiat added inline comments to D128432: [LoongArch] Implement prologue/epilogue insertion.
Jul 3 2022, 6:20 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128433: [LoongArch] Add LoongArch support to update_llc_test_checks.

rebase

Jul 3 2022, 6:20 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128432: [LoongArch] Implement prologue/epilogue insertion.

Address @xen0n's comments.

Jul 3 2022, 6:19 PM · Restricted Project, Restricted Project
wangleiat added inline comments to D128430: [LoongArch] Support lowering FrameIndex.
Jul 3 2022, 6:09 PM · Restricted Project, Restricted Project

Jul 1 2022

wangleiat added inline comments to D128428: [LoongArch] Add codegen support for conditional branches.
Jul 1 2022, 8:53 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128433: [LoongArch] Add LoongArch support to update_llc_test_checks.

Address @MaskRay's comments.

Jul 1 2022, 7:42 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128432: [LoongArch] Implement prologue/epilogue insertion.

rebase

Jul 1 2022, 7:41 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128430: [LoongArch] Support lowering FrameIndex.

rebase

Jul 1 2022, 7:41 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128429: [LoongArch] Add initial support for function calls.

Address @xen0n's comments.

Jul 1 2022, 7:38 PM · Restricted Project, Restricted Project
wangleiat added inline comments to D128428: [LoongArch] Add codegen support for conditional branches.
Jul 1 2022, 7:14 PM · Restricted Project, Restricted Project
wangleiat added a comment to D128427: [LoongArch] Add codegen support for load/store operations.

While I'm not very sure about the new pcalau12i + addi symbol address materialization, they look good regardless, so are the other test cases.

Do you think a test exercising very large offset for getelementptr is worthwhile? LGTM otherwise.

Jul 1 2022, 6:54 PM · Restricted Project, Restricted Project

Jun 30 2022

wangleiat added a comment to D128427: [LoongArch] Add codegen support for load/store operations.

PING
Do you have any comments on this series of patches?

Jun 30 2022, 2:47 AM · Restricted Project, Restricted Project

Jun 26 2022

wangleiat added inline comments to D128427: [LoongArch] Add codegen support for load/store operations.
Jun 26 2022, 8:50 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128433: [LoongArch] Add LoongArch support to update_llc_test_checks.

Update test to use opaque pointers

Jun 26 2022, 8:47 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128432: [LoongArch] Implement prologue/epilogue insertion.

rebase

Jun 26 2022, 8:46 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128430: [LoongArch] Support lowering FrameIndex.

Update test to use opaque pointers

Jun 26 2022, 8:45 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128429: [LoongArch] Add initial support for function calls.

Update test to use opaque pointers

Jun 26 2022, 8:44 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128428: [LoongArch] Add codegen support for conditional branches.

Update tests to use opaque pointers

Jun 26 2022, 8:44 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D128427: [LoongArch] Add codegen support for load/store operations.

Update test to use opaque pointers

Jun 26 2022, 8:42 PM · Restricted Project, Restricted Project

Jun 23 2022

wangleiat added inline comments to D128427: [LoongArch] Add codegen support for load/store operations.
Jun 23 2022, 8:28 PM · Restricted Project, Restricted Project
wangleiat requested review of D128433: [LoongArch] Add LoongArch support to update_llc_test_checks.
Jun 23 2022, 5:19 AM · Restricted Project, Restricted Project
wangleiat requested review of D128432: [LoongArch] Implement prologue/epilogue insertion.
Jun 23 2022, 5:18 AM · Restricted Project, Restricted Project
wangleiat requested review of D128430: [LoongArch] Support lowering FrameIndex.
Jun 23 2022, 5:14 AM · Restricted Project, Restricted Project
wangleiat requested review of D128429: [LoongArch] Add initial support for function calls.
Jun 23 2022, 5:12 AM · Restricted Project, Restricted Project
wangleiat requested review of D128428: [LoongArch] Add codegen support for conditional branches.
Jun 23 2022, 5:10 AM · Restricted Project, Restricted Project
wangleiat requested review of D128427: [LoongArch] Add codegen support for load/store operations.
Jun 23 2022, 5:04 AM · Restricted Project, Restricted Project

Apr 14 2022

wangleiat added inline comments to D123290: [LoongArch] Add support for selecting constant materializations..
Apr 14 2022, 8:04 PM · Restricted Project, Restricted Project
wangleiat updated the diff for D123290: [LoongArch] Add support for selecting constant materializations..

Reduce the test cases and simply cover all the code paths in generateInstSeq

Apr 14 2022, 8:03 PM · Restricted Project, Restricted Project
wangleiat requested review of D123290: [LoongArch] Add support for selecting constant materializations..

ping @MaskRay

Apr 14 2022, 4:36 AM · Restricted Project, Restricted Project