blob: 2239c117bc4c81448f041f7bd9be071c470a500d [file] [log] [blame]
Gordon Henriksena8a118b2008-05-08 17:46:35 +00001//===-- StructRetPromotion.cpp - Promote sret arguments ------------------===//
Devang Patelca891ec2008-02-29 23:34:08 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
Gordon Henriksena8a118b2008-05-08 17:46:35 +000010// This pass finds functions that return a struct (using a pointer to the struct
11// as the first argument of the function, marked with the 'sret' attribute) and
12// replaces them with a new function that simply returns each of the elements of
13// that struct (using multiple return values).
14//
15// This pass works under a number of conditions:
16// 1. The returned struct must not contain other structs
17// 2. The returned struct must only be used to load values from
18// 3. The placeholder struct passed in is the result of an alloca
19//
Devang Patelca891ec2008-02-29 23:34:08 +000020//===----------------------------------------------------------------------===//
21
22#define DEBUG_TYPE "sretpromotion"
23#include "llvm/Transforms/IPO.h"
24#include "llvm/Constants.h"
25#include "llvm/DerivedTypes.h"
Owen Anderson14ce9ef2009-07-06 01:34:54 +000026#include "llvm/LLVMContext.h"
Devang Patelca891ec2008-02-29 23:34:08 +000027#include "llvm/Module.h"
28#include "llvm/CallGraphSCCPass.h"
29#include "llvm/Instructions.h"
30#include "llvm/Analysis/CallGraph.h"
31#include "llvm/Support/CallSite.h"
32#include "llvm/Support/CFG.h"
33#include "llvm/Support/Debug.h"
34#include "llvm/ADT/Statistic.h"
35#include "llvm/ADT/SmallVector.h"
Devang Patel98a6e062008-03-04 17:44:37 +000036#include "llvm/ADT/Statistic.h"
Devang Patelca891ec2008-02-29 23:34:08 +000037#include "llvm/Support/Compiler.h"
Daniel Dunbar460f6562009-07-26 09:48:23 +000038#include "llvm/Support/raw_ostream.h"
Devang Patelca891ec2008-02-29 23:34:08 +000039using namespace llvm;
40
Devang Patel98a6e062008-03-04 17:44:37 +000041STATISTIC(NumRejectedSRETUses , "Number of sret rejected due to unexpected uses");
42STATISTIC(NumSRET , "Number of sret promoted");
Devang Patelca891ec2008-02-29 23:34:08 +000043namespace {
44 /// SRETPromotion - This pass removes sret parameter and updates
45 /// function to use multiple return value.
46 ///
Nick Lewycky6726b6d2009-10-25 06:33:48 +000047 struct SRETPromotion : public CallGraphSCCPass {
Devang Patelca891ec2008-02-29 23:34:08 +000048 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
49 CallGraphSCCPass::getAnalysisUsage(AU);
50 }
51
Chris Lattner5095e3d2009-08-31 00:19:58 +000052 virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC);
Devang Patelca891ec2008-02-29 23:34:08 +000053 static char ID; // Pass identification, replacement for typeid
Dan Gohmanae73dc12008-09-04 17:05:41 +000054 SRETPromotion() : CallGraphSCCPass(&ID) {}
Devang Patelca891ec2008-02-29 23:34:08 +000055
56 private:
Chris Lattner5095e3d2009-08-31 00:19:58 +000057 CallGraphNode *PromoteReturn(CallGraphNode *CGN);
Devang Patelca891ec2008-02-29 23:34:08 +000058 bool isSafeToUpdateAllCallers(Function *F);
59 Function *cloneFunctionBody(Function *F, const StructType *STy);
Chris Lattner5095e3d2009-08-31 00:19:58 +000060 CallGraphNode *updateCallSites(Function *F, Function *NF);
Devang Patela9fe8bb2008-03-04 21:32:09 +000061 bool nestedStructType(const StructType *STy);
Devang Patelca891ec2008-02-29 23:34:08 +000062 };
Devang Patelca891ec2008-02-29 23:34:08 +000063}
64
Dan Gohman844731a2008-05-13 00:00:25 +000065char SRETPromotion::ID = 0;
66static RegisterPass<SRETPromotion>
67X("sretpromotion", "Promote sret arguments to multiple ret values");
68
Devang Patelca891ec2008-02-29 23:34:08 +000069Pass *llvm::createStructRetPromotionPass() {
70 return new SRETPromotion();
71}
72
Chris Lattner5095e3d2009-08-31 00:19:58 +000073bool SRETPromotion::runOnSCC(std::vector<CallGraphNode *> &SCC) {
Devang Patelca891ec2008-02-29 23:34:08 +000074 bool Changed = false;
75
76 for (unsigned i = 0, e = SCC.size(); i != e; ++i)
Chris Lattner5095e3d2009-08-31 00:19:58 +000077 if (CallGraphNode *NewNode = PromoteReturn(SCC[i])) {
78 SCC[i] = NewNode;
79 Changed = true;
80 }
Devang Patelca891ec2008-02-29 23:34:08 +000081
82 return Changed;
83}
84
85/// PromoteReturn - This method promotes function that uses StructRet paramater
Chris Lattner5095e3d2009-08-31 00:19:58 +000086/// into a function that uses multiple return values.
87CallGraphNode *SRETPromotion::PromoteReturn(CallGraphNode *CGN) {
Devang Patelca891ec2008-02-29 23:34:08 +000088 Function *F = CGN->getFunction();
89
Rafael Espindolabb46f522009-01-15 20:18:42 +000090 if (!F || F->isDeclaration() || !F->hasLocalLinkage())
Chris Lattner5095e3d2009-08-31 00:19:58 +000091 return 0;
Devang Patelca891ec2008-02-29 23:34:08 +000092
93 // Make sure that function returns struct.
Devang Patel41e23972008-03-03 21:46:28 +000094 if (F->arg_size() == 0 || !F->hasStructRetAttr() || F->doesNotReturn())
Chris Lattner5095e3d2009-08-31 00:19:58 +000095 return 0;
Devang Patelca891ec2008-02-29 23:34:08 +000096
Daniel Dunbar460f6562009-07-26 09:48:23 +000097 DEBUG(errs() << "SretPromotion: Looking at sret function "
98 << F->getName() << "\n");
Matthijs Kooijman81ec2482008-08-07 15:14:04 +000099
Chris Lattner5095e3d2009-08-31 00:19:58 +0000100 assert(F->getReturnType() == Type::getVoidTy(F->getContext()) &&
101 "Invalid function return type");
Devang Patelca891ec2008-02-29 23:34:08 +0000102 Function::arg_iterator AI = F->arg_begin();
103 const llvm::PointerType *FArgType = dyn_cast<PointerType>(AI->getType());
Chris Lattner5095e3d2009-08-31 00:19:58 +0000104 assert(FArgType && "Invalid sret parameter type");
Devang Patelca891ec2008-02-29 23:34:08 +0000105 const llvm::StructType *STy =
106 dyn_cast<StructType>(FArgType->getElementType());
Chris Lattner5095e3d2009-08-31 00:19:58 +0000107 assert(STy && "Invalid sret parameter element type");
Devang Patelca891ec2008-02-29 23:34:08 +0000108
109 // Check if it is ok to perform this promotion.
Devang Patel98a6e062008-03-04 17:44:37 +0000110 if (isSafeToUpdateAllCallers(F) == false) {
Chris Lattnerbbbfa992009-08-23 06:35:02 +0000111 DEBUG(errs() << "SretPromotion: Not all callers can be updated\n");
Devang Patel98a6e062008-03-04 17:44:37 +0000112 NumRejectedSRETUses++;
Chris Lattner5095e3d2009-08-31 00:19:58 +0000113 return 0;
Devang Patel98a6e062008-03-04 17:44:37 +0000114 }
Devang Patelca891ec2008-02-29 23:34:08 +0000115
Chris Lattnerbbbfa992009-08-23 06:35:02 +0000116 DEBUG(errs() << "SretPromotion: sret argument will be promoted\n");
Devang Pateldf1d15c2008-03-04 17:48:11 +0000117 NumSRET++;
Devang Patelca891ec2008-02-29 23:34:08 +0000118 // [1] Replace use of sret parameter
Owen Anderson50dead02009-07-15 23:53:25 +0000119 AllocaInst *TheAlloca = new AllocaInst(STy, NULL, "mrv",
120 F->getEntryBlock().begin());
Devang Patelca891ec2008-02-29 23:34:08 +0000121 Value *NFirstArg = F->arg_begin();
122 NFirstArg->replaceAllUsesWith(TheAlloca);
123
Devang Patel98a6e062008-03-04 17:44:37 +0000124 // [2] Find and replace ret instructions
Devang Patelca891ec2008-02-29 23:34:08 +0000125 for (Function::iterator FI = F->begin(), FE = F->end(); FI != FE; ++FI)
126 for(BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ) {
127 Instruction *I = BI;
128 ++BI;
129 if (isa<ReturnInst>(I)) {
Dan Gohmanfc74abf2008-07-23 00:34:11 +0000130 Value *NV = new LoadInst(TheAlloca, "mrv.ld", I);
Owen Anderson1d0be152009-08-13 21:58:54 +0000131 ReturnInst *NR = ReturnInst::Create(F->getContext(), NV, I);
Devang Patelca891ec2008-02-29 23:34:08 +0000132 I->replaceAllUsesWith(NR);
133 I->eraseFromParent();
134 }
135 }
136
Devang Patel98a6e062008-03-04 17:44:37 +0000137 // [3] Create the new function body and insert it into the module.
Devang Patelca891ec2008-02-29 23:34:08 +0000138 Function *NF = cloneFunctionBody(F, STy);
139
Devang Patel98a6e062008-03-04 17:44:37 +0000140 // [4] Update all call sites to use new function
Chris Lattner5095e3d2009-08-31 00:19:58 +0000141 CallGraphNode *NF_CFN = updateCallSites(F, NF);
Devang Patelca891ec2008-02-29 23:34:08 +0000142
Chris Lattner5095e3d2009-08-31 00:19:58 +0000143 CallGraph &CG = getAnalysis<CallGraph>();
144 NF_CFN->stealCalledFunctionsFrom(CG[F]);
145
146 delete CG.removeFunctionFromModule(F);
147 return NF_CFN;
Devang Patelca891ec2008-02-29 23:34:08 +0000148}
149
Duncan Sands33af59d2008-05-09 12:20:10 +0000150// Check if it is ok to perform this promotion.
Devang Patelca891ec2008-02-29 23:34:08 +0000151bool SRETPromotion::isSafeToUpdateAllCallers(Function *F) {
152
153 if (F->use_empty())
154 // No users. OK to modify signature.
155 return true;
156
157 for (Value::use_iterator FnUseI = F->use_begin(), FnUseE = F->use_end();
158 FnUseI != FnUseE; ++FnUseI) {
Matthijs Kooijman257da0a2008-06-05 08:48:32 +0000159 // The function is passed in as an argument to (possibly) another function,
160 // we can't change it!
Devang Patelca891ec2008-02-29 23:34:08 +0000161 CallSite CS = CallSite::get(*FnUseI);
162 Instruction *Call = CS.getInstruction();
Matthijs Kooijman47c6fd72008-06-05 08:57:20 +0000163 // The function is used by something else than a call or invoke instruction,
164 // we can't change it!
Gabor Greifedc4d692009-01-22 21:35:57 +0000165 if (!Call || !CS.isCallee(FnUseI))
Matthijs Kooijman47c6fd72008-06-05 08:57:20 +0000166 return false;
Devang Patelca891ec2008-02-29 23:34:08 +0000167 CallSite::arg_iterator AI = CS.arg_begin();
168 Value *FirstArg = *AI;
169
170 if (!isa<AllocaInst>(FirstArg))
171 return false;
172
173 // Check FirstArg's users.
174 for (Value::use_iterator ArgI = FirstArg->use_begin(),
175 ArgE = FirstArg->use_end(); ArgI != ArgE; ++ArgI) {
176
177 // If FirstArg user is a CallInst that does not correspond to current
178 // call site then this function F is not suitable for sret promotion.
179 if (CallInst *CI = dyn_cast<CallInst>(ArgI)) {
180 if (CI != Call)
181 return false;
182 }
183 // If FirstArg user is a GEP whose all users are not LoadInst then
184 // this function F is not suitable for sret promotion.
185 else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(ArgI)) {
Devang Patele0a6a3f2008-03-05 23:39:23 +0000186 // TODO : Use dom info and insert PHINodes to collect get results
187 // from multiple call sites for this GEP.
188 if (GEP->getParent() != Call->getParent())
189 return false;
Devang Patelca891ec2008-02-29 23:34:08 +0000190 for (Value::use_iterator GEPI = GEP->use_begin(), GEPE = GEP->use_end();
191 GEPI != GEPE; ++GEPI)
192 if (!isa<LoadInst>(GEPI))
193 return false;
194 }
195 // Any other FirstArg users make this function unsuitable for sret
196 // promotion.
197 else
198 return false;
199 }
200 }
201
202 return true;
203}
204
205/// cloneFunctionBody - Create a new function based on F and
206/// insert it into module. Remove first argument. Use STy as
207/// the return type for new function.
208Function *SRETPromotion::cloneFunctionBody(Function *F,
209 const StructType *STy) {
210
Devang Patelca891ec2008-02-29 23:34:08 +0000211 const FunctionType *FTy = F->getFunctionType();
212 std::vector<const Type*> Params;
213
Devang Patel05988662008-09-25 21:00:45 +0000214 // Attributes - Keep track of the parameter attributes for the arguments.
215 SmallVector<AttributeWithIndex, 8> AttributesVec;
216 const AttrListPtr &PAL = F->getAttributes();
Devang Patel2a4821b2008-03-03 18:36:03 +0000217
218 // Add any return attributes.
Devang Patel19c87462008-09-26 22:53:05 +0000219 if (Attributes attrs = PAL.getRetAttributes())
Devang Patel05988662008-09-25 21:00:45 +0000220 AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
Devang Patel2a4821b2008-03-03 18:36:03 +0000221
Devang Patelca891ec2008-02-29 23:34:08 +0000222 // Skip first argument.
223 Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
224 ++I;
Devang Patel8f9b5512008-03-12 00:07:03 +0000225 // 0th parameter attribute is reserved for return type.
226 // 1th parameter attribute is for first 1st sret argument.
227 unsigned ParamIndex = 2;
Devang Patelca891ec2008-02-29 23:34:08 +0000228 while (I != E) {
229 Params.push_back(I->getType());
Devang Patel19c87462008-09-26 22:53:05 +0000230 if (Attributes Attrs = PAL.getParamAttributes(ParamIndex))
Devang Patel05988662008-09-25 21:00:45 +0000231 AttributesVec.push_back(AttributeWithIndex::get(ParamIndex - 1, Attrs));
Devang Patelca891ec2008-02-29 23:34:08 +0000232 ++I;
Devang Patel2a4821b2008-03-03 18:36:03 +0000233 ++ParamIndex;
Devang Patelca891ec2008-02-29 23:34:08 +0000234 }
235
Devang Patel19c87462008-09-26 22:53:05 +0000236 // Add any fn attributes.
237 if (Attributes attrs = PAL.getFnAttributes())
238 AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
239
240
Owen Andersondebcb012009-07-29 22:17:13 +0000241 FunctionType *NFTy = FunctionType::get(STy, Params, FTy->isVarArg());
Matthijs Kooijman7d942002008-08-07 16:01:23 +0000242 Function *NF = Function::Create(NFTy, F->getLinkage());
243 NF->takeName(F);
Duncan Sands28c3cff2008-05-26 19:58:59 +0000244 NF->copyAttributesFrom(F);
Devang Patel05988662008-09-25 21:00:45 +0000245 NF->setAttributes(AttrListPtr::get(AttributesVec.begin(), AttributesVec.end()));
Devang Patelca891ec2008-02-29 23:34:08 +0000246 F->getParent()->getFunctionList().insert(F, NF);
247 NF->getBasicBlockList().splice(NF->begin(), F->getBasicBlockList());
248
249 // Replace arguments
250 I = F->arg_begin();
251 E = F->arg_end();
252 Function::arg_iterator NI = NF->arg_begin();
253 ++I;
254 while (I != E) {
Chris Lattner5095e3d2009-08-31 00:19:58 +0000255 I->replaceAllUsesWith(NI);
256 NI->takeName(I);
257 ++I;
258 ++NI;
Devang Patelca891ec2008-02-29 23:34:08 +0000259 }
260
261 return NF;
262}
263
264/// updateCallSites - Update all sites that call F to use NF.
Chris Lattner5095e3d2009-08-31 00:19:58 +0000265CallGraphNode *SRETPromotion::updateCallSites(Function *F, Function *NF) {
Duncan Sandsa9c32512008-09-08 11:08:09 +0000266 CallGraph &CG = getAnalysis<CallGraph>();
Devang Patelca891ec2008-02-29 23:34:08 +0000267 SmallVector<Value*, 16> Args;
268
Devang Patel05988662008-09-25 21:00:45 +0000269 // Attributes - Keep track of the parameter attributes for the arguments.
270 SmallVector<AttributeWithIndex, 8> ArgAttrsVec;
Devang Patel2a4821b2008-03-03 18:36:03 +0000271
Chris Lattner5095e3d2009-08-31 00:19:58 +0000272 // Get a new callgraph node for NF.
273 CallGraphNode *NF_CGN = CG.getOrInsertFunction(NF);
274
Matthijs Kooijmanc1f1d462008-08-14 15:03:05 +0000275 while (!F->use_empty()) {
276 CallSite CS = CallSite::get(*F->use_begin());
Devang Patelca891ec2008-02-29 23:34:08 +0000277 Instruction *Call = CS.getInstruction();
278
Devang Patel05988662008-09-25 21:00:45 +0000279 const AttrListPtr &PAL = F->getAttributes();
Devang Patel2a4821b2008-03-03 18:36:03 +0000280 // Add any return attributes.
Devang Patel19c87462008-09-26 22:53:05 +0000281 if (Attributes attrs = PAL.getRetAttributes())
Devang Patel05988662008-09-25 21:00:45 +0000282 ArgAttrsVec.push_back(AttributeWithIndex::get(0, attrs));
Devang Patel2a4821b2008-03-03 18:36:03 +0000283
Devang Patelca891ec2008-02-29 23:34:08 +0000284 // Copy arguments, however skip first one.
285 CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end();
286 Value *FirstCArg = *AI;
287 ++AI;
Devang Patel8f9b5512008-03-12 00:07:03 +0000288 // 0th parameter attribute is reserved for return type.
289 // 1th parameter attribute is for first 1st sret argument.
290 unsigned ParamIndex = 2;
Devang Patelca891ec2008-02-29 23:34:08 +0000291 while (AI != AE) {
292 Args.push_back(*AI);
Devang Patel19c87462008-09-26 22:53:05 +0000293 if (Attributes Attrs = PAL.getParamAttributes(ParamIndex))
Devang Patel05988662008-09-25 21:00:45 +0000294 ArgAttrsVec.push_back(AttributeWithIndex::get(ParamIndex - 1, Attrs));
Devang Patel2a4821b2008-03-03 18:36:03 +0000295 ++ParamIndex;
Devang Patelca891ec2008-02-29 23:34:08 +0000296 ++AI;
297 }
298
Devang Patel19c87462008-09-26 22:53:05 +0000299 // Add any function attributes.
300 if (Attributes attrs = PAL.getFnAttributes())
301 ArgAttrsVec.push_back(AttributeWithIndex::get(~0, attrs));
Chris Lattner58d74912008-03-12 17:45:29 +0000302
Devang Patel05988662008-09-25 21:00:45 +0000303 AttrListPtr NewPAL = AttrListPtr::get(ArgAttrsVec.begin(), ArgAttrsVec.end());
Chris Lattner58d74912008-03-12 17:45:29 +0000304
Devang Patelca891ec2008-02-29 23:34:08 +0000305 // Build new call instruction.
306 Instruction *New;
307 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
Gabor Greif051a9502008-04-06 20:25:17 +0000308 New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(),
309 Args.begin(), Args.end(), "", Call);
Devang Patelca891ec2008-02-29 23:34:08 +0000310 cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv());
Devang Patel05988662008-09-25 21:00:45 +0000311 cast<InvokeInst>(New)->setAttributes(NewPAL);
Devang Patelca891ec2008-02-29 23:34:08 +0000312 } else {
Gabor Greif051a9502008-04-06 20:25:17 +0000313 New = CallInst::Create(NF, Args.begin(), Args.end(), "", Call);
Devang Patelca891ec2008-02-29 23:34:08 +0000314 cast<CallInst>(New)->setCallingConv(CS.getCallingConv());
Devang Patel05988662008-09-25 21:00:45 +0000315 cast<CallInst>(New)->setAttributes(NewPAL);
Devang Patelca891ec2008-02-29 23:34:08 +0000316 if (cast<CallInst>(Call)->isTailCall())
317 cast<CallInst>(New)->setTailCall();
318 }
319 Args.clear();
Devang Patel544b92b2008-03-04 19:12:58 +0000320 ArgAttrsVec.clear();
Devang Patelca891ec2008-02-29 23:34:08 +0000321 New->takeName(Call);
322
Duncan Sandsa9c32512008-09-08 11:08:09 +0000323 // Update the callgraph to know that the callsite has been transformed.
Chris Lattnerda230cb2009-09-01 18:52:39 +0000324 CallGraphNode *CalleeNode = CG[Call->getParent()->getParent()];
325 CalleeNode->removeCallEdgeFor(Call);
326 CalleeNode->addCalledFunction(New, NF_CGN);
Chris Lattner7c8c1ba2009-09-01 18:50:55 +0000327
Dan Gohmanfc74abf2008-07-23 00:34:11 +0000328 // Update all users of sret parameter to extract value using extractvalue.
Devang Patelca891ec2008-02-29 23:34:08 +0000329 for (Value::use_iterator UI = FirstCArg->use_begin(),
330 UE = FirstCArg->use_end(); UI != UE; ) {
331 User *U2 = *UI++;
332 CallInst *C2 = dyn_cast<CallInst>(U2);
333 if (C2 && (C2 == Call))
334 continue;
Chris Lattner5095e3d2009-08-31 00:19:58 +0000335
Chris Lattner7c8c1ba2009-09-01 18:50:55 +0000336 GetElementPtrInst *UGEP = cast<GetElementPtrInst>(U2);
337 ConstantInt *Idx = cast<ConstantInt>(UGEP->getOperand(2));
338 Value *GR = ExtractValueInst::Create(New, Idx->getZExtValue(),
339 "evi", UGEP);
340 while(!UGEP->use_empty()) {
341 // isSafeToUpdateAllCallers has checked that all GEP uses are
342 // LoadInsts
343 LoadInst *L = cast<LoadInst>(*UGEP->use_begin());
344 L->replaceAllUsesWith(GR);
345 L->eraseFromParent();
Devang Patelca891ec2008-02-29 23:34:08 +0000346 }
Chris Lattner7c8c1ba2009-09-01 18:50:55 +0000347 UGEP->eraseFromParent();
348 continue;
Devang Patelca891ec2008-02-29 23:34:08 +0000349 }
350 Call->eraseFromParent();
351 }
Chris Lattner5095e3d2009-08-31 00:19:58 +0000352
353 return NF_CGN;
Devang Patelca891ec2008-02-29 23:34:08 +0000354}
Devang Patela9fe8bb2008-03-04 21:32:09 +0000355
356/// nestedStructType - Return true if STy includes any
357/// other aggregate types
358bool SRETPromotion::nestedStructType(const StructType *STy) {
359 unsigned Num = STy->getNumElements();
360 for (unsigned i = 0; i < Num; i++) {
361 const Type *Ty = STy->getElementType(i);
Owen Anderson1d0be152009-08-13 21:58:54 +0000362 if (!Ty->isSingleValueType() && Ty != Type::getVoidTy(STy->getContext()))
Devang Patela9fe8bb2008-03-04 21:32:09 +0000363 return true;
364 }
365 return false;
366}