Page MenuHomePhabricator

yechunliang (Chris Ye)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 6 2019, 8:30 AM (10 w, 1 d)

Recent Activity

Today

yechunliang added a comment to D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

@bjope, @vsk: Thanks very much for the comments, really help me.

Wed, Oct 16, 2:43 AM · Restricted Project

Yesterday

yechunliang updated the diff for D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

fix typo of patch description

Tue, Oct 15, 5:45 AM · Restricted Project
yechunliang updated the diff for D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

Rethink about this issue and the root cause should be caused by use_empty. Just resubmitted the patch with "[InlineFunction] Erase use_empty allocas when inline".

Tue, Oct 15, 5:39 AM · Restricted Project
yechunliang added a comment to D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

! In D68633#1699421, @bjope wrote:
So I think that the solution might be based on one of these ideas:

  1. Remove the check for use_empty in the outer loop.
  2. Add a check for !use_empty in the inner loop.
  3. Remove the inner loop (i.e only splice one alloca at a time).

    Alternative 3 would be the simplest. If there really is a speedup on doing fewer splices, then alternative 2 still moves consequtive !use_empty allocas in batches. The idea with alternative 2 is to split batches on allocas that has no uses (as they are handled in the outer loop). Alternative 1 might work assuming that allocas with no uses are cleaned up somewhere else. But I think this alternative is the least interesting one.
Tue, Oct 15, 1:12 AM · Restricted Project

Fri, Oct 11

yechunliang added a comment to D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

So the root cause is rather that we treat an alloca being immediately preceeded by another alloca differrently from the case when it is preceeded by another kind of instruction. This happens also when having other instructions in between, and is not specific to dbg intrinsics (could be interesting to add a test case where you replace the dbg intrinsics by something else).

Yes I think so, if the other instruction is not dbg instr which exist between two allocas, the InlineFunction with and without "-strip-debug" will make the same behavior, that should both erase second use_empty alloca. This patch is to fix the issue that debug instr impact InlineFunction generate different output.

Fri, Oct 11, 4:09 AM · Restricted Project

Thu, Oct 10

yechunliang updated the diff for D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

Update patch:

  1. Use BasicBlock::iterator skipDebugIntrinsics instead of rolling directly. The recommend API BasicBlock:: instructionsWithoutDebug() looks not very suitable to handle llvm::Instruction in this code.
  2. follow llvm style, condition: break first, then unconditionally execute the code
Thu, Oct 10, 8:02 PM · Restricted Project
yechunliang added a comment to D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

The code is written in a way that it skips any instruction, but moves contigous blocks of allocas in one splice (not sure exactly why, is that really faster?).

Thu, Oct 10, 7:22 PM · Restricted Project
yechunliang updated the diff for D68633: [utils] InlineFunction: fix for debug info affecting optimizations.

[inline] skip dbg info when scan allocas

Thu, Oct 10, 7:35 AM · Restricted Project

Tue, Oct 8

yechunliang added a comment to D68004: [InstCombine] Fix call guard difference with dbg.

just added updated test, could some one help to review again? thanks.

Tue, Oct 8, 5:28 AM · Restricted Project
yechunliang updated the diff for D68004: [InstCombine] Fix call guard difference with dbg.

Added one more RUN command line with "-debugify-each" in existed call-guard.ll, needn't duplicate another same test case file.

Tue, Oct 8, 5:28 AM · Restricted Project
yechunliang created D68633: [utils] InlineFunction: fix for debug info affecting optimizations.
Tue, Oct 8, 4:14 AM · Restricted Project

Wed, Sep 25

yechunliang updated the diff for D68004: [InstCombine] Fix call guard difference with dbg.

thanks for review. add test case with --debugify-each based on previous call-guard.ll

Wed, Sep 25, 7:03 PM · Restricted Project

Tue, Sep 24

yechunliang updated the diff for D68004: [InstCombine] Fix call guard difference with dbg.

[InstCombine] Fix call guard difference with dbg

Tue, Sep 24, 7:45 PM · Restricted Project
yechunliang created D68004: [InstCombine] Fix call guard difference with dbg.
Tue, Sep 24, 6:48 PM · Restricted Project

Sep 2 2019

yechunliang updated the diff for D66467: [Codegen] skip debug instr to avoid code change.

update branch-folder-with-debug.mir follow the review comments

  • update CHECK block lines before successors check
  • Add "CHECK-NEXT" for successors after block
  • Simplify address after successors block
  • move RUN line to top and add more descriptions.
Sep 2 2019, 7:40 PM · Restricted Project

Aug 27 2019

yechunliang added a comment to D66467: [Codegen] skip debug instr to avoid code change.

@djtodoro thanks for review, followed your comments and guide from https://llvm.org/docs/MIRLangRef.html#id14, I have simplified mir test code by removing all unnecessary code for FileCheck.
"llc -o - test.mir -mtriple=x86_64-- -run-pass=branch-folder | FileCheck test.mir"

Aug 27 2019, 6:10 PM · Restricted Project
yechunliang updated the diff for D66467: [Codegen] skip debug instr to avoid code change.

Simplify MIR test case

Aug 27 2019, 5:38 PM · Restricted Project

Aug 26 2019

yechunliang updated the diff for D66467: [Codegen] skip debug instr to avoid code change.

add branch-folder-with-debug.mir test

Aug 26 2019, 12:56 AM · Restricted Project

Aug 21 2019

yechunliang added reviewers for D66467: [Codegen] skip debug instr to avoid code change: HsiangKai, petarj.

Please allow me to add Hsiangkai and Petar as reviewer, as you had contributed related patches about debug and CFI instruction skipping. Thanks.

Aug 21 2019, 2:23 AM · Restricted Project
yechunliang added a comment to D66467: [Codegen] skip debug instr to avoid code change.

thanks for review and comments. While adding test code, found another error about "unnamed alloca" before branch-folder by llc, I'll investigate the issue before submit the test code.

Aug 21 2019, 2:12 AM · Restricted Project

Aug 20 2019

yechunliang created D66467: [Codegen] skip debug instr to avoid code change.
Aug 20 2019, 4:02 AM · Restricted Project