Page MenuHomePhabricator

shiva0217 (Shiva Chen)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 25 2016, 5:14 PM (146 w, 2 d)

Recent Activity

Yesterday

shiva0217 created D68979: [RISCV] Handle variable sized objects with the stack need to be realigned.
Tue, Oct 15, 3:11 AM · Restricted Project

Mon, Oct 14

shiva0217 updated the diff for D67698: [RISCV] Remove RA from reserved register to use as callee saved register.

Rebase the test case.

Mon, Oct 14, 8:04 PM · Restricted Project
shiva0217 committed rG078bec6c48dd: [RISCV] Support fast calling convention (authored by shiva0217).
[RISCV] Support fast calling convention
Mon, Oct 14, 7:09 PM
shiva0217 closed D68559: [RISCV] Support fast calling convention.
Mon, Oct 14, 7:09 PM · Restricted Project

Sat, Oct 12

shiva0217 added inline comments to D62190: [RISCV] Allow shrink wrapping for RISC-V.
Sat, Oct 12, 11:34 PM · Restricted Project

Tue, Oct 8

shiva0217 added a comment to D68559: [RISCV] Support fast calling convention.

I like this change.

fastcc is LLVM-internal only, right? Checking that we don't have to care about splitting operands that don't fit into registers, or any other psABI details, right?

Yes, to my understanding, fastcc doesn't need to care about psABI details.

Tue, Oct 8, 11:26 AM · Restricted Project
shiva0217 updated the diff for D68559: [RISCV] Support fast calling convention.

Update patch to address the feedbacks

Tue, Oct 8, 11:25 AM · Restricted Project
shiva0217 updated the diff for D68559: [RISCV] Support fast calling convention.

Update patch to address the comment

Tue, Oct 8, 12:20 AM · Restricted Project

Sun, Oct 6

shiva0217 created D68559: [RISCV] Support fast calling convention.
Sun, Oct 6, 7:16 PM · Restricted Project

Thu, Oct 3

shiva0217 committed rGff55e2e0476b: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill… (authored by shiva0217).
[RISCV] Split SP adjustment to reduce the offset of callee saved register spill…
Thu, Oct 3, 7:00 PM
shiva0217 updated the diff for D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.

Fix comment in the patch.

Thu, Oct 3, 6:50 PM · Restricted Project
shiva0217 added inline comments to D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.
Thu, Oct 3, 6:46 PM · Restricted Project

Thu, Sep 26

shiva0217 updated the diff for D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.

Add splitting SP adjustment boundary test case as @luismarques suggest.

Thu, Sep 26, 9:59 PM · Restricted Project
shiva0217 added a comment to D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.

Update patch

@shiva0217 Thanks for updating the patch and addressing the previous concerns. This is looking quite good. I have just a couple more concerns before approving this:

  • The boundary condition for doing the two-stage sp adjustment probably needs adjustment. For instance, try this:

    ` int main() { char xx[2048-16]; foo(xx); } -- addi sp, sp, -2032 sd ra, 2024(sp) addi sp, sp, -16 ... `

    I think that one would still fit a single-stage sp update. Related to that, where you have the code if (!isInt<12>(StackSize) && (CSI.size() > 0)), be sure that the isInt<12> check properly accounts for the StackSize, CSI size, StackAlign etc. Which brings me to the second point...
  • Please include tests showing that the boundary condition is correctly computed. For instance, one test where the stack size is just enough not to have to split the sp adjustment and another where the adjustment is needed.

    Thanks!
Thu, Sep 26, 7:01 AM · Restricted Project
shiva0217 updated the diff for D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.

Update patch

Thu, Sep 26, 1:14 AM · Restricted Project

Wed, Sep 25

shiva0217 updated the diff for D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.

Update patch

  1. Call getFirstSPAdjustAmount() once in per prologue/epilogue generation as @luismarques suggest
  2. Generate CFI directives in large-stack.ll test case to check the CFI generation
Wed, Sep 25, 7:24 PM · Restricted Project
shiva0217 updated the diff for D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.

Update patch to address the comments.

