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

Issue 14643019: Use Intrinsic::getDeclaration to obtain the nacl_read_tp intrinsic (Closed)

Created:
7 years, 7 months ago by eliben
Modified:
7 years, 7 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

The customary LLVM way of obtaining intrinsics is with Intrinsic::getDeclaration and use the definition in include/llvm/Intrinsics.td This also makes the attribute on the intrinsic to be more consistent with the back-end (code-gen), which automatically assumes it's ReadNone (because this is what Intrinsics.td) defines. Using ReadNone rather than ReadOnly may be not strictly correct because the intrinsic depends on the value of the TP. However, this attribute is not really used anywhere in IR optimizations, and in the backend the intrinsic is ReadNone anyhow (the IR setting gets overridden). If we run into any problems with this in the future, we may consider handling the lowering of this intrinsic in TargetLowering::LowerINTRINSIC_W_CHAIN rather than in TargetLowering::LowerINTRINSIC_WO_CHAIN. BUG=None R=mseaborn@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=8fe6f1f

Patch Set 1 #

Patch Set 2 : Updated description #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -13 lines) Patch
M include/llvm/IR/Intrinsics.td View 1 chunk +1 line, -2 lines 0 comments Download
M lib/Transforms/NaCl/ExpandTls.cpp View 2 chunks +2 lines, -11 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
eliben
Hi Mark, While working on the setjmp-rewrite pass, I noticed that the ExpandTls pass uses ...
7 years, 7 months ago (2013-05-14 20:04:23 UTC) #1
Mark Seaborn
On 14 May 2013 13:04, <eliben@chromium.org> wrote: > Reviewers: Mark Seaborn, > > Message: > ...
7 years, 7 months ago (2013-05-14 21:10:05 UTC) #2
eliben
Committed patchset #2 manually as r8fe6f1f (presubmit successful).
7 years, 7 months ago (2013-05-14 22:06:47 UTC) #3
Mark Seaborn
On 14 May 2013 13:04, <eliben@chromium.org> wrote: > While working on the setjmp-rewrite pass, I ...
7 years, 7 months ago (2013-05-15 22:05:07 UTC) #4
eliben
7 years, 7 months ago (2013-05-15 22:44:54 UTC) #5
Message was sent while issue was closed.
On 2013/05/15 22:05:07, Mark Seaborn wrote:
> On 14 May 2013 13:04, <mailto:eliben@chromium.org> wrote:
> 
> > While working on the setjmp-rewrite pass, I noticed that the ExpandTls
> > pass uses
> > a long-winded way to declare and obtain the llvm.nacl.read.tp intrinsic,
> > while
> > the customary way in LLVM is to use the definition in
> > include/llvm/IR/Intrinsics.td and then use Intrinsic::getDeclaration (the
> > former
> > method is only used in ExpandTls when grepping globally on LLVM, the
> > latter is
> > used in many places).
> >
> 
> BTW, if Module::getOrInsertTargetIntrinsic() isn't used or tested upstream,
> maybe it should be removed upstream?

Good point. Done in r181943

> 
> I think the reason I didn't find Intrinsic::getDeclaration() is that
> Intrinsic is a namespace and not a class, and I've mostly been using the
> class list in LLVM's Doxygen docs to navigate around (
> http://llvm.org/docs/doxygen/html/annotated.html).
> 
> Cheers,
> Mark
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:native-client-reviews+unsubscribe@googlegroups.com.
> To post to this group, send email to
mailto:native-client-reviews@googlegroups.com.
> Visit this group at
http://groups.google.com/group/native-client-reviews?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
>

Powered by Google App Engine
This is Rietveld 408576698