[WebAssembly] Clean up several FIXME comments.
authorDan Gohman <dan433584@gmail.com>
Wed, 25 Nov 2015 18:13:18 +0000 (18:13 +0000)
committerDan Gohman <dan433584@gmail.com>
Wed, 25 Nov 2015 18:13:18 +0000 (18:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254079 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyInstrMemory.td
lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp

index 8a2cf1ad46e2fd32f9959dfdf9697bfabb596a79..8e02a03ecd264b488cb6a979d84cc3f5b666725a 100644 (file)
@@ -65,7 +65,7 @@ void WebAssemblyFrameLowering::eliminateCallFramePseudoInstr(
 
 void WebAssemblyFrameLowering::emitPrologue(MachineFunction &MF,
                                             MachineBasicBlock &MBB) const {
 
 void WebAssemblyFrameLowering::emitPrologue(MachineFunction &MF,
                                             MachineBasicBlock &MBB) const {
-  // FIXME: Implement WebAssemblyFrameLowering::emitPrologue.
+  llvm_unreachable("TODO: implement emitPrologue");
 }
 
 void WebAssemblyFrameLowering::emitEpilogue(MachineFunction &MF,
 }
 
 void WebAssemblyFrameLowering::emitEpilogue(MachineFunction &MF,
index 8a02c910ba1e88dc7fa65fe2a35e4edb85c72c14..8390f797c43ec3cf758f17bd4f926d3dacb3dfe8 100644 (file)
@@ -87,7 +87,7 @@ SDNode *WebAssemblyDAGToDAGISel::Select(SDNode *Node) {
   switch (Node->getOpcode()) {
   default:
     break;
   switch (Node->getOpcode()) {
   default:
     break;
-    // FIXME: Implement WebAssembly-specific selection.
+    // If we need WebAssembly-specific selection, it would go here.
     (void)VT;
   }
 
     (void)VT;
   }
 
index 4febdb088cf93bf3e4a32003845364d11249b649..405a2a977a0ab1bf6743d0344fb792288a623cd3 100644 (file)
@@ -38,7 +38,8 @@ using namespace llvm;
 
 namespace {
 // Diagnostic information for unimplemented or unsupported feature reporting.
 
 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.
 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");
       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,
     InVals.push_back(
         In.Used
             ? DAG.getNode(WebAssemblyISD::ARGUMENT, DL, In.VT,
index 3b6c6cb933efc729d3729c2ff89d561f11830a03..f0cc02ada6579f0f3c185102fd6af5525a477aaf 100644 (file)
@@ -12,7 +12,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
 ///
 //===----------------------------------------------------------------------===//
 
-// FIXME:
+// TODO:
 //  - HasAddr64
 //  - WebAssemblyTargetLowering::isLegalAddressingMode
 //  - WebAssemblyTargetLowering having to do with atomics
 //  - HasAddr64
 //  - WebAssemblyTargetLowering::isLegalAddressingMode
 //  - WebAssemblyTargetLowering having to do with atomics
index 8a300373421cfe01fc22b7dfcb9bb57c0b51642e..0c9ffb3a8e7b260f5b47433bfb69a8c63708cd9b 100644 (file)
@@ -54,7 +54,7 @@ WebAssemblyRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
 void WebAssemblyRegisterInfo::eliminateFrameIndex(
     MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum,
     RegScavenger *RS) 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
 }
 
 unsigned
index 493e4be18dc6a1aba0298988f6e86ed33365474c..29332940b76f39c6bc69e2b97fe132247f7196ae 100644 (file)
@@ -134,9 +134,8 @@ FunctionPass *WebAssemblyPassConfig::createTargetRegisterAllocator(bool) {
 //===----------------------------------------------------------------------===//
 
 void WebAssemblyPassConfig::addIRPasses() {
 //===----------------------------------------------------------------------===//
 
 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)
   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
     addPass(createLowerAtomicPass());
   else
     // Expand some atomic operations. WebAssemblyTargetLowering has hooks which
@@ -168,8 +167,9 @@ void WebAssemblyPassConfig::addPreRegAlloc() {
 }
 
 void WebAssemblyPassConfig::addPostRegAlloc() {
 }
 
 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);
   //
   // Fails with: Regalloc must assign all vregs.
   disablePass(&PrologEpilogCodeInserterID);