Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Issue 27690005: [MIPS] Modify LongBranch expansion to work with sandboxing (Closed)

Created:
7 years, 2 months ago by petarj
Modified:
6 years, 9 months ago
Reviewers:
Mark Seaborn
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/pnacl-llvm.git@master
Visibility:
Public.

Description

[MIPS] Modify LongBranch expansion to work with sandboxing LongBranch expansion replaces direct branches with indirect jumps in cases when branch can not reach the target. This assumes the distance from the target will not change, which is not the case for Native Client and its sandboxing. For NativeClient, we need to provide flexible LongBranch expansion that does not rely on the current offset from the target but it defers offset calculation to the fixup phase after sandboxing is done. In addition, criteria for LongBranch expansion are more rigid to prevent the case when the current offset is near but below the threshold yet the sandboxing pass make it cross the threshold. BUG= issue found with a large function in llc while compiling pnacl-llc.nexe TEST= build pnacl-llc.nexe for MIPS

Patch Set 1 #

Total comments: 8

Patch Set 2 : Test case added. #

Patch Set 3 : Update. #

Total comments: 20

Patch Set 4 : Changes per code review. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -22 lines) Patch
M lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp View 1 2 3 2 chunks +44 lines, -1 line 2 comments Download
M lib/Target/Mips/MipsInstrInfo.td View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M lib/Target/Mips/MipsLongBranch.cpp View 1 2 3 4 chunks +85 lines, -21 lines 0 comments Download
M lib/Target/Mips/MipsMCInstLower.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M lib/Target/Mips/MipsMCInstLower.cpp View 1 2 3 2 chunks +78 lines, -0 lines 0 comments Download
A test/MC/Mips/nacl-long-branch.ll View 1 2 3 1 chunk +89 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
petarj
PTAL.
7 years, 2 months ago (2013-10-17 18:05:23 UTC) #1
Mark Seaborn
Can you add an llvm-lit test for this, please? This would be easier to understand ...
7 years, 2 months ago (2013-10-17 19:00:10 UTC) #2
petarj
A test case has been added. PTAL. https://codereview.chromium.org/27690005/diff/1/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp File lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp (right): https://codereview.chromium.org/27690005/diff/1/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp#newcode122 lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp:122: // @LOCALMOD-START ...
7 years, 2 months ago (2013-10-22 23:10:26 UTC) #3
Mark Seaborn
It took me a while to get my head around this... https://codereview.chromium.org/27690005/diff/58001/include/llvm/MC/MCExpr.h File include/llvm/MC/MCExpr.h (right): ...
7 years, 2 months ago (2013-10-24 23:38:43 UTC) #4
petarj
New patch uploaded. PTAL. Thanks. Petar https://codereview.chromium.org/27690005/diff/58001/include/llvm/MC/MCExpr.h File include/llvm/MC/MCExpr.h (right): https://codereview.chromium.org/27690005/diff/58001/include/llvm/MC/MCExpr.h#newcode221 include/llvm/MC/MCExpr.h:221: VK_Mips_NACL_LONG_BRANCH_HI16, On 2013/10/24 ...
7 years, 1 month ago (2013-11-21 18:23:42 UTC) #5
petarj
On 2013/11/21 18:23:42, petarj wrote: > New patch uploaded. PTAL. > > Thanks. > Petar ...
7 years ago (2013-11-25 16:57:33 UTC) #6
petarj
On 2013/11/25 16:57:33, petarj wrote: > On 2013/11/21 18:23:42, petarj wrote: > > New patch ...
7 years ago (2013-11-28 00:12:16 UTC) #7
Mark Seaborn
https://codereview.chromium.org/27690005/diff/188001/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp File lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp (right): https://codereview.chromium.org/27690005/diff/188001/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp#newcode109 lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp:109: void processFixupValue(const MCAssembler &Asm, const MCAsmLayout &Layout, Can you ...
7 years ago (2013-11-28 03:37:02 UTC) #8
Mark Seaborn
On 27 November 2013 19:37, <mseaborn@chromium.org> wrote: > https://codereview.chromium.org/27690005/diff/188001/lib/ > Target/Mips/MCTargetDesc/MipsAsmBackend.cpp > File lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp (right): ...
7 years ago (2013-12-11 21:57:05 UTC) #9
petarj
On 2013/12/11 21:57:05, Mark Seaborn wrote: > Ping. Is my request OK? Am I right ...
7 years ago (2013-12-11 22:36:03 UTC) #10
Mark Seaborn
6 years, 9 months ago (2014-03-15 00:29:29 UTC) #11
Message was sent while issue was closed.
Since Sasa Stankovic has sent me an upstream patch to implement this now
(http://llvm-reviews.chandlerc.com/D3089), I'll close this review.

Powered by Google App Engine
This is Rietveld 408576698