[project @ 2000-09-11 08:13:37 by simonpj]
authorsimonpj <unknown>
Mon, 11 Sep 2000 08:13:37 +0000 (08:13 +0000)
committersimonpj <unknown>
Mon, 11 Sep 2000 08:13:37 +0000 (08:13 +0000)
Remove redundant setNoDiscardId call from Specialise.newIdSM

ghc/compiler/specialise/Specialise.lhs

index 5f865c2..cf55186 100644 (file)
@@ -1140,15 +1140,12 @@ newIdSM old_id new_ty
   = getUniqSM          `thenSM` \ uniq ->
     let 
        -- Give the new Id a similar occurrence name to the old one
+       -- We used to add setIdNoDiscard if the old id was exported, to
+       -- avoid it being dropped as dead code, but that's not necessary any more.
        name   = idName old_id
        new_id = mkUserLocal (mkSpecOcc (nameOccName name)) uniq new_ty (getSrcLoc name)
-
-       -- If the old Id was exported, make the new one non-discardable,
-       -- else we will discard it since it doesn't seem to be called.
-       new_id' | isExportedId old_id = setIdNoDiscard new_id
-               | otherwise           = new_id
     in
-    returnSM new_id'
+    returnSM new_id
 
 newTyVarSM
   = getUniqSM          `thenSM` \ uniq ->