As the comments indicate, this is a temporary, repulsive, hack
authorChris Lattner <sabre@nondot.org>
Thu, 13 Nov 2003 19:26:54 +0000 (19:26 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 13 Nov 2003 19:26:54 +0000 (19:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9982 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccas/gccas.cpp

index c7a2204e32dffd966eda4eb7dc238cdc64d1970a..0ed58b97db5365e1a7919da1d73776507780bf84 100644 (file)
@@ -70,6 +70,12 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
     addPass(PM, createFunctionInliningPass());   // Inline small functions
 
   addPass(PM, createInstructionCombiningPass()); // Cleanup code for raise
+
+  // HACK HACK HACK.  This pass should be extended to support calls like 'call
+  // (const expr cast (free))(Ty *).  Until it does so, we have to run it after
+  // instruction combining.  This should be removed after PLDI!
+  addPass(PM, createRaiseAllocationsPass());     // call %malloc -> malloc inst
+
   addPass(PM, createRaisePointerReferencesPass());// Recover type information
   addPass(PM, createTailDuplicationPass());      // Simplify cfg by copying code
   addPass(PM, createCFGSimplificationPass());    // Merge & remove BBs