LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 32184 - PowerPC - llc is spewing remarks in latest build
Summary: PowerPC - llc is spewing remarks in latest build
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llc (show other bugs)
Version: 4.0
Hardware: Other Linux
: P normal
Assignee: Eric Schweitz
URL:
Keywords:
Depends on:
Blocks: release-4.0.1
  Show dependency tree
 
Reported: 2017-03-08 15:11 PST by Eric Schweitz
Modified: 2017-04-03 18:28 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments
Fix (542 bytes, patch)
2017-03-08 16:29 PST, Adam Nemet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Schweitz 2017-03-08 15:11:22 PST
My latest build of the 4.0 branch is generating a lot of remarks, though I'm not explicitly asking for them.

llvm/4.0/bin/llc /tmp/5-oROzlY7V8.llvm -mcpu=native -O2 -code-model=large -o /tmp/X-ot2IA_JlK.s
remark: foobar.cpp:1150:1: failed to move load with loop-invariant address because the loop may invalidate its value
…
Comment 1 Adam Nemet 2017-03-08 15:37:56 PST
I'll try to reproduce.
Comment 2 Adam Nemet 2017-03-08 16:23:54 PST
OK, that's probably because PPC schedules an IR LICM pass unlike other targets?
Comment 3 Adam Nemet 2017-03-08 16:27:58 PST
OK, reproduced:

$ ./bin/llc ../test/Transforms/LICM/opt-remarks-intervening-store.ll  -O2 -march=ppc64
remark: /tmp/kk.c:2:20: failed to move load with loop-invariant address because the loop may invalidate its value
Comment 4 Adam Nemet 2017-03-08 16:29:21 PST
Created attachment 18068 [details]
Fix

The attached patch fixes it for me.
Comment 5 Adam Nemet 2017-03-08 16:32:57 PST
Hans, can you please commit this to the 4.0 branch?  This is a partial backport of r293110 from trunk.
Comment 6 Hans Wennborg 2017-03-08 16:39:53 PST
I suppose this regressed with r291648?

We're very late in the release process and I was hoping to promote rc4 to final today. I would rather not do an rc5.

How bad is this? Could it be emitting remarks for Clang even if users haven't asked for them?
Comment 7 Hans Wennborg 2017-03-08 16:41:14 PST
(In reply to Hans Wennborg from comment #6)
> How bad is this? Could it be emitting remarks for Clang even if users
> haven't asked for them?

Oh wait, your patch is for llc.

I don't think we can hold the release for this.
Comment 8 Adam Nemet 2017-03-08 16:43:08 PST
Sure.  Can you still commit it on the branch for me?
Comment 9 Hal Finkel 2017-03-08 16:43:55 PST
(In reply to Hans Wennborg from comment #7)
> (In reply to Hans Wennborg from comment #6)
> > How bad is this? Could it be emitting remarks for Clang even if users
> > haven't asked for them?
> 
> Oh wait, your patch is for llc.
> 
> I don't think we can hold the release for this.

I agree, we shouldn't hold the release. It should end up in the release branch for the point release, however.
Comment 10 Hans Wennborg 2017-03-08 16:45:06 PST
(In reply to Hal Finkel from comment #9)
> (In reply to Hans Wennborg from comment #7)
> > (In reply to Hans Wennborg from comment #6)
> > > How bad is this? Could it be emitting remarks for Clang even if users
> > > haven't asked for them?
> > 
> > Oh wait, your patch is for llc.
> > 
> > I don't think we can hold the release for this.
> 
> I agree, we shouldn't hold the release. It should end up in the release
> branch for the point release, however.

Yes. Please file a blocker against 32061 for that.
Comment 11 Adam Nemet 2017-03-08 16:52:18 PST
Done.
Comment 12 Adam Nemet 2017-03-21 09:19:24 PDT
Eric, can you please confirm if this fixes the problem for you too?
Comment 13 Eric Schweitz 2017-03-21 17:54:07 PDT
(In reply to Adam Nemet from comment #12)
> Eric, can you please confirm if this fixes the problem for you too?

Hi Adam, can you tell me what commit to look for? Thanks in advance.
Comment 14 Adam Nemet 2017-03-21 18:10:37 PDT
Eric, please apply the patch attached to this bug.  It's not yet committed I think.
Comment 15 Eric Schweitz 2017-03-23 09:33:02 PDT
The patch looks good. Not sure about "resolved" status though, since it does not appear to be checked in.
Comment 16 Adam Nemet 2017-03-23 09:34:28 PDT
Thanks.  Good point on the status, moved it back.

When Hans checks it in we can move it back to RESOLVED.
Comment 17 Adam Nemet 2017-04-03 10:28:36 PDT
Description of the bug for the 4.0.1 release:

Partial merge of r293110 into the 4.0 branch:

Avoid printing optimization remarks from llc unless they are enabled.
Comment 18 Tom Stellard 2017-04-03 18:28:35 PDT
Merged: r299409