|
41 | 41 | #include "llvm/IR/MatrixBuilder.h" |
42 | 42 | #include "llvm/Passes/OptimizationLevel.h" |
43 | 43 | #include "llvm/Support/ConvertUTF.h" |
44 | | -#include "llvm/Support/Debug.h" |
45 | 44 | #include "llvm/Support/MathExtras.h" |
46 | 45 | #include "llvm/Support/Path.h" |
47 | 46 | #include "llvm/Support/SaveAndRestore.h" |
|
51 | 50 | #include <optional> |
52 | 51 | #include <string> |
53 | 52 |
|
54 | | -#define DEBUG_TYPE "CGExpr" |
55 | | - |
56 | 53 | using namespace clang; |
57 | 54 | using namespace CodeGen; |
58 | 55 |
|
@@ -118,21 +115,12 @@ RawAddress CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, CharUnits Align, |
118 | 115 | llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, |
119 | 116 | const Twine &Name, |
120 | 117 | llvm::Value *ArraySize) { |
121 | | - LLVM_DEBUG(llvm::dbgs() << "DEBUG: " << Name << "\n";); |
122 | 118 | llvm::AllocaInst *Alloca; |
123 | 119 | if (ArraySize) |
124 | 120 | Alloca = Builder.CreateAlloca(Ty, ArraySize, Name); |
125 | | - else { |
| 121 | + else |
126 | 122 | Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), |
127 | 123 | ArraySize, Name, AllocaInsertPt); |
128 | | - if (Ty->isIntegerTy()) { |
129 | | - llvm::IRBuilder<> StoreFreezePoisonBuilder(Alloca->getContext()); |
130 | | - StoreFreezePoisonBuilder.SetInsertPoint(getPostAllocaInsertPoint()); |
131 | | - auto FreezePoison = StoreFreezePoisonBuilder.CreateFreeze( |
132 | | - llvm::PoisonValue::get(Ty), "freeze"); |
133 | | - StoreFreezePoisonBuilder.CreateStore(FreezePoison, Alloca); |
134 | | - } |
135 | | - } |
136 | 124 | if (Allocas) { |
137 | 125 | Allocas->Add(Alloca); |
138 | 126 | } |
|
0 commit comments