Wed, Sep 25, 7:49 AM · Restricted Project
shiva0217 added inline comments to D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.
Wed, Sep 25, 6:54 AM · Restricted Project
shiva0217 created D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore.
Wed, Sep 25, 2:27 AM · Restricted Project

Thu, Sep 19

shiva0217 added a comment to D67698: [RISCV] Remove RA from reserved register to use as callee saved register.

We discussed this in the RISC-V meeting on 19 Sep 2019.

  • Pros: GCC for RISC-V and LLVM for ARM and AArch64 seem to do the same. It can help in situations with particularly bad register pressure requirements.
  • Cons: It can make debugging a lot harder, though this seems not to be an issue in GDB for RISC-V.

    I think we don't want to have yet another configuration flag to control this.

    It would be good to see some performance comparison, but I realise you may not be able to release internal benchmarks, and we have no public benchmarking system for RISC-V.
Thu, Sep 19, 10:13 PM · Restricted Project

Wed, Sep 18

shiva0217 created D67698: [RISCV] Remove RA from reserved register to use as callee saved register.
Wed, Sep 18, 2:03 AM · Restricted Project

Sep 12 2019

shiva0217 committed rGa49a16ddd0eb: [RISCV] Support stack offset exceed 32-bit for RV64 (authored by shiva0217).
[RISCV] Support stack offset exceed 32-bit for RV64
Sep 12 2019, 9:04 PM
shiva0217 committed rGea530ba3ed75: Revert "[RISCV] Support stack offset exceed 32-bit for RV64" (authored by shiva0217).
Revert "[RISCV] Support stack offset exceed 32-bit for RV64"
Sep 12 2019, 9:04 PM
shiva0217 committed rGeaa230fe3c86: [RISCV] Support stack offset exceed 32-bit for RV64 (authored by shiva0217).
[RISCV] Support stack offset exceed 32-bit for RV64
Sep 12 2019, 7:51 PM
shiva0217 updated the diff for D61884: [RISCV] Support stack offset exceed 32-bit for RV64.

Choosing virtual register as temp register.

Sep 12 2019, 8:01 AM · Restricted Project

Sep 11 2019

shiva0217 added a comment to D61884: [RISCV] Support stack offset exceed 32-bit for RV64.

Nice, this is looking a lot better.

I chatted to @asb about this this morning, and he's not sure of the value of using t1 (if it's free) instead of any general-purpose-register. This is going to compromise how many of these instructions we can compress when the C extension is enabled. If you use a virtual register, then the register allocator can use a0-5 if it wishes, which can be compressed, unlike t1. Do you have a justification for explicitly choosing t1?

Sep 11 2019, 6:57 PM · Restricted Project
shiva0217 updated the diff for D61884: [RISCV] Support stack offset exceed 32-bit for RV64.

Update patch to address the comments.

Sep 11 2019, 7:14 AM · Restricted Project
shiva0217 added inline comments to D61884: [RISCV] Support stack offset exceed 32-bit for RV64.
Sep 11 2019, 7:11 AM · Restricted Project

Sep 10 2019

shiva0217 updated the diff for D61884: [RISCV] Support stack offset exceed 32-bit for RV64.

Using T1 as temp register for prologue/epilogue generation if there is no shrink wrapping optimization occur.

Sep 10 2019, 12:08 AM · Restricted Project

Aug 31 2019

shiva0217 committed rGadfdcb9c2652: [TargetLowering] Fix Bugzilla ID 43183 to avoid soften comparison broken with… (authored by shiva0217).
[TargetLowering] Fix Bugzilla ID 43183 to avoid soften comparison broken with…
Aug 31 2019, 9:54 PM

Aug 28 2019

shiva0217 updated the diff for D61884: [RISCV] Support stack offset exceed 32-bit for RV64.

Rebase to the trunk

