mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Remove FreeInst.
Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -5486,26 +5486,6 @@ void SelectionDAGLowering::visitInlineAsm(CallSite CS) {
|
||||
DAG.setRoot(Chain);
|
||||
}
|
||||
|
||||
void SelectionDAGLowering::visitFree(FreeInst &I) {
|
||||
TargetLowering::ArgListTy Args;
|
||||
TargetLowering::ArgListEntry Entry;
|
||||
Entry.Node = getValue(I.getOperand(0));
|
||||
Entry.Ty = TLI.getTargetData()->getIntPtrType(*DAG.getContext());
|
||||
Args.push_back(Entry);
|
||||
EVT IntPtr = TLI.getPointerTy();
|
||||
bool isTailCall = PerformTailCallOpt &&
|
||||
isInTailCallPosition(&I, Attribute::None, TLI);
|
||||
std::pair<SDValue,SDValue> Result =
|
||||
TLI.LowerCallTo(getRoot(), Type::getVoidTy(*DAG.getContext()),
|
||||
false, false, false, false,
|
||||
0, CallingConv::C, isTailCall,
|
||||
/*isReturnValueUsed=*/true,
|
||||
DAG.getExternalSymbol("free", IntPtr), Args, DAG,
|
||||
getCurDebugLoc());
|
||||
if (Result.second.getNode())
|
||||
DAG.setRoot(Result.second);
|
||||
}
|
||||
|
||||
void SelectionDAGLowering::visitVAStart(CallInst &I) {
|
||||
DAG.setRoot(DAG.getNode(ISD::VASTART, getCurDebugLoc(),
|
||||
MVT::Other, getRoot(),
|
||||
|
@@ -44,7 +44,6 @@ class FPExtInst;
|
||||
class FPToSIInst;
|
||||
class FPToUIInst;
|
||||
class FPTruncInst;
|
||||
class FreeInst;
|
||||
class Function;
|
||||
class GetElementPtrInst;
|
||||
class GCFunctionInfo;
|
||||
@@ -528,7 +527,6 @@ private:
|
||||
void visitGetElementPtr(User &I);
|
||||
void visitSelect(User &I);
|
||||
|
||||
void visitFree(FreeInst &I);
|
||||
void visitAlloca(AllocaInst &I);
|
||||
void visitLoad(LoadInst &I);
|
||||
void visitStore(StoreInst &I);
|
||||
|
Reference in New Issue
Block a user