From: Dan Gohman Date: Wed, 25 Nov 2015 18:13:18 +0000 (+0000) Subject: [WebAssembly] Clean up several FIXME comments. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=553ab96017d6e77f0529270baa9e508f713b9282 [WebAssembly] Clean up several FIXME comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254079 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp index 8a2cf1ad46e..8e02a03ecd2 100644 --- a/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp +++ b/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp @@ -65,7 +65,7 @@ void WebAssemblyFrameLowering::eliminateCallFramePseudoInstr( void WebAssemblyFrameLowering::emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const { - // FIXME: Implement WebAssemblyFrameLowering::emitPrologue. + llvm_unreachable("TODO: implement emitPrologue"); } void WebAssemblyFrameLowering::emitEpilogue(MachineFunction &MF, diff --git a/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp b/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp index 8a02c910ba1..8390f797c43 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp +++ b/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp @@ -87,7 +87,7 @@ SDNode *WebAssemblyDAGToDAGISel::Select(SDNode *Node) { switch (Node->getOpcode()) { default: break; - // FIXME: Implement WebAssembly-specific selection. + // If we need WebAssembly-specific selection, it would go here. (void)VT; } diff --git a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 4febdb088cf..405a2a977a0 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -38,7 +38,8 @@ using namespace llvm; 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. @@ -387,7 +388,8 @@ SDValue WebAssemblyTargetLowering::LowerFormalArguments( 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, diff --git a/lib/Target/WebAssembly/WebAssemblyInstrMemory.td b/lib/Target/WebAssembly/WebAssemblyInstrMemory.td index 3b6c6cb933e..f0cc02ada65 100644 --- a/lib/Target/WebAssembly/WebAssemblyInstrMemory.td +++ b/lib/Target/WebAssembly/WebAssemblyInstrMemory.td @@ -12,7 +12,7 @@ /// //===----------------------------------------------------------------------===// -// FIXME: +// TODO: // - HasAddr64 // - WebAssemblyTargetLowering::isLegalAddressingMode // - WebAssemblyTargetLowering having to do with atomics diff --git a/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp b/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp index 8a300373421..0c9ffb3a8e7 100644 --- a/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp +++ b/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp @@ -54,7 +54,7 @@ WebAssemblyRegisterInfo::getReservedRegs(const MachineFunction &MF) const { 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 diff --git a/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index 493e4be18dc..29332940b76 100644 --- a/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -134,9 +134,8 @@ FunctionPass *WebAssemblyPassConfig::createTargetRegisterAllocator(bool) { //===----------------------------------------------------------------------===// 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 @@ -168,8 +167,9 @@ void WebAssemblyPassConfig::addPreRegAlloc() { } 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);