Move lower intrinsics before FP constant emission, in case
authorChris Lattner <sabre@nondot.org>
Sun, 5 Dec 2004 06:49:44 +0000 (06:49 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 5 Dec 2004 06:49:44 +0000 (06:49 +0000)
intrinsic lowering ever introduces constants.

Rename local symbols before printing function bodies, fixing 255.vortex
with the CBE!!!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18534 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index d71a568d288a848e46adbb0a00f4f81971c6b591..40800b9d434a6894148d072b4364a095f7effc6f 100644 (file)
@@ -85,10 +85,15 @@ namespace {
     bool runOnFunction(Function &F) {
       LI = &getAnalysis<LoopInfo>();
 
+      // Get rid of intrinsics we can't handle.
+      lowerIntrinsics(F);
+
       // Output all floating point constants that cannot be printed accurately.
       printFloatingPointConstants(F);
-  
-      lowerIntrinsics(F);
+
+      // Ensure that no local symbols conflict with global symbols.
+      F.renameLocalSymbols();
+
       printFunction(F);
       FPConstantMap.clear();
       return false;
index d71a568d288a848e46adbb0a00f4f81971c6b591..40800b9d434a6894148d072b4364a095f7effc6f 100644 (file)
@@ -85,10 +85,15 @@ namespace {
     bool runOnFunction(Function &F) {
       LI = &getAnalysis<LoopInfo>();
 
+      // Get rid of intrinsics we can't handle.
+      lowerIntrinsics(F);
+
       // Output all floating point constants that cannot be printed accurately.
       printFloatingPointConstants(F);
-  
-      lowerIntrinsics(F);
+
+      // Ensure that no local symbols conflict with global symbols.
+      F.renameLocalSymbols();
+
       printFunction(F);
       FPConstantMap.clear();
       return false;