void WebAssemblyFrameLowering::emitPrologue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
- // FIXME: Implement WebAssemblyFrameLowering::emitPrologue.
+ llvm_unreachable("TODO: implement emitPrologue");
}
void WebAssemblyFrameLowering::emitEpilogue(MachineFunction &MF,
switch (Node->getOpcode()) {
default:
break;
- // FIXME: Implement WebAssembly-specific selection.
+ // If we need WebAssembly-specific selection, it would go here.
(void)VT;
}
namespace {
// Diagnostic information for unimplemented or unsupported feature reporting.
-// FIXME copied from BPF and AMDGPU.
+// TODO: This code is copied from BPF and AMDGPU; consider factoring it out
+// and sharing code.
class DiagnosticInfoUnsupported final : public DiagnosticInfo {
private:
// Debug location where this diagnostic is triggered.
fail(DL, DAG, "WebAssembly hasn't implemented cons regs arguments");
if (In.Flags.isInConsecutiveRegsLast())
fail(DL, DAG, "WebAssembly hasn't implemented cons regs last arguments");
- // FIXME Do something with In.getOrigAlign()?
+ // Ignore In.getOrigAlign() because all our arguments are passed in
+ // registers.
InVals.push_back(
In.Used
? DAG.getNode(WebAssemblyISD::ARGUMENT, DL, In.VT,
///
//===----------------------------------------------------------------------===//
-// FIXME:
+// TODO:
// - HasAddr64
// - WebAssemblyTargetLowering::isLegalAddressingMode
// - WebAssemblyTargetLowering having to do with atomics
void WebAssemblyRegisterInfo::eliminateFrameIndex(
MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum,
RegScavenger *RS) const {
- llvm_unreachable("WebAssemblyRegisterInfo::eliminateFrameIndex"); // FIXME
+ llvm_unreachable("TODO: implement WebAssemblyRegisterInfo::eliminateFrameIndex");
}
unsigned
//===----------------------------------------------------------------------===//
void WebAssemblyPassConfig::addIRPasses() {
- // FIXME: the default for this option is currently POSIX, whereas
- // WebAssembly's MVP should default to Single.
if (TM->Options.ThreadModel == ThreadModel::Single)
+ // In "single" mode, atomics get lowered to non-atomics.
addPass(createLowerAtomicPass());
else
// Expand some atomic operations. WebAssemblyTargetLowering has hooks which
}
void WebAssemblyPassConfig::addPostRegAlloc() {
- // FIXME: the following passes dislike virtual registers. Disable them for now
- // so that basic tests can pass. Future patches will remedy this.
+ // TODO: The following CodeGen passes don't currently support code containing
+ // virtual registers. Consider removing their restrictions and re-enabling
+ // them.
//
// Fails with: Regalloc must assign all vregs.
disablePass(&PrologEpilogCodeInserterID);