[llvm] r257620 - [WebAssemly] Invalidate liveness in CFG stackifier
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 14:30:58 PST 2016
Not yet. On trunk, wasm is running the BranchFolding pass which invalidates
liveness before this pass runs and so the problem never gets triggered. I'm
experimenting with requiring passes to opt-in to support virtual registers
(so I disabled BranchFolding) and got the problem. I'm planning to post to
llvm-dev shortly with more on that.
On Wed, Jan 13, 2016 at 1:54 PM David Blaikie <dblaikie at gmail.com> wrote:
> On Wed, Jan 13, 2016 at 9:10 AM, Derek Schuff via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: dschuff
>> Date: Wed Jan 13 11:10:28 2016
>> New Revision: 257620
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=257620&view=rev
>> Log:
>> [WebAssemly] Invalidate liveness in CFG stackifier
>>
>> WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing
>> verifier failure if liveness has not already been invalidated.
>>
>
> Got a test for this?
>
>
>>
>> Modified:
>> llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
>>
>> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp?rev=257620&r1=257619&r2=257620&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
>> (original)
>> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp Wed Jan
>> 13 11:10:28 2016
>> @@ -34,6 +34,7 @@
>> #include "llvm/CodeGen/MachineFunction.h"
>> #include "llvm/CodeGen/MachineInstrBuilder.h"
>> #include "llvm/CodeGen/MachineLoopInfo.h"
>> +#include "llvm/CodeGen/MachineRegisterInfo.h"
>> #include "llvm/CodeGen/Passes.h"
>> #include "llvm/Support/Debug.h"
>> #include "llvm/Support/raw_ostream.h"
>> @@ -475,7 +476,9 @@ bool WebAssemblyCFGStackify::runOnMachin
>>
>> const auto &MLI = getAnalysis<MachineLoopInfo>();
>> auto &MDT = getAnalysis<MachineDominatorTree>();
>> + // Liveness is not tracked for EXPR_STACK physreg.
>> const auto &TII =
>> *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
>> + MF.getRegInfo().invalidateLiveness();
>>
>> // RPO sorting needs all loops to be single-entry.
>> EliminateMultipleEntryLoops(MF, MLI);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160113/a4873e59/attachment.html>
More information about the llvm-commits
mailing list