Aug 28 2019, 7:00 PM · Restricted Project
shiva0217 committed rGb39876d8cddb: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating LibCall (authored by shiva0217).
[RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating LibCall
Aug 28 2019, 4:42 PM

Aug 21 2019

shiva0217 committed rG72a41e7b0d04: [TargetLowering] Remove optional arguments passing to makeLibCall (authored by shiva0217).
[TargetLowering] Remove optional arguments passing to makeLibCall
Aug 21 2019, 10:02 PM

Aug 20 2019

shiva0217 added a comment to D66278: [RISCV] Enable tail call opt for variadic function.

Hi Jim,

Aug 20 2019, 8:01 PM · Restricted Project
shiva0217 updated the diff for D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.

Add comment for the new field in MakeLibCallOptions struct.

Aug 20 2019, 6:41 PM · Restricted Project

Aug 19 2019

shiva0217 added inline comments to D62190: [RISCV] Allow shrink wrapping for RISC-V.
Aug 19 2019, 11:25 PM · Restricted Project
shiva0217 updated the diff for D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.

Update patch to reflect the comments.

Aug 19 2019, 7:45 PM · Restricted Project
shiva0217 added inline comments to D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.
Aug 19 2019, 7:35 PM · Restricted Project

Aug 8 2019

shiva0217 updated the diff for D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.

I remove the IsCastFromFloat flag and store the SDNode before soften in MakeLibCallOptions struct. So that the shouldExtendTypeInLibCall could get the original type directly and get rid of the complicate IsCastFromFloat setting method. I try to illustrate most of the single soft-float functions in rv64i-single-softfloat.ll. Please kindly remind me if I still missing something, thanks.

Aug 8 2019, 11:49 PM · Restricted Project
shiva0217 updated the diff for D65795: [TargetLowering] Remove optional arguments passing to makeLibCall.

Only define the bits will be used for makelibCall in MakeLibCallOptions struct.

Aug 8 2019, 11:33 PM · Restricted Project
shiva0217 added inline comments to D65795: [TargetLowering] Remove optional arguments passing to makeLibCall.
Aug 8 2019, 11:25 PM · Restricted Project

Aug 7 2019

shiva0217 updated the diff for D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.

Rebase the patch base on D65795 and update test cases.
Thanks for Eli's comments and Alex's excellent floating test cases that we could easily observe the difference.

Aug 7 2019, 1:17 AM · Restricted Project
shiva0217 added inline comments to D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.
Aug 7 2019, 1:06 AM · Restricted Project

Aug 6 2019

shiva0217 added inline comments to D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.
Aug 6 2019, 2:31 AM · Restricted Project
shiva0217 added a parent revision for D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall: D65795: [TargetLowering] Remove optional arguments passing to makeLibCall.
Aug 6 2019, 2:18 AM · Restricted Project
shiva0217 added a child revision for D65795: [TargetLowering] Remove optional arguments passing to makeLibCall: D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.
Aug 6 2019, 2:18 AM · Restricted Project
shiva0217 created D65795: [TargetLowering] Remove optional arguments passing to makeLibCall.
Aug 6 2019, 2:18 AM · Restricted Project

Aug 5 2019

shiva0217 committed rGb12056bd3390: [RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions (authored by shiva0217).
[RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions
Aug 5 2019, 5:24 PM

Aug 1 2019

shiva0217 updated the diff for D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.

Update the patch to catch divsf3 case.

Aug 1 2019, 7:13 PM · Restricted Project
shiva0217 added inline comments to D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.
Aug 1 2019, 7:11 PM · Restricted Project
shiva0217 updated the diff for D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.

Thanks for pointing me the right direction.
I added shouldExtendTypeInLibCall target hook to indicate the Libcall should do the extension or not.
The parameter IsCastFromFloat will be passed to TargetLowering::makeLibCall and shouldExtendTypeInLibCall. So shouldExtendTypeInLibCall can identify the Type is casting by floating and disable the extensions.
Without generating AssertZext for the Libcall return value, and operation for clearing upper bits will be preserved.

Aug 1 2019, 1:17 AM · Restricted Project

Jul 31 2019

shiva0217 added a comment to D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.

I thought the problem was in that in the complex add case, we needed to zero-extend the i32 into an i64, in order to zero the upper 32 bits. This patch seems to sign-extend the libcall instead. Is there a shouldZeroExtendTypeInLibCall callback?

Jul 31 2019, 1:13 AM · Restricted Project

Jul 30 2019

shiva0217 created D65497: [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating Libcall.
Jul 30 2019, 10:45 PM · Restricted Project
shiva0217 updated the diff for D65434: [RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions.

Updated the test cases changed by the patch.

Jul 30 2019, 6:40 PM · Restricted Project
shiva0217 created D65434: [RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions.
Jul 30 2019, 1:46 AM · Restricted Project

Jun 18 2019

shiva0217 added inline comments to D62592: [RISCV] Add support for RVC HINT instructions.
Jun 18 2019, 11:46 PM · Restricted Project

Jun 4 2019

shiva0217 added inline comments to D62592: [RISCV] Add support for RVC HINT instructions.
Jun 4 2019, 10:49 PM · Restricted Project

May 28 2019

shiva0217 added a comment to D61773: [RISCV] Add CFI directives for RISCV prologue/epilog..

Hi Kai,
We could also generate .cfi_restore for epilogue by:

unsigned CFIIndex = MF->addFrameInst(MCCFIInstruction::createRestore(
    nullptr, MRI->getDwarfRegNum(Reg, 1)));
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
    .addCFIIndex(CFIIndex);
May 28 2019, 1:20 AM · Restricted Project

May 14 2019

shiva0217 created D61884: [RISCV] Support stack offset exceed 32-bit for RV64.
May 14 2019, 1:50 AM · Restricted Project
shiva0217 added a comment to D61773: [RISCV] Add CFI directives for RISCV prologue/epilog..

Hi Kai,

May 14 2019, 1:46 AM · Restricted Project

May 9 2019

shiva0217 added a comment to D61665: [TailCall] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address.
In D61665#1496085, @asb wrote:

Yes, I think leaving the current behaviour probably makes sense. I encountered that test failure too and mask that test on the basis that that those builtins aren't documented as being guaranteed to work https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html (that page even notes that crashing is allowable behaviour).

May 9 2019, 12:14 AM · Restricted Project

May 8 2019

shiva0217 abandoned D61626: [RISCV] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address.
May 8 2019, 6:56 PM · Restricted Project
shiva0217 abandoned D61665: [TailCall] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address.

I have a few concerns here:

  1. Looping over every instruction in a function is expensive, and makes any pass which checks this for every call in a function take quadratic time overall.

It may too expansive, using function attribute as Hal's comment would be a better approach.

  1. You can't inspect the body of a function pointer, or a function in a different translation unit, so we can't make this work consistently.

Yes, we can't detect the function in a different translation unit or pointed by a function pointer.

  1. Even in the same translation unit, how do we "preserve" the behavior for values greater than 1?

Yes, disabling tail call can only preserve the stack in depth 1, it may have other optimizations change the behavior of the depth greater than one.


I'd prefer to just leave the current behavior if it isn't causing any practical problems. The user can always use -fno-optimize-sibling-calls if their codebase needs it for some reason.

If we do wish to make our "best effort" contain more effort, I think that we'd want to do this during function-attribute inference - there we can iterate over the call graph and add some inhibiting attributes. That having been said, if the only use case we have for this is matching some portion of GCC's heuristic for the purpose of making their test case pass, I'm not sure that this is worthwhile.

May 8 2019, 6:51 PM · Restricted Project
shiva0217 added a comment to D61665: [TailCall] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address.
In D61665#1494592, @asb wrote:

The description of the llvm.frameaddress and llvm.returnaddress intrinsics seems to indicate that these are "best effort" and LLVM doesn't really guarantee a correct result for a depth > 1 https://llvm.org/docs/LangRef.html#llvm-returnaddress-intrinsic https://llvm.org/docs/LangRef.html#llvm-returnaddress-intrinsic

Is there a particular use case that is improved by improving the quality of frameaddress/returnaddress results?

May 8 2019, 5:16 AM · Restricted Project

May 7 2019

shiva0217 added a comment to D61626: [RISCV] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address.

Is this really a target-independent problem?

May 7 2019, 8:12 PM · Restricted Project
shiva0217 created D61665: [TailCall] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address.
May 7 2019, 8:03 PM · Restricted Project

May 6 2019

shiva0217 created D61626: [RISCV] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address.
May 6 2019, 11:09 PM · Restricted Project

Apr 10 2019

shiva0217 committed rG7cc03bd06487: [RISCV] Put data smaller than eight bytes to small data section (authored by shiva0217).
[RISCV] Put data smaller than eight bytes to small data section
Apr 10 2019, 9:58 PM
shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Update patch to address Alex's comments.
Hi Alex, thanks for the review.

Apr 10 2019, 6:51 PM · Restricted Project

Mar 31 2019

shiva0217 accepted D59686: [RISCV] Don't evaluatePCRelLo if a relocation will be forced (e.g. due to linker relaxation).

Thanks for the update, LGTM.

Mar 31 2019, 7:19 PM · Restricted Project

Mar 29 2019

shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Update patch to address the comments from Eli and Ana.

Mar 29 2019, 2:39 AM · Restricted Project
shiva0217 added inline comments to D57493: [RISCV] Put data smaller than eight bytes to small data section.
Mar 29 2019, 2:34 AM · Restricted Project

Mar 28 2019

shiva0217 added inline comments to D57497: [RISCV] Passing small data limitation value to RISCV backend.
Mar 28 2019, 6:39 AM · Restricted Project
shiva0217 updated the diff for D57497: [RISCV] Passing small data limitation value to RISCV backend.

Add warning message for -msmall-data-limit with -fpic or RV64 with -mcmodel=large

Mar 28 2019, 5:53 AM · Restricted Project

Mar 22 2019

shiva0217 added a comment to D59686: [RISCV] Don't evaluatePCRelLo if a relocation will be forced (e.g. due to linker relaxation).

Could you add a case in option-relax.s after .option norelax to indicate the relocation type for local symbol will leave once the relaxation has been enabled?

Mar 22 2019, 7:34 AM · Restricted Project

Mar 20 2019

shiva0217 updated the diff for D57497: [RISCV] Passing small data limitation value to RISCV backend.

Update patch to address Ana's comments.

  1. Ignoring -G when -msmall-data-limit= in the command line and show the warning message
  2. Removing LTO plugin invoking which should introduce in another patch
Mar 20 2019, 11:49 PM · Restricted Project
shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Remove riscv-ssection-threshold flag because front end will pass the threshold by module flag.

Mar 20 2019, 11:42 PM · Restricted Project
shiva0217 added inline comments to D57493: [RISCV] Put data smaller than eight bytes to small data section.
Mar 20 2019, 11:32 PM · Restricted Project

Mar 14 2019

shiva0217 updated the diff for D57497: [RISCV] Passing small data limitation value to RISCV backend.

Passing small data limitation by module flag.

Mar 14 2019, 4:09 AM · Restricted Project
shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Add getModuleMetadata() to read SmallDataLimit Module flag.

Mar 14 2019, 4:09 AM · Restricted Project

Feb 19 2019

shiva0217 added a comment to D57497: [RISCV] Passing small data limitation value to RISCV backend.

Did you mean declare as a target feature in RISCV.td or I misunderstanding something?

That's sort of the right idea, but I don't think it works in this context because we aren't trying to change the generated code for a function; we actually need to stick the global into a specific section. Maybe worth sending an email to llvmdev to discuss the right way to represent this in IR?

Hi Eli,
I have sent the email to llvmdev http://lists.llvm.org/pipermail/llvm-dev/2019-February/130222.html. It seems that there're not much consensus on how to represent in IR. I incline to implement passing through -plugin-opt= as the first version. We could create an incremental patch when we have more consensus on IR approach. What do you think?

Feb 19 2019, 6:41 PM · Restricted Project

Feb 17 2019

shiva0217 committed rGe3aaeabb6da6: [RISCV] Default enable RISCV linker relaxation (authored by shiva0217).
[RISCV] Default enable RISCV linker relaxation
Feb 17 2019, 8:06 AM
shiva0217 updated the diff for D47127: [RISCV] Default enable RISCV linker relaxation.

Update patch to address Alex's comment.

Feb 17 2019, 7:44 AM · Restricted Project

Feb 11 2019

shiva0217 added a comment to D57497: [RISCV] Passing small data limitation value to RISCV backend.

If this is a target flag in GCC, shouldn't we make it a LLVM Target feature and pass it as -mattr, just like done for mrelax?

Feb 11 2019, 6:21 PM · Restricted Project

Feb 5 2019

shiva0217 updated the diff for D57497: [RISCV] Passing small data limitation value to RISCV backend.
  1. Remove passing path for LTO because Eli raised the concern that whether it would appropriate to assign the same limitation for all files when LTO enabled.
  2. Add -msmall-data-limitation= as James pointed out it's the main setting flag for RISCV GCC
Feb 5 2019, 11:33 PM · Restricted Project

Feb 3 2019

shiva0217 added a comment to D57497: [RISCV] Passing small data limitation value to RISCV backend.

I don't see -plugin-opt=-riscv-ssection-threshold=.. being passed.
tools::gnutools::Linker::ConstructJob is being invoked with target riscv32-unknown-linux-gnu
It has to work for riscv32-unknown-linux-gnu and riscv32-unknown-elf

Feb 3 2019, 6:52 PM · Restricted Project
shiva0217 updated the diff for D57497: [RISCV] Passing small data limitation value to RISCV backend.

Support passing small data limitation for target riscv32-unknown-linux-gnu with LTO enabled.

Feb 3 2019, 6:44 PM · Restricted Project
shiva0217 added a comment to D57497: [RISCV] Passing small data limitation value to RISCV backend.

Hi Shiva, I think you need to check for and pass along the -G option to the linker (gnutools::Linker and RISCV::Linker) and will be available for LTO. Check Hexagon, it passes the threshold value to the assembler (via -gpsize) and linker (via -G).

Feb 3 2019, 1:59 AM · Restricted Project
shiva0217 updated the diff for D57497: [RISCV] Passing small data limitation value to RISCV backend.
  1. Setting small data limitation to zero for PIC and RV64 with large code model.
  2. Support passing small data limitation with LTO enabled.
Feb 3 2019, 1:39 AM · Restricted Project
shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Remove guard condition for large code model which will implement in clang.

Feb 3 2019, 1:31 AM · Restricted Project

Feb 2 2019

shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Add testing for large code model.

Feb 2 2019, 5:45 PM · Restricted Project

Feb 1 2019

shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Correct the default small data limitation to 8 bytes for RV32 and RV64.
Setting the limitation to 0 for PIC.
The test case didn' add the testing line for PIC because we don't support pic yet, it will trigger "Unable to lowerGlobalAddress" error message.

Feb 1 2019, 9:40 PM · Restricted Project
shiva0217 added inline comments to D57493: [RISCV] Put data smaller than eight bytes to small data section.
Feb 1 2019, 5:37 PM · Restricted Project
shiva0217 updated the diff for D57493: [RISCV] Put data smaller than eight bytes to small data section.

Fix the issue for -G0 as Ana pointed out.

Feb 1 2019, 5:33 PM · Restricted Project

Jan 31 2019

Herald added a project to D57497: [RISCV] Passing small data limitation value to RISCV backend: Restricted Project.

As this mllvm option only affects the creation of ELF objects, do we also need to add a similar option for the LTO case, as the -G value would have no effect otherwise?

Jan 31 2019, 7:28 PM · Restricted Project

Jan 30 2019

shiva0217 added a child revision for D57493: [RISCV] Put data smaller than eight bytes to small data section: D57497: [RISCV] Passing small data limitation value to RISCV backend.
Jan 30 2019, 9:51 PM · Restricted Project
shiva0217 added a parent revision for D57497: [RISCV] Passing small data limitation value to RISCV backend: D57493: [RISCV] Put data smaller than eight bytes to small data section.
Jan 30 2019, 9:51 PM · Restricted Project
shiva0217 created D57497: [RISCV] Passing small data limitation value to RISCV backend.
Jan 30 2019, 9:48 PM · Restricted Project
shiva0217 created D57493: [RISCV] Put data smaller than eight bytes to small data section.
Jan 30 2019, 6:30 PM · Restricted Project

Jan 18 2019

shiva0217 closed D53485: [ScheduleDAGRRList] Do not preschedule the node has ADJCALLSTACKDOWN parent.

Hi Eli, Thanks for the review.

Jan 18 2019, 12:55 AM