This is an archive of the discontinued LLVM Phabricator instance.

[X86] Making X86OptimizeLEAs pass public. NFC
ClosedPublic

Authored by gpei on Aug 8 2019, 2:32 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

gpei created this revision.Aug 8 2019, 2:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2019, 2:32 AM

I'm happy with making this pass properly public, but I'm not sure what you're gaining from splitting off X86MemOpKey.h - are you intending to reuse that code someplace else?

gpei added a comment.Aug 9 2019, 4:18 AM

I'm happy with making this pass properly public, but I'm not sure what you're gaining from splitting off X86MemOpKey.h - are you intending to reuse that code someplace else?

It’s useful to us and it seemed like a generally good code reorganization.

I'm happy with making this pass properly public, but I'm not sure what you're gaining from splitting off X86MemOpKey.h - are you intending to reuse that code someplace else?

It’s useful to us and it seemed like a generally good code reorganization.

In which case I'd recommend splitting the X86MemOpKey.h change into a separate followup patch and making this patch just about making the pass public.

gpei updated this revision to Diff 214606.Aug 12 2019, 5:16 AM
gpei retitled this revision from [X86] Simpily X86OptimizeLEAs.cpp. NFC to [X86] Making X86OptimizeLEAs pass public. NFC.
gpei edited the summary of this revision. (Show Details)

Not sure we should consider this NFC any more

@craig.topper Any comments?

llvm/lib/Target/X86/X86.h
146 ↗(On Diff #214606)

Naming convention: initializeX86OptimizeLEAPassPass

Address those two comments and I'm happy.

llvm/lib/Target/X86/X86.h
146 ↗(On Diff #214606)

Alphabetize also.

gpei updated this revision to Diff 215609.Aug 16 2019, 8:36 AM
RKSimon added inline comments.Aug 16 2019, 8:40 AM
llvm/lib/Target/X86/X86TargetMachine.cpp
84 ↗(On Diff #215609)

There's no need to reorder this - @craig.topper 's comment was about sorting the definitions in X86.h

gpei updated this revision to Diff 215614.Aug 16 2019, 9:05 AM
gpei updated this revision to Diff 215623.Aug 16 2019, 9:28 AM
gpei marked an inline comment as done.

please rebase on rL369126

llvm/lib/Target/X86/X86.h
146 ↗(On Diff #214606)
void initializeX86FlagsCopyLoweringPassPass(PassRegistry &);
void initializeX86OptimizeLEAPassPass(PassRegistry &);
void initializeX86SpeculativeLoadHardeningPassPass(PassRegistry &);
gpei updated this revision to Diff 215634.Aug 16 2019, 10:46 AM
gpei marked an inline comment as done.
RKSimon added inline comments.Aug 19 2019, 2:51 AM
llvm/lib/Target/X86/X86.h
146 ↗(On Diff #214606)

Still not alphabetized

gpei updated this revision to Diff 216050.Aug 19 2019, 8:10 PM
gpei marked 2 inline comments as done.
RKSimon accepted this revision.Aug 20 2019, 3:00 AM

LGTM - you just need to clang-format X86OptimizeLEAs.cpp as the addition of "X86" has screwed up indentations.

llvm/lib/Target/X86/X86OptimizeLEAs.cpp
311 ↗(On Diff #216050)

clang-format

393 ↗(On Diff #216050)

clang-format

417 ↗(On Diff #216050)

clang-format

570 ↗(On Diff #216050)

clang-format

This revision is now accepted and ready to land.Aug 20 2019, 3:00 AM
gpei updated this revision to Diff 216320.Aug 20 2019, 7:28 PM
RKSimon accepted this revision.Aug 21 2019, 5:53 AM

LGTM

This revision was automatically updated to reflect the committed changes.