SuccessChanges

Summary

  1. [SCEV] Change an early exit to an assert; NFC
  2. update the test file that was omitted in r309478.
  3. Refine the PGOOpt and SamplePGOSupport handling. Summary: Now that SamplePGOSupport is part of PGOOpt, there are several places that need tweaking: 1. AddDiscriminator pass should *not* be invoked at ThinLTOBackend (as it's already invoked in the PreLink phase) 2. addPGOInstrPasses should only be invoked when either ProfileGenFile or ProfileUseFile is non-empty. 3. SampleProfileLoaderPass should only be invoked when SampleProfileFile is non-empty. 4. PGOIndirectCallPromotion should only be invoked in ProfileUse phase, or in ThinLTOBackend of SamplePGO. Reviewers: chandlerc, tejohnson, davidxl Reviewed By: chandlerc Subscribers: sanjoy, mehdi_amini, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D36040
  4. AMDGPU: Remove deadcode from AMDGPUInstPrinter Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D36034
  5. AMDGPU: Move INDIRECT_BASE_ADDR definition out of common files Summary: This is only used by R600. Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D35926
  6. [MachineOutliner] NFC: Change IsTailCall to a call class + frame class This commit - Removes IsTailCall and replaces it with a target-defined unsigned - Refactors getOutliningCallOverhead and getOutliningFrameOverhead so that they don't use IsTailCall - Adds a call class + frame class classification to OutlinedFunction and Candidate respectively This accomplishes a couple things. Firstly, we don't need the notion of *tail call* in the general outlining algorithm. Secondly, we now can have different "outlining classes" for each candidate within a set of candidates. This will make it easy to add new ways to outline sequences for certain targets and dynamically choose an appropriate cost model for a sequence depending on the context that that sequence lives in. Ultimately, this should get us closer to being able to do something like, say avoid saving the link register when outlining AArch64 instructions.
  7. [libc++] Hoist extern template above first use This function template is referenced inside class basic_string as a friend function. The extern template declaration needs to be above that friend declaration to actually take effect. This is important because this function was marked as exported in r307966, so without the extern template taking effect, it can leak into other DSOs as a visible symbol.
  8. lit::shtest-format.py: Make write-bad-encoding.py py3-aware. Traceback (most recent call last): File "llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py", line 5, in <module> sys.stdout.write(b"a line with bad encoding: \xc2.") sys.stdout.write doesn't accept bytes but sys.stdout.buffer.write accepts.
Revision 309480 by sanjoy:
[SCEV] Change an early exit to an assert; NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Analysis/ScalarEvolution.cppllvm.src/lib/Analysis/ScalarEvolution.cpp
Revision 309479 by dehao:
update the test file that was omitted in r309478.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Other/new-pm-pgo.llllvm.src/test/Other/new-pm-pgo.ll
Revision 309478 by dehao:
Refine the PGOOpt and SamplePGOSupport handling.

Summary:
Now that SamplePGOSupport is part of PGOOpt, there are several places that need tweaking:
1. AddDiscriminator pass should *not* be invoked at ThinLTOBackend (as it's already invoked in the PreLink phase)
2. addPGOInstrPasses should only be invoked when either ProfileGenFile or ProfileUseFile is non-empty.
3. SampleProfileLoaderPass should only be invoked when SampleProfileFile is non-empty.
4. PGOIndirectCallPromotion should only be invoked in ProfileUse phase, or in ThinLTOBackend of SamplePGO.

Reviewers: chandlerc, tejohnson, davidxl

Reviewed By: chandlerc

Subscribers: sanjoy, mehdi_amini, eraman, llvm-commits

Differential Revision: https://reviews.llvm.org/D36040
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Passes/PassBuilder.hllvm.src/include/llvm/Passes/PassBuilder.h
The file was modified/llvm/trunk/lib/Passes/PassBuilder.cppllvm.src/lib/Passes/PassBuilder.cpp
The file was modified/llvm/trunk/test/Other/new-pm-thinlto-defaults.llllvm.src/test/Other/new-pm-thinlto-defaults.ll
Revision 309477 by tstellar:
AMDGPU: Remove deadcode from AMDGPUInstPrinter

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye

Differential Revision: https://reviews.llvm.org/D36034
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cppllvm.src/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.hllvm.src/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h
The file was modified/llvm/trunk/lib/Target/AMDGPU/R600Instructions.tdllvm.src/lib/Target/AMDGPU/R600Instructions.td
Revision 309476 by tstellar:
AMDGPU: Move INDIRECT_BASE_ADDR definition out of common files

Summary: This is only used by R600.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye

Differential Revision: https://reviews.llvm.org/D35926
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterInfo.tdllvm.src/lib/Target/AMDGPU/AMDGPURegisterInfo.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/R600RegisterInfo.tdllvm.src/lib/Target/AMDGPU/R600RegisterInfo.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cppllvm.src/lib/Target/AMDGPU/SIRegisterInfo.cpp
Revision 309475 by paquette:
[MachineOutliner] NFC: Change IsTailCall to a call class + frame class

This commit

- Removes IsTailCall and replaces it with a target-defined unsigned
- Refactors getOutliningCallOverhead and getOutliningFrameOverhead so that they don't use IsTailCall
- Adds a call class + frame class classification to OutlinedFunction and Candidate respectively

This accomplishes a couple things.

Firstly, we don't need the notion of *tail call* in the general outlining algorithm.

Secondly, we now can have different "outlining classes" for each candidate within a set of candidates.
This will make it easy to add new ways to outline sequences for certain targets and dynamically choose
an appropriate cost model for a sequence depending on the context that that sequence lives in.

Ultimately, this should get us closer to being able to do something like, say avoid saving the link
register when outlining AArch64 instructions.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Target/TargetInstrInfo.hllvm.src/include/llvm/Target/TargetInstrInfo.h
The file was modified/llvm/trunk/lib/CodeGen/MachineOutliner.cppllvm.src/lib/CodeGen/MachineOutliner.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cppllvm.src/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.hllvm.src/lib/Target/AArch64/AArch64InstrInfo.h
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.cppllvm.src/lib/Target/X86/X86InstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86InstrInfo.hllvm.src/lib/Target/X86/X86InstrInfo.h
Revision 309474 by smeenai:
[libc++] Hoist extern template above first use

This function template is referenced inside class basic_string as a
friend function. The extern template declaration needs to be above that
friend declaration to actually take effect.

This is important because this function was marked as exported in
r307966, so without the extern template taking effect, it can leak into
other DSOs as a visible symbol.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/include/stringlibcxx.src/include/string
Revision 309473 by chapuni:
lit::shtest-format.py: Make write-bad-encoding.py py3-aware.

  Traceback (most recent call last):
    File "llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py", line 5, in <module>
      sys.stdout.write(b"a line with bad encoding: \xc2.")

sys.stdout.write doesn't accept bytes but sys.stdout.buffer.write accepts.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.pyllvm.src/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py