[PATCH] D76389: [NewPM] Run the Speculative Execution Pass if the target has divergent branches

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 18 15:13:46 PDT 2020


leonardchan created this revision.
leonardchan added reviewers: chandlerc, arsenm, nhaehnle.
leonardchan added a project: LLVM.
Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya, wdng.
Herald added a project: clang.

The `SpeculativeExecutionPass` was running under the new PM for non-GPU targets. It appears that the pass would run regardless as long as speed optimizations were available.

In this patch:

- Split the `SpeculativeExecutionPass` into a separate one (`SpeculativeExecutionIfHasBranchDivergencePass`) that mirrors the 2 passes in the legacy PM
- Replace the `SpeculativeExecutionPass` with `SpeculativeExecutionIfHasBranchDivergencePass` in the new PM pipeline
- Update tests that expected the previous pass when running


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76389

Files:
  clang/test/CodeGen/thinlto-distributed-newpm.ll
  llvm/include/llvm/Transforms/Scalar/SpeculativeExecution.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-thinlto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76389.251182.patch
Type: text/x-patch
Size: 9336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200318/2900af1a/attachment-0001.bin>


More information about the cfe-commits mailing list