diff options
author | Matthias Braun <matze@braunis.de> | 2017-08-23 03:17:59 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2017-08-23 03:17:59 +0000 |
commit | d44f02488c6ed07308dfb1d0ae8907c12edad82f (patch) | |
tree | 810754499f344edf9b230465d22968caccfbc0f0 /lib/CodeGen/TailDuplication.cpp | |
parent | d10d99ec2ae2bdbcc8d560b23d18268901311a8f (diff) |
Add test case for r311511
This also changes the TailDuplicator to be configured explicitely
pre/post regalloc rather than relying on the isSSA() flag. This was
necessary to have `llc -run-pass` work reliably.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TailDuplication.cpp')
-rw-r--r-- | lib/CodeGen/TailDuplication.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/TailDuplication.cpp b/lib/CodeGen/TailDuplication.cpp index 489a607eb17..131b9a22768 100644 --- a/lib/CodeGen/TailDuplication.cpp +++ b/lib/CodeGen/TailDuplication.cpp @@ -52,7 +52,10 @@ bool TailDuplicatePass::runOnMachineFunction(MachineFunction &MF) { auto MBPI = &getAnalysis<MachineBranchProbabilityInfo>(); - Duplicator.initMF(MF, MBPI, /* LayoutMode */ false); + // TODO: Querying isSSA() to determine pre-/post-regalloc is fragile, better + // split this into two passes instead. + bool PreRegAlloc = MF.getRegInfo().isSSA(); + Duplicator.initMF(MF, PreRegAlloc, MBPI, /* LayoutMode */ false); bool MadeChange = false; while (Duplicator.tailDuplicateBlocks()) |