mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +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:
@ -17,6 +17,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/CaptureTracking.h"
|
||||
#include "llvm/Analysis/MallocHelper.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/Value.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
@ -48,6 +49,9 @@ bool llvm::PointerMayBeCaptured(const Value *V, bool ReturnCaptures) {
|
||||
|
||||
switch (I->getOpcode()) {
|
||||
case Instruction::Call:
|
||||
if (isFreeCall(I))
|
||||
// Freeing a pointer does not cause it to be captured.
|
||||
break;
|
||||
case Instruction::Invoke: {
|
||||
CallSite CS = CallSite::get(I);
|
||||
// Not captured if the callee is readonly, doesn't return a copy through
|
||||
@ -73,9 +77,6 @@ bool llvm::PointerMayBeCaptured(const Value *V, bool ReturnCaptures) {
|
||||
// captured.
|
||||
break;
|
||||
}
|
||||
case Instruction::Free:
|
||||
// Freeing a pointer does not cause it to be captured.
|
||||
break;
|
||||
case Instruction::Load:
|
||||
// Loading from a pointer does not cause it to be captured.
|
||||
break;
|
||||
|
Reference in New Issue
Block